Intellij 12 and internal compilation error when building scala project - scala

I have just downloaded Intellij 12.01 (build #IC-123.94) and once I try to build a Scala project I get the following stacktrace:
Internal error: (java.lang.ClassNotFoundException) org.jetbrains.jps.incremental.BinaryContent
java.lang.ClassNotFoundException: org.jetbrains.jps.incremental.BinaryContent
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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.jetbrains.jps.incremental.scala.LazyCompiledClass.<init>(ScalaBuilder.scala:239)
at org.jetbrains.jps.incremental.scala.IdeClient.generated(ScalaBuilder.scala:230)
at org.jetbrains.jps.incremental.scala.remote.ClientEventProcessor.process(ClientEventProcessor.scala:17)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$.liftedTree1$1(RemoteServer.scala:76)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$.org$jetbrains$jps$incremental$scala$remote$RemoteServer$$handle(RemoteServer.scala:74)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1$$anonfun$apply$1$$anonfun$apply$3.apply(RemoteServer.scala:44)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1$$anonfun$apply$1$$anonfun$apply$3.apply(RemoteServer.scala:43)
at org.jetbrains.jps.incremental.scala.package$.using(package.scala:15)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1$$anonfun$apply$1.apply(RemoteServer.scala:43)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1$$anonfun$apply$1.apply(RemoteServer.scala:40)
at org.jetbrains.jps.incremental.scala.package$.using(package.scala:15)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1.apply(RemoteServer.scala:40)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1.apply(RemoteServer.scala:39)
at org.jetbrains.jps.incremental.scala.package$.using(package.scala:15)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer.send(RemoteServer.scala:39)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer.compile(RemoteServer.scala:24)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5$$anonfun$apply$3$$anonfun$apply$4.apply(ScalaBuilder.scala:110)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5$$anonfun$apply$3$$anonfun$apply$4.apply(ScalaBuilder.scala:100)
at scala.util.Either$RightProjection.map(Either.scala:536)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5$$anonfun$apply$3.apply(ScalaBuilder.scala:100)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5$$anonfun$apply$3.apply(ScalaBuilder.scala:99)
at scala.util.Either$RightProjection.flatMap(Either.scala:523)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5.apply(ScalaBuilder.scala:99)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5.apply(ScalaBuilder.scala:98)
at scala.util.Either$RightProjection.flatMap(Either.scala:523)
at org.jetbrains.jps.incremental.scala.ScalaBuilder.doBuild(ScalaBuilder.scala:98)
at org.jetbrains.jps.incremental.scala.ScalaBuilder.build(ScalaBuilder.scala:67)
at org.jetbrains.jps.incremental.scala.ScalaBuilderService$ScalaBuilderDecorator.build(ScalaBuilderService.java:42)
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:963)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:710)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:740)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:673)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:494)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:274)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:164)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:114)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:205)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:102)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:107)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:26)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Apparently, the problem comes from the openapi.jar inside the Intellij's lib folder, which was supposed to contain such a class.
Any pointers?
Regards.

Had the same issue with Idea 12, but after updating the Scala plugin to version 0.7.62, problem has been solved for me.
However, you can try to follow Idea's advice:
In case of any compilation problems you may enable the previous (internal) compiler by clearing:
Project Settings / Compiler / Use external build

Same issue for me too, fixed by updating to nightly builds (0.7.82), instructions available here: http://confluence.jetbrains.net/display/SCA/Scala+Plugin+Nightly+Builds+for+Leda

Related

Joda Time - Cannot run JUnit tests in Eclipse or IntelliJ

I cloned the joda-time GitHub repository locally, imported it as a Maven project in both Eclipse and IntelliJ Idea and it built absolutelly fine in both IDEs. But when trying to run the JUnit tests it just will not work in either IDE and I cannot see what the issue is.
I know that I need to create an additional folder
src\tz-data\org\joda\time\tz\data
and place in there the two files
CET
ZoneInfoMap
and I have done all that.
The JUnit tests still do not run and the funny thing is that I get completelly different errors under Eclipse:
java.lang.ExceptionInInitializerError
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.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.getTest(JUnit3TestLoader.java:100)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.loadTests(JUnit3TestLoader.java:51)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: java.lang.IllegalArgumentException: The datetime zone id 'Europe/Paris' is not recognised
at org.joda.time.DateTimeZone.forID(DateTimeZone.java:234)
at org.joda.time.TestLocalDate_Basics.<clinit>(TestLocalDate_Basics.java:50)
... 10 more
and under IntelliJ Idea:
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.joda.time.TestAbstractPartial
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at junit.framework.TestSuite.createTest(TestSuite.java:58)
at junit.framework.TestSuite.addTestMethod(TestSuite.java:280)
at junit.framework.TestSuite.<init>(TestSuite.java:140)
at com.intellij.junit3.TestRunnerUtil.createClassOrMethodSuite(TestRunnerUtil.java:147)
at com.intellij.junit3.TestAllInPackage2.<init>(TestAllInPackage2.java:32)
at com.intellij.junit3.TestRunnerUtil.getTestSuite(TestRunnerUtil.java:78)
at com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunner.java:43)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Any tips on how to get around this would be really appreciated.
I am new to maven and it turns out the issue was with the way I was trying to run the tests.
As noted by roby, I should have used the maven bar in IntelliJ to run the correct maven goal (simmilarly, I should have used Run As.. and the correct maven goal in Eclipse), whereas I was just trying to run the tests by using the IDE, i.e. right click on the project and 'Run All Tests' which understandably did not work as it was not using the correct configuration.

Copied IntelliJ project machine A to B, but it won't build on B

I have IntelliJ, Scala and SBT at work (Win8) and on my laptop (OSX). I've never had a problem like this before. I'm stuck in a hotel because of weather, and I have a copy of my IDEA project on my laptop. I tried building the project on my laptop, and it failed with the message below. As far as I know I have all the dependent JARs, the latest plugins, etc. I don't think I'm missing anything. But I'm mystified how something so simple could eat up time that could be spent programming while I try to figure out what went wrong after zipping and copying an IntelliJ project from one machine to another.
Error:scalac: Error: xsbt.CompilerInterface
java.lang.ClassNotFoundException: xsbt.CompilerInterface
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 java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at sbt.compiler.AnalyzingCompiler.getInterfaceClass(AnalyzingCompiler.scala:117)
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:99)
at sbt.compiler.AnalyzingCompiler.newCachedCompiler(AnalyzingCompiler.scala:57)
at sbt.compiler.AnalyzingCompiler.newCachedCompiler(AnalyzingCompiler.scala:52)
at sbt.compiler.CompilerCache$$anon$2.apply(CompilerCache.scala:50)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:39)
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:62)
at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:20)
at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
at sun.reflect.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 com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
Suggestions:
use "Import project" instead of File|Open. Select sbt project
ensure you have access to internet
build the project first on the command line . e.g
sbt compile package
or
sbt compile assembly
- rebuild the project in the IDE (Yes painful, but it is a known bug)
Get back here if you still encounter issues.
It seems the problem with updating IDEA to version 14. Try removing the JDK from IDEA and adding it again. It should work.

PlayFramework 2.3.1 NoClassDefFoundError: org/fusesource/jansi/AnsiOutputStream

I'm studying Play Framework 2.x and I have installed the framework, with the activator 1.2.3, on my Fedora FC20. Now I'm facing a strange error on launching the activator new, that never happened before. I've tried with java-1.7.0-openjdk-1.7.0.65-2.5.1.2.fc20.i386 and also with openjedk 1.8.0, but this error is still here.
java.lang.NoClassDefFoundError: org/fusesource/jansi/AnsiOutputStream
at jline.console.ConsoleReader.stripAnsi(ConsoleReader.java:479)
at jline.console.ConsoleReader.setPrompt(ConsoleReader.java:398)
at jline.console.ConsoleReader.readLine(ConsoleReader.java:2172)
at jline.console.ConsoleReader.readLine(ConsoleReader.java:2126)
at sbt.JLine.sbt$JLine$$readLineDirectRaw(LineReader.scala:45)
at sbt.JLine$$anonfun$readLineDirect$2.apply(LineReader.scala:37)
at sbt.JLine$$anonfun$readLineDirect$2.apply(LineReader.scala:37)
at sbt.Signals0.withHandler(Signal.scala:87)
at sbt.Signals$.withHandler(Signal.scala:13)
at sbt.JLine.readLineDirect(LineReader.scala:37)
at sbt.JLine.readLineWithHistory(LineReader.scala:32)
at sbt.JLine.sbt$JLine$$unsynchronizedReadLine(LineReader.scala:20)
at sbt.JLine$$anonfun$readLine$1.apply(LineReader.scala:17)
at sbt.JLine$$anonfun$readLine$1.apply(LineReader.scala:17)
at sbt.JLine$$anonfun$withJLine$1.apply(LineReader.scala:118)
at sbt.JLine$$anonfun$withJLine$1.apply(LineReader.scala:116)
at sbt.JLine$.withTerminal(LineReader.scala:92)
at sbt.JLine$.withJLine(LineReader.scala:116)
at sbt.JLine.readLine(LineReader.scala:17)
at activator.ActivatorCliHelper$class.readLine(ActivatorCliHelper.scala:19)
at activator.TemplateHandler$.readLine(TemplateHandler.scala:16)
at activator.TemplateHandler$.getTemplateName(TemplateHandler.scala:81)
at activator.ActivatorCli$$anonfun$apply$1.getTemplateName$1(ActivatorCli.scala:55)
at activator.ActivatorCli$$anonfun$apply$1.apply$mcI$sp(ActivatorCli.scala:89)
at activator.ActivatorCli$$anonfun$apply$1.apply(ActivatorCli.scala:19)
at activator.ActivatorCli$$anonfun$apply$1.apply(ActivatorCli.scala:19)
at activator.ActivatorCli$.withContextClassloader(ActivatorCli.scala:179)
at activator.ActivatorCli$.apply(ActivatorCli.scala:19)
at activator.ActivatorLauncher.run(ActivatorLauncher.scala:28)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:129)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:19)
at xsbt.boot.Boot$.runImpl(Boot.scala:44)
at xsbt.boot.Boot$.main(Boot.scala:20)
at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.lang.ClassNotFoundException: org.fusesource.jansi.AnsiOutputStream
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 38 more
Error during sbt execution: java.lang.NoClassDefFoundError: org/fusesource/jansi/AnsiOutputStream
You can try to delete and recreate your local repo (not quite sure which one applies to you):
~/.m2/repository
~/.ivy2/cache
~/.ivy/cache
Also, there was a play clean command before they switched to the activator. There should be something like activator clean now. After this you can try with activator compile.
Edit: as #sentenza pointed out, removing ~/.sbt was the correct step which solved the problem. I will still leave the other options above as they might work for somebody else.

Can't generate java from UML using Acceleo in Eclipse

I am new to Eclipse and Acceleo, and I have been trying to complete the First Generator Model Tutorial. I am using Kepler 4.3 and Acceleo 3.X.
I am following the tutorial that generates java code from uml. The link is http://wiki.eclipse.org/Acceleo/Getting_Started. But when I try to run the generate.mtl file, the error log gives me the message:
Couldn't load class org.eclipse.acceleo.module.sample.main.Generate
from project org.eclipse.acceleo.module.sample
It also gives me the warning:
Couldn't load class org.eclipse.acceleo.module.sample.main.Generate.
Check that its containing package is exported.
and The activator org.eclipse.acceleo.module.sample.Activator for
bundle org.eclipse.acceleo.module.sample is invalid
org.osgi.framework.BundleException: The activator
org.eclipse.acceleo.module.sample.Activator for bundle
org.eclipse.acceleo.module.sample is invalid at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:172)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:478)
at
org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:236)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212)
at
org.eclipse.acceleo.common.internal.utils.workspace.AcceleoWorkspaceUtil.getClass(AcceleoWorkspaceUtil.java:544)
at
org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoLaunchOperation.run(AcceleoLaunchOperation.java:103)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2327)
at
org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginLaunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java:259)
at
org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginLaunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java:161)
at
org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchDelegate.launch(AcceleoLaunchDelegate.java:51)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) Caused
by: java.lang.ClassNotFoundException:
org.eclipse.acceleo.module.sample.Activator cannot be found by
org.eclipse.acceleo.module.sample_1.0.0.qualifier at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source) at
org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:165)
... 19 more Root exception: java.lang.ClassNotFoundException:
org.eclipse.acceleo.module.sample.Activator cannot be found by
org.eclipse.acceleo.module.sample_1.0.0.qualifier at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source) at
org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:165)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:478)
at
org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:236)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212)
at
org.eclipse.acceleo.common.internal.utils.workspace.AcceleoWorkspaceUtil.getClass(AcceleoWorkspaceUtil.java:544)
at
org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoLaunchOperation.run(AcceleoLaunchOperation.java:103)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2327)
at
org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginLaunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java:259)
at
org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginLaunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java:161)
at
org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchDelegate.launch(AcceleoLaunchDelegate.java:51)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
I have put the [comment #main/] below the template line and do all the steps in the tutorial, i really have no idea what the problem is.
I would appreciate any help or feedback.
java.lang.ClassNotFoundException: org.eclipse.acceleo.module.sample.Activator cannot be found by org.eclipse.acceleo.module.sample_1.0.0.qualifier
The most likely reason I can think of is that you have used the File > New Plug-in Project wizard and kept most of the default values, yet afterwards removed (or renamed) the "Activator" class that it created in your project.
The META-INF/MANIFEST.MF file of your project should contain a line that looks like :
Bundle-Activator: org.eclipse.acceleo.module.sample.Activator
And if it does, it most likely shows a warning or error on that line. You can either remove the line altogether or make sure you indeed have a plug-in activator with that qualified name.
I had exactly the same problem using Acceleo 3.5.0 on a clean Kepler and a clean Luna install. In Luna Acceleo displays a warning when you select the 'Acceleo Plugin Application' for the Runner in the run configuration. If you select 'Java Application' instead it works on Kepler.
A little research led me to the following 'fixed' bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=419205 . The 'fix' I guess was to add an error message in Luna telling us this feature doesn't work. I see exactly the same problem in Kepler and in Juno too with Acceleo 3.5 so it doesn't seem Luna specific at all.
Only workarounds I've found for this are to:
switch back to Acceleo 3.4 or
use only 'Java Application' referred to as 'standalone' in the documentation as it runs outside of Eclipse.
The problem with standalone is then you lose all the great features of Acceleo's debugger and interpreter, plus you have longer wait time testing your templates.
I corrected this error by updating the classpath in the MANIFEST.MF file :
I added the bin/ folder of the projet. It now works properly.
Etienne

JOGL throwing ClassNotFoundException?

I've seen this question brought up a couple of times on this website, but never really seen a clear answer, so excuse me from repeating it. While programming with JOGL and Java3D I've encountered some errors. I was trying to create a project that I might eventually put on the Android App Store. I began the project just using Java3D and JOGL and putting them in the system library on my mac, where they worked fine. Then to try to make the project portable I moved the J3D and JOGL files inside the project so they could be compiled into a jar file that would be runnable without needing to install j3d and JOGL. But then every time I ran the project it threw this error:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/opengl/GL
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at javax.media.j3d.Pipeline$PipelineCreator.run(Pipeline.java:73)
at javax.media.j3d.Pipeline$PipelineCreator.run(Pipeline.java:61)
at java.security.AccessController.doPrivileged(Native Method)
at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:90)
at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:832)
at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:274)
at javax.media.j3d.GroupRetained.<init>(GroupRetained.java:155)
at javax.media.j3d.TransformGroupRetained.<init>(TransformGroupRetained.java:116)
at javax.media.j3d.TransformGroup.createRetained(TransformGroup.java:114)
at javax.media.j3d.SceneGraphObject.<init>(SceneGraphObject.java:114)
at javax.media.j3d.Node.<init>(Node.java:172)
at javax.media.j3d.Group.<init>(Group.java:549)
at javax.media.j3d.TransformGroup.<init>(TransformGroup.java:87)
at src.Project.<clinit>(Project.java:47)
at src.ProjectPanel.<clinit>(ProjectPanel.java:8)
Caused by: java.lang.ClassNotFoundException: javax.media.opengl.GL
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:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 17 more
I'm using Eclipse as an IDE, and have the jogl-all.jar and gluegen-rt.jar files in the classpath of the project, as well as all of the require j3d jars, but it cannot find the GL.class file for some reason.
Thanks in advance for help.
When you export your application as a Runnable JAR use the
+ Library handling:
Copy required libraries into a sub-folder next to the generated JAR
or
+ Library handling:
Package required libraries into generated JAR
More information is available in the jogamp jogl wiki:
http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE
http://jogamp.org/wiki/index.php/JogAmp_JAR_File_Handling
Also you will need to use the java -jar yourapp.jar command line option to run your application.