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>
Related
So, I am trying to build my project in maven and am getting this weird error during compile time. A duplicate of the question HERE but the solution provided HERE didn't work for me. It is still complaining about the namespace conflict during compile time. Am not that much familiar with maven so any inputs would be highly appreciated.
Thanks
scala.reflect.internal.Types$TypeError: package macros contains object and package with same name: blackbox
one of them needs to be removed from classpath
at scala.tools.nsc.symtab.SymbolLoaders.enterPackage(SymbolLoaders.scala:89)
at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader$$anonfun$doComplete$1$$anonfun$apply$mcV$sp$2.apply(SymbolLoaders.scala:270)
at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader$$anonfun$doComplete$1$$anonfun$apply$mcV$sp$2.apply(SymbolLoaders.scala:269)
at scala.collection.Iterator$class.foreach(Iterator.scala:893)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader$$anonfun$doComplete$1.apply$mcV$sp(SymbolLoaders.scala:269)
at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader$$anonfun$doComplete$1.apply(SymbolLoaders.scala:260)
at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader$$anonfun$doComplete$1.apply(SymbolLoaders.scala:260)
at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:235)
at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader.doComplete(SymbolLoaders.scala:260)
at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:211)
at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1514)
at scala.reflect.internal.pickling.UnPickler$Scan.scala$reflect$internal$pickling$UnPickler$Scan$$fromName$1(UnPickler.scala:217)
at scala.reflect.internal.pickling.UnPickler$Scan.readExtSymbol$1(UnPickler.scala:258)
at scala.reflect.internal.pickling.UnPickler$Scan.readSymbol(UnPickler.scala:284)
at scala.reflect.internal.pickling.UnPickler$Scan.readSymbolRef(UnPickler.scala:649)
at scala.reflect.internal.pickling.UnPickler$Scan.readThisType$1(UnPickler.scala:398)
at scala.reflect.internal.pickling.UnPickler$Scan.readType(UnPickler.scala:413)
at scala.reflect.internal.pickling.UnPickler$Scan$$anonfun$readTypeRef$1.apply(UnPickler.scala:658)
at scala.reflect.internal.pickling.UnPickler$Scan$$anonfun$readTypeRef$1.apply(UnPickler.scala:658)
at scala.reflect.internal.pickling.UnPickler$Scan.at(UnPickler.scala:179)
at scala.reflect.internal.pickling.UnPickler$Scan.readTypeRef(UnPickler.scala:658)
at scala.reflect.internal.pickling.UnPickler$Scan.readType(UnPickler.scala:417)
at scala.reflect.internal.pickling.UnPickler$Scan$$anonfun$readTypeRef$1.apply(UnPickler.scala:658)
at scala.reflect.internal.pickling.UnPickler$Scan$$anonfun$readTypeRef$1.apply(UnPickler.scala:658)
at scala.reflect.internal.pickling.UnPickler$Scan.at(UnPickler.scala:179)
at scala.reflect.internal.pickling.UnPickler$Scan.readTypeRef(UnPickler.scala:658)
at scala.reflect.internal.pickling.UnPickler$Scan.readAnnotationInfo(UnPickler.scala:492)
at scala.reflect.internal.pickling.UnPickler$Scan.readSymbolAnnotation(UnPickler.scala:515)
at scala.reflect.internal.pickling.UnPickler$Scan.run(UnPickler.scala:97)
at scala.reflect.internal.pickling.UnPickler.unpickle(UnPickler.scala:38)
at scala.tools.nsc.symtab.classfile.ClassfileParser.scala$tools$nsc$symtab$classfile$ClassfileParser$$parseAttribute$1(ClassfileParser.scala:840)
at scala.tools.nsc.symtab.classfile.ClassfileParser.parseAttributes(ClassfileParser.scala:1017)
at scala.tools.nsc.symtab.classfile.ClassfileParser.parseClass(ClassfileParser.scala:502)
at scala.tools.nsc.symtab.classfile.ClassfileParser.parse(ClassfileParser.scala:139)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader$$anonfun$doComplete$2.apply$mcV$sp(SymbolLoaders.scala:347)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader$$anonfun$doComplete$2.apply(SymbolLoaders.scala:347)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader$$anonfun$doComplete$2.apply(SymbolLoaders.scala:347)
at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:235)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader.doComplete(SymbolLoaders.scala:347)
at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:211)
at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1514)
at scala.reflect.internal.Types$TypeRef.baseTypeSeqImpl(Types.scala:2227)
at scala.reflect.internal.Types$class.defineBaseTypeSeqOfTypeRef(Types.scala:2372)
at scala.reflect.internal.SymbolTable.defineBaseTypeSeqOfTypeRef(SymbolTable.scala:16)
at scala.reflect.internal.Types$TypeRef.baseTypeSeq(Types.scala:2240)
at scala.reflect.internal.BaseTypeSeqs$class.compoundBaseTypeSeq(BaseTypeSeqs.scala:168)
at scala.reflect.internal.SymbolTable.compoundBaseTypeSeq(SymbolTable.scala:16)
at scala.reflect.internal.Types$class.defineBaseTypeSeqOfCompoundType(Types.scala:1488)
at scala.reflect.internal.SymbolTable.defineBaseTypeSeqOfCompoundType(SymbolTable.scala:16)
at scala.reflect.internal.Types$CompoundType.baseTypeSeq(Types.scala:1356)
at scala.reflect.internal.Types$TypeRef.baseTypeSeqImpl(Types.scala:2227)
at scala.reflect.internal.Types$class.defineBaseTypeSeqOfTypeRef(Types.scala:2372)
at scala.reflect.internal.SymbolTable.defineBaseTypeSeqOfTypeRef(SymbolTable.scala:16)
at scala.reflect.internal.Types$TypeRef.baseTypeSeq(Types.scala:2240)
at scala.reflect.internal.BaseTypeSeqs$class.compoundBaseTypeSeq(BaseTypeSeqs.scala:168)
at scala.reflect.internal.SymbolTable.compoundBaseTypeSeq(SymbolTable.scala:16)
at scala.reflect.internal.Types$class.defineBaseTypeSeqOfCompoundType(Types.scala:1488)
at scala.reflect.internal.SymbolTable.defineBaseTypeSeqOfCompoundType(SymbolTable.scala:16)
at scala.reflect.internal.Types$CompoundType.baseTypeSeq(Types.scala:1356)
at scala.reflect.internal.Types$TypeRef.baseTypeSeqImpl(Types.scala:2227)
at scala.reflect.internal.Types$class.defineBaseTypeSeqOfTypeRef(Types.scala:2372)
at scala.reflect.internal.SymbolTable.defineBaseTypeSeqOfTypeRef(SymbolTable.scala:16)
at scala.reflect.internal.Types$TypeRef.baseTypeSeq(Types.scala:2240)
at scala.reflect.internal.BaseTypeSeqs$class.compoundBaseTypeSeq(BaseTypeSeqs.scala:168)
at scala.reflect.internal.SymbolTable.compoundBaseTypeSeq(SymbolTable.scala:16)
at scala.reflect.internal.Types$class.defineBaseTypeSeqOfCompoundType(Types.scala:1488)
at scala.reflect.internal.SymbolTable.defineBaseTypeSeqOfCompoundType(SymbolTable.scala:16)
at scala.reflect.internal.Types$CompoundType.baseTypeSeq(Types.scala:1356)
at scala.reflect.internal.Types$TypeRef.baseTypeSeqImpl(Types.scala:2227)
at scala.reflect.internal.Types$class.defineBaseTypeSeqOfTypeRef(Types.scala:2372)
at scala.reflect.internal.SymbolTable.defineBaseTypeSeqOfTypeRef(SymbolTable.scala:16)
at scala.reflect.internal.Types$TypeRef.baseTypeSeq(Types.scala:2240)
at scala.reflect.internal.BaseTypeSeqs$class.compoundBaseTypeSeq(BaseTypeSeqs.scala:168)
at scala.reflect.internal.SymbolTable.compoundBaseTypeSeq(SymbolTable.scala:16)
at scala.reflect.internal.Types$class.defineBaseTypeSeqOfCompoundType(Types.scala:1488)
at scala.reflect.internal.SymbolTable.defineBaseTypeSeqOfCompoundType(SymbolTable.scala:16)
at scala.reflect.internal.Types$CompoundType.baseTypeSeq(Types.scala:1356)
at scala.reflect.internal.Types$Type.baseTypeIndex(Types.scala:891)
at scala.reflect.internal.Types$CompoundType.baseType(Types.scala:1401)
at scala.reflect.internal.Types$ClassTypeRef$class.baseType(Types.scala:1968)
at scala.reflect.internal.Types$ClassNoArgsTypeRef.baseType(Types.scala:2331)
at scala.reflect.internal.tpe.TypeComparers$class.firstTry$1(TypeComparers.scala:405)
at scala.reflect.internal.tpe.TypeComparers$class.isSubType2(TypeComparers.scala:552)
at scala.reflect.internal.tpe.TypeComparers$class.isSubType1(TypeComparers.scala:320)
at scala.reflect.internal.tpe.TypeComparers$class.isSubType(TypeComparers.scala:278)
at scala.reflect.internal.SymbolTable.isSubType(SymbolTable.scala:16)
at scala.reflect.internal.Types$Type.$less$colon$less(Types.scala:779)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$validateParentClass$1(Typers.scala:1712)
at scala.tools.nsc.typechecker.Typers$Typer.validateParentClasses(Typers.scala:1730)
at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1893)
at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1762)
at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5309)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5359)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5452)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:3047)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$65.apply(Typers.scala:3151)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$65.apply(Typers.scala:3151)
at scala.collection.immutable.List.loop$1(List.scala:173)
at scala.collection.immutable.List.mapConserve(List.scala:189)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3151)
at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5015)
at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5312)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5359)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5448)
at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:102)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply$mcV$sp(Global.scala:440)
at scala.tools.nsc.Global$GlobalPhase.withCurrentUnit(Global.scala:431)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:440)
at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:94)
at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:93)
at scala.collection.Iterator$class.foreach(Iterator.scala:893)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:93)
at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1501)
at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1486)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:1481)
at scala.tools.nsc.Global$Run.compile(Global.scala:1582)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:123)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:99)
at xsbt.CompilerInterface.run(CompilerInterface.scala:27)
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:498)
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply$mcV$sp(AggressiveCompile.scala:99)
at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:99)
at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:99)
at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:166)
at sbt.compiler.AggressiveCompile$$anonfun$3.compileScala$1(AggressiveCompile.scala:98)
at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:143)
at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.scala:87)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:39)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:37)
at sbt.inc.IncrementalCommon.cycle(Incremental.scala:99)
at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:38)
at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:37)
at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:65)
at sbt.inc.Incremental$.compile(Incremental.scala:37)
at sbt.inc.IncrementalCompile$.apply(Compile.scala:27)
at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:157)
at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:71)
at com.typesafe.zinc.Compiler.compile(Compiler.scala:184)
at com.typesafe.zinc.Compiler.compile(Compiler.scala:164)
at sbt_inc.SbtIncrementalCompiler.compile(SbtIncrementalCompiler.java:92)
at scala_maven.ScalaCompilerSupport.incrementalCompile(ScalaCompilerSupport.java:303)
at scala_maven.ScalaCompilerSupport.compile(ScalaCompilerSupport.java:119)
at scala_maven.ScalaCompilerSupport.doExecute(ScalaCompilerSupport.java:99)
at scala_maven.ScalaMojoSupport.execute(ScalaMojoSupport.java:482)
at scala_maven.ScalaTestCompileMojo.execute(ScalaTestCompileMojo.java:48)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
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:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR] error while loading Assertions, class file '/Users/xxxxxx/.m2/repository/org/scalatest/scalatest_2.11/2.2.4/scalatest_2.11-2.2.4.jar(org/scalatest/Assertions.class)' is broken
(class java.lang.RuntimeException/error reading Scala signature of Assertions.class: package macros contains object and package with same name: blackbox
one of them needs to be removed from classpath)
And I updated the POM with following plugin
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.15.2</version>
<executions>
<execution>
<id>scala-compile-first</id>
<goals>
<goal>compile</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<scalaVersion>2.11</scalaVersion>
<args>
<arg>-Yresolve-term-conflict:object</arg>
//this was added
</args>
<jvmArgs>
<jvmArg>-Xms2048m</jvmArg>
<jvmArg>-Xmx4096m</jvmArg>
</jvmArgs>
</configuration>
</execution>
</executions>
</plugin>
in REST API using jersey, using Maven.
Maven successfully added mox and entity jars.
I'm getting below error when trying to get JSON type result.
#Produces(MediaType.APPLICATION_JSON)
content of 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>in.alonebirddev.acs</groupId>
<artifactId>messanger</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>messanger</name>
<build>
<finalName>messanger</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<inherited>true</inherited>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId>
<version>${jersey.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<!-- use the following artifactId if you don't need servlet 2.x compatibility -->
<!-- artifactId>jersey-container-servlet</artifactId -->
</dependency>
<!-- uncomment this to get JSON support -->
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-moxy</artifactId>
<version>2.23.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-entity-filtering</artifactId>
<version>2.7</version>
</dependency>
</dependencies>
<properties>
<jersey.version>2.23.2</jersey.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
error :
SEVERE: StandardWrapper.Throwable
java.lang.NoSuchMethodError: org.glassfish.jersey.message.filtering.EntityFilteringFeature.enabled(Ljavax/ws/rs/core/Configuration;)Z
at org.glassfish.jersey.moxy.json.MoxyJsonFeature.configure(MoxyJsonFeature.java:88)
at org.glassfish.jersey.model.internal.CommonConfig.configureFeatures(CommonConfig.java:730)
at org.glassfish.jersey.model.internal.CommonConfig.configureMetaProviders(CommonConfig.java:648)
at org.glassfish.jersey.server.ResourceConfig.configureMetaProviders(ResourceConfig.java:829)
at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:453)
at org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:184)
at org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:350)
at org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:347)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:255)
at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:347)
at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:392)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:177)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:369)
at javax.servlet.GenericServlet.init(GenericServlet.java:160)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5123)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5407)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Sep 18, 2016 6:11:14 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /messanger threw load() exception
java.lang.NoSuchMethodError: org.glassfish.jersey.message.filtering.EntityFilteringFeature.enabled(Ljavax/ws/rs/core/Configuration;)Z
at org.glassfish.jersey.moxy.json.MoxyJsonFeature.configure(MoxyJsonFeature.java:88)
at org.glassfish.jersey.model.internal.CommonConfig.configureFeatures(CommonConfig.java:730)
at org.glassfish.jersey.model.internal.CommonConfig.configureMetaProviders(CommonConfig.java:648)
at org.glassfish.jersey.server.ResourceConfig.configureMetaProviders(ResourceConfig.java:829)
at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:453)
at org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:184)
at org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:350)
at org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:347)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:255)
at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:347)
at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:392)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:177)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:369)
at javax.servlet.GenericServlet.init(GenericServlet.java:160)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5123)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5407)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
and when removed version info from pom getting below error
Sep 18, 2016 6:27:57 PM org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: org/glassfish/jersey/moxy/json/internal/ConfigurableMoxyJsonProvider
at org.glassfish.jersey.moxy.json.MoxyJsonFeature.configure(MoxyJsonFeature.java:92)
at org.glassfish.jersey.model.internal.CommonConfig.configureFeatures(CommonConfig.java:730)
at org.glassfish.jersey.model.internal.CommonConfig.configureMetaProviders(CommonConfig.java:648)
at org.glassfish.jersey.server.ResourceConfig.configureMetaProviders(ResourceConfig.java:829)
at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:453)
at org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:184)
at org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:350)
at org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:347)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:255)
at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:347)
at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:392)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:177)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:369)
at javax.servlet.GenericServlet.init(GenericServlet.java:160)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Sep 18, 2016 6:27:57 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Allocate exception for servlet Jersey Web Application
java.lang.NoClassDefFoundError: org/glassfish/jersey/moxy/json/internal/ConfigurableMoxyJsonProvider
at org.glassfish.jersey.moxy.json.MoxyJsonFeature.configure(MoxyJsonFeature.java:92)
at org.glassfish.jersey.model.internal.CommonConfig.configureFeatures(CommonConfig.java:730)
at org.glassfish.jersey.model.internal.CommonConfig.configureMetaProviders(CommonConfig.java:648)
at org.glassfish.jersey.server.ResourceConfig.configureMetaProviders(ResourceConfig.java:829)
at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:453)
at org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:184)
at org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:350)
at org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:347)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:255)
at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:347)
at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:392)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:177)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:369)
at javax.servlet.GenericServlet.init(GenericServlet.java:160)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
!!! SOLVED.
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-moxy</artifactId>
<version>2.8</version>
</dependency>
this solved my problem.
Tried the following
mvn dependency:tree
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # messanger ---
[INFO] in.alonebirddev.acs:messanger:war:0.0.1-SNAPSHOT
[INFO] +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.23.2:compile
[INFO] | +- org.glassfish.hk2.external:javax.inject:jar:2.5.0-b05:compile
[INFO] | +- org.glassfish.jersey.core:jersey-common:jar:2.23.2:compile
[INFO] | | +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] | | +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.23.2:compile
[INFO] | | +- org.glassfish.hk2:hk2-api:jar:2.5.0-b05:compile
[INFO] | | | +- org.glassfish.hk2:hk2-utils:jar:2.5.0-b05:compile
[INFO] | | | \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.5.0-b05:compile
[INFO] | | +- org.glassfish.hk2:hk2-locator:jar:2.5.0-b05:compile
[INFO] | | | \- org.javassist:javassist:jar:3.20.0-GA:compile
[INFO] | | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] | +- org.glassfish.jersey.core:jersey-server:jar:2.23.2:compile
[INFO] | | +- org.glassfish.jersey.core:jersey-client:jar:2.23.2:compile
[INFO] | | +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.23.2:compile
[INFO] | | \- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | \- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
[INFO] +- org.glassfish.jersey.media:jersey-media-moxy:jar:2.23.2:compile
[INFO] | \- org.eclipse.persistence:org.eclipse.persistence.moxy:jar:2.6.0:compile
[INFO] | +- org.eclipse.persistence:org.eclipse.persistence.core:jar:2.6.0:compile
[INFO] | | \- org.eclipse.persistence:org.eclipse.persistence.asm:jar:2.6.0:compile
[INFO] | \- org.glassfish:javax.json:jar:1.0.4:compile
[INFO] \- org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.7:compile
I checked the repo for this. The dependency you have is 2.7 and the method is not available in that revision. Have you tried adding a newer dependency to jersey-entity-filtering and tried if it works ?
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?
I have opened a Maven project in Eclipse. When I click on Run as -> Maven build and type "clean install" as goal, then I get the following error message:
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder
org.apache.maven.lifecycle.internal.builder.
singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ---------------------------------------------------------------------
[INFO] Building OCL 0.0.1-SNAPSHOT
[INFO] ---------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # OCL ---
[INFO]
[INFO] --- monticore-maven-plugin:4.1.1:generate (default) # OCL ---
[INFO] Downloading: http://nexus.se.rwth-aachen.de/content/groups/monticore/
de/se_rwth/commons/se-commons-utilities/1.7.0-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: http://nexus.se.rwth
aachen.de/content/groups/monticore/de/
se_rwth/commons/se-commons-utilities/1.7.0-SNAPSHOT/
maven-metadata.xml (1006 B at 0.2 KB/sec)
[INFO] Downloading: http://nexus.se.rwth-
aachen.de/content/groups/monticore/
de/se_rwth/commons/se-commons/1.7.0-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: http://nexus.se.rwth-
aachen.de/content/groups/monticore/de/se_rwth/commons/se-commons/1.7.0-
SNAPSHOT/maven-metadata.xml (607 B at 0.5 KB/sec)
[INFO] Downloading: http://nexus.se.rwth-
aachen.de/content/groups/monticore/de/
se_rwth/commons/se-commons-logging/1.7.0-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: http://nexus.se.rwth-
aachen.de/content/groups/monticore/de/
se_rwth/commons/se-commons-logging/1.7.0-SNAPSHOT
/maven-metadata.xml (1004 B at 0.2 KB/sec)
[INFO] Downloading: http://nexus.se.rwth-
aachen.de/content/groups/monticore/de/
se_rwth/commons/se-commons-groovy/1.7.0-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: http://nexus.se.rwth-
aachen.de/content/groups/monticore/de/se_rwth/
commons/se-commons-groovy/1.7.0-SNAPSHOT/
maven-metadata.xml (2 KB at 1.3 KB/sec)
[WARNING] Error injecting: de.monticore.mojo.GenerateMojo
java.lang.TypeNotPresentException: Type de.monticore.mojo.GenerateMojo not
present
at org.eclipse.sisu.space.URLClassSpace.loadClass
(URLClassSpace.java:115)
at org.eclipse.sisu.space.NamedClass.load(NamedClass.java:46)
at
org.eclipse.sisu.space.AbstractDeferredClass.get
(AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.
provision(ProviderInternalFactory.java:86)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.
provision(InternalFactoryToInitializableAdapter.java:55)
at com.google.inject.internal.ProviderInternalFactory$1.call
(ProviderInternalFactory.java:70)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.
provision(ProvisionListenerStackCallback.java:100)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.
onProvision(PlexusLifecycleManager.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.
provision(ProvisionListenerStackCallback.java:109)
at com.google.inject.internal.ProvisionListenerStackCallback.
provision(ProvisionListenerStackCallback.java:55)
at com.google.inject.internal.ProviderInternalFactory.
circularGet(ProviderInternalFactory.java:68)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.
get(InternalFactoryToInitializableAdapter.java:47)
at com.google.inject.internal.InjectorImpl$2$1.
call(InjectorImpl.java:997)
at com.google.inject.internal.InjectorImpl.
callInContext(InjectorImpl.java:1047)
at com.google.inject.internal.InjectorImpl$2.
get(InjectorImpl.java:993)
at com.google.inject.Scopes$1$1.get(Scopes.java:59)
at org.eclipse.sisu.inject.LazyBeanEntry.
getValue(LazyBeanEntry.java:82)
at org.eclipse.sisu.plexus.LazyPlexusBean.
getValue(LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.
lookup(DefaultPlexusContainer.java:260)
at org.codehaus.plexus.DefaultPlexusContainer.
lookup(DefaultPlexusContainer.java:252)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.
getConfiguredMojo(DefaultMavenPluginManager.java:462)
at org.apache.maven.plugin.DefaultBuildPluginManager.
executeMojo(DefaultBuildPluginManager.java:120)
at org.apache.maven.lifecycle.internal.MojoExecutor.
execute(MojoExecutor.java:208)
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:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.
buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.
SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.
execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.plexus.classworlds.launcher.Launcher.
launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.
launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.
mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.
main(Launcher.java:356)
Caused by: java.lang.UnsupportedClassVersionError:
de/monticore/mojo/GenerateMojo :
Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at org.codehaus.plexus.classworlds.realm.ClassRealm.
loadClassFromSelf(ClassRealm.java:389)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.
loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.
unsynchronizedLoadClass(ClassRealm.java:259)
at org.codehaus.plexus.classworlds.realm.ClassRealm.
loadClass(ClassRealm.java:235)
at org.codehaus.plexus.classworlds.realm.ClassRealm.
loadClass(ClassRealm.java:227)
at org.eclipse.sisu.space.URLClassSpace.
loadClass(URLClassSpace.java:107)
... 41 more
[INFO] ---------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ---------------------------------------------------------------------
[INFO] Total time: 29.582 s
[INFO] Finished at: 2015-06-07T13:42:38+01:00
[INFO] Final Memory: 12M/89M
[INFO] ---------------------------------------------------------------------
[ERROR] Failed to execute goal de.monticore.mojo:monticore-maven-
plugin:4.1.1:generate (default) on project OCL:
Execution default of goal de.monticore.mojo:monticore-maven-
plugin:4.1.1:generate failed: Unable to load the mojo 'generate' in the
plugin 'de.monticore.mojo:monticore-maven-plugin:4.1.1' due to an API
incompatibility:
org.codehaus.plexus.component.repository.exception.ComponentLookupException:
de/monticore/mojo/GenerateMojo : Unsupported major.minor version 52.0
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>de.monticore.mojo:monticore-maven-plugin:4.1.1
[ERROR] strategy =
org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/Abdullah-
PC/.m2/repository/de/monticore/mojo/monticore-maven-plugin/4.1.1/monticore-
maven-plugin-4.1.1.jar
[ERROR] urls[1] = file:/C:/Users/Abdullah-
PC/.m2/repository/de/monticore/monticore-generator/4.1.1/monticore-
generator-4.1.1.jar
[ERROR] urls[2] = file:/C:/Users/Abdullah-
PC/.m2/repository/de/monticore/monticore-runtime/4.1.1/monticore-runtime-
4.1.1.jar
[ERROR] urls[3] = file:/C:/Users/Abdullah-
PC/.m2/repository/de/se_rwth/commons/se-commons-utilities/1.7.0-
SNAPSHOT/se-commons-utilities-1.7.0-SNAPSHOT.jar
[ERROR] urls[4] = file:/C:/Users/Abdullah-
PC/.m2/repository/de/se_rwth/commons/se-commons-logging/1.7.0-SNAPSHOT/se-
commons-logging-1.7.0-SNAPSHOT.jar
[ERROR] urls[5] = file:/C:/Users/Abdullah-
PC/.m2/repository/com/google/inject/guice/3.0/guice-3.0.jar
[ERROR] urls[6] = file:/C:/Users/Abdullah-
PC/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
[ERROR] urls[7] = file:/C:/Users/Abdullah-
PC/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar
[ERROR] urls[8] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.jar
[ERROR] urls[9] = file:/C:/Users/Abdullah-
PC/.m2/repository/com/google/code/findbugs/jsr305/3.0.0/jsr305-3.0.0.jar
[ERROR] urls[10] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/antlr/antlr4/4.3/antlr4-4.3.jar
[ERROR] urls[11] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2.jar
[ERROR] urls[12] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/antlr/ST4/4.0.8/ST4-4.0.8.jar
[ERROR] urls[13] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/freemarker/freemarker/2.3.20/freemarker-2.3.20.jar
[ERROR] urls[14] = file:/C:/Users/Abdullah-
PC/.m2/repository/de/se_rwth/commons/se-commons-groovy/1.7.0-SNAPSHOT/se-
commons-groovy-1.7.0-SNAPSHOT.jar
[ERROR] urls[15] = file:/C:/Users/Abdullah-
PC/.m2/repository/jline/jline/2.12/jline-2.12.jar
[ERROR] urls[16] = file:/C:/Users/Abdullah-PC/.m2/repository/commons-
io/commons-io/2.4/commons-io-2.4.jar
[ERROR] urls[17] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/codehaus/groovy/groovy/2.3.0/groovy-2.3.0.jar
[ERROR] urls[18] = file:/C:/Users/Abdullah-
PC/.m2/repository/de/monticore/monticore-grammar/4.1.1/monticore-grammar-
4.1.1.jar
[ERROR] urls[19] = file:/C:/Users/Abdullah-
PC/.m2/repository/de/monticore/lang/cd4analysis/0.0.1-MCGen.3/cd4analysis-
0.0.1-MCGen.3.jar
[ERROR] urls[20] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/antlr/antlr4-annotations/4.3/antlr4-annotations-
4.3.jar
[ERROR] urls[21] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/antlr/antlr4-runtime/4.3/antlr4-runtime-4.3.jar
[ERROR] urls[22] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/abego/treelayout/org.abego.
treelayout.core/1.0.1/org.abego.treelayout.core-1.0.1.jar
[ERROR] urls[23] = file:/C:/Users/Abdullah-
PC/.m2/repository/de/monticore/de.monticore.java/4.1.0.M2/de.monticore.java-
4.1.0.M2.jar
[ERROR] urls[24] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-
0.9.0.M2.jar
[ERROR] urls[25] = file:/C:/Users/Abdullah-
PC/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
[ERROR] urls[26] = file:/C:/Users/Abdullah-
PC/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
[ERROR] urls[27] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-
no_aop.jar
[ERROR] urls[28] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/eclipse/sisu/org.eclipse.
sisu.inject/0.0.0.M5/org.eclipse.sisu.inject-0.0.0.M5.jar
[ERROR] urls[29] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.19/plexus-
interpolation-1.19.jar
[ERROR] urls[30] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.17/plexus-utils-
3.0.17.jar
[ERROR] urls[31] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/codehaus/plexus/plexus-component-
annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[32] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-
dispatcher-1.3.jar
[ERROR] urls[33] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-
1.4.jar
[ERROR] urls[34] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-
annotations/3.3/maven-plugin-annotations-3.3.jar
[ERROR] urls[35] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/apache/maven/reporting/maven-reporting-api/3.0/maven-
reporting-api-3.0.jar
[ERROR] urls[36] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.6/doxia-sink-api-
1.6.jar
[ERROR] urls[37] = file:/C:/Users/Abdullah-
PC/.m2/repository/org/apache/maven/doxia/doxia-logging-api/1.6/doxia-
logging-api-1.6.jar
[ERROR] urls[38] = file:/C:/Users/Abdullah-PC/.m2/repository/xml-apis/xml-
apis/1.0.b2/xml-apis-1.0.b2.jar
[ERROR] urls[39] = file:/C:/Users/Abdullah-
PC/.m2/repository/com/google/guava/guava/18.0/guava-18.0.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent:
null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[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/PluginContainerException
And I also add pom.xml :
<project xmlns="http://maven.apache.org/POM/4.0.0"
mlns: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>
<!-- == PROJECT COORDINATES =============================================>
<groupId>OCL</groupId>
<artifactId>OCL</artifactId>
<version>0.0.1-SNAPSHOT</version>
<!-- == PROJECT PROPERTIES ==============================================-->
<properties>
<!-- .. Libraries ..................................................... -->
<antlr.version>4.3</antlr.version>
<guava.version>18.0</guava.version>
<jsr305.version>3.0.0</jsr305.version>
<junit.version>4.11</junit.version>
<logback.version>1.1.2</logback.version>
<monticore.version>4.1.4</monticore.version>
<se-commons.version>1.7.0</se-commons.version>
<!-- .. Plugins ....................................................... -->
<compiler.plugin>3.2</compiler.plugin>
<monticore.plugin>4.1.1</monticore.plugin>
<!-- Classifiers -->
<grammars.classifier>grammars</grammars.classifier>
<!-- .. Misc .......................................................... -->
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<!-- == PROJECT DEPENDENCIES =============================================->
<dependencies>
<dependency>
<groupId>de.se_rwth.commons</groupId>
<artifactId>se-commons-logging</artifactId>
<version>${se-commons.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>${jsr305.version}</version>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-annotations</artifactId>
<version>${antlr.version}</version>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>${antlr.version}</version>
</dependency>
<!-- MontiCore Dependencies -->
<dependency>
<groupId>de.monticore</groupId>
<artifactId>monticore-runtime</artifactId>
<version>${monticore.version}</version>
</dependency>
<dependency>
<groupId>de.monticore</groupId>
<artifactId>monticore-grammar</artifactId>
<version>${monticore.version}</version>
</dependency>
<dependency>
<groupId>de.monticore</groupId>
<artifactId>monticore-grammar</artifactId>
<version>${monticore.version}</version>
<classifier>${grammars.classifier}</classifier>
<scope>provided</scope>
</dependency>
<!-- .. Test Libraries ............................................... -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>de.monticore</groupId>
<artifactId>monticore-runtime</artifactId>
<version>${monticore.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
</dependencies>
<!-- == PROJECT BUILD SETTINGS ===========================================->
<build>
<plugins>
<!-- MontiCore Generation -->
<plugin>
<groupId>de.monticore.mojo</groupId>
<artifactId>monticore-maven-plugin</artifactId>
<version>${monticore.plugin}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Other Configuration -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler.plugin}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
</build>
<!-- == DEPENDENCY & PLUGIN REPOSITORIES ===============================-->
<repositories>
<repository>
<id>se-public</id>
<url>http://nexus.se.rwth-aachen.de/content/groups/public</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>se-public</id>
<url>http://nexus.se.rwth-aachen.de/content/groups/public</url>
</pluginRepository>
</pluginRepositories>
</project>
How can I solve my problem?
best regards,
I´m trying to deploy my maven ear project but I´m getting this error while doing, mvn install in the pom proyect(my IDE is eclipse)
C:\temp\eat>mvn clean install -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] eat application
[INFO] eat utility module
[INFO] eat EJB module
[INFO] eat Web module
[INFO] eat EAR module
[INFO] eat integration tests module
[INFO] ------------------------------------------------------------------------
[INFO] Building eat application
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
-----------------------------------------------------
this realm = app0.child-container[org.apache.maven.plugins:maven-site-plugin:2.0
-beta-7]
urls[0] = file:/C:/Users/luis.cabezas/.m2/repository/org/apache/maven/plugins/ma
ven-site-plugin/2.0-beta-7/maven-site-plugin-2.0-beta-7.jar
urls[1] = file:/C:/Users/luis.cabezas/.m2/repository/org/codehaus/plexus/plexus-
utils/1.1/plexus-utils-1.1.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry#a6c57a42
import: org.codehaus.classworlds.Entry#12f43f3b
import: org.codehaus.classworlds.Entry#20025374
import: org.codehaus.classworlds.Entry#f8e44ca4
import: org.codehaus.classworlds.Entry#92758522
import: org.codehaus.classworlds.Entry#ebf2705b
import: org.codehaus.classworlds.Entry#bb25e54
import: org.codehaus.classworlds.Entry#bece5185
import: org.codehaus.classworlds.Entry#3fee8e37
import: org.codehaus.classworlds.Entry#3fee19d8
this realm = plexus.core
urls[0] = file:/C:/apache-maven-2.2.1/bin/../lib/maven-2.2.1-uber.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry#a6c57a42
import: org.codehaus.classworlds.Entry#12f43f3b
import: org.codehaus.classworlds.Entry#20025374
import: org.codehaus.classworlds.Entry#f8e44ca4
import: org.codehaus.classworlds.Entry#92758522
import: org.codehaus.classworlds.Entry#ebf2705b
import: org.codehaus.classworlds.Entry#bb25e54
import: org.codehaus.classworlds.Entry#bece5185
import: org.codehaus.classworlds.Entry#3fee8e37
import: org.codehaus.classworlds.Entry#3fee19d8
----------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plu
gins:maven-site-plugin:2.0-beta-7:attach-descriptor': Unable to load the mojo 'o
rg.apache.maven.plugins:maven-site-plugin:2.0-beta-7:attach-descriptor' in the p
lugin 'org.apache.maven.plugins:maven-site-plugin'. A required class is missing:
org/apache/maven/doxia/tools/SiteToolException
org.apache.maven.doxia.tools.SiteToolException
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the pl
ugin manager executing goal 'org.apache.maven.plugins:maven-site-plugin:2.0-beta
-7:attach-descriptor': Unable to load the mojo 'org.apache.maven.plugins:maven-s
ite-plugin:2.0-beta-7:attach-descriptor' in the plugin 'org.apache.maven.plugins
:maven-site-plugin'. A required class is missing: org/apache/maven/doxia/tools/S
iteToolException
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:698)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.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: org.apache.maven.plugin.PluginManagerException: Unable to load the mo
jo 'org.apache.maven.plugins:maven-site-plugin:2.0-beta-7:attach-descriptor' in
the plugin 'org.apache.maven.plugins:maven-site-plugin'. A required class is mis
sing: org/apache/maven/doxia/tools/SiteToolException
at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(Defaul
tPluginManager.java:669)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:468)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
... 17 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupExc
eption: Unable to lookup component 'org.apache.maven.plugin.Mojoorg.apache.maven
.plugins:maven-site-plugin:2.0-beta-7:attach-descriptor', it could not be created at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:335)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440)
at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(Defaul
tPluginManager.java:652)
... 19 more
Caused by: org.codehaus.plexus.component.factory.ComponentInstantiationException
: Could not instanciate component: role: 'null', implementation: 'org.apache.mav
en.plugins.site.SiteDescriptorAttachMojo'
at org.codehaus.plexus.component.factory.java.JavaComponentFactory.makeE
xception(JavaComponentFactory.java:77)
at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newIn
stance(JavaComponentFactory.java:62)
at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(De
faultPlexusContainer.java:1464)
at org.codehaus.plexus.component.manager.AbstractComponentManager.create
ComponentInstance(AbstractComponentManager.java:93)
at org.codehaus.plexus.component.manager.PerLookupComponentManager.getCo
mponent(PerLookupComponentManager.java:48)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:331)
... 21 more
Caused by: java.lang.NoClassDefFoundError: org/apache/maven/doxia/tools/SiteTool
Exception
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newIn
stance(JavaComponentFactory.java:44)
... 25 more
Caused by: java.lang.ClassNotFoundException: org.apache.maven.doxia.tools.SiteTo
olException
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:306)
at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassL
oader.java:195)
at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal
m.java:255)
at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal
m.java:274)
at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.
java:214)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 31 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Mon Mar 04 16:01:47 CET 2013
[INFO] Final Memory: 4M/15M
this is my parent.pom
<modelVersion>4.0.0</modelVersion>
<groupId>com.eat</groupId>
<artifactId>eat</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>eat application</name>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2.SP1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<excludedGroups>${tests.excludedGroups}</excludedGroups>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<modules>
<module>eat-util</module>
<module>eat-ejb</module>
<module>eat-web</module>
<module>eat-ear</module>
<module>eat-tests</module>
</modules>
ear.pom
<parent>
<artifactId>eat</artifactId>
<groupId>com.eat</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>com.eat</groupId>
<artifactId>eat-ear</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>ear</packaging>
<name>eat EAR module</name>
<build>
<finalName>eat-ear</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<version>5</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<earSourceExcludes>**/application.xml, **/jboss-app.xml</earSourceExcludes>
<generateApplicationXml>true</generateApplicationXml>
<jboss>
<version>4.2.3</version>
<loader-repository>seam.jboss.org:loader=eat-ear.ear</loader-repository>
</jboss>
<modules>
<webModule>
<groupId>com.eat</groupId>
<artifactId>eat-web</artifactId>
<contextRoot>/eat</contextRoot>
<bundleFileName>eat-web.war</bundleFileName>
</webModule>
<ejbModule>
<groupId>com.eat</groupId>
<artifactId>eat-ejb</artifactId>
<bundleFileName>eat-ejb.jar</bundleFileName>
</ejbModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
war.pom
<parent>
<artifactId>eat</artifactId>
<groupId>com.eat</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>com.eat</groupId>
<artifactId>eat-web</artifactId>
<packaging>war</packaging>
<version>1.0.0-SNAPSHOT</version>
<name>eat Web module</name>
ejb.pom
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>eat</artifactId>
<groupId>com.eat</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>com.eat</groupId>
<artifactId>eat-ejb</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>ejb</packaging>
<name>eat EJB module</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.2</version>
<configuration>
<ejbVersion>3.0</ejbVersion>
</configuration>
</plugin>
</plugins>
</build>
I don´t know if this is enough information. if is not, tell me.
Thanks.