首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >java.lang.NoClassDefFoundError: com/sap/conn/jco/JCoException错误

java.lang.NoClassDefFoundError: com/sap/conn/jco/JCoException错误
EN

Stack Overflow用户
提问于 2017-02-14 00:22:41
回答 1查看 3.1K关注 0票数 1
代码语言:javascript
复制
java.lang.NoClassDefFoundError: com/sap/conn/jco/JCoException
    at testSAP.TestSAP.execute(TestSAP.java:41) ~[na:na]
    at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:406) ~[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:330) ~[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) ~[spring-tx-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:271) ~[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:81) ~[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374) ~[spring-batch-infrastructure-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215) ~[spring-batch-infrastructure-3.0.5.RELEASE.jar:3.0.5.RELEA

我有下面提到的我的POM.xml -

代码语言:javascript
复制
<dependency>
  <groupId>com.sap.conn.jco</groupId>
  <artifactId>sapjco3</artifactId>
  <version>3.0.15</version>
  <scope>system</scope>
  <systemPath>${pom.basedir}\src\main\resources\sapjco3.jar</systemPath>
</dependency>

我还添加了指向jco3.jar文件的Class-Path环境变量和指向jco库文件夹的Path变量。当直接在eclipse中运行代码时,它正在工作,也给出了输出。但是当我在spring xd服务器上部署maven构建过程中生成的jar时,它没有得到jco jar文件的引用。请帮帮忙。如果你需要更多的澄清,请告诉我。

EN

回答 1

Stack Overflow用户

发布于 2017-02-14 18:15:16

您可以考虑打包依赖项:

How can I create an executable JAR with dependencies using Maven?

或者检查您正在运行已编译jar的类路径,以确保包含sapjco3.jar。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42208792

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档