2017-02-13 9 views
1
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 

- 私もへのClass-Path環境変数ポインティングを追加したjava.lang.NoClassDefFoundErrorが:COM/SAP/CONN/JCO/JCoExceptionエラーの下に述べたように、私は私のpom.xmlを持って

<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ファイルおよびPath変数ポインティングjcoライブラリフォルダー。 eclipseでコードを直接実行している間は、出力を出しています。 しかし、mavenビルド中に生成されたjarファイルをspring xdサーバーにデプロイすると、jco jarファイルの参照が取得されません。助けてください。 詳しい説明が必要な場合はお知らせください。

Screenshot of my Package Structure

+0

https://myarch.com/classnotfound/ - 役立つ場合は、いくつかのチェックリスト。 Jarフォルダを解凍し、見つからないクラスが実際に存在することを確認してください。 –

答えて

0

あなたは依存関係をパッケージ考えることができます:

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

か、sapjco3.jarのが含まれていることを確認するために、コンパイル済みのjarファイルを実行している、あなたのクラスパスを確認してください。

関連する問題