linux - executable jar made by STS errors out -


i made java-batch on sts in windows, , transfer jar(made maven install) , property files centos(ver,7). when executed, error occurred. logs below: note bbbb01 program name.

can me..!

yyyy-mm-dd 13:49:33,413 error commandlinejobrunner - job terminated in error: error creating bean name 'bbbb01configuration': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private org.springframework.batch.core.repository.jobrepository com.batch.xxxxx.bbbb01configuration.jobrepository; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'jobrepository': invocation of init method failed; nested exception org.springframework.jdbc.support.metadataaccessexception: not connection extracting meta data; nested exception org.springframework.jdbc.cannotgetjdbcconnectionexception: not jdbc connection; nested exception org.apache.commons.dbcp.sqlnestedexception: cannot load jdbc driver class '${batch.jdbc.driver}' org.springframework.beans.factory.beancreationexception: error creating bean name 'bbbb01configuration': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private org.springframework.batch.core.repository.jobrepository com.batch.cilabo.bbbb01configuration.jobrepository; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'jobrepository': invocation of init method failed; nested exception org.springframework.jdbc.support.metadataaccessexception: not connection extracting meta data; nested exception org.springframework.jdbc.cannotgetjdbcconnectionexception: not jdbc connection; nested exception org.apache.commons.dbcp.sqlnestedexception: cannot load jdbc driver class '${batch.jdbc.driver}'     @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor.postprocesspropertyvalues(autowiredannotationbeanpostprocessor.java:288)     @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.populatebean(abstractautowirecapablebeanfactory.java:1074)     @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:517) 

==================== concerting info think shown below:

**2 property files on src/main/resources. 1)batch.properties 2)log4j.properties

put on same directory jar file on centos.

1) include hsqldb's general settings(below) , ones of program specified.

# placeholders batch.* #    hsqldb: batch.jdbc.driver=org.hsqldb.jdbcdriver batch.jdbc.url=jdbc:hsqldb:mem:testdb;sql.enforce_strict_size=true # use 1 separate server process can inspect results # (or add system properties -d override @ run time). # batch.jdbc.url=jdbc:hsqldb:hsql://localhost:9005/samples batch.jdbc.user=sa batch.jdbc.password= batch.schema= batch.schema.script=classpath:/org/springframework/batch/core/schema-hsqldb.sql ... 

**launch-context.xml

<beans ...>      <context:property-placeholder order="1" location="classpath:batch.properties" />     <context:property-placeholder order="2" location="classpath:log4j.properties" />     <context:annotation-config/>      <context:component-scan base-package="com.batch.xxxxxx" />     <jdbc:initialize-database data-source="datasource">         <jdbc:script location="${batch.schema.script}" />     </jdbc:initialize-database>      <batch:job-repository id="jobrepository" />      <import resource="classpath:/meta-inf/spring/module-context.xml" /> 

**manifest.mf made maven-shade-plugin.

manifest-version: 1.0 package: com.batch.xxxxxx build-number: 1 archiver-version: plexus archiver built-by: xxxxxxxxx class-path: ./ created-by: apache maven 3.3.9 build-jdk: 1.8.0_102 main-class: org.springframework.batch.core.launch.support.commandlinej  obrunner 

**parts of pom.xml *properties

<properties>     <maven.test.failure.ignore>true</maven.test.failure.ignore>     <spring.framework.version>3.0.6.release</spring.framework.version>     <spring.batch.version>2.1.7.release</spring.batch.version>     <configfilebatch>batch.properties</configfilebatch>     <configfilelog4j>log4j.properties</configfilelog4j> </properties> 

*build

<build>           <plugins>         <plugin>             <groupid>org.apache.maven.plugins</groupid>             <artifactid>maven-compiler-plugin</artifactid>             <configuration>                 <source>1.5</source>                 <target>1.5</target>             </configuration>         </plugin>           <plugin>             <groupid>org.apache.maven.plugins</groupid>             <artifactid>maven-jar-plugin</artifactid>             <configuration>                 <archive>                     <index>false</index>                     <manifest>                         <packagename>com.batch.cilabo</packagename>                         <mainclass>org.springframework.batch.core.launch.support.commandlinejobrunner</mainclass>                         <addclasspath>true</addclasspath>                         <classpathprefix>lib/</classpathprefix>                     </manifest>                 </archive>             </configuration>         </plugin>          <plugin>             <groupid>org.apache.maven.plugins</groupid>             <artifactid>maven-shade-plugin</artifactid>             <configuration>                 <finalname>bbbb01</finalname>                 <transformers>                     <transformer implementation="org.apache.maven.plugins.shade.resource.manifestresourcetransformer">                         <manifestentries>                             <main-class>org.springframework.batch.core.launch.support.commandlinejobrunner</main-class>                             <class-path>./</class-path>                             <build-number>1</build-number>                         </manifestentries>                     </transformer>                     <transformer implementation="org.apache.maven.plugins.shade.resource.dontincluderesourcetransformer">                         <resource>.properties</resource>                     </transformer>                     <transformer implementation="org.apache.maven.plugins.shade.resource.appendingtransformer">                         <resource>meta-inf/spring.handlers</resource>                     </transformer>                     <transformer implementation="org.apache.maven.plugins.shade.resource.appendingtransformer">                         <resource>meta-inf/spring.schemas</resource>                     </transformer>                 </transformers>                 <archive>                   <manifestentries>                     <class-path>./</class-path>                   </manifestentries>                 </archive>               </configuration>             <version>1.7</version>             <executions>                 <execution>                     <phase>package</phase>                     <goals>                         <goal>shade</goal>                     </goals>                 </execution>             </executions>         </plugin>     </plugins> </build> 

thx in advance.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -