Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Runtime exception in J3D when running JOGL  (Read 1452 times)
0 Members and 1 Guest are viewing this topic.
Offline shawnkendall

Senior Devvie





« Posted 2003-07-30 15:39:15 »

Hi all,
I am trying to use one or my existing J3D loaders to load geometry using J3D classes, then process to generate a new non-J3D geometry graph for my JOGL renderer.

Problem is, it seems that even if I never do any J3D rendering, in fact the error is in a non-live setTransform call, J3D blows up on trying to load jawt.dll.

Any ideas?

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
java.lang.UnsatisfiedLinkError: Native Library C:\j2sdk1.4.2\jre\bin\jawt.dll already loaded in another classloader
      at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1525)
      at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477)
      at java.lang.Runtime.loadLibrary0(Runtime.java:788)
      at java.lang.System.loadLibrary(System.java:834)
      at javax.media.j3d.MasterControl$24.run(MasterControl.java:911)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:908)
      at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:229)
      at javax.media.j3d.TransformGroupRetained.setTransform(TransformGroupRetained.java:127)
      at javax.media.j3d.TransformGroup.setTransform(TransformGroup.java:111)
      at com.imi.j3d.loaders.rtg.RtgLoader.readHierarchy(RtgLoader.java:1273)
      at com.imi.j3d.loaders.rtg.RtgLoader.loadMain(RtgLoader.java:405)
      at com.imi.j3d.loaders.rtg.RtgLoader.loadMain(RtgLoader.java:238)
      at com.imi.j3d.loaders.rtg.RtgLoader.load(RtgLoader.java:1422)
      at GearsTest$GearRenderer.init(GearsTest.java:159)
      at net.java.games.jogl.impl.GLDrawableHelper.init(GLDrawableHelper.java:68)
      at net.java.games.jogl.GLCanvas$InitAction.run(GLCanvas.java:201)
      at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:144)
      at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.makeCurrent(WindowsOnscreenGLContext.java:110)
      at net.java.games.jogl.impl.GLContext.setRenderingThread(GLContext.java:253)
      at net.java.games.jogl.GLCanvas.setRenderingThread(GLCanvas.java:162)
      at net.java.games.jogl.Animator$1.run(Animator.java:89)
      at java.lang.Thread.run(Thread.java:534)


....
I moved my load call outside of the init, i.e. before GLCanvas canvas is made and it worked fine.

Still, what is the error?  J3D loads jawt.dll and JOGL from different classloaders so there COULD be a conflist depending on what stage of the load the app is in?
Thanks!

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline sugarshark

Junior Devvie




Sugar to the sharks.


« Reply #1 - Posted 2003-07-31 06:56:19 »

What happens if you move J3D out of you 'ext' directory and into your normal classpath?

I used to think that the brain was the most wonderful organ in my body.  
Then I realized who was telling me this.
-- Emo Phillips
Offline shawnkendall

Senior Devvie





« Reply #2 - Posted 2003-07-31 11:55:00 »

Actually I don't run like that.  I have several version os J3D for testign and I point the runtime enviroment all over depending what I want to test.
Also, I did try in ext as well as elsewhere.

Like I said, I just moved the load call and it worked.  Since I am only doing R & D, it's fine for now but I am curious as to why JOGL and J3D would conflict on loading jawt.dll - AWT and also why J3D loads it when I only use BranchGroup, TranformGroup and Shade3D in a non-live, non-attached scene graph.

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #3 - Posted 2003-08-01 02:50:57 »

Both Java3D and JOGL need to use jawt.dll and due to the library search path the java launcher provides it's necessary to dynamically open jawt rather than statically link against it.  To avoid writing C code to dlopen() jawt.dll, both libraries use System.loadLibrary() and there are (as you've found) rules about not opening the same library in two classloaders due to namespace and static variable initialization issues. Note also that JOGL now guards against the case when jawt.dll/libjawt.so is already opened; there was an issue filed about conflicts between Accessibility and JOGL (check the issue archives). Basically if you initialize Java3D first and JOGL second then things will work, as you've found.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Mr.CodeIt (10 views)
2014-12-23 03:34:11

rwatson462 (38 views)
2014-12-15 09:26:44

Mr.CodeIt (31 views)
2014-12-14 19:50:38

BurntPizza (62 views)
2014-12-09 22:41:13

BurntPizza (99 views)
2014-12-08 04:46:31

JscottyBieshaar (60 views)
2014-12-05 12:39:02

SHC (74 views)
2014-12-03 16:27:13

CopyableCougar4 (77 views)
2014-11-29 21:32:03

toopeicgaming1999 (138 views)
2014-11-26 15:22:04

toopeicgaming1999 (127 views)
2014-11-26 15:20:36
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!