I just created an eclipse plugin using tycho. I can run mvn clean install and so far there are no errors.
Now I want to run the plugin as Eclipse Application (it is basically a builder). When I press run as Eclipse Application a second eclipse instance is showing up. When I create a new project there and add my builder, eclipse throws me this exception:
org.eclipse.e4.core.di.InjectionException: org.eclipse.core.commands.ExecutionException: Failed to toggle nature
Caused by: org.eclipse.core.commands.ExecutionException: Failed to toggle nature
Caused by: org.eclipse.core.runtime.CoreException: Problems encountered while setting project description
The error happens in this method:
private void toggleNature(IProject project) throws CoreException {
IProjectDescription description = project.getDescription();
String[] natures = description.getNatureIds();
for (int i = 0; i < natures.length; ++i) {
if (SidecarNature.NATURE_ID.equals(natures[i])) {
// Remove the nature
String[] newNatures = new String[natures.length - 1];
System.arraycopy(natures, 0, newNatures, 0, i);
System.arraycopy(natures, i + 1, newNatures, i, natures.length - i - 1);
description.setNatureIds(newNatures);
project.setDescription(description, null);
return;
}
}
// Add the nature
String[] newNatures = new String[natures.length + 1];
System.arraycopy(natures, 0, newNatures, 0, natures.length);
newNatures[natures.length] = SidecarNature.NATURE_ID;
description.setNatureIds(newNatures);
// ---------------------------------------
// The Error is thrown here
// ---------------------------------------
project.setDescription(description, null);
}
I don't know whats wrong since this is the eclipse template code. I haven't changed anything. It should works when I dont use maven.
This is basically the pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>tycho_example</groupId>
<artifactId>com.codeandme.tycho.plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>
<tycho.version>0.23.0</tycho.version>
</properties>
<repositories>
<!-- add Mars repository to resolve dependencies -->
<repository>
<id>Mars</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/mars/</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<!-- enable tycho build extension -->
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho.version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
Edit
As requested here is the full stack trace:
org.eclipse.e4.core.di.InjectionException: org.eclipse.core.commands.ExecutionException: Failed to toggle nature
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:68)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:252)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:234)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:493)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:486)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:799)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:675)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:659)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:592)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4230)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1491)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1514)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1499)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1299)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4072)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3698)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
Caused by: org.eclipse.core.commands.ExecutionException: Failed to toggle nature
at de.ustutt.sidewise.eclipseintegration.builder.AddRemoveSidewiseNatureHandler.execute(AddRemoveSidewiseNatureHandler.java:37)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
... 41 more
Caused by: org.eclipse.core.runtime.CoreException: Problems encountered while setting project description.
at org.eclipse.core.internal.resources.Project.setDescription(Project.java:1256)
at org.eclipse.core.internal.resources.Project.setDescription(Project.java:1281)
at de.ustutt.sidewise.eclipseintegration.builder.AddRemoveSidewiseNatureHandler.toggleNature(AddRemoveSidewiseNatureHandler.java:78)
at de.ustutt.sidewise.eclipseintegration.builder.AddRemoveSidewiseNatureHandler.execute(AddRemoveSidewiseNatureHandler.java:34)
... 48 more
Edit2
The IStatus:
Status WARNING: org.eclipse.core.resources code=568 Problems encountered while setting project description. null children=[[type: WARNING], [path: null], [message: Nature does not exist: eclipseintegration.builder.SidewiseNature.], [plugin: org.eclipse.core.resources], [exception: null]
]
The message in the IStatus Nature does not exist: eclipseintegration.builder.SidewiseNature. is saying you are trying to add a nature that does not exist.
Have you declared the nature with the org.eclipse.core.resources.natures extension point? Does the id declared there match the SidecarNature.NATURE_ID constant?
The project uses scala 2.9
my scalatest dependency is:
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.9.2</artifactId>
</dependency>
Error:scalac: Error: org.jetbrains.jps.incremental.scala.remote.ServerException
Error compiling sbt component 'compiler-interface-2.9.2-50.0'
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:145)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:142)
at sbt.IO$.withTemporaryDirectory(IO.scala:285)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:142)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:139)
at sbt.IO$.withTemporaryDirectory(IO.scala:285)
at sbt.compiler.AnalyzingCompiler$.compileSources(AnalyzingCompiler.scala:139)
at sbt.compiler.IC$.compileInterfaceJar(IncrementalCompiler.scala:33)
at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl$.org$jetbrains$jps$incremental$scala$local$CompilerFactoryImpl$$getOrCompileInterfaceJar(CompilerFactoryImpl.scala:87)
at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl$$anonfun$getScalac$1.apply(CompilerFactoryImpl.scala:44)
at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl$$anonfun$getScalac$1.apply(CompilerFactoryImpl.scala:43)
at scala.Option.map(Option.scala:145)
at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl.getScalac(CompilerFactoryImpl.scala:43)
at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl.createCompiler(CompilerFactoryImpl.scala:22)
at org.jetbrains.jps.incremental.scala.local.CachingFactory$$anonfun$createCompiler$1.apply(CachingFactory.scala:24)
at org.jetbrains.jps.incremental.scala.local.CachingFactory$$anonfun$createCompiler$1.apply(CachingFactory.scala:24)
at org.jetbrains.jps.incremental.scala.local.Cache$$anonfun$getOrUpdate$2.apply(Cache.scala:20)
at scala.Option.getOrElse(Option.scala:120)
at org.jetbrains.jps.incremental.scala.local.Cache.getOrUpdate(Cache.scala:19)
at org.jetbrains.jps.incremental.scala.local.CachingFactory.createCompiler(CachingFactory.scala:23)
at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:22)
at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:62)
at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:20)
at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
I think your dependency is incomplete and misses the library version. Easiest is to look it up on Maven Central:
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.9.2</artifactId>
<version>1.9.2</version> <!-- here -->
</dependency>
After upgrading the Jasper Version to 5.5.0, I am getting error while compiling the report from server/Jenkins. In my local machine it is working fine. Any idea what can be the reason. Below is the log:
[WARNING] POM for 'commons-logging:commons-logging:pom:99.0-does-not-exist:runtime' is invalid.
Its dependencies (if any) will NOT be available to the current build.
[INFO] [jasperreports:compile-reports {execution: default}]
[INFO] Compiling 29 report design files.
[INFO] Compiling report file: interfaceConfiguration\processConf.jrxml
[FATAL ERROR] org.codehaus.mojo.jasperreports.JasperReportsMojo#execute() caused a linkage error (java.lang.NoClassDefFoundError) and may be out-of-date. Check the realms:
[FATAL ERROR] Plugin realm = app0.child-container[org.codehaus.mojo:jasperreports-maven-plugin:1.0-beta-2]
urls[0] = file:/d:/maven/maven-2.0.9/org/codehaus/mojo/jasperreports-maven-plugin/1.0-beta-2/jasperreports-maven-plugin-1.0-beta-2.jar
urls[1] = file:/d:/maven/maven-2.0.9/net/sf/jasperreports/jasperreports/5.5.0/jasperreports-5.5.0.jar
urls[2] = file:/d:/maven/maven-2.0.9/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar
urls[3] = file:/d:/maven/maven-2.0.9/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
urls[4] = file:/d:/maven/maven-2.0.9/commons-collections/commons-collections/2.1/commons-collections-2.1.jar
urls[5] = file:/d:/maven/maven-2.0.9/commons-digester/commons-digester/2.1/commons-digester-2.1.jar
urls[6] = file:/d:/maven/maven-2.0.9/com/lowagie/itext/2.1.7.js2/itext-2.1.7.js2.jar
urls[7] = file:/d:/maven/maven-2.0.9/jfree/jcommon/1.0.15/jcommon-1.0.15.jar
urls[8] = file:/d:/maven/maven-2.0.9/jfree/jfreechart/1.0.12/jfreechart-1.0.12.jar
urls[9] = file:/d:/maven/maven-2.0.9/xml-apis/xml-apis/1.3.02/xml-apis-1.3.02.jar
urls[10] = file:/d:/maven/maven-2.0.9/eclipse/jdtcore/3.1.0/jdtcore-3.1.0.jar
urls[11] = file:/d:/maven/maven-2.0.9/org/codehaus/castor/castor/1.2/castor-1.2.jar
urls[12] = file:/d:/maven/maven-2.0.9/com/fasterxml/jackson/core/jackson-core/2.1.4/jackson-core-2.1.4.jar
urls[13] = file:/d:/maven/maven-2.0.9/com/fasterxml/jackson/core/jackson-databind/2.1.4/jackson-databind-2.1.4.jar
urls[14] = file:/d:/maven/maven-2.0.9/com/fasterxml/jackson/core/jackson-annotations/2.1.4/jackson-annotations-2.1.4.jar
urls[15] = file:/d:/maven/maven-2.0.9/jasperreports/jasperreports/1.2.0/jasperreports-1.2.0.jar
urls[16] = file:/d:/maven/maven-2.0.9/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
urls[17] = file:/d:/maven/maven-2.0.9/org/codehaus/plexus/plexus-compiler-api/1.5.3/plexus-compiler-api-1.5.3.jar
[FATAL ERROR] Container realm = plexus.core
urls[0] = file:/C:/APPS/DCSCM/tool/Maven2.2.1/lib/maven-2.2.1-uber.jar
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] javax/servlet/ServletOutputStream
javax.servlet.ServletOutputStream
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError: javax/servlet/ServletOutputStream
at net.sf.jasperreports.web.util.WebResourceHandlersExtensionRegistryFactory.<clinit>(WebResourceHandlersExtensionRegistryFactory.java:47)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:157)
at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:115)
at net.sf.jasperreports.engine.util.ClassUtils.instantiateClass(ClassUtils.java:53)
at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.instantiateRegistry(DefaultExtensionsRegistry.java:237)
at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:214)
at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:162)
at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getRegistries(DefaultExtensionsRegistry.java:133)
at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:105)
at net.sf.jasperreports.engine.DefaultJasperReportsContext.getExtensions(DefaultJasperReportsContext.java:246)
at net.sf.jasperreports.engine.component.ComponentsEnvironment.findBundles(ComponentsEnvironment.java:119)
at net.sf.jasperreports.engine.component.ComponentsEnvironment.getCachedBundles(ComponentsEnvironment.java:109)
at net.sf.jasperreports.engine.component.ComponentsEnvironment.getBundles(ComponentsEnvironment.java:97)
at net.sf.jasperreports.engine.component.ComponentsEnvironment.getComponentBundles(ComponentsEnvironment.java:179)
at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.getSchemaLocations(JRReportSaxParserFactory.java:84)
at net.sf.jasperreports.engine.xml.BaseSaxParserFactory.configureParser(BaseSaxParserFactory.java:131)
at net.sf.jasperreports.engine.xml.BaseSaxParserFactory.createParser(BaseSaxParserFactory.java:94)
at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createParser(JRXmlDigesterFactory.java:1439)
at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createDigester(JRXmlDigesterFactory.java:1415)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:254)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:210)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:185)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:176)
at net.sf.jasperreports.engine.JasperCompileManager.compileToFile(JasperCompileManager.java:137)
at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:438)
at org.codehaus.mojo.jasperreports.JasperReportsMojo.compile(JasperReportsMojo.java:249)
at org.codehaus.mojo.jasperreports.JasperReportsMojo.execute(JasperReportsMojo.java:187)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletOutputStream
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 48 more
Try adding the servlet API as a plugin dependency. For example:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jasperreports-maven-plugin</artifactId>
<version>1.0-beta-2</version>
<executions>
<execution>
<goals>
<goal>compile-reports</goal>
</goals>
</execution>
</executions>
<dependencies>
<!--note this must be repeated here to pick up correct xml validation -->
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>5.5.0</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>
</dependencies>
</plugin>
GWT 2.5 maven plugin throws errors for i18n generation in Linux but works perfect in Windows.
I tried to run with -X option but did not find any useful error descriptions in logs.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>generateAsync</goal>
<goal>i18n</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<webappDirectory>${project.build.directory}/${project.build.finalName}/cms</webappDirectory>
<hostedWebapp>target/${project.artifactId}</hostedWebapp>
<i18nMessagesBundles>
<i18nMessagesBundle>package.module1.client.Messages</i18nMessagesBundle>
<i18nMessagesBundle>package.module2.client.Messages</i18nMessagesBundle>
<i18nMessagesBundle>package.module3.client.Messages</i18nMessagesBundle>
</i18nMessagesBundles>
<modules>
<module>package.module1.Module1</module>
<module>package.module2.Module2</module>
<module>package.module3.Module3</module>
</modules>
</configuration>
</plugin>
Any ideas?
Thanks.
The problem stack trace is the following
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.5.1:i18n (default) on project application: Command [[
/bin/sh -c /usr/lib/jvm/java-7-oracle/jre/bin/java -Xmx512m -classpath [CLASSPATH] com.google.gwt.i18n.tools.I18NSync -out /home/alex/development/camomile-cms/svn/application/target/generated-sources/gwt -createMessages com.comomile.cms.ria.fs.client.Messages
]] failed with status 1
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
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:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.codehaus.mojo.gwt.shell.ForkedProcessExecutionException: Command [[
/bin/sh -c /usr/lib/jvm/java-7-oracle/jre/bin/java -Xmx512m -classpath [CLASSPATH] com.google.gwt.i18n.tools.I18NSync -out /home/alex/development/comomile/svn/application/target/generated-sources/gwt -createMessages com.comomile.cms.ria.fs.client.Messages
]] failed with status 1
at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo$JavaCommand.execute(AbstractGwtShellMojo.java:485)
at org.codehaus.mojo.gwt.shell.I18NMojo.doExecute(I18NMojo.java:133)
at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo.execute(AbstractGwtShellMojo.java:172)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
[ERROR]
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :application
alex#alex-pc:~/development/comomile/svn$
I found the solution after debugging.
Solution is to create property files with messages using capitalized first letter: for example "Messages.properties" instead of "messages.properties"
The problem was that Linux is case sensitive for file names that's why this snippet issued:
String resourcePath = className.replace('.', '/') + ".properties";
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (cl == null) {
cl = ClassLoader.getSystemClassLoader();
}
URL r = cl.getResource(resourcePath);
if (r == null) {
throw new FileNotFoundException("Could not find the resource '"
+ resourcePath + " matching '" + className
+ "' did you remember to add it to your classpath?");
}
in com.google.gwt.i18n.tools.I18NSync:326 .
While deploying a mavenized application consisting of a parent project, ejb jar project and a web project I have following stack trace in Jboss As ,5.1.0.GA.
I checked that I have the dependency for jboss-el-1.0_02.CR4.jar and the library also contains the class org/jboss/el/util/ReflectionUtil.
Any ideas ? If required, I will also post the pom files of all the projects. They are based on the seam-refimpl project mentioned in the seam FAQ section.
Here the link
http://code.google.com/p/seam-maven-refimpl
regards,
ramgalo
org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.el.referenceCache
at org.jboss.seam.Component.newInstance(Component.java:2144)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:116)
at org.jboss.seam.init.Initialization.init(Initialization.java:740)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy38.start(Unknown Source)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
at org.jboss.system.ServiceController.start(ServiceController.java:460)
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
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:619)
Caused by: java.lang.RuntimeException: exception invoking: start
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:154)
at org.jboss.seam.Component.callComponentMethod(Component.java:2249)
at org.jboss.seam.Component.callCreateMethod(Component.java:2172)
at org.jboss.seam.Component.newInstance(Component.java:2132)
... 70 more
Caused by: java.lang.reflect.InvocationTargetException
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.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
at org.jboss.seam.el.JBossELReferenceCache_$$_javassist_seam_0.start(JBossELReferenceCache_$$_javassist_seam_0.java)
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.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
... 73 more
Caused by: java.lang.NoClassDefFoundError: org/jboss/el/util/ReflectionUtil
at org.jboss.seam.el.JBossELReferenceCache.start(JBossELReferenceCache.java:18)
... 94 more
Caused by: java.lang.ClassNotFoundException: org.jboss.el.util.ReflectionUtil from BaseClassLoader#1a591e2{VFSClassLoaderPolicy#10cbb6f{name=vfszip:/home/hardik/apps/jboss-5.1.0.GA/server/default/deploy/SeamCalculator.ear/ domain=ClassLoaderDomain#88bec9{name=seam.jboss.org:loader=SeamCalculator parentPolicy=AFTER_BUT_JAVA_BEFORE parent=ClassLoaderDomain#628704{DefaultDomain}} roots=[MemoryContextHandler#15048449[path= context=vfsmemory://3j001-2eqc8x-g552fg9t-1-g556hj7b-2zg real=vfsmemory://3j001-2eqc8x-g552fg9t-1-g556hj7b-2zg], DelegatingHandler#19542132[path= context=file:/home/hardik/apps/jboss-5.1.0.GA/server/default/tmp/3j001-2eqc8x-g552fg9t-1-g556hj0b-2zf/SeamCalculator.ear real=vfszip:/home/hardik/apps/jboss-5.1.0.GA/server/default/tmp/3j001-2eqc8x-g552fg9t-1-g556hj0b-2zf/SeamCalculator.ear], DelegatingHandler#13839876[path=ejb-jar-1.0-SNAPSHOT.jar context=file:/home/hardik/apps/jboss-5.1.0.GA/server/default/tmp/3j001-2eqc8x-g552fg9t-1-g556hj0b-2zf/SeamCalculator.ear real=file:/home/hardik/apps/jboss-5.1.0.GA/server/default/tmp/3j001-2eqc8x-g552fg9t-1-g556hj0b-2zf/SeamCalculator.ear/ejb-jar-1.0-SNAPSHOT.jar], DelegatingHandler#7483658[path=jboss-seam-2.2.0.GA.jar context=file:/home/hardik/apps/jboss-5.1.0.GA/server/default/tmp/3j001-2eqc8x-g552fg9t-1-g556hj0b-2zf/SeamCalculator.ear real=file:/home/hardik/apps/jboss-5.1.0.GA/server/default/tmp/3j001-2eqc8x-g552fg9t-1-g556hj0b-2zf/SeamCalculator.ear/jboss-seam-2.2.0.GA.jar], DelegatingHandler#15830241[path= context=file:/home/hardik/apps/jboss-5.1.0.GA/server/default/deployers/seam.deployer/lib-int/jboss-seam-int-jbossas.jar real=vfszip:/home/hardik/apps/jboss-5.1.0.GA/server/default/deployers/seam.deployer/lib-int/jboss-seam-int-jbossas.jar]] delegates=null exported=[, org.jboss.seam.mock, jboss-el-1.0_02.CR4.jar.org.jboss.el.parser, org.jboss.seam.theme, org.jboss.seam.security.crypto, jboss-el-1.0_02.CR4.jar.org.jboss.el.lang, org.jboss.seam.security.management, org.jboss.seam.contexts, org.jboss.seam.el, org.jboss.seam.mail, org.jboss.seam.exception, org.jboss.seam.navigation, org.jboss.seam.international, xstream-1.1.3.jar.com.thoughtworks.xstream.core.util, xstream-1.1.3.jar.com.thoughtworks.xstream.annotations, org.jboss.seam.annotations.datamodel, xstream-1.1.3.jar.com.thoughtworks.xstream.io.xml.xppdom, org.jboss.seam.security.jaas, org.jboss.seam.init, org.jboss.seam.webservice, org.jboss.seam.annotations.bpm, org.jboss.seam.framework, xstream-1.1.3.jar.com.thoughtworks.xstream.mapper, xstream-1.1.3.jar.META-INF, xpp3_min-1.1.3.4.O.jar.META-INF.services, xstream-1.1.3.jar.com.thoughtworks.xstream.converters.collections, org.jboss.seam.log, org.jboss.seam.captcha, com.hardik.seamcalculator, org.jboss.seam.core, xstream-1.1.3.jar.com.thoughtworks.xstream.io.xml, META-INF.maven.org.jboss.seam.integration.jboss-seam-int-jbossas, org.jboss.seam.cache, xpp3_min-1.1.3.4.O.jar.org.xmlpull.v1, org.jboss.seam.jsf, jboss-el-1.0_02.CR4.jar.org.jboss.el.util, org.jboss.seam.intercept, org.jboss.seam.integration.jbossas.vfs, xstream-1.1.3.jar.com.thoughtworks.xstream.converters.enums, org.jboss.seam.annotations.intercept, org.jboss.seam.servlet, org.jboss.seam.drools, org.jboss.seam.annotations, org.jboss.seam.ejb, xstream-1.1.3.jar.com.thoughtworks.xstream.converters.basic, org.jboss.seam.persistence, xpp3_min-1.1.3.4.O.jar.org.xmlpull.mxp1, org.jboss.seam.pageflow, org.jboss.seam.annotations.async, org.jboss.seam.security.digest, xstream-1.1.3.jar.com.thoughtworks.xstream.core, org.jboss.seam.text, META-INF.maven.com.hardik.ejb-jar, xstream-1.1.3.jar.com.thoughtworks.xstream.converters.reflection, xstream-1.1.3.jar.com.thoughtworks.xstream.alias, org.jboss.seam.faces, org.jboss.seam.deployment, org.jboss.seam.annotations.web, org.jboss.seam, org.jboss.seam.annotations.faces, jboss-el-1.0_02.CR4.jar.org.jboss.el, org.jboss.seam.security.openid, org.jboss.seam.jmx, org.jboss.seam.jms, META-INF.maven.com.hardik.ear, xstream-1.1.3.jar.com.thoughtworks.xstream.converters, org.jboss.seam.security.permission, xpp3_min-1.1.3.4.O.jar, org.jboss.seam.annotations.exception, xstream-1.1.3.jar.com.thoughtworks.xstream.converters.extended, org.jboss.seam.async, xstream-1.1.3.jar.com.thoughtworks.xstream.io, org.jboss.seam.annotations.security.management, org.jboss.seam.integration.jbossas.jms, org.jboss.seam.util, org.jboss.seam.bpm, org.jboss.seam.security, org.jboss.seam.web, org.jboss.seam.security.management.action, org.jboss.seam.databinding, xstream-1.1.3.jar.com.thoughtworks.xstream, xstream-1.1.3.jar.com.thoughtworks.xstream.converters.javabean, xpp3_min-1.1.3.4.O.jar.META-INF, META-INF, org.jboss.seam.security.permission.action, xstream-1.1.3.jar.com.thoughtworks.xstream.io.path, org.jboss.seam.annotations.security.permission, jboss-el-1.0_02.CR4.jar.META-INF, org.jboss.seam.annotations.security, org.jboss.seam.transaction, org.jboss.seam.document] <IMPORT-ALL>NON_EMPTY}}
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:448)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
... 95 more
12:29:31,726 ERROR [StandardContext] Error listenerStart
I figured out that my ear plugin was including the jboss-el.jar file on the root level with other modules. This doesn't work. Jboss requires it inside the lib directory in the ear package.
Following configuration option in ear plugin configuration fixed the problem. This way, all the dependencies, except which are mentioned in the modules will go to the lib directory in side the archive.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.4</version>
<configuration>
<defaultLibBundleDir>lib</defaultLibBundleDir>
...
</configuration>
</plugin>
I have a hunch that JBoss 5.1 already includes a copy of the org.jboss.el stuff. If you also package a copy of those same classes in your application, then you may experience some classloader weirdness.
Try removing all copies of ReflectionUtil from your application, and see if that helps.