error starting 'sbt' inside project directory - scala

I am learning functional programming on Coursera with Scala. To attempt an assignment, I need to start 'sbt' in a project directory. I am following the instructions here: https://class.coursera.org/progfun-004/assignment/view?assignment_id=2
This is the error I got. I am sure that there's a build.sbt file and src folder within the project directory, but somehow sbt fails on me. Any ideas?
alex#alex-K46CM:~/progfun-assignments/example
$ sbt
[info] Loading project definition from /home/alex/progfun-assignments/example/project/project
[info] Loading project definition from /home/alex/progfun-assignments/example/project
[info] Compiling 8 Scala sources to /home/alex/progfun-assignments/example/project/target/scala-2.9.2/sbt-0.12/classes...
[error] error while loading <root>, zip file is empty
scala.tools.nsc.MissingRequirementError: object scala not found.
at scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass(Definitions.scala:655)
at scala.tools.nsc.symtab.Definitions$definitions$.getModule(Definitions.scala:605)
at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackage(Definitions.scala:145)
at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackageClass(Definitions.scala:146)
at scala.tools.nsc.symtab.Definitions$definitions$.AnyClass(Definitions.scala:176)
at scala.tools.nsc.symtab.Definitions$definitions$.init(Definitions.scala:814)
at scala.tools.nsc.Global$Run.<init>(Global.scala:697)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:86)
at xsbt.CachedCompiler0.liftedTree1$1(CompilerInterface.scala:72)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:72)
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:73)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:35)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:29)
at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply$mcV$sp(AggressiveCompile.scala:71)
at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:71)
at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:71)
at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:101)
at sbt.compiler.AggressiveCompile$$anonfun$4.compileScala$1(AggressiveCompile.scala:70)
at sbt.compiler.AggressiveCompile$$anonfun$4.apply(AggressiveCompile.scala:88)
at sbt.compiler.AggressiveCompile$$anonfun$4.apply(AggressiveCompile.scala:60)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:24)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:22)
at sbt.inc.Incremental$.cycle(Incremental.scala:52)
at sbt.inc.Incremental$.compile(Incremental.scala:29)
at sbt.inc.IncrementalCompile$.apply(Compile.scala:20)
at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:96)
at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:44)
at sbt.compiler.AggressiveCompile.apply(AggressiveCompile.scala:31)
at sbt.Compiler$.apply(Compiler.scala:79)
at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:574)
at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:574)
at sbt.Scoped$$anonfun$hf2$1.apply(Structure.scala:578)
at sbt.Scoped$$anonfun$hf2$1.apply(Structure.scala:578)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41)
at sbt.std.Transform$$anon$5.work(System.scala:71)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:238)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
[error] (compile:compile) scala.tools.nsc.MissingRequirementError: object scala not found.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q

try to remove your local ivy directory ~/.ivy2/, you may have some broken jars here. also check your environment variables related to sbt and scala. you can check whether it's your project problem or not by running sbt outside of sbt project, if error still appears, than it's sbt installation or environment problem

Related

Play Framework and Eclipse: java.lang.NoClassDefFoundError: controllers/routes

I created a new application using the command
activator new myapp play-java
Then, without modifying anything, I used
activator ui
For opening the admin web console of the new project. Then, I generated the eclipse project of my application from that console. Then I imported the project into a new eclipse workspace and it was good, but when I did run the IntegrationTest class (right click on the file) I got this exception:
[ERROR] [09/03/2014 17:50:25.444] [play-akka.actor.default-dispatcher-3] [ActorSystem(play)] Uncaught error from thread [play-akka.actor.default-dispatcher-3] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled
java.lang.NoClassDefFoundError: controllers/routes
at views.html.main$.apply(main.template.scala:36)
at views.html.index$.apply(index.template.scala:31)
at views.html.index$.render(index.template.scala:39)
at views.html.index.render(index.template.scala)
at controllers.Application.index(Application.java:11)
at Routes$$anonfun$routes$1$$anonfun$applyOrElse$1$$anonfun$apply$1.apply(routes_routing.scala:59)
at Routes$$anonfun$routes$1$$anonfun$applyOrElse$1$$anonfun$apply$1.apply(routes_routing.scala:59)
at play.core.Router$HandlerInvokerFactory$$anon$4.resultCall(Router.scala:264)
at play.core.Router$HandlerInvokerFactory$JavaActionInvokerFactory$$anon$15$$anon$1.invocation(Router.scala:255)
at play.core.j.JavaAction$$anon$1.call(JavaAction.scala:55)
at play.core.j.JavaAction$$anonfun$11.apply(JavaAction.scala:82)
at play.core.j.JavaAction$$anonfun$11.apply(JavaAction.scala:82)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
at play.core.j.HttpExecutionContext$$anon$2.run(HttpExecutionContext.scala:40)
at play.api.libs.iteratee.Execution$trampoline$.execute(Execution.scala:46)
at play.core.j.HttpExecutionContext.execute(HttpExecutionContext.scala:32)
at scala.concurrent.impl.Future$.apply(Future.scala:31)
at scala.concurrent.Future$.apply(Future.scala:492)
at play.core.j.JavaAction$class.apply(JavaAction.scala:82)
at play.core.Router$HandlerInvokerFactory$JavaActionInvokerFactory$$anon$15$$anon$1.apply(Router.scala:252)
at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:130)
at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:130)
at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:129)
at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:128)
at scala.Option.map(Option.scala:145)
at play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:128)
at play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:121)
at play.api.libs.iteratee.Iteratee$$anonfun$mapM$1.apply(Iteratee.scala:483)
at play.api.libs.iteratee.Iteratee$$anonfun$mapM$1.apply(Iteratee.scala:483)
at play.api.libs.iteratee.Iteratee$$anonfun$flatMapM$1.apply(Iteratee.scala:519)
at play.api.libs.iteratee.Iteratee$$anonfun$flatMapM$1.apply(Iteratee.scala:519)
at play.api.libs.iteratee.Iteratee$$anonfun$flatMap$1$$anonfun$apply$14.apply(Iteratee.scala:496)
at play.api.libs.iteratee.Iteratee$$anonfun$flatMap$1$$anonfun$apply$14.apply(Iteratee.scala:496)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.ClassNotFoundException: controllers.routes
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 43 more
Somebody knows how do I fix that?
Thanks a lot !
Most likely caused by Eclipse running sbt to build the workspace concurrently with activator. This thread has an in-depth explanation. Try turning off "Build Automatically" in Eclipse, or instruct it to build to a different directory than target.

import sbt project to intellij result akka.actor.InvalidActorNameException

I am trying to import existing sbt project to intellij
I am getting this error :
akka.actor.InvalidActorNameException: actor name [simple-service-actor] is not unique!
at akka.actor.dungeon.ChildrenContainer$NormalChildrenContainer.reserve(ChildrenContainer.scala:130)
at akka.actor.dungeon.Children$class.reserveChild(Children.scala:77)
at akka.actor.ActorCell.reserveChild(ActorCell.scala:369)
at akka.actor.dungeon.Children$class.makeChild(Children.scala:202)
at akka.actor.dungeon.Children$class.attachChild(Children.scala:42)
at akka.actor.ActorCell.attachChild(ActorCell.scala:369)
at akka.actor.ActorSystemImpl.actorOf(ActorSystem.scala:552)
at spray.routing.SimpleRoutingApp$class.startServer(SimpleRoutingApp.scala:52)
at com.lihaoyi.workbench.Plugin$.startServer(Plugin.scala:16)
at com.lihaoyi.workbench.Plugin$$anonfun$6.apply(Plugin.scala:97)
at com.lihaoyi.workbench.Plugin$$anonfun$6.apply(Plugin.scala:97)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.EvaluateSettings$MixedNode.evaluate0(INode.scala:175)
at sbt.EvaluateSettings$INode.evaluate(INode.scala:134)
at sbt.EvaluateSettings$$anonfun$sbt$EvaluateSettings$$submitEvaluate$1.apply$mcV$sp(INode.scala:66)
at sbt.EvaluateSettings.sbt$EvaluateSettings$$run0(INode.scala:75)
at sbt.EvaluateSettings$$anon$3.run(INode.scala:71)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
[error] akka.actor.InvalidActorNameException: actor name [simple-service-actor] is not unique!
[error] Use 'last' for the full log.
However the project compiles and run when using sbt command line

Unexpected exception: Compilation failed on new Play project

I am getting this error on freshly created Play 2.1.3 application. I am running Java 7u25. I created new application and ran it with "play run" from within application directory.
Unexpected exception
Compilation failed without reporting any problem!?
No source available, here is the exception stack trace:
->sbt.compiler.CompileFailed:
sbt.compiler.JavaCompiler$$anon$1.compile(JavaCompiler.scala:59)
sbt.compiler.JavaTool$class.apply(JavaCompiler.scala:26)
sbt.compiler.JavaCompiler$$anon$1.apply(JavaCompiler.scala:51)
sbt.compiler.JavaCompiler$class.compile(JavaCompiler.scala:17)
sbt.compiler.JavaCompiler$$anon$1.compile(JavaCompiler.scala:51)
sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileJava$1$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$2.apply$mcV$sp(AggressiveCompile.scala:83)
sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileJava$1$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$2.apply(AggressiveCompile.scala:83)
sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileJava$1$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$2.apply(AggressiveCompile.scala:83)
sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:101)
sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileJava$1$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(AggressiveCompile.scala:82)
sbt.classfile.Analyze$.apply(Analyze.scala:85)
sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileJava$1$1.apply$mcV$sp(AggressiveCompile.scala:81)
sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileJava$1$1.apply(AggressiveCompile.scala:81)
sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileJava$1$1.apply(AggressiveCompile.scala:81)
sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:101)
sbt.compiler.AggressiveCompile$$anonfun$4.compileJava$1(AggressiveCompile.scala:80)
sbt.compiler.AggressiveCompile$$anonfun$4.apply(AggressiveCompile.scala:88)
sbt.compiler.AggressiveCompile$$anonfun$4.apply(AggressiveCompile.scala:60)
sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:24)
sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:22)
sbt.inc.Incremental$.cycle(Incremental.scala:45)
sbt.inc.Incremental$.compile(Incremental.scala:29)
sbt.inc.IncrementalCompile$.apply(Compile.scala:20)
sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:96)
sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:44)
sbt.compiler.AggressiveCompile.apply(AggressiveCompile.scala:31)
sbt.Compiler$.apply(Compiler.scala:79)
sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:572)
sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:572)
sbt.Scoped$$anonfun$hf2$1.apply(Structure.scala:578)
sbt.Scoped$$anonfun$hf2$1.apply(Structure.scala:578)
scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41)
sbt.std.Transform$$anon$5.work(System.scala:71)
sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
sbt.Execute.work(Execute.scala:238)
sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
java.util.concurrent.FutureTask.run(Unknown Source)
java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
java.util.concurrent.FutureTask.run(Unknown Source)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
Is there any reason you can't use JDK 1.8? Also which version of SBT, and which version of scala are you using? I had something similar to this happen and have experienced a few failures (albeit usually with some form of error reporting).
My solution was use SBT version 0.13.15 or 1.0.3
You can specify your SBT build version in your /project/build.properties file
sbt.version=0.13.15
Also might try using scala version 2.11.8, I've found it to be pretty rock solid! (You can set this in your build.sbt file)
scalaVersion := 2.11.8

IntelliJ custom plugin does not load library jars on classpath

I am working on IntelliJ plugin and am using apache httpcore-4.2.1.jar. I followed documentation for plugin structure as Jetbrains states on their Confluence pages and am using this structure:
.IntelliJIDEAx0
plugins
Sample
lib
libfoo.jar
libbar.jar
classes
com/foo/.....
...
...
META-INF
plugin.xml
My directory structure is this one
c:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.0.1
plugins
myplugin
lib
commons-codec-1.6.jar
commons-logging-1.1.1.jar
httpclient-4.2.1-atlassian-2.jar
httpcore-4.2.1.jar
jackson-core-asl-1.9.12.jar
jackson-mapper-asl-1.9.12.jar
list.txt
myplugin.jar
META-INF
plugin.xml
com/..... #classes here
Then I installed this plugin via IntelliJ/Settings/Plugins/Install from harddrive using myplugin.jar.
After restart, I got this exception
org/apache/http/protocol/HttpContext [Plugin: maca.myplugin]: org/apache/http/protocol/HttpContext [Plugin: maca.myplugin]
com.intellij.diagnostic.PluginException: org/apache/http/protocol/HttpContext [Plugin: maca.myplugin]
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:470)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:435)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.access$000(ComponentManagerImpl.java:421)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:102)
at com.intellij.openapi.components.impl.ComponentManagerImpl.initComponents(ComponentManagerImpl.java:346)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:86)
at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:307)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:279)
at com.intellij.openapi.project.impl.ProjectManagerImpl.access$300(ProjectManagerImpl.java:81)
at com.intellij.openapi.project.impl.ProjectManagerImpl$9.compute(ProjectManagerImpl.java:529)
at com.intellij.openapi.project.impl.ProjectManagerImpl$9.compute(ProjectManagerImpl.java:525)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$4.run(ProgressManagerImpl.java:275)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:501)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:310)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:191)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:232)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:181)
at com.intellij.openapi.application.impl.ApplicationImpl$8$1.run(ApplicationImpl.java:692)
at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:465)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:153)
Caused by: java.lang.NoClassDefFoundError: org/apache/http/protocol/HttpContext
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:445)
... 25 more
Caused by: java.lang.ClassNotFoundException: org.apache.http.protocol.HttpContext PluginClassLoader[maca.myplugin, 0.1]
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 28 more
It seems that IntelliJ does not put other libraries on classpath for plugin's classloader and I can't figure why.
Can somebody help me?
Thanks

GWT Maven build with Place Annotations

I'm attempting to convert my GWT app to build with maven. The first issue I've his is that the compiler does not seem to like the "#WithTokenizers" I have in my PlaceHistoryMapper - at least that's what I think is failing and if I comment those out the application will compile. Do I need to put some extra configuration in my pom to get this to work? It compiles fine in eclipse or if I attempt the maven build after eclipse has already compiled the GWT source.
Here's the exception I get:
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin
:2.3.2:compile (default-compile) on project product_ui_administration: Compilation failure
\workspaces\java\product_ui_administration\src\main\java\com\company\product\ui\administration\AdminPlaceHistoryMapper.java:[13,0] illega
l start of expression
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
\workspaces\java\product_ui_administration\src\main\java\com\company\product\ui\administration\AdminPlaceHistoryMapper.java:[13,0] illega
l start of expression
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:656)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
[ERROR]
Here is my AdminPlaceHistoryMapper interface
// this annotation not working in mvn for some reason
#WithTokenizers({
UserDetailsPlace.Tokenizer.class,
UserPermissionsPlace.Tokenizer.class,
CompanyDetailsPlace.Tokenizer.class,
})
public interface AdminPlaceHistoryMapper extends PlaceHistoryMapper {
}
This turned out to be a simple syntax problem that the Eclipse compiler ignored, but the maven GWT compiler flagged.
From the "gwt-maven-plugin Users" Google Group
This seems pretty clear to me, it even gives you the line number...
Anyhow, you can not legally have a comma character at the end of your
Tokenizer list. That is a syntax error. Your Eclipse compiler
tolerated it, but most other compilers will not.
-Jesse