Java Spring XD分布式运行时-JDBCHDFS作业获取“未能初始化读取器”

Java Spring XD分布式运行时-JDBCHDFS作业获取“未能初始化读取器”,java,spring,spring-mvc,hadoop,spring-xd,Java,Spring,Spring Mvc,Hadoop,Spring Xd,我们正试图使用SpringXD环境中的批处理作业将外部数据源表SQLServer2012拉入hadoop系统 运行以下作业后: 作业状态失败后尝试了以下操作: 我们在SpringXD的分布式模式下运行。 因此,尝试使用以下命令部署不同的容器 job deploy jobname --properties "module.jdbchdfs.criteria=host.equals('host1.acme.com')" job deploy jobname --properties "module

我们正试图使用SpringXD环境中的批处理作业将外部数据源表SQLServer2012拉入hadoop系统

运行以下作业后:

作业状态失败后尝试了以下操作:

我们在SpringXD的分布式模式下运行。 因此,尝试使用以下命令部署不同的容器

job deploy jobname --properties "module.jdbchdfs.criteria=host.equals('host1.acme.com')"

job deploy jobname --properties "module.jdbchdfs.criteria=host.equals('host2.acme.com')"
获取“出口描述”

获取更多错误:

用于调试的容器日志包括:

问题是:

当我们在作业定义中提供sql选项时 由于向上弹簧xd未能初始化读卡器,因此从tablename unpivot选择*, 但同时如果我们能提供 从tablename中选择*成功执行作业*

**Any help would be much appreciated ?**

你能发布完整的堆栈跟踪吗?应该有一个更有用的方法。另外,驱动程序通常通过lib目录对作业可用吗?是的,我想发布完整的堆栈跟踪。我们已将剩余的堆栈跟踪添加到“获取更多错误”部分。当我访问$xd_home/lib时,发现以下驱动程序可用于作业sqljdbc4.jar、sqljdbc.jar。请发布,否则我们无法帮助您。我们有作业执行详细信息,包括以下两个执行步骤:我们在这里介绍。这是spring-xd图形用户界面中列出的完整堆栈跟踪。我们应该在这里粘贴container.log吗?
org.springframework.batch.item.ItemStreamException: Failed to initialize the reader
    at org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader.open(AbstractItemCountingItemStreamItemReader.java:147)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
    at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
    at com.sun.proxy.$Proxy471.open(Unknown Source)
    at org.springframework.batch.item.support.CompositeItemStream.open(CompositeItemStream.java:96)
    at org.springframework.batch.core.step.tasklet.TaskletStep.open(TaskletStep.java:310)
    at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:195)
    at org.springframework.batch.integration.partition.StepExecutionRequestHandler.handle(StepExecutionRequestHandler.java:64)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.springframework.expression.spel.support.ReflectiveMethodExecutor.execute(ReflectiveMethodExecutor.java:112)
    at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:129)
    at org.springframework.expression.spel.ast.MethodReference.access$000(MethodReference.java:49)
    at org.springframework.expression.spel.ast.MethodReference$MethodValueRef.getValue(MethodReference.java:342)
    at org.springframework.expression.spel.ast.CompoundExpressio
org.springframework.batch.core.JobExecutionException: Partition handler returned an unsuccessful step
    at org.springframework.batch.core.partition.support.PartitionStep.doExecute(PartitionStep.java:112)
    at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:198)
    at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)
    at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64)
    at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:67)
    at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:165)
    at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144)
    at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:134)
    at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:304)
    at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135)
    at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
    at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:128)
    at sun.reflect.GeneratedMethodAccessor122.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.batch.core.configuration.annotation.SimpleBatchConfiguration$PassthruAdvice.invoke(SimpleBatchConfiguration.java:127)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
    at com.sun.proxy.$Proxy52.run(Unknown Source)
    at org.springframework.batch.integration.launch.JobLaunchingMessageHandler.launch(JobLaunchingMessageHandler.java:50)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.refl
2015-10-21T16:40:59-0400 1.2.1.RELEASE INFO CuratorFramework-0-EventThread container.DeploymentListener - Undeploying module [ModuleDescriptor@45e9256d moduleName = 'jdbchdfs', moduleLabel = 'jdbchdfs', group = 'jobname', sourceChannelName = [null], sinkChannelName = [null], index = 0, type = job, parameters = map['fileExtension' -> 'csv', 'partitions' -> '1', 'testOnBorrow' -> 'false', 'driverClassName' -> 'com.microsoft.sqlserver.jdbc.SQLServerDriver', 'password' -> 'password', 'url' -> 'jdbc:sqlserver://hostname:port;database=databasename', 'delimiter' -> ';', 'username' -> 'user', 'sql' -> ''select t1.* from (select ROW_NUMBER() OVER (ORDER BY GroupBy4KPI,Name DESC) AS ID, GETDATE() as time,Name,budget,CASE WHEN bmon='BudMnt1' THEN CONVERT(DATE, '01-JAN-2015') WHEN bmon='BudMnt2' THEN CONVERT(DATE, '01-FEB-2015') WHEN bmon='BudMnt3' THEN CONVERT(DATE, '01-MAR-2015') WHEN bmon='BudMnt4' THEN CONVERT(DATE, '01-APR-2015') WHEN bmon='BudMnt5' THEN CONVERT(DATE, '01-MAY-2015') WHEN bmon='BudMnt6' THEN CONVERT(DATE, '01-JUN-2015') WHEN bmon='BudMnt7' THEN CONVERT(DATE, '01-JUL-2015') WHEN bmon='BudMnt8' THEN CONVERT(DATE, '01-AUG-2015') WHEN bmon='BudMnt9' THEN CONVERT(DATE, '01-SEP-2015') WHEN bmon='BudMnt10' THEN CONVERT(DATE, '01-OCT-2015') WHEN bmon='BudMnt11' THEN CONVERT(DATE, '01-NOV-2015') WHEN bmon='BudMnt12' THEN CONVERT(DATE, '01-DEC-2015')END AS bmon from dbo.tablename UNPIVOT (budget FOR bmon IN(BudMnt1,BudMnt2,BudMnt3,BudMnt4,BudMnt5,BudMnt6,BudMnt7,BudMnt8,BudMnt9,BudMnt10,BudMnt11,BudMnt12)) as p) t1'', 'directory' -> '/path/to/hdfs/', 'fsUri' -> 'hdfs://HOSTNAME-HA', 'fileName' -> 'rev', 'makeUnique' -> 'true'], children = list[[empty]]]
2015-10-21T16:40:59-0400 1.2.1.RELEASE INFO DeploymentsPathChildrenCache-0 container.DeploymentListener - Path cache event: path=/deployments/modules/allocated/ee07615a-4051-477d-962f-400582136d23/trev_bycorpclass_stg0.job.jdbchdfs.1, type=CHILD_REMOVED
2015-10-21T16:47:30-0400 1.2.1.RELEASE INFO DeploymentsPathChildrenCache-0 container.DeploymentListener - Path cache event: path=/deployments/modules/allocated/ee07615a-4051-477d-962f-400582136d23/kpi_stg0.job.jdbchdfs.1, type=CHILD_ADDED
2015-10-21T16:47:31-0400 1.2.1.RELEASE WARN DeploymentsPathChildrenCache-0 config.ReleaseStrategyFactoryBean - No annotated method found; falling back to SequenceSizeReleaseStrategy, target:org.springframework.batch.integration.partition.MessageChannelPartitionHandler@311776a3, methodName:null
2015-10-21T17:49:10-0400 1.2.1.RELEASE INFO DeploymentsPathChildrenCache-0 container.DeploymentListener - Path cache event: path=/deployments/modules/allocated/ee07615a-4051-477d-962f-400582136d23/jobname.job.jdbchdfs.1, type=CHILD_ADDED
2015-10-21T17:49:10-0400 1.2.1.RELEASE INFO DeploymentsPathChildrenCache-0 container.DeploymentListener - Deploying job 'jobname'
2015-10-21T17:49:10-0400 1.2.1.RELEASE INFO DeploymentsPathChildrenCache-0 container.DeploymentListener - Deploying module [ModuleDescriptor@5ef4ee27 moduleName = 'jdbchdfs', moduleLabel = 'jdbchdfs', group = 'jobname', sourceChannelName = [null], sinkChannelName = [null], index = 0, type = job, parameters = map['fileExtension' -> 'csv', 'partitions' -> '1', 'testOnBorrow' -> 'false', 'driverClassName' -> 'com.microsoft.sqlserver.jdbc.SQLServerDriver', 'password' -> 'password', 'url' -> 'jdbc:sqlserver://hostname:port;database=databasename', 'delimiter' -> ';', 'username' -> 'user', 'sql' -> 'select ROW_NUMBER() OVER (ORDER BY GroupBy4KPI,Name DESC) AS ID, GETDATE() as time from tablename', 'directory' -> '/path/to/hdfs/', 'fsUri' -> 'hdfs://HOSTNAME-HA', 'fileName' -> 'rev', 'makeUnique' -> 'true'], children = list[[empty]]]
2015-10-21T17:49:11-0400 1.2.1.RELEASE WARN DeploymentsPathChildrenCache-0 config.ReleaseStrategyFactoryBean - No annotated method found; falling back to SequenceSizeReleaseStrategy, target:org.springframework.batch.integration.partition.MessageChannelPartitionHandler@6cc0c6f2, methodName:null
**Any help would be much appreciated ?**