NPE when building OSGi bundles with Maven Tycho - eclipse

I have several OSGi-bundles that I want to build using Maven Tycho. While the dependencies of the first 4 bundles can be resolved without problem, Tycho quits with the following cryptic exception at the 5th:
[INFO] Resolving dependencies of MavenProject: my.parent:my.module:0.0.1-SNAPSHOT # D:\Path\To\Project\pom.xml
[WARNING] The following locally built units have been used to resolve project dependencies:
[WARNING] my-other-module/0.0.1.201407011334
[INFO] Resolving class path of MavenProject: my.parent:my.module:0.0.1-SNAPSHOT # D:\Path\To\Project\pom.xml
[ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:167)
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(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: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.NullPointerException
at org.eclipse.tycho.core.osgitools.OsgiBundleProject.resolveClassPath(OsgiBundleProject.java:187)
at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:122)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:75)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
... 11 more
Following is the MANIFEST.MF of that bundle (Import-Package section):
Import-Package: my.other.module.package;version="[0.0,1)",
org.apache.commons.lang3.builder;version="[3.3,4)",
org.dozer;version="[5.5,6)",
org.osgi.service.blueprint;version="[1.0.0,2.0.0)"
Resolving the dependencies from the repository shouldn't be a problem, as launching the bundles from within eclipse works fine.
Interesting aspect: I'm working on Windows 7x64. On my coworker's pc with Linux it runs fine.
I'm not really sure where to start finding the error - the exception doesn't really give a hint, so I'd appreciate every tip. If you need further information, I'd be happy to clarify.

Related

Not able to install GWT Plugin as of May 2018 in eclipse

Please reply for both the issues.
Issue 1:
The installation of GWT Plugin through eclipse marketplace was working fine until last month. But now as I check there is some issue. The URL http://storage.googleapis.com/gwt-eclipse-plugin/v3/release is not reachable. This url is used to install the plugin in eclipse.
Issue 2
Also I tried compiling the source code from https://github.com/gwt-plugins/gwt-eclipse-plugin. I am also pasting part of the log output for reference:
[INFO] Adding repository http://download.eclipse.org/webtools/repository/mars
[INFO] Adding repository http://download.eclipse.org/tools/orbit/downloads/drops/R20160221192158/repository
[INFO] Adding repository https://dl.google.com/eclipse/google-cloud-eclipse/stable
[ERROR] Failed to resolve target definition C:\Work\softwares\gwt-eclipse-plugin-master\eclipse\mars\gwt-eclipse-mars.target: Could not find "com.google.cloud.tools.eclipse.suite.feature.feature.group/1.6.0.201803071812" in the repositories of the current location -> [Help 1]
org.apache.maven.MavenExecutionException: Failed to resolve target definition C:\Work\softwares\gwt-eclipse-plugin-master\eclipse\mars\gwt-eclipse-mars.target: Could not find "com.google.cloud.tools.eclipse.suite.feature.feature.group/1.6.0.201803071812" in the repositories of the current location
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:100)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:266)
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)
Caused by: org.eclipse.tycho.core.shared.BuildFailureException: Failed to resolve target definition C:\Work\softwares\gwt-eclipse-plugin-master\eclipse\mars\gwt-eclipse-mars.target: Could not find "com.google.cloud.tools.eclipse.suite.feature.feature.group/1.6.0.201803071812" in the repositories of the current location
at org.eclipse.tycho.p2.target.TargetDefinitionResolver.resolveContent(TargetDefinitionResolver.java:99)
at org.eclipse.tycho.p2.target.TargetDefinitionResolverService.resolveFromArguments(TargetDefinitionResolverService.java:70)
at org.eclipse.tycho.p2.target.TargetDefinitionResolverService.getTargetDefinitionContent(TargetDefinitionResolverService.java:60)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.resolveTargetDefinitions(TargetPlatformFactoryImpl.java:214)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:155)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:128)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:1)
at org.eclipse.tycho.p2.manager.ReactorRepositoryManagerImpl.computePreliminaryTargetPlatform(ReactorRepositoryManagerImpl.java:84)
at org.eclipse.tycho.p2.resolver.P2DependencyResolver.computePreliminaryTargetPlatform(P2DependencyResolver.java:223)
at org.eclipse.tycho.core.resolver.DefaultTychoResolver.resolveProject(DefaultTychoResolver.java:109)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:95)
... 14 more
Caused by: org.eclipse.tycho.p2.target.facade.TargetDefinitionResolutionException: Could not find "com.google.cloud.tools.eclipse.suite.feature.feature.group/1.6.0.201803071812" in the repositories of the current location
at org.eclipse.tycho.p2.target.TargetDefinitionResolver$LoadedIULocation.findUnitInThisLocation(TargetDefinitionResolver.java:313)
at org.eclipse.tycho.p2.target.TargetDefinitionResolver$LoadedIULocation.getRootIUs(TargetDefinitionResolver.java:303)
at org.eclipse.tycho.p2.target.TargetDefinitionResolver$ResolverRun.addLocation(TargetDefinitionResolver.java:155)
at org.eclipse.tycho.p2.target.TargetDefinitionResolver.resolveContentWithExceptions(TargetDefinitionResolver.java:121)
at org.eclipse.tycho.p2.target.TargetDefinitionResolver.resolveContent(TargetDefinitionResolver.java:94)
... 24 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/MavenExecutionException
Just use https://github.com/gwt-plugins/gwt-eclipse-plugin
This is a fork of the old plugin, but is still maintained and has a bunch of extra features.
Look at the GitHub page for documentation (also in the form of videos).
Also available in Eclipse Marktplace: https://marketplace.eclipse.org/content/gwt-eclipse-plugin

Numenta - htm.java-examples - Ubuntu - Eclipse - NetworkAPIDemo - NoClassDefFoundError: no/uib/cipr/matrix/sparse/FlexCompRowMatrix

I am facing problems, while trying to run the NetworkAPIDemo example with reference to the htm.java-examples
If I try to run the code, I get the error:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.NoClassDefFoundError: no/uib/cipr/matrix/sparse/FlexCompRowMatrix
at org.numenta.nupic.algorithms.SDRClassifier.<init>(SDRClassifier.java:180)
at org.numenta.nupic.algorithms.SDRClassifier.<init>(SDRClassifier.java:159)
at org.numenta.nupic.network.Layer.makeClassifiers(Layer.java:1947)
at org.numenta.nupic.network.Layer.close(Layer.java:504)
at org.numenta.nupic.network.Region.close(Region.java:199)
at org.numenta.nupic.network.Region.observe(Region.java:315)
at org.numenta.nupic.network.Network.observe(Network.java:535)
at Intro2.NetworkAPIDemo.<init>(NetworkAPIDemo.java:66)
at Intro2.NetworkAPIDemo.main(NetworkAPIDemo.java:242)
Caused by: java.lang.ClassNotFoundException: no.uib.cipr.matrix.sparse.FlexCompRowMatrix
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 9 more
If I add the dependency to the POM file:
com.googlecode.matrix-toolkits-java.mtj.1.0.2
I get the error:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "Sensor Layer [Region 1:Layer 5] Thread" java.lang.NoSuchMethodError: no.uib.cipr.matrix.sparse.FlexCompRowMatrix.addCol([D)V
at org.numenta.nupic.algorithms.SDRClassifier.compute(SDRClassifier.java:280)
at org.numenta.nupic.network.Layer$FunctionFactory$3.call(Layer.java:2372)
at org.numenta.nupic.network.Layer$FunctionFactory$3.call(Layer.java:2345)
at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55)
at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55)
at rx.internal.operators.OperatorFilter$1.onNext(OperatorFilter.java:54)
at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55)
at rx.internal.operators.OperatorCast$1.onNext(OperatorCast.java:50)
at rx.internal.operators.OperatorFilter$1.onNext(OperatorFilter.java:54)
at rx.subjects.SubjectSubscriptionManager$SubjectObserver.onNext(SubjectSubscriptionManager.java:224)
at rx.subjects.PublishSubject.onNext(PublishSubject.java:114)
at org.numenta.nupic.network.Layer.compute(Layer.java:956)
at org.numenta.nupic.network.Region$2.onNext(Region.java:653)
at org.numenta.nupic.network.Region$2.onNext(Region.java:646)
at org.numenta.nupic.network.Layer$3.onNext(Layer.java:1863)
at org.numenta.nupic.network.Layer$3.onNext(Layer.java:1843)
at rx.Observable$33.onNext(Observable.java:7480)
at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:130)
at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55)
at rx.internal.operators.OperatorFilter$1.onNext(OperatorFilter.java:54)
at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55)
at rx.internal.operators.OperatorCast$1.onNext(OperatorCast.java:50)
at rx.internal.operators.OperatorFilter$1.onNext(OperatorFilter.java:54)
at rx.subjects.SubjectSubscriptionManager$SubjectObserver.onNext(SubjectSubscriptionManager.java:224)
at rx.subjects.PublishSubject.onNext(PublishSubject.java:114)
at org.numenta.nupic.network.Layer.compute(Layer.java:956)
at org.numenta.nupic.network.Region$2.onNext(Region.java:653)
at org.numenta.nupic.network.Region$2.onNext(Region.java:646)
at org.numenta.nupic.network.Layer$3.onNext(Layer.java:1863)
at org.numenta.nupic.network.Layer$3.onNext(Layer.java:1843)
at rx.Observable$33.onNext(Observable.java:7480)
at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:130)
at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55)
at rx.internal.operators.OperatorFilter$1.onNext(OperatorFilter.java:54)
at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55)
at rx.internal.operators.OperatorCast$1.onNext(OperatorCast.java:50)
at rx.internal.operators.OperatorFilter$1.onNext(OperatorFilter.java:54)
at rx.subjects.SubjectSubscriptionManager$SubjectObserver.onNext(SubjectSubscriptionManager.java:224)
at rx.subjects.PublishSubject.onNext(PublishSubject.java:114)
at org.numenta.nupic.network.Layer.compute(Layer.java:956)
at org.numenta.nupic.network.Layer$5.lambda$run$1(Layer.java:2039)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at org.numenta.nupic.network.Layer$5.run(Layer.java:2036)
Caused by: rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value: org.numenta.nupic.network.ManualInput.class
at rx.exceptions.OnErrorThrowable.addValueAsLastCause(OnErrorThrowable.java:101)
at rx.internal.operators.OperatorFilter$1.onNext(OperatorFilter.java:60)
... 46 more
Caused by: rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value: [I.class
at rx.exceptions.OnErrorThrowable.addValueAsLastCause(OnErrorThrowable.java:101)
at rx.internal.operators.OperatorCast$1.onNext(OperatorCast.java:52)
... 16 more
I encountered the problem with both openjdk1.8 and oracle_jdk1.8 as well.
com.googlecode.matrix-toolkits-java.mtj.1.0.2 can be found in the .m2 folder (I'm using Maven with Eclipse).
I tried running it on two computers, it worked with one of the computers, but the same code did not work with another computer. I did not bother with the Cortico examples, so external libraries should not cause any problem. In the POM file, I specify only the dependency
org.numenta.htm.java.0.6.13
If I add the external libraries (which can be found in the libs folder), I get the error:
Exception in thread "main" java.lang.NoSuchMethodError: org.numenta.nupic.Parameters.set(Lorg/numenta/nupic/Parameters$KEY;Ljava/lang/Object;)V
at Intro2.NetworkDemoHarness.getParameters(NetworkDemoHarness.java:211)
at Intro2.NetworkAPIDemo.createMultiLayerNetwork(NetworkAPIDemo.java:105)
at Intro2.NetworkAPIDemo.<init>(NetworkAPIDemo.java:62)
at Intro2.NetworkAPIDemo.main(NetworkAPIDemo.java:242)
I did not build the project from source, I only specified the dependencies in the POM.xml File. org.numenta.htm.java.0.6.12 can be found in the .m2 folder. I tried using 0.6.13 version of htm.java, but encountered the same problem.
POM.xml includes:
Specifying maven compiler to java 1.8
Specifying htm.java dependency
I am using Ubuntu 16.04 with Java:
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
Running:
mvn clean install
is successful with two warnings and 1 error:
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[ERROR] error reading /home/szi/.m2/repository/algorithmfoundry/algorithmfoundry-shade-culled/1.3/algorithmfoundry-shade-culled-1.3.jar; invalid LOC header (bad signature)
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
Running:
mvn -e exec:java -Dexec.mainClass="/home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java"
Gives the error:
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building HTM.Intro 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) # HTM.Intro ---
[WARNING]
java.lang.ClassNotFoundException: /home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:270)
at java.lang.Thread.run(Thread.java:748)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.990 s
[INFO] Finished at: 2017-05-23T12:03:37+02:00
[INFO] Final Memory: 12M/303M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project HTM.Intro: An exception occured while executing the Java class. /home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project HTM.Intro: An exception occured while executing the Java class. /home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
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)
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured while executing the Java class. /home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java
at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:339)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: java.lang.ClassNotFoundException: /home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:270)
at java.lang.Thread.run(Thread.java:748)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Can someone please give me an advice on what can be wrong? I copy-pasted the code from the github repository without modification.
Thank you for any help!
Problem solved!
If anyone encountered the same problem, you should add the library algorithmfoundry-shade-culled-1.3.jar to your project .

Why does IDEA report "Error:scalac: error while loading Object, Missing dependency 'object scala in compiler mirror'" building scala breeze?

The breeze project builds fine from command line sbt:
sbt package
...
info] Done packaging.
[info] Packaging /shared/breeze/viz/target/scala-2.11/breeze-viz_2.11-0.11-SNAPSHOT.jar ...
[info] Done packaging.
[success] Total time: 238 s, completed Jan 27, 2015 9:40:03 AM
However , the following error comes up repeatedly when doing Build|Rebuild Project in IntelliJ IDEA 14:
Error:scalac: error while loading Object, Missing dependency 'object scala in compiler mirror', required by /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/jre/lib/rt.jar(java/lang/Object.class)
Here is the full stacktrace:
Error:scalac: Error: scala.tools.nsc.typechecker.Namers$Namer.enterExistingSym(Lscala/reflect/internal/Symbols$Symbol;)Lscala/tools/nsc/typechecker/Contexts$Context;
java.lang.NoSuchMethodError: scala.tools.nsc.typechecker.Namers$Namer.enterExistingSym(Lscala/reflect/internal/Symbols$Symbol;)Lscala/tools/nsc/typechecker/Contexts$Context;
at org.scalamacros.paradise.typechecker.Namers$Namer$class.enterSym(Namers.scala:41)
at org.scalamacros.paradise.typechecker.Namers$$anon$3.enterSym(Namers.scala:13)
at org.scalamacros.paradise.typechecker.AnalyzerPlugins$MacroPlugin$.pluginsEnterSym(AnalyzerPlugins.scala:35)
at scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$13.custom(AnalyzerPlugins.scala:429)
at scala.tools.nsc.typechecker.AnalyzerPlugins$$anonfun$2.apply(AnalyzerPlugins.scala:371)
at scala.tools.nsc.typechecker.AnalyzerPlugins$$anonfun$2.apply(AnalyzerPlugins.scala:371)
at scala.collection.immutable.List.map(List.scala:273)
at scala.tools.nsc.typechecker.AnalyzerPlugins$class.invoke(AnalyzerPlugins.scala:371)
at scala.tools.nsc.typechecker.AnalyzerPlugins$class.pluginsEnterSym(AnalyzerPlugins.scala:423)
at scala.tools.nsc.Global$$anon$1.pluginsEnterSym(Global.scala:463)
at scala.tools.nsc.typechecker.Namers$Namer.enterSym(Namers.scala:274)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$enterSyms$1.apply(Namers.scala:500)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$enterSyms$1.apply(Namers.scala:499)
at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
at scala.collection.immutable.List.foldLeft(List.scala:84)
at scala.tools.nsc.typechecker.Namers$Namer.enterSyms(Namers.scala:499)
at scala.tools.nsc.typechecker.Namers$Namer.templateSig(Namers.scala:925)
at scala.tools.nsc.typechecker.Namers$Namer.moduleSig(Namers.scala:989)
at scala.tools.nsc.typechecker.Namers$Namer.getSig$1(Namers.scala:1526)
at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:1541)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply$mcV$sp(Namers.scala:781)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:780)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:780)
at scala.tools.nsc.typechecker.Namers$Namer.scala$tools$nsc$typechecker$Namers$Namer$$logAndValidate(Namers.scala:1568)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:780)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:772)
at scala.tools.nsc.typechecker.Namers$$anon$1.completeImpl(Namers.scala:1684)
at scala.tools.nsc.typechecker.Namers$LockingTypeCompleter$class.complete(Namers.scala:1692)
at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1682)
at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1483)
at scala.reflect.internal.SymbolTable.openPackageModule(SymbolTable.scala:286)
at scala.tools.nsc.typechecker.Analyzer$packageObjects$$anon$2$$anon$4.traverse(Analyzer.scala:63)
at scala.tools.nsc.typechecker.Analyzer$packageObjects$$anon$2$$anon$4.traverse(Analyzer.scala:59)
at scala.reflect.api.Trees$Traverser$$anonfun$traverseStats$1$$anonfun$apply$1.apply$mcV$sp(Trees.scala:2498)
at scala.reflect.api.Trees$Traverser.atOwner(Trees.scala:2507)
at scala.reflect.api.Trees$Traverser.traverseStats(Trees.scala:2497)
at scala.reflect.internal.Trees$class.itraverse(Trees.scala:1326)
at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
at scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
at scala.tools.nsc.typechecker.Analyzer$packageObjects$$anon$2$$anon$4.traverse(Analyzer.scala:66)
at scala.tools.nsc.typechecker.Analyzer$packageObjects$$anon$2$$anon$4.traverse(Analyzer.scala:59)
at scala.reflect.api.Trees$Traverser$$anonfun$traverseStats$1$$anonfun$apply$1.apply$mcV$sp(Trees.scala:2498)
at scala.reflect.api.Trees$Traverser.atOwner(Trees.scala:2507)
at scala.reflect.api.Trees$Traverser.traverseStats(Trees.scala:2497)
at scala.reflect.internal.Trees$class.itraverse(Trees.scala:1326)
at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:16)
at scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2475)
at scala.tools.nsc.typechecker.Analyzer$packageObjects$$anon$2$$anon$4.traverse(Analyzer.scala:66)
at scala.tools.nsc.typechecker.Analyzer$packageObjects$$anon$2$$anon$4.traverse(Analyzer.scala:59)
at scala.reflect.api.Trees$Traverser.apply(Trees.scala:2513)
at scala.tools.nsc.typechecker.Analyzer$packageObjects$$anon$2.apply(Analyzer.scala:71)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply$mcV$sp(Global.scala:441)
at scala.tools.nsc.Global$GlobalPhase.withCurrentUnit(Global.scala:432)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:441)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:399)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:399)
at scala.collection.Iterator$class.foreach(Iterator.scala:750)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1202)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:399)
at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1500)
at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1487)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:1482)
at scala.tools.nsc.Global$Run.compile(Global.scala:1580)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:126)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:102)
at xsbt.CompilerInterface.run(CompilerInterface.scala:27)
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 sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:29)
at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26)
at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:65)
at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:23)
at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
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 com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
There's a version mismatch between the Scala compiler and the macro paradise version. Macro-paradise is a compiler plugin and is tightly coupled to the Scala compiler, so it's cross-compiled against a full Scala version. Check the version of Scala that IntelliJ uses and check what Scala version is macro-paradise compiled against.
Not sure exactly how Intellij works, but in Eclipse there's a "Scala Installation" configuration page (similar to JDK). You can set a Scala Installation that matches the paradise version. Maybe IntelliJ has a similar concept.
For my case, I switch to JDK8, now it builds successfully.

java.lang.ClassNotFoundException: org.slf4j.LoggerFactory Maven

I just installed Maven on Eclipse. If I run the pom.xml, I get the error below.
People who use Windows don't get this error. I have Mac OS X.
When I add slf4j-simple-1.7.5.jr and slf4j-api-1.7.5.jar to the build path, it works.
Is there a way NOT to add external jars?
EDIT 2:
I used Maven clean via Terminal and that worked. I think the problem is Maven internal in Eclipse.
EDIT 3:
I deleted the projects and checked out it all from SVN and it worked somehow.
[INFO] Scanning for projects...
[ERROR] Internal error: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException: org/slf4j/LoggerFactory: org.slf4j.LoggerFactory -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
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:601)
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: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.eclipse.tycho.core.maven.utils.MavenCompatiblityHelper.getPluginDescriptor(MavenCompatiblityHelper.java:86)
at org.eclipse.tycho.core.maven.utils.PluginRealmHelper.execute(PluginRealmHelper.java:95)
at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.getDependencyMetadata(P2TargetPlatformResolver.java:144)
at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.setupProjects(P2TargetPlatformResolver.java:126)
at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.setupProject(DefaultTychoDependencyResolver.java:87)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:77)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:273)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
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:601)
at org.eclipse.tycho.core.maven.utils.MavenCompatiblityHelper.getPluginDescriptor(MavenCompatiblityHelper.java:68)
... 18 more
Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at com.ning.http.client.AsyncHttpClient.<clinit>(AsyncHttpClient.java:147)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector.<init>(AsyncRepositoryConnector.java:150)
at org.sonatype.aether.connector.async.AsyncRepositoryConnectorFactory.newInstance(AsyncRepositoryConnectorFactory.java:110)
at org.sonatype.aether.impl.internal.DefaultRemoteRepositoryManager.getRepositoryConnector(DefaultRemoteRepositoryManager.java:333)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:456)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:220)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:197)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:268)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:173)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:316)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:108)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:143)
... 23 more
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
... 35 more
[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/InternalErrorException
If your code makes use of slf4j, you'll also have to add the API and one of the implementation jars to your project. So the answer is: no.

Grails test war creation error

I am using Grails 2.1.4 and Maven Integration.
I created pom file for Grails project. I am running a goal like this from Eclipse:
mvn -Dgrails.env=test package
I am getting error like this:
Fatal error forking Grails JVM: java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.grails.launcher.GrailsLauncher.launch(GrailsLauncher.java:150)
at org.grails.maven.plugin.tools.ForkedGrailsRuntime.main(ForkedGrailsRuntime.java:168)
Caused by: java.lang.reflect.InvocationTargetException
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:601)
at org.grails.launcher.GrailsLauncher.launch(GrailsLauncher.java:144)
... 1 more
Caused by: java.lang.IllegalStateException: User input is not enabled, cannot obtain input stream
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:194)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:391)
The error that you're seeing may happen once in a while, especially in Grails 2.1.x.
Run the command(mvn -Dgrails.env=test package) couple of times and you'll notice that your problem is intermittent, it cannot be reproduced all the time.
Setting the fork option to false in your pom.xml seems to 'fix' it, in most cases. It's probably a Grails bug for 2.1.x releases.
I haven't seen the issue yet in newer Grails versions.
I just encountered the same error after upgrading Grails from 2.2.1 to 2.2.4 .
The issue was that the plugin directory was not cleared out and was clashing with the new plugins coming in.
The solution is to delete all of the plugins in the project root/plugins directory and then run any grails or maven commands to reinstall the new set of plugins.