Exception thrown while running JUnit tests using maven - junit4

I got the following exception while running JUnit tests in Maven.
java.lang.IllegalStateException: Native library for Attach API not available in this JRE
at mockit.internal.startup.JDK6AgentLoader.getVirtualMachineImplementationFromEmbeddedOnes(JDK6AgentLoader.java:81)
at mockit.internal.startup.JDK6AgentLoader.loadAgent(JDK6AgentLoader.java:54)
at mockit.internal.startup.AgentInitialization.initializeAccordingToJDKVersion(AgentInitialization.java:21)
at mockit.internal.startup.Startup.initializeIfNeeded(Startup.java:96)
at mockit.integration.junit4.JMockit.<clinit>(JMockit.java:23)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
at org.apache.maven.surefire.junit4.JUnit4TestSet.<init>(JUnit4TestSet.java:45)
at org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite.createTestSet(JUnit4DirectoryTestSuite.java:56)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:96)
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.apache.maven.surefire.booter.SurefireBooter.getTestSets(SurefireBooter.java:455)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesForkPerTestSet(SurefireBooter.java:406)
at org.apache.maven.surefire.booter.SurefireBooter.run(SurefireBooter.java:249)
at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:537)
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.UnsatisfiedLinkError: Native Library C:\Program Files\Java\jdk1.6.0_25\jre\bin\attach.dll already loaded in another classloader
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1772)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1724)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at sun.tools.attach.WindowsVirtualMachine.<clinit>(WindowsVirtualMachine.java:169)
at mockit.internal.startup.JDK6AgentLoader.getVirtualMachineImplementationFromEmbeddedOnes(JDK6AgentLoader.java:68)
... 44 more
I have used mocking in my tests.The framework used is JMockit. Any help is appreciated.

I don't know why this duplicate loading of "attach.dll" occurs (will investigate later), but you can avoid the problem by using the "-javaagent" JVM initialization parameter. See here for details.

I'll give it a try. Here it says something like:
Caused by: java.lang.UnsatisfiedLinkError: Native Library C:\Program Files\Java\jdk1.6.0_25\jre\bin\attach.dll already loaded in another classloader
My guess is that you try to load the dll twice? Once maybe it's loaded as a maven dependency and once as from the jdk?

Try adding tools.jar to your classpath. If you've downloaded a JDK, it is typically in Contents/Home/lib/tools.jar under your JDK root. If you're using Eclipse, check out this answer on another question.

Related

Not able to start STS

Am not able to start my STS 3.3. It is failing to start by giving following exception
!ENTRY org.eclipse.osgi 4 0 2013-09-30 10:22:40.079
!MESSAGE Application error
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in "org.eclipse.ui.ide.application" was unable to instantiate class "org.eclipse.ui.internal.ide.application.IDEApplication".
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:188)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:191)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/ui/application/WorkbenchAdvisor
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2483)
at java.lang.Class.getConstructor0(Class.java:2793)
at java.lang.Class.newInstance(Class.java:345)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:184)
... 16 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.ui.application.WorkbenchAdvisor cannot be found by org.eclipse.ui.ide.application_1.0.400.v20130326-1250
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(ClassLoader.java:357)
... 21 more
What is the problem here?
This is often a problem with temporary files saved by plugins. These steps should help you out:
Check YOUR_WORKSPACE/.metadata/.plugins/org.eclipse.jdt.core/ There are a lot of index files. Sometimes it helps to delete them. Also start your eclipse with -clean.
According to your problem, I think you've moved some files from the filesystem, a new location prehaps, that's causing this error. Try checking them.
Refresh all your projects.
Try creating a new workspace and check.
If nothing works, try re-installing it.
Also, if you decide not to go with STS, you can always use Eclipse IDE with STS plugin.
Hope it helps. :)

Java JDK versions eclipse Blackboard 9.1 java.lang.UnsupportedClassVersionError

I have successfully implemented and deployed a hello world project adding a admin Example Admin Tool.
I did this after having to correct all version of JRE/JDK to 1.6 in 3 places in eclipse (project, ant, and general eclipse java setting).
Now I'm trying to compile a project given to us by an external contractor (which is working in .war format). I want to extend the project myself.
The project has axis jars in it etc and references the blackboard jars and although it compiles in eclipse, upon deployment to Bb and running it I get get:
java.lang.UnsupportedClassVersionError
Ive tried to compile in JDK 1.7 and I also get an error. It seems related to versions - which JDK version should i be using for Bb 9.1?
Can anyone shed any light?
full errors:
com/streaming/SearchManager
java.lang.UnsupportedClassVersionError: com/streaming/SearchManager
at org.apache.jsp.helix.resultsList_jsp._jspService(resultsList_jsp.java:129)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at sun.reflect.GeneratedMethodAccessor1109.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:270)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:302)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:163)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
at blackboard.platform.servlet.B2ContextFilter.doFilter(B2ContextFilter.java:121)
at sun.reflect.GeneratedMethodAccessor1114.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:270)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:302)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:243)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
at blackboard.platform.servlet.ContentTypeFilter.doFilter(ContentTypeFilter.java:57)
at sun.reflect.GeneratedMethodAccessor1112.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:270)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:302)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:243)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
at blackboard.platform.servlet.XssServletFilter.doFilter(XssServletFilter.java:139)
at sun.reflect.GeneratedMethodAccessor1111.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:270)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:302)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:243)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
at blackboard.platform.servlet.RequestSessionFilter.doFilter(RequestSessionFilter.java:123)
at sun.reflect.GeneratedMethodAccessor1110.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:270)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:302)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:243)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:647)
at blackboard.tomcat.valves.LoggingRemoteIpValve.invoke(LoggingRemoteIpValve.java:44)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:662)
The version of the JDK running will vary depending on the local setup. After Blackboard Learn 9.1 Service Pack 10 (the October 2012 release) systems should be running a version of JDK 1.7. Prior that they are probably running under JDK1.6 though some are running under 1.7. You should contact your local administrator to determine the path to the JDK and get the version used. The path to the JDK is stored in the bb-config.properies file.
The problem in your jsp file is probably that it is referencing a library in your webapps/WEB-INF/lib (local Building Block libraries) which is incompatible with the version of the JDK on the target Blackboard system. It appears that your jsp is being compiled at runtime on the blackboard server and is failing because of this third party libraries compatibility. If you want to precompile the jsp in the war file you must use jspc as an ant task.

SmartGWT onModuleLoad() threw an exception

I'm getting the following exception, after I've added SmartGWT to an existing GWT project:
onModuleLoad() threw an exception
Exception while loading module com.smartgwt.client.SmartGwtEntryPoint. See Development Mode for details.
java.lang.reflect.InvocationTargetException
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 com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
at java.lang.Thread.run(Unknown Source)
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError): Unable to get value of the property 'Browser': object is null or undefined
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at com.smartgwt.client.SmartGwtEntryPoint.init(SmartGwtEntryPoint.java)
at com.smartgwt.client.SmartGwtEntryPoint.onModuleLoad(SmartGwtEntryPoint.java:239)
... 9 more
I've added the jar file to the build path, and also added the inherits node to the *.gwt.xml. What am I missing?
I had this issue. I attempted many different fixes, but in the end it appears that there were some resources (JavaScript files and CSS files) which were not being loaded because of authentication issues (I was using Spring security and forgot to provide access to some subfolders of my web application).
There are some important processes you need to go through when troubleshooting GWT apps. They can cause issues even when there aren't really any.
Clear your Browser cache
Use the code server query string (e.g. http://127.0.0.1:8888/index.html?gwt.codesvr=127.0.0.1:9997)
GWT compile your code
It could also be an issue with Google Chrome (if that's what you're using). The guys at SmartGWT suggest you don't use Chrome for GWT development.
http://forums.smartclient.com/showthread.php?t=8159#aChrome

java.lang.NoClassDefFoundError: com/jogamp/common/type/WriteCloneable jogl 2 in eclipse

I am on windows 7 64 bit and using eclipse indigo. I downloaded the latest version of jogl 2 and i have created an eclipse project following this link
https://sites.google.com/site/justinscsstuff/jogl-tutorial-2
this tutorial is old as the jars in the jogl download dont match and i have included all the jars and for each jar set the native libraries directory. I have written a small jogl test program that creates a GLProfile, GlCapabilities and an awt frame. I get this exception:
java.lang.NoClassDefFoundError: com/jogamp/common/type/WriteCloneable
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Caused by: java.lang.ClassNotFoundException: com.jogamp.common.type.WriteCloneable
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:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 24 more
Exception in thread "main"
seems like im missing a jar..could any let me know what im doing wrong here?
I am using the jogl-all.jar from Matlab 2014a. The error above disappeared and everything run smoothly when I added the library glugen-rt.jar.
(remember also to -Djava.library.path=/path/to/native/files when you execute your application, in my case this was -Djava.library.path=/Applications/MATLAB_R2014a.app/bin/maci64)
Try to add gluegen as well.
For example
<dependency>
<groupId>org.jogamp.jogl</groupId>
<artifactId>jogl-all</artifactId>
<version>2.0-rc11</version>
</dependency>
AND
<dependency>
<groupId>org.jogamp.gluegen</groupId>
<artifactId>gluegen-rt-main</artifactId>
<version>2.0-rc11</version>
</dependency>
I had a similar problem with the JOGL jar files. See here. Also, check out the tutorials on the jogamp wiki (by the looks of it Wade is pretty active on the wiki).

Exporting a .product for macosx results in a NullPointerException

I am trying to build a product using Eclipse RCP for multiple systems (linux gtk/x86, macosx cocoa/x86_64, win32 win32/x86), but I keep on getting a NullPointerException when exporting specifically to macosx. I am running Linux, and the linux and win32 builds export fine, and without issues.
I am running Eclipse 3.6.2 (Helios) and have installed all the nescessary libraries for the project (it runs fine). As well, I am able to run it fine under OSX. I have also installed the nescessary delta to enable the multi-platform RCP export.
The following is the error log from the export. Note that the temp directory doesn't exist under .metadata/.plugins/org.eclipse.pde.core/ after the export errors out.
!ENTRY org.eclipse.ant.core 4 1 2011-05-05 11:32:59.049
!MESSAGE /home/meatcar/.../workspace/.metadata/.plugins/org.eclipse.pde.core/temp/org.eclipse.pde.container.feature/assemble.org.eclipse.pde.container.feature.macosx.cocoa.x86_64.xml:97: java.lang.NullPointerException
!STACK 0
/home/meatcar/.../workspace/.metadata/.plugins/org.eclipse.pde.core/temp/org.eclipse.pde.container.feature/assemble.org.eclipse.pde.container.feature.macosx.cocoa.x86_64.xml:97: java.lang.NullPointerException
at org.eclipse.pde.internal.build.tasks.BrandTask.execute(BrandTask.java:48)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor465.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:662)
at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:495)
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.eclipse.ant.core.AntRunner.run(AntRunner.java:378)
at org.eclipse.pde.internal.core.exports.FeatureExportOperation.runScript(FeatureExportOperation.java:424)
at org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:280)
at org.eclipse.pde.internal.core.exports.ProductExportOperation.run(ProductExportOperation.java:106)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.NullPointerException
at org.eclipse.pde.internal.build.BrandingIron.brandMac(BrandingIron.java:158)
at org.eclipse.pde.internal.build.BrandingIron.brand(BrandingIron.java:78)
at org.eclipse.pde.internal.build.tasks.BrandTask.execute(BrandTask.java:46)
... 24 more
--- Nested Exception ---
java.lang.NullPointerException
at org.eclipse.pde.internal.build.BrandingIron.brandMac(BrandingIron.java:158)
at org.eclipse.pde.internal.build.BrandingIron.brand(BrandingIron.java:78)
at org.eclipse.pde.internal.build.tasks.BrandTask.execute(BrandTask.java:46)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor465.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:662)
at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:495)
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.eclipse.ant.core.AntRunner.run(AntRunner.java:378)
at org.eclipse.pde.internal.core.exports.FeatureExportOperation.runScript(FeatureExportOperation.java:424)
at org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:280)
at org.eclipse.pde.internal.core.exports.ProductExportOperation.run(ProductExportOperation.java:106)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Any help would be much appreciated. I killed a whole day on this, and got nowhere, and me excelent google skills haven't brought me back anything.
I had the same problem a while ago and I think I solved it by removing the branding images (Bug 292327). This bug was resolved a while ago (2009) but it might be a point to start from..