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 .
Related
I am not a code writer or technical guy. Trying to install Dspace with the guides provided. I am stucked in ant fresh_insatll process and here is the error message. Can someone help to overcome this.
Buildfile: C:\dspace-6.0-src-release\dspace\target\dspace-installer\build.xml
init_installation:
prepare_configs:
[mkdir] Created dir: C:\dspace-6.0-src-release\dspace\target\dspace-installer\config-temp
[copy] Copying 156 files to C:\dspace-6.0-src-release\dspace\target\dspace-installer\config-temp
[copy] Copying 1 file to C:\dspace-6.0-src-release\dspace\target\dspace-installer\config-temp
[copy] Copying 16 files to C:\dspace-6.0-src-release\dspace\target\dspace-installer\config-temp
init_configs:
[copy] Copying 1 file to C:\dspace\config
[delete] Deleting directory C:\dspace-6.0-src-release\dspace\target\dspace-installer\config-temp
test_database:
[java] 2016-11-08 07:17:42,129 WARN org.apache.commons.configuration.DefaultConfigurationBuilder # Internal error
[java] org.apache.commons.configuration.ConfigurationException: Cannot locate configuration source local.cfg
[java] at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:259)
[java] at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:238)
[java] at org.apache.commons.configuration.DefaultConfigurationBuilder$FileConfigurationProvider.getConfiguration(DefaultConfigurationBuilder.java:1455)
[java] at org.apache.commons.configuration.DefaultConfigurationBuilder$ConfigurationBeanFactory.createBean(DefaultConfigurationBuilder.java:1321)
[java] at org.apache.commons.configuration.beanutils.BeanHelper.createBean(BeanHelper.java:390)
[java] at org.apache.commons.configuration.beanutils.BeanHelper.createBean(BeanHelper.java:412)
[java] at org.apache.commons.configuration.beanutils.BeanHelper.createBean(BeanHelper.java:426)
[java] at org.apache.commons.configuration.DefaultConfigurationBuilder.createConfigurationAt(DefaultConfigurationBuilder.java:855)
[java] at org.apache.commons.configuration.DefaultConfigurationBuilder.initCombinedConfiguration(DefaultConfigurationBuilder.java:719)
[java] at org.apache.commons.configuration.DefaultConfigurationBuilder.getConfiguration(DefaultConfigurationBuilder.java:622)
[java] at org.apache.commons.configuration.DefaultConfigurationBuilder.getConfiguration(DefaultConfigurationBuilder.java:587)
[java] at org.dspace.servicemanager.config.DSpaceConfigurationService.loadInitialConfig(DSpaceConfigurationService.java:494)
[java] at org.dspace.servicemanager.config.DSpaceConfigurationService.<init>(DSpaceConfigurationService.java:87)
[java] at org.dspace.servicemanager.DSpaceKernelImpl.start(DSpaceKernelImpl.java:148)
[java] at org.dspace.servicemanager.DSpaceKernelImpl.start(DSpaceKernelImpl.java:128)
[java] at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:49)
[java] 2016-11-08 07:17:44,969 WARN org.dspace.services.email.EmailServiceImpl # Couldn't get an email session from environment: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
[java]
[java] Attempting to connect to database
[java] Connected successfully!
[java]
[java] Database Type: postgres
[java] Database URL: jdbc:postgresql://localhost:5432/dspace
[java] Database Schema: public
[java] Database Username: dspace
[java] Database Software: PostgreSQL version 9.6.1
[java] Database Driver: PostgreSQL Native Driver version PostgreSQL 9.4.1211
[java] PostgreSQL 'pgcrypto' extension installed/up-to-date? false (not installed)
[java]
[java] WARNING: Required PostgreSQL 'pgcrypto' extension is NOT INSTALLED on this database.
[java]
[java] ** DSpace REQUIRES PostgreSQL >= 9.4 AND pgcrypto extension >= 1.1 **
[java]
[java] To install it, please connect to your DSpace database as a 'superuser' and manually run the following command:
[java]
[java] CREATE EXTENSION pgcrypto;
[java]
[java] 2016-11-08 07:17:45,781 WARN org.dspace.services.sessions.SessionRequestServiceImpl # Request interceptor (org.dspace.services.events.SystemEventService$EventRequestInterceptor#52fd6efa) failed to execute on end (request-70-1478569665302): null
Did you enabled pgcrypto on your new made PostgreSQL database?
psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;"
See DSpace 6.0 manual, paragraph 4. Database Setup: https://wiki.duraspace.org/display/DSDOC6x/Installing+DSpace#InstallingDSpace-Installation
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 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.
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 am developing an xtext plug-in project for an eclipse application for my Bachelor thesis.
I want to do the 'Generate Xtext Artifacts' at runtime with an ant script executing the Mwe2Launcher class and do the generation in an temp folder.
I wrote an Activator to create in the temp folder a project folder and copy the mwe2 file, my grammar file and the ant script.
Executing the Ant script leads to this error:
osgi> start 360
gen:
[java] 0 INFO StandaloneSetup - Registering platform uri 'C:\Foo-test'
[java] 2461 INFO DirectoryCleaner - Cleaning C:\Foo-test\org.xtext.example.foobar\..\org.xtext.example.foobar\src-gen
[java] 2503 INFO DirectoryCleaner - Cleaning C:\Foo-test\org.xtext.example.foobar\..\org.xtext.example.foobar.ui\src-gen
[java] 3056 INFO LanguageConfig - generating infrastructure for org.xtext.example.foobar.Foo with fragments : ImplicitRuntimeFragment, ImplicitUiFragment, GrammarAccessFragment, EcoreGeneratorFragment, ParseTreeConstructorFragment, ResourceFactoryFragment, XtextAntlrGeneratorFragment, JavaValidatorFragment, ImportNamespacesScopingFragment, QualifiedNamesFragment, BuilderIntegrationFragment, GeneratorFragment, FormatterFragment, LabelProviderFragment, OutlineTreeProviderFragment, QuickOutlineFragment, QuickfixProviderFragment, JavaBasedContentAssistFragment, XtextAntlrUiGeneratorFragment, TypesGeneratorFragment, XbaseGeneratorFragment, CodetemplatesGeneratorFragment
[java] 6253 INFO GenModelHelper - Registered GenModel 'http://www.xtext.org/example/foobar/Foo' from 'file:/C:/Foo-test/org.xtext.example.foobar/src-gen/org/xtext/example/foobar/Foo.genmodel'
[java] org.eclipse.emf.common.util.WrappedException: java.io.IOException: The path '/org.xtext.example.foobar/src-gen/org/xtext/example/foobar/foo/FooPackage.java' is unmapped
[java] at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.generateJava(AbstractGeneratorAdapter.java:1112)
[java] at org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageGeneratorAdapter.generatePackageInterface(GenPackageGeneratorAdapter.java:467)
[java] at org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageGeneratorAdapter.generateModel(GenPackageGeneratorAdapter.java:219)
[java] at org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter.doGenerate(GenBaseGeneratorAdapter.java:221)
[java] at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.generate(AbstractGeneratorAdapter.java:290)
[java] at org.eclipse.emf.codegen.ecore.generator.Generator.generate(Generator.java:617)
[java] at org.eclipse.emf.codegen.ecore.generator.Generator.generate(Generator.java:528)
[java] at org.eclipse.xtext.generator.ecore.EcoreGeneratorFragment.doGenerate(EcoreGeneratorFragment.java:144)
[java] at org.eclipse.xtext.generator.ecore.EcoreGeneratorFragment.generate(EcoreGeneratorFragment.java:211)
[java] at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:81)
[java] at org.eclipse.xtext.generator.LanguageConfig.generate(LanguageConfig.java:108)
[java] at org.eclipse.xtext.generator.Generator.generate(Generator.java:352)
[java] at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:126)
[java] at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
[java] at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
[java] at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
[java] at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
[java] at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
[java] at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:97)
[java] at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:73)
[java] at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:76)
[java] at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)
[java] Caused by: java.io.IOException: The path '/org.xtext.example.foobar/src-gen/org/xtext/example/foobar/foo/FooPackage.java' is unmapped
[java] at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl.createOutputStream(PlatformResourceURIHandlerImpl.java:428)
[java] at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createOutputStream(ExtensibleURIConverterImpl.java:339)
[java] at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.createOutputStream(AbstractGeneratorAdapter.java:1440)
[java] at org.eclipse.emf.mwe2.ecore.CvsIdFilteringGeneratorAdapterFactoryDescriptor$IdFilteringGenModelGeneratorAdapterFactory$IdFilteringGenPackageAdapter.createOutputStream(CvsIdFilteringGeneratorAdapterFactoryDescriptor.java:39)
[java] at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.generateJava(AbstractGeneratorAdapter.java:1104)
[java] ... 21 more
[java] org.eclipse.emf.common.util.WrappedException: java.io.IOException: The path '/org.xtext.example.foobar/src-gen/org/xtext/example/foobar/foo/Model.java' is unmapped
[java] at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.generateJava(AbstractGeneratorAdapter.java:1112)
[java] at org.eclipse.emf.codegen.ecore.genmodel.generator.GenClassGeneratorAdapter.generateInterface(GenClassGeneratorAdapter.java:123)
[java] at org.eclipse.emf.codegen.ecore.genmodel.generator.GenClassGeneratorAdapter.generateModel(GenClassGeneratorAdapter.java:106)
[java] at org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter.doGenerate(GenBaseGeneratorAdapter.java:221)
[java] at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.generate(AbstractGeneratorAdapter.java:290)
[java] at org.eclipse.emf.codegen.ecore.generator.Generator.generate(Generator.java:617)
[java] at org.eclipse.emf.codegen.ecore.generator.Generator.generate(Generator.java:528)
[java] at org.eclipse.xtext.generator.ecore.EcoreGeneratorFragment.doGenerate(EcoreGeneratorFragment.java:144)
[java] at org.eclipse.xtext.generator.ecore.EcoreGeneratorFragment.generate(EcoreGeneratorFragment.java:211)
[java] at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:81)
[java] at org.eclipse.xtext.generator.LanguageConfig.generate(LanguageConfig.java:108)
[java] at org.eclipse.xtext.generator.Generator.generate(Generator.java:352)
[java] at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:126)
[java] at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
[java] at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
[java] at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
[java] at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
[java] at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
[java] at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:97)
[java] at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:73)
[java] at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:76)
[java] at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)
[java] Caused by: java.io.IOException: The path '/org.xtext.example.foobar/src-gen/org/xtext/example/foobar/foo/Model.java' is unmapped
[java] at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl.createOutputStream(PlatformResourceURIHandlerImpl.java:428)
[java] at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createOutputStream(ExtensibleURIConverterImpl.java:339)
[java] at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.createOutputStream(AbstractGeneratorAdapter.java:1440)
[java] at org.eclipse.emf.mwe2.ecore.CvsIdFilteringGeneratorAdapterFactoryDescriptor$IdFilteringGenModelGeneratorAdapterFactory$IdFilteringGenClassAdapter.createOutputStream(CvsIdFilteringGeneratorAdapterFactoryDescriptor.java:73)
[java] at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.generateJava(AbstractGeneratorAdapter.java:1104)
[java] ... 21 more
[java] org.eclipse.emf.common.util.WrappedException: java.io.IOException: The path '/org.xtext.example.foobar/src-gen/org/xtext/example/foobar/foo/Greeting.java' is unmapped
[java] at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.generateJava(AbstractGeneratorAdapter.java:1112)
[java] at org.eclipse.emf.codegen.ecore.genmodel.generator.GenClassGeneratorAdapter.generateInterface(GenClassGeneratorAdapter.java:123)
[java] at org.eclipse.emf.codegen.ecore.genmodel.generator.GenClassGeneratorAdapter.generateModel(GenClassGeneratorAdapter.java:106)
[java] at org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter.doGenerate(GenBaseGeneratorAdapter.java:221)
[java] at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.generate(AbstractGeneratorAdapter.java:290)
[java] at org.eclipse.emf.codegen.ecore.generator.Generator.generate(Generator.java:617)
[java] at org.eclipse.emf.codegen.ecore.generator.Generator.generate(Generator.java:528)
[java] at org.eclipse.xtext.generator.ecore.EcoreGeneratorFragment.doGenerate(EcoreGeneratorFragment.java:144)
[java] at org.eclipse.xtext.generator.ecore.EcoreGeneratorFragment.generate(EcoreGeneratorFragment.java:211)
[java] at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:81)
[java] at org.eclipse.xtext.generator.LanguageConfig.generate(LanguageConfig.java:108)
[java] at org.eclipse.xtext.generator.Generator.generate(Generator.java:352)
[java] at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:126)
[java] at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
[java] at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
[java] at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
[java] at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
[java] at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
[java] at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:97)
[java] at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:73)
[java] at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:76)
[java] at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)
[java] Caused by: java.io.IOException: The path '/org.xtext.example.foobar/src-gen/org/xtext/example/foobar/foo/Greeting.java' is unmapped
[java] at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl.createOutputStream(PlatformResourceURIHandlerImpl.java:428)
[java] at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createOutputStream(ExtensibleURIConverterImpl.java:339)
[java] at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.createOutputStream(AbstractGeneratorAdapter.java:1440)
[java] at org.eclipse.emf.mwe2.ecore.CvsIdFilteringGeneratorAdapterFactoryDescriptor$IdFilteringGenModelGeneratorAdapterFactory$IdFilteringGenClassAdapter.createOutputStream(CvsIdFilteringGeneratorAdapterFactoryDescriptor.java:73)
[java] at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.generateJava(AbstractGeneratorAdapter.java:1104)
[java] ... 21 more
[java] 6768 INFO EcoreGeneratorFragment - Diagnostic ERROR source=org.eclipse.emf.codegen.ecore code=0 Generating code data=[] [Diagnostic OK source=org.eclipse.emf.common code=0 OK data=[], Diagnostic OK source=org.eclipse.emf.common code=0 OK data=[], Diagnostic OK source=org.eclipse.emf.common code=0 OK data=[], Diagnostic OK source=org.eclipse.emf.common code=0 OK data=[], Diagnostic OK source=org.eclipse.emf.common code=0 OK data=[], Diagnostic ERROR source=org.eclipse.emf.codegen.ecore code=0 Generating Java interface org.xtext.example.foobar.foo.FooPackage failed with an unhandled exception data=[] [Diagnostic ERROR source=org.eclipse.emf.common code=0 IOException: The path '/org.xtext.example.foobar/src-gen/org/xtext/example/foobar/foo/FooPackage.java' is unmapped data=[java.io.IOException: The path '/org.xtext.example.foobar/src-gen/org/xtext/example/foobar/foo/FooPackage.java' is unmapped]], Diagnostic ERROR source=org.eclipse.emf.codegen.ecore code=0 Generating Java interface org.xtext.example.foobar.foo.Model failed with an unhandled exception data=[] [Diagnostic ERROR source=org.eclipse.emf.common code=0 IOException: The path '/org.xtext.example.foobar/src-gen/org/xtext/example/foobar/foo/Model.java' is unmapped data=[java.io.IOException: The path '/org.xtext.example.foobar/src-gen/org/xtext/example/foobar/foo/Model.java' is unmapped]], Diagnostic ERROR source=org.eclipse.emf.codegen.ecore code=0 Generating Java interface org.xtext.example.foobar.foo.Greeting failed with an unhandled exception data=[] [Diagnostic ERROR source=org.eclipse.emf.common code=0 IOException: The path '/org.xtext.example.foobar/src-gen/org/xtext/example/foobar/foo/Greeting.java' is unmapped data=[java.io.IOException: The path '/org.xtext.example.foobar/src-gen/org/xtext/example/foobar/foo/Greeting.java' is unmapped]], Diagnostic OK source=org.eclipse.emf.common code=0 OK data=[], Diagnostic OK source=org.eclipse.emf.common code=0 OK data=[], Diagnostic OK source=org.eclipse.emf.common code=0 OK data=[], Diagnostic OK source=org.eclipse.emf.common code=0 OK data=[]]
[java] 10385 INFO JavaValidatorFragment - generating Java-based EValidator API
[java] 13246 INFO Workflow - Done. BUILD SUCCESSFUL Total time: 27 seconds
The ".java" file which are unmapped were also not generated. The whole "/src-gen/...../foobar/foo" folder is missing.
I guess this is the reason and what should be fixed.
I really don't know, where the problem is. I already had a discussion in an Eclipse forum there you can find the build.xml but for another project, also an Activator class to activate the plugin and do the copy stuff and execute the ant script, also you find the mwe2 file I use.
You have to make sure that your register your temp folder as platform URI in your workflow. Xtext uses the platform:/resource URI scheme of EMF. Therefore, the platform root has to be registered in order to define the path mappings from absolute locations on the filesystem to logical locations according the the platform path. You could try to copy the .project file, too. I assume that will help if you already register the temp folder as platform path.