kindly help me out in this. its urgent. am calling the xml test file from ant build.xml file. when i run the test task its giving me this error
"java.lang.NoClassDefFoundError: org/apache/log4j/Logger"
please let me know what is the problem. i checked the jar files also..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Shreya, check to see if the log4j JAR file is available on your classpath. You should see a classpath definition in the build.xml file, and there should be a bunch of jar files in there. Although I am almost positive that log4j.jar is in the distribution, but I could be wrong.
-sujit
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Buildfile: build.xml
init:
precompile:
compile:
[javac] Compiling 10 source files to \build
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
compile-test:
[javac] Compiling 5 source files to \build
def:
test:
[sqlunit] java.lang.NoClassDefFoundError: org/apache/log4j/Logger
[sqlunit] at net.sourceforge.sqlunit.ReporterFactory.<clinit>(ReporterFactory.java:36)
[sqlunit] at net.sourceforge.sqlunit.ant.SqlunitTask.createReporter(SqlunitTask.java:264)
[sqlunit] at net.sourceforge.sqlunit.ant.SqlunitTask.execute(SqlunitTask.java:75)
[sqlunit] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[sqlunit] at org.apache.tools.ant.Task.perform(Task.java:364)
[sqlunit] at org.apache.tools.ant.Target.execute(Target.java:341)
[sqlunit] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[sqlunit] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[sqlunit] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[sqlunit] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[sqlunit] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[sqlunit] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[sqlunit] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[sqlunit] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
[sqlunit] org/apache/log4j/Logger
kindly help me out in this. its urgent. am calling the xml test file from ant build.xml file. when i run the test task its giving me this error
"java.lang.NoClassDefFoundError: org/apache/log4j/Logger"
please let me know what is the problem. i checked the jar files also..
Hi Shreya, check to see if the log4j JAR file is available on your classpath. You should see a classpath definition in the build.xml file, and there should be a bunch of jar files in there. Although I am almost positive that log4j.jar is in the distribution, but I could be wrong.
-sujit
Buildfile: build.xml
init:
precompile:
compile:
[javac] Compiling 10 source files to \build
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
compile-test:
[javac] Compiling 5 source files to \build
def:
test:
[sqlunit] java.lang.NoClassDefFoundError: org/apache/log4j/Logger
[sqlunit] at net.sourceforge.sqlunit.ReporterFactory.<clinit>(ReporterFactory.java:36)
[sqlunit] at net.sourceforge.sqlunit.ant.SqlunitTask.createReporter(SqlunitTask.java:264)
[sqlunit] at net.sourceforge.sqlunit.ant.SqlunitTask.execute(SqlunitTask.java:75)
[sqlunit] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[sqlunit] at org.apache.tools.ant.Task.perform(Task.java:364)
[sqlunit] at org.apache.tools.ant.Target.execute(Target.java:341)
[sqlunit] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[sqlunit] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[sqlunit] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[sqlunit] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[sqlunit] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[sqlunit] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[sqlunit] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[sqlunit] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
[sqlunit] org/apache/log4j/Logger
BUILD FAILED
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
Total time: 8 seconds
this is what am getting. i checked log4j jar. have placed in the directories..