jogl won't load?

Problems with Java, jogl, etc?
Post Reply
dunmatt
Posts: 22
Joined: Sat 28. Jul 2012, 02:36

jogl won't load?

Post by dunmatt » Sat 28. Jul 2012, 02:47

Hello all, I'm just starting out with jReality and I'm having some trouble getting jogl to work. No matter what I try it keeps saying "Possibly no jogl in classpath!". The trick is, the jar is there, and it is referenced in the ant classpath:

Code: Select all

  <path id='jreality.classpath'>
    <path refid='base.classpath'/>
    <pathelement path='${build.lib.dir}/jreality/beans.jar'/>
    <pathelement path='${build.lib.dir}/jreality/bsh.jar'/>
    <pathelement path='${build.lib.dir}/jreality/colorpicker.jar'/>
    <pathelement path='${build.lib.dir}/jreality/jogl.all.jar'/>
    <pathelement path='${build.lib.dir}/jreality/jReality.jar'/>
    <pathelement path='${build.lib.dir}/jreality/jrworkspace.jar'/>
    <pathelement path='${build.lib.dir}/jreality/jterm.jar'/>
    <pathelement path='${build.lib.dir}/jreality/glugen-rt.jar'/>
    <pathelement path='${build.lib.dir}/jreality/vrData.jar'/>
    <pathelement path='${build.lib.dir}/jreality/xstream.jar'/>
  </path>
And in the launch target:

Code: Select all

        <jvmarg value='-Djava.library.path=${build.lib.dir}/jreality/jogl'/>
        <env key='LD_LIBRARY_PATH' value='${env.LD_LIBRARY_PATH}:${build.lib.dir}/jreality/jogl'/>
If I change a single character in the pathelement ant gives me a warning that it couldn't find the jar I asked for, but the warning doesn't display when I have it spelled right, so I know it's finding the jar. I've also double checked that the appropriate .so files are indeed stored in jreality/jogl.

I'm using the latest version of jogl from http://jogamp.org/deployment/jogamp-current/jar/ , could that be the problem? I tried it with the jars linked to at http://www3.math.tu-berlin.de/jreality/ ... e-tutorial... or does it mean that jogl support is under construction (I interpreted it to mean that the wiki directions were under construction)

Help?

dunmatt
Posts: 22
Joined: Sat 28. Jul 2012, 02:36

Re: jogl won't load?

Post by dunmatt » Sat 28. Jul 2012, 03:19

Oop, check that, it wasn't jogl.jar that was missing from the classpath, it was something else. I went ahead and added all 3rd party jars to the classpath and it got to a real error! Now it says

Code: Select all

Jul 27, 2012 9:15:57 PM de.jtem.jrworkspace.plugin.simplecontroller.SimpleController startup
SEVERE: java.lang.reflect.InvocationTargetException
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1045)
	at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1347)
	at de.jtem.jrworkspace.plugin.simplecontroller.SimpleController.startup(SimpleController.java:391)
	at de.jtem.jrworkspace.plugin.simplecontroller.SimpleController.startupLocal(SimpleController.java:414)
	at de.jreality.plugin.JRViewer.startupLocal(JRViewer.java:432)
	at com.robotsim.ui.SuperRobotViewer.<init>(SuperRobotViewer.java:27)
	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:532)
	at ade.gui.ADEGuiCreatorUtil.createGuiPanel(ADEGuiCreatorUtil.java:27)
	at ade.gui.ADEGuiExternalFrame.createExternalGUIFrames(ADEGuiExternalFrame.java:157)
	at ade.gui.ADEGuiExternalFrame$1.run(ADEGuiExternalFrame.java:132)
Caused by: java.lang.NoSuchMethodError: javax.media.opengl.GLCapabilities: method <init>()V not found
	at de.jreality.jogl.Viewer.initializeFrom(Viewer.java:71)
	at de.jreality.jogl.AbstractViewer.<init>(AbstractViewer.java:105)
	at de.jreality.jogl.AbstractViewer.<init>(AbstractViewer.java:100)
	at de.jreality.jogl.Viewer.<init>(Viewer.java:63)
	at de.jreality.jogl.Viewer.<init>(Viewer.java:60)
	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:532)
	at java.lang.Class.newInstance0(Class.java:372)
	at java.lang.Class.newInstance(Class.java:325)
	at de.jreality.plugin.basic.View.createViewerSwitch(View.java:191)
	at de.jreality.plugin.basic.View.init(View.java:121)
	at de.jreality.plugin.basic.View.install(View.java:238)
	at de.jtem.jrworkspace.plugin.simplecontroller.SimpleController.activatePlugin(SimpleController.java:549)
	at de.jtem.jrworkspace.plugin.simplecontroller.SimpleController.getPlugin(SimpleController.java:581)
	at de.jreality.plugin.scene.Avatar.install(Avatar.java:170)
	at de.jtem.jrworkspace.plugin.simplecontroller.SimpleController.activatePlugin(SimpleController.java:549)
	at de.jtem.jrworkspace.plugin.simplecontroller.SimpleController$1.run(SimpleController.java:352)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:216)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:647)
	at java.awt.EventQueue.access$000(EventQueue.java:96)
	at java.awt.EventQueue$1.run(EventQueue.java:608)
	at java.awt.EventQueue$1.run(EventQueue.java:606)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:617)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
On a whim I tried removing all the .so files and the error didn't change. I'm not sure if that helps or not.

Edit: If I switch the classpath to point to jogl.all.jar (the new one from http://jogamp.org/deployment/jogamp-current/jar/) I get the above exceptions. If I use the jogl.jar from your site I get the same "Possibly no jogl in classpath!".

Any suggestions?

dunmatt
Posts: 22
Joined: Sat 28. Jul 2012, 02:36

Re: jogl won't load?

Post by dunmatt » Sat 28. Jul 2012, 03:38

Solved!! I'm not sure what the issue was, but deleting all the native files and jogl.jar and gluegen-rt.jar and redownloading them all from http://www3.math.tu-berlin.de/jreality/ ... e-tutorial seems to have done it! (whew!)

Andre
Posts: 226
Joined: Fri 18. Sep 2009, 11:30

Re: jogl won't load?

Post by Andre » Mon 20. Aug 2012, 08:44

Hi dunmatt,

nice that you could solve your problem by your own. To solve your final question:
Yes, it was a version issue of jogl. Unfortunately we aren't running the newest version of jogl and jogl isn't supporting our used version anymore. So we have to maintain/keep the "old" jogl for our self at our website.

best regards
andre

ted
Posts: 57
Joined: Wed 25. Jul 2012, 22:53

Re: jogl won't load?

Post by ted » Tue 21. Aug 2012, 08:27

I'm wondering how extensive are the differences? Perhaps it's one reason it's been giving me trouble trying to call from MATLAB on OSX.. . .

Not sure whether OSX or MATLAB or one of the toolboxes for it that I installed has too old of libraries or too new, but there may be conflicts somewhere...

Andre
Posts: 226
Joined: Fri 18. Sep 2009, 11:30

Re: jogl won't load?

Post by Andre » Tue 21. Aug 2012, 09:46

Hi Ted,

I was also thinking about that. I'm pretty sure, that it is not possible to render with two different jogl-versions. So I think jReality and Matlab need the same jogl version in classpath. We are already working on a new jogl-backend but this may take some months...

There is already one hardcoded jogl2- branch at the jreality repository. You can check him out via http://fs.math.tu-berlin.de:8000/svn/jreality and than "branches" instead of "trunk". The name of the branch is jogamp

If you remove there all the jogl- and gluegen- jars and substitute them with the ones used for matlab, you have hopefully solved some of your problems.

best
andre

Post Reply