3D Viewer Exception

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
ard
Reply | Threaded
Open this post in threaded view
|

3D Viewer Exception

ard
Trying to generate a 3D drawn scene using 3D Tools plugin and subsequently using the 3D Viewer plugin
I get

version = 1.5
Exception in thread "J3D-Renderer-1" java.lang.NoClassDefFoundError: apple/awt/ComponentModel
        at com.sun.opengl.impl.JAWT_DrawingSurface.GetDrawingSurfaceInfo0(Native Method)
        at com.sun.opengl.impl.JAWT_DrawingSurface.GetDrawingSurfaceInfo(JAWT_DrawingSurface.java:56)
        at com.sun.opengl.impl.macosx.MacOSXOnscreenGLDrawable$1.run(MacOSXOnscreenGLDrawable.java:165)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.opengl.impl.macosx.MacOSXOnscreenGLDrawable.lockSurface(MacOSXOnscreenGLDrawable.java:163)
        at com.sun.opengl.impl.macosx.MacOSXOnscreenGLContext.makeCurrentImpl(MacOSXOnscreenGLContext.java:57)
        at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134)
        at javax.media.j3d.JoglPipeline$QueryCanvas.doQuery(JoglPipeline.java:9030)
        at javax.media.j3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8778)
        at javax.media.j3d.Renderer.doWork(Renderer.java:495)
        at javax.media.j3d.J3dThread.run(J3dThread.java:256)
Caused by: java.lang.ClassNotFoundException: apple.awt.ComponentModel
        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)
        ... 11 more

(on MacOS 10.10.4, system preferences Java PrefPane opens Java Control Panel, version Java 8 Update 51)
I've learnt that this probably is caused by calling an obsolete version of Java3D and that I should use Java3D 1.6.0
(source: http://stackoverflow.com/questions/26378249/how-to-get-java3d-to-work-in-intellij-on-os-x)

The only Java3D-like documents I could find were located in FIJI folder and don't seem to get updated with the FIJI updater.
/Applications/Fiji.app/java/macosx-java3d/Home/lib/ext/j3dutils.jar and
/Applications/Fiji.app/java/macosx-java3d/Home/lib/ext/j3dcore.jar

I'm afraid pulling framworks from a running system might do more harm than good.
What is the safest upgrade to get the 3D Viewer plugin working again?

Ard
________________________________

AMC Disclaimer : http://www.amc.nl/disclaimer

________________________________

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: 3D Viewer Exception

ctrueden
Hi Ard,

The 3D Viewer does not currently work with Java 8 on OS X.

We are going to fix that (at least on the ImageJ2 side) later this summer;
see:

   http://fiji.sc/bugzilla/show_bug.cgi?id=1095

The workaround for the moment is to use Java 6:
* http://imagej.net/FAQ#How_do_I_set_up_Java_6_on_OS_X.3F
* http://imagej.net/FAQ#On_OS_X

Regards,
Curtis

On Tue, Jul 28, 2015 at 3:49 AM, A. Jonker <[hidden email]> wrote:

> Trying to generate a 3D drawn scene using 3D Tools plugin and subsequently
> using the 3D Viewer plugin
> I get
>
> version = 1.5
> Exception in thread "J3D-Renderer-1" java.lang.NoClassDefFoundError:
> apple/awt/ComponentModel
>         at
> com.sun.opengl.impl.JAWT_DrawingSurface.GetDrawingSurfaceInfo0(Native
> Method)
>         at
> com.sun.opengl.impl.JAWT_DrawingSurface.GetDrawingSurfaceInfo(JAWT_DrawingSurface.java:56)
>         at
> com.sun.opengl.impl.macosx.MacOSXOnscreenGLDrawable$1.run(MacOSXOnscreenGLDrawable.java:165)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> com.sun.opengl.impl.macosx.MacOSXOnscreenGLDrawable.lockSurface(MacOSXOnscreenGLDrawable.java:163)
>         at
> com.sun.opengl.impl.macosx.MacOSXOnscreenGLContext.makeCurrentImpl(MacOSXOnscreenGLContext.java:57)
>         at
> com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134)
>         at
> javax.media.j3d.JoglPipeline$QueryCanvas.doQuery(JoglPipeline.java:9030)
>         at
> javax.media.j3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8778)
>         at javax.media.j3d.Renderer.doWork(Renderer.java:495)
>         at javax.media.j3d.J3dThread.run(J3dThread.java:256)
> Caused by: java.lang.ClassNotFoundException: apple.awt.ComponentModel
>         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)
>         ... 11 more
>
> (on MacOS 10.10.4, system preferences Java PrefPane opens Java Control
> Panel, version Java 8 Update 51)
> I've learnt that this probably is caused by calling an obsolete version of
> Java3D and that I should use Java3D 1.6.0
> (source:
> http://stackoverflow.com/questions/26378249/how-to-get-java3d-to-work-in-intellij-on-os-x
> )
>
> The only Java3D-like documents I could find were located in FIJI folder
> and don't seem to get updated with the FIJI updater.
> /Applications/Fiji.app/java/macosx-java3d/Home/lib/ext/j3dutils.jar and
> /Applications/Fiji.app/java/macosx-java3d/Home/lib/ext/j3dcore.jar
>
> I'm afraid pulling framworks from a running system might do more harm than
> good.
> What is the safest upgrade to get the 3D Viewer plugin working again?
>
> Ard
> ________________________________
>
> AMC Disclaimer : http://www.amc.nl/disclaimer
>
> ________________________________
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
ard
Reply | Threaded
Open this post in threaded view
|

Re: 3D Viewer Exception

ard
In reply to this post by ard
On 20150729, at 06:00, IMAGEJ automatic digest system <[hidden email]> wrote:
>
> The 3D Viewer does not currently work with Java 8 on OS X.

Thanks for your comments Curtis. Isn't the bug Mac specific?
No quick workaround by replacing a call to awt?
Oh, well, maybe that isn't even necessary (see below).

> We are going to fix that (at least on the ImageJ2 side) later this summer;
> see:
>
>   http://fiji.sc/bugzilla/show_bug.cgi?id=1095
>
> The workaround for the moment is to use Java 6:
> * http://imagej.net/FAQ#How_do_I_set_up_Java_6_on_OS_X.3F
> * http://imagej.net/FAQ#On_OS_X

They contradict. Nevertheless, I tried to follow the launch on OSX (Java 1.6 not uninstalled and Java 1.8 installed) and got 3D Viewer running, despite the error messages below that appeared in the Terminal, from which I issued the commands
 export J6="$(/usr/libexec/java_home -v 1.6)"
 export IJ_HOME=/Applications/Fiji.app
 $J6/bin/$($IJ_HOME/Contents/MacOS/ImageJ-macosx --dry-run | perl -pe 's/ -Djava.ext.dirs=.*? -D/ -D/')

Error message:
---
java[16567:1439722] Unable to simultaneously satisfy constraints:
(
    "<NSAutoresizingMaskLayoutConstraint:0x7ff94ecb3790 h=--& v=--& V:[FI_TBrowserBackgroundView:0x7ff94ed44240(0)]>",
    "<NSAutoresizingMaskLayoutConstraint:0x7ff94ecb31e0 h=-&- v=-&- V:|-(0)-[FI_TListScrollView:0x7ff94ed14060]   (Names: '|':FI_TBrowserBackgroundView:0x7ff94ed44240 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x7ff94ecb3190 h=-&- v=-&- V:[FI_TListScrollView:0x7ff94ed14060]-(0)-|   (Names: '|':FI_TBrowserBackgroundView:0x7ff94ed44240 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x7ff94ecae090 h=-&- v=-&- V:[NSClipView:0x7ff94ed13ca0]-(15)-|   (Names: '|':FI_TListScrollView:0x7ff94ed14060 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x7ff94ecae040 h=-&- v=-&- V:|-(0)-[NSClipView:0x7ff94ed13ca0]   (Names: '|':FI_TListScrollView:0x7ff94ed14060 )>"
)

Will attempt to recover by breaking constraint
<NSAutoresizingMaskLayoutConstraint:0x7ff94ecae090 h=-&- v=-&- V:[NSClipView:0x7ff94ed13ca0]-(15)-|   (Names: '|':FI_TListScrollView:0x7ff94ed14060 )>

Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens.  And/or, break on objc_exception_throw to catch this in the debugger.
version = 1.5
nFrames = 1
---

Ard
________________________________

AMC Disclaimer : http://www.amc.nl/disclaimer

________________________________

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html