I am trying to use Jenkins to build a maven project (same failure at cmd line!) and I get the below error. I can't see any permissions issues and have tried several changes to permissions to see if it is a linux side error but no luck? Any ideas?
export:
[echo] midleware.home = /u01/Oracle/Middleware
Property "export.log.dir" has not been set
[echo] export log dir = ${export.log.dir}
[java] Executing '/usr/java/jdk1.6.0_30/jre/bin/java' with arguments:
[java] '-XX:MaxPermSize=256m'
[java] '-Xmx768m'
[java] '-Dsun.lang.ClassLoader.allowArraySyntax=true'
[java] '-Dweblogic.home=/u01/Oracle/Middleware/wlserver_10.3'
[java] '-Dharvester.home=/u01/Oracle/Middleware/osb_11/harvester'
[java] '-Dosb.home=/u01/Oracle/Middleware/osb_11'
[java] '-Dosgi.bundlefile.limit=500'
[java] '-Dosgi.nl=en_US'
[java] '-Dmiddleware.home=/u01/Oracle/Middleware'
[java] '-Dosgi.logfile=/var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/export.log'
[java] '-jar'
[java] '/u01/Oracle/Middleware/oepe/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar'
[java] '-data'
[java] '/var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas'
[java] '-application'
[java] 'com.bea.alsb.core.ConfigExport'
[java] '-configProject'
[java] 'ATAS_Configuration'
[java] '-configJar'
[java] '/var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/target/atas-10.0.jar'
[java] '-includeDependencies'
[java] 'true'
[java] '-debug'
[java]
[java] The ' characters around the executable and arguments are
[java] not part of the command.
[ant] Exiting /var/lib/jenkins/workspace/01_export-atas-osbconfig/build/ant/osb-config-export.xml.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.698s
[INFO] Finished at: Thu Mar 27 14:00:50 GMT 2014
[INFO] Final Memory: 9M/56M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (export-osb-configuration) on project atas: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /var/lib/jenkins/workspace/01_export-atas-osbconfig/build/ant/osb-config-export.xml:12: /u01/Oracle/Middleware/oepe is not a valid directory
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (export-osb-configuration) on project atas: An Ant BuildException has occured: The following error occurred while executing this line:
/var/lib/jenkins/workspace/01_export-atas-osbconfig/build/ant/osb-config-export.xml:12: /u01/Oracle/Middleware/oepe is not a valid directory
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: The following error occurred while executing this line:
/var/lib/jenkins/workspace/01_export-atas-osbconfig/build/ant/osb-config-export.xml:12: /u01/Oracle/Middleware/oepe is not a valid directory
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:283)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 31 more
Caused by: /var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/target/antrun/build-main.xml:9: The following error occurred while executing this line:
/var/lib/jenkins/workspace/01_export-atas-osbconfig/build/ant/osb-config-export.xml:12: /u01/Oracle/Middleware/oepe is not a valid directory
at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:444)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:270)
... 33 more
Caused by: /var/lib/jenkins/workspace/01_export-atas-osbconfig/build/ant/osb-config-export.xml:12: /u01/Oracle/Middleware/oepe is not a valid directory
at org.apache.tools.ant.taskdefs.Java.setupWorkingDir(Java.java:855)
at org.apache.tools.ant.taskdefs.Java.setupExecutable(Java.java:825)
at org.apache.tools.ant.taskdefs.Java.fork(Java.java:788)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:214)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
... 44 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[JENKINS] Archiving /var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/pom.xml to uk.org.tlms.tlmsim.flows/atas/10.0/atas-10.0.pom
channel stopped
Finished: FAILURE
xml file as requeted
<project name="osb-config-export" default="export">
<property file="${export.properties.file}"/>
<target name="delete-metadata">
<delete dir="${workspace.dir}/.metadata"/>
</target>
<target name="export" depends="delete-metadata">
<echo message="midleware.home = ${middleware.home}"/>
<echo message="export log dir = ${export.log.dir}"/>
<java dir="${middleware.home}/oepe" jar="${middleware.home}/oepe/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar"
fork="true" failonerror="true" maxmemory="768m">
<jvmarg line="-XX:MaxPermSize=256m" />
<arg line="-data ${workspace.dir}"/>
<arg line="-application com.bea.alsb.core.ConfigExport"/>
<arg line="-configProject ${config.project}"/>
<!--<arg line="-configSubProjects ${config.subprojects}"/>-->
<arg line="-configJar ${config.jar}"/>
<arg line="-includeDependencies ${config.includeDependencies}"/>
<arg line="-debug"/>
<sysproperty key="sun.lang.ClassLoader.allowArraySyntax" value="true"/>
<sysproperty key="weblogic.home" value="${middleware.home}/wlserver_10.3"/>
<sysproperty key="harvester.home" value="${middleware.home}/osb_11/harvester"/>
<sysproperty key="osb.home" value="${middleware.home}/osb_11"/>
<sysproperty key="osgi.bundlefile.limit" value="500"/>
<sysproperty key="osgi.nl" value="en_US"/>
<sysproperty key="middleware.home" value="${middleware.home}"/>
<!--sysproperty key="osgi.logfile" value="${export.log.dir}/export.log"/-->
<sysproperty key="osgi.logfile" value="${workspace.dir}/export.log"/>
</java>
</target>
</project>
Well, as you yourself pointed out, this is the error:
[ERROR] /var/lib/jenkins/workspace/01_export-atas-osbconfig/build/ant/osb-config-export.xml:12: /u01/Oracle/Middleware/oepe is not a valid directory
You also say that the same error happens from command line, so this is not an issue with Jenkins's user permissions, Jenkins environment variables or workspace
You need to look at the code on line 12 of /var/lib/jenkins/workspace/01_export-atas-osbconfig/build/ant/osb-config-export.xml. Please edit that file into the original question.
But it seems pretty obvious, it cannot access /u01/Oracle/Middleware/oepe. What happens when you just open command prompt and do cd /u01/Oracle/Middleware/oepe?
There is also this:
Property "export.log.dir" has not been set
I don't know if you are expecting that error or not. Looks like you need to provide an additional property value.
Edit 1:
So, if the cd /u01/Oracle/Middleware/oepe works from command line and the structure looks good, it could be filesystem permissions. Try executing your maven command with a sudo in front of it. If that works, then we will need to look closer at permissions.
Secondly, try executing the java command outside of the ant script, on command line, from within /u01/Oracle/Middleware/oepe:
/usr/java/jdk1.6.0_30/jre/bin/java -XX:MaxPermSize=256m -Xmx768m -Dsun.lang.ClassLoader.allowArraySyntax=true -Dweblogic.home=/u01/Oracle/Middleware/wlserver_10.3 -Dharvester.home=/u01/Oracle/Middleware/osb_11/harvester -Dosb.home=/u01/Oracle/Middleware/osb_11 -Dosgi.bundlefile.limit=500 -Dosgi.nl=en_US -Dmiddleware.home=/u01/Oracle/Middleware -Dosgi.logfile=/var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/export.log -jar /u01/Oracle/Middleware/oepe/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar -data /var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas -application com.bea.alsb.core.ConfigExport -configProject ATAS_Configuration -configJar /var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/target/atas-10.0.jar -includeDependencies true -debug
I only have general advice in this situation--try to pinpoint where the error is coming from. We're seeing an error that's coming out of a combination of Maven, the Maven Ant plugin (I assume), Jenkins, and the actual Java command that's calling the OSB export. Break it down to the simplest one first (just call the java command yourself to see what works), then layer on top of it until you find where the breakage is occuring.
For instance, I don't know whether what is being logged to the console is actually the same java command it's calling, or if that's something you're logging yourself by guessing at the call:
[java] Executing '/usr/java/jdk1.6.0_30/jre/bin/java' with arguments:
[java] '-XX:MaxPermSize=256m'
[java] '-Xmx768m'
[java] '-Dsun.lang.ClassLoader.allowArraySyntax=true'
[java] '-Dweblogic.home=/u01/Oracle/Middleware/wlserver_10.3'
[java] '-Dharvester.home=/u01/Oracle/Middleware/osb_11/harvester'
[java] '-Dosb.home=/u01/Oracle/Middleware/osb_11'
[java] '-Dosgi.bundlefile.limit=500'
[java] '-Dosgi.nl=en_US'
[java] '-Dmiddleware.home=/u01/Oracle/Middleware'
[java] '-Dosgi.logfile=/var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/export.log'
[java] '-jar'
[java] '/u01/Oracle/Middleware/oepe/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar'
[java] '-data'
[java] '/var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas'
[java] '-application'
[java] 'com.bea.alsb.core.ConfigExport'
[java] '-configProject'
[java] 'ATAS_Configuration'
[java] '-configJar'
[java] '/var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/target/atas-10.0.jar'
[java] '-includeDependencies'
[java] 'true'
[java] '-debug'
First, take that and call it yourself as the same user that Jenkins is running as. That would let you know whether you're even able to call this:
/usr/java/jdk1.6.0_30/jre/bin/java -XX:MaxPermSize=256m -Xmx768m -Dsun.lang.ClassLoader.allowArraySyntax=true -Dweblogic.home=/u01/Oracle/Middleware/wlserver_10.3 -Dharvester.home=/u01/Oracle/Middleware/osb_11/harvester -Dosb.home=/u01/Oracle/Middleware/osb_11 -Dosgi.bundlefile.limit=500 -Dosgi.nl=en_US -Dmiddleware.home=/u01/Oracle/Middleware -Dosgi.logfile=/var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/export.log -jar /u01/Oracle/Middleware/oepe/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar -data /var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas -application com.bea.alsb.core.ConfigExport -configProject ATAS_Configuration -configJar /var/lib/jenkins/workspace/01_export-atas-osbconfig/osbflows/atas/target/atas-10.0.jar -includeDependencies true -debug
Then, call the ant script that's doing that as the Jenkins user
Then, call the Maven plugin as the Jekins user,
then Jenkins itself
Don't walk down to the simplest solution, start there and walk up.
Related
I have a selenium webdriver script which i want to run in Jenkins, i created a Ant build.xml and configured it in Jenkins. My script uses Junit TestCase like below:
public class StartCaseJava extends TestCase {
private WebDriver driver = new FirefoxDriver();
private boolean acceptNextAlert = true;
private StringBuffer verificationErrors = new StringBuffer();
// Getting Date and Timestamp for Last Name
Date d = new Date();
SimpleDateFormat dateFormat = new SimpleDateFormat("MMddyyHHmmss");
public void setUp() throws Exception {
While running the run JAR step of build.xml, i am getting below error message:
run:
[java] Exception in thread "main" java.lang.NoClassDefFoundError: junit/framework/TestCase
[java] at java.lang.ClassLoader.defineClass1(Native Method)
[java] at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
[java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
[java] at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
[java] at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
[java] Caused by: java.lang.ClassNotFoundException: junit.framework.TestCase
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
[java] ... 13 more
[java] Java Result: 1
Since i am new to Selenium, Java and Intellij not sure how to resolve this issue. Any help would be appreciated! Thanks!
I also added junit jar in my lib folder and added path in my ant build.xml.Not sure what else i can add to my build.xml file.
I have a simple HelloWorld type Worklight application, with no adapters and just a 'common' environment. And I am trying to build the application through the build-app target supplied in the worklight-ant.jar file. This target fails with the following stack trace. Any ideas on why this might be happening?
StackTrace from command line
Buildfile: /Users/jai/Dev/Workspaces/worklight-2014/EFMobile/build.xml
init:
[echo] Loading ANT Tool
build-app:
[echo] Building app at /Users/jai/Dev/Workspaces/worklight-2014/EFMobile/apps/HelloEF
[echo] Worklight Ant Task version 6.1.0.00.20131123-2150
BUILD FAILED
/Users/jai/Dev/Workspaces/worklight-2014/EFMobile/build.xml:26: java.lang.ExceptionInInitializerError
at com.worklight.builder.environment.EnvironmentBuilderFactory.get(EnvironmentBuilderFactory.java:70)
at com.worklight.builder.ApplicationBuilder.buildEnvironment(ApplicationBuilder.java:268)
at com.worklight.builder.ApplicationBuilder.buildEnvironments(ApplicationBuilder.java:230)
at com.worklight.builder.ApplicationBuilder.build(ApplicationBuilder.java:119)
at com.worklight.ant.builders.ApplicationBuilderTask.execute(ApplicationBuilderTask.java:112)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.RuntimeException: Failed creating resourcesRootFolder
at com.worklight.builder.environment.EnvironmentBuilder.initResourceFolder(EnvironmentBuilder.java:199)
at com.worklight.builder.environment.EnvironmentBuilder.<clinit>(EnvironmentBuilder.java:192)
... 22 more
Caused by: java.io.IOException: Resource not found: jslibexpanded.zip.MD5
at com.worklight.builder.util.BuilderUtils.unzipResourceIfRequired(BuilderUtils.java:723)
at com.worklight.builder.util.BuilderUtils.initResourcesFolder(BuilderUtils.java:704)
at com.worklight.builder.environment.EnvironmentBuilder.initResourceFolder(EnvironmentBuilder.java:197)
... 23 more
Total time: 1 second
may be your ant is older than the prerequisite version ?
http://publib.boulder.ibm.com/infocenter/prodguid/v1r0/clarity-reports/report/html/softwareReqsForProduct?deliverableId=66C745D01E8711E28ACF6F870925FE36&osPlatform=Linux#!
regards
I tried to build Jython on my macbook pro, but got an error after simpley ant command.
$ jython-2.5.4-rc1-sources zzhao$ ant
Buildfile: /Users/jack/Dev/jython/jython-2.5.4-rc1-sources/build.xml
init:
needed-check:
clean-if-antlr-needed:
init:
clean-checkout-dir:
clean:
prepare-output:
[mkdir] Created dir: /Users/jack/Dev/jython/jython-2.5.4-rc1-sources/build/classes
[mkdir] Created dir: /Users/jack/Dev/jython/jython-2.5.4-rc1-sources/build/gensrc/org/python/antlr
[mkdir] Created dir: /Users/jack/Dev/jython/jython-2.5.4-rc1-sources/build/exposed
[mkdir] Created dir: /Users/jack/Dev/jython/jython-2.5.4-rc1-sources/dist
antlr_gen:
[java] Exception in thread "main" java.lang.NoClassDefFoundError: org/antlr/Tool
[java] Caused by: java.lang.ClassNotFoundException: org.antlr.Tool
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
BUILD FAILED
/Users/jack/Dev/jython/jython-2.5.4-rc1-sources/build.xml:496: Java returned: 1
Any idea to the problem?
Your build is failing in the "antlr_gen" target. The java task is missing the antlr jar from its classpath.
Can't help any further without an ANT build.xml to debug.
I tried to execute below mentioned ant mail task, I'm getting error message: java.lang.ClassNotFoundException: javax.mail.internet.MimeMessage.
I have created environment variable for ant.
Also placed mail.jar, activation jar & ant-javamail jar in lib folder as well as in eclipse -> preferences -> Global Entries. Anything else required for executing ant mail task? Please suggest.
<target description="Generates and send TestNG test reports" name="send-report">
<mail mailhost="smtp.sears.com" mailport="25" user="kmart\vlakshm" password="AK230211$$" ssl="true" subject="Test build">
<from address="vijayalakshmi.lakshmanan#searshc.com"></from>
<replyto address="vijayalakshmi.lakshmanan#searshc.com"></replyto>
<to address="vijayalakshmi.lakshmanan#searshc.com"></to>
<message>Please find the attached report for Sears International smoke test results.</message>
<attachments>
<fileset dir="C:\\Documents and Settings\\vlakshm\\workspace\\INTL_REG\\test-output\\emailable-report.html">
<include name="**/*.zip"/>
</fileset>
</attachments>
</mail>
</target>
In command prompt,executed below mentioned command
ant send-report
Getting below mentioned exception
build.xml:70: java.lang.ClassNotFoundException: javax.mail.internet.MimeMessage
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.apache.tools.ant.taskdefs.email.EmailTask.execute(EmailTask.java:
452)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Total time: 0 seconds
add mail.jar and activation.jar in ANT_HOME/lib or use both jar form your project/lib
I'm new to Ant and this application. I'm not able to decode this error message.
C:\Eclipse\sources_int\external-sources>ant netstudy-generate-client
Buildfile: C:\Eclipse\sources_int\external-sources\build.xml
netstudy-generate-client:
[delete] Deleting directory C:\Eclipse\ext_sources_int\external-sources\build\generated_classe
s
[mkdir] Created dir: C:\Eclipse\sources_int\external-sources\build\generated_classes
[java] java.lang.NoClassDefFoundError: org/apache/cxf/tools/wsdlto/WSDLToJava
[java] Caused by: java.lang.ClassNotFoundException: org.apache.cxf.tools.wsdlto.WSDLToJava
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
[java] Could not find the main class: org.apache.cxf.tools.wsdlto.WSDLToJava. Program will exit.
[java] Exception in thread "main"
[java] Java Result: 1
BUILD FAILED
C:\Eclipse\sources_int\external-sources\build.xml:183: srcdir "C:\Eclipse\sources_int\
external-sources\build\generated_src" does not exist!
part of the ant build is trying to run a Java application. the main class (the Java class that contains a main method) cannot be found. check your path and make sure you are including the jar file that contains the class org.apache.cxf.tools.wsdlto.WSDLToJava.
possibly it is expecting to find this class in the directory it cannot find.
JBoss comes with wsconsume in order to generate the client. I was trying to enforce the use of wsdltojava but it didn't work and I have the same problem.
So try to use wsconsume .