Announcement Announcement Module
Collapse
No announcement yet.
Error while compiling the Sample Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error while compiling the Sample

    Hi All,

    I created the sample applicationin ecllipse for the SPRING BATCH, Example of Hello World) and it was working fine in ecllipse.

    Now I moved the sources in the LINUX Machine and I am trying to build the Java Source (Onle Single Java File) and creating a JAR. However I am getting the following exception
    ##########################################
    [javac] Compiling 10 source files to /QuantumFX/reports/build/bin
    [javac] /QuantumFX/reports/build/src/com/sample/spring/batch/PrintHelloWorld.java:3: package org.springframework.batch.core does not exist
    [javac] import org.springframework.batch.core.StepContribution;
    [javac] ^
    [javac] /QuantumFX/reports/build/src/com/sample/spring/batch/PrintHelloWorld.java:4: package org.springframework.batch.core.scope.context does not exist
    [javac] import org.springframework.batch.core.scope.context.Chunk Context;
    [javac] ^
    [javac] /QuantumFX/reports/build/src/com/sample/spring/batch/PrintHelloWorld.java:5: package org.springframework.batch.core.step.tasklet does not exist
    [javac] import org.springframework.batch.core.step.tasklet.Taskle t;
    [javac] ^
    [javac] /QuantumFX/reports/build/src/com/sample/spring/batch/PrintHelloWorld.java:6: package org.springframework.batch.repeat does not exist
    [javac] import org.springframework.batch.repeat.RepeatStatus;
    [javac] ^
    [javac] /QuantumFX/reports/build/src/com/sample/spring/batch/PrintHelloWorld.java:8: cannot find symbol
    [javac] symbol: class Tasklet
    [javac] public class PrintHelloWorld implements Tasklet {
    [javac] ^
    [javac] /QuantumFX/reports/build/src/com/sample/spring/batch/PrintHelloWorld.java:12: cannot find symbol
    [javac] symbol : class StepContribution
    [javac] location: class com.sample.spring.batch.PrintHelloWorld
    [javac] public RepeatStatus execute(StepContribution arg0, ChunkContext arg1) throws Exception {
    [javac] ^
    [javac] /QuantumFX/reports/build/src/com/sample/spring/batch/PrintHelloWorld.java:12: cannot find symbol
    [javac] symbol : class ChunkContext
    [javac] location: class com.sample.spring.batch.PrintHelloWorld
    [javac] public RepeatStatus execute(StepContribution arg0, ChunkContext arg1) throws Exception {
    ##########################################

    My setEnv.sh (For setting the jars for build is as follows
    export PATH=/opt/wasce/2.1/java/bin:$PATH
    export JAR_HOME=/QuantumFX/reports/batch/lib
    export APPLN_HOME=/QuantumFX/reports/batch

    export CLASSPATH=$JAR_HOME/commons-beanutils-1.8.0.jar:$JAR_HOME/commons-collections-2.1.1.jar:$JAR_HOME/commons-digester-1.7.jar
    export CLASSPATH=$CLASSPATH:$JAR_HOME/commons-lang-2.3.jar:$JAR_HOME/commons-logging.jar:$JAR_HOME/groovy-all-1.5.5.jar:$JAR_HOME/iText-2.1.7.jar
    export CLASSPATH=$CLASSPATH:$JAR_HOME/jasperreports-3.7.5.jar:$JAR_HOME/log4j-1.2.9.jar:$JAR_HOME/ojdbc14.jar:$JAR_HOME/org.springframework.batch.core-2.0.0.RELEASE.jar
    export CLASSPATH=$CLASSPATH:$JAR_HOME/org.springframework.batch.infrastructure-2.0.0.RELEASE.jar:$JAR_HOME/spring.jar
    export CLASSPATH=$CLASSPATH:$APPLN_HOME/config



    Kindly suggest

  • #2
    The issue was with the classpath Error Solved

    Comment

    Working...
    X