Hi!

I tried to update the version of Qt Jambi that I use to 4.5.x, but it looks 
like some internal changes since 4.4.3_01 give me serious trouble. During 
startup of my application I get a sequence of exceptions and then a hard 
crash, probably as a result of the exceptions. This happens with both 4.5.0_01 
and 4.5.2_01, but with the latter I get more verbose output. The stack traces 
that get logged are the following:

QtJambi: Exception pending in native code
Exception in thread "main" java.lang.NoClassDefFoundError: 
eu/moonlight3d/ml3d/ui/mainwindow/view/Viewport
        at com.trolltech.qt.internal.MetaObjectTools.internalTypeName(Native 
Method)                      
        at 
com.trolltech.qt.internal.MetaObjectTools.buildMetaData(MetaObjectTools.java:434)
              
        at 
com.trolltech.qt.gui.QWidget.__qt_QWidget_QWidget_WindowFlags(Native Method)    
               
        at com.trolltech.qt.gui.QWidget.<init>(QWidget.java:77)                 
                          
        at com.trolltech.qt.gui.QWidget.<init>(QWidget.java:69)                 
                          
        at 
eu.moonlight3d.ml3d.ui.mainwindow.view.ViewWindowSpace.<init>(Unknown Source)   
               
        at eu.moonlight3d.ml3d.ui.mainwindow.MainWindow.<init>(Unknown Source)  
                          
        at 
eu.moonlight3d.ml3d.ui.mainwindow.MainWindowFactory.createNew(Unknown Source)   
               
        at 
eu.moonlight3d.framework.ui.UIManager.getMainWidget(UIManager.java:344)         
               
        at 
eu.moonlight3d.framework.ui.ApplicationWindow.<init>(ApplicationWindow.java:80) 
               
        at eu.moonlight3d.framework.State.createMainWindow(State.java:367)      
                          
        at eu.moonlight3d.framework.State.runInteractive(State.java:241)        
                          
        at eu.moonlight3d.ml3d.ML3D.main(Unknown Source)                        
                          
Caused by: java.lang.ClassNotFoundException: 
eu.moonlight3d.ml3d.ui.mainwindow.view.Viewport              
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)               
                          
        at java.security.AccessController.doPrivileged(Native Method)           
                          
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)           
                          
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)                
                          
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)        
                          
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)                
                          
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)        
                          
        ... 13 more                                                             
                          
QtJambi: Exception pending in native code in file 'qtdynamicmetaobject.cpp':116 
                          
Exception in thread "main" java.lang.NoClassDefFoundError: 
eu/moonlight3d/ml3d/ui/mainwindow/view/Viewport
        at com.trolltech.qt.internal.MetaObjectTools.internalTypeName(Native 
Method)                      
        at 
com.trolltech.qt.internal.MetaObjectTools.buildMetaData(MetaObjectTools.java:434)
              
        at 
com.trolltech.qt.gui.QWidget.__qt_QWidget_QWidget_WindowFlags(Native Method)    
               
        at com.trolltech.qt.gui.QWidget.<init>(QWidget.java:77)                 
                          
        at com.trolltech.qt.gui.QWidget.<init>(QWidget.java:69)                 
                          
        at 
eu.moonlight3d.ml3d.ui.mainwindow.view.ViewWindowSpace.<init>(Unknown Source)   
               
        at eu.moonlight3d.ml3d.ui.mainwindow.MainWindow.<init>(Unknown Source)  
                          
        at 
eu.moonlight3d.ml3d.ui.mainwindow.MainWindowFactory.createNew(Unknown Source)   
               
        at 
eu.moonlight3d.framework.ui.UIManager.getMainWidget(UIManager.java:344)         
               
        at 
eu.moonlight3d.framework.ui.ApplicationWindow.<init>(ApplicationWindow.java:80) 
               
        at eu.moonlight3d.framework.State.createMainWindow(State.java:367)      
                          
        at eu.moonlight3d.framework.State.runInteractive(State.java:241)        
                          
        at eu.moonlight3d.ml3d.ML3D.main(Unknown Source)                        
                          
Caused by: java.lang.ClassNotFoundException: 
eu.moonlight3d.ml3d.ui.mainwindow.view.Viewport              
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)               
                          
        at java.security.AccessController.doPrivileged(Native Method)           
                          
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)           
                          
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)                
                          
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)        
                          
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)                
                          
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)        
                          
        ... 13 more                                                             
                          
QtJambi: Exception pending in native code                                       
                          
Exception in thread "main" java.lang.NoClassDefFoundError: 
eu/moonlight3d/ml3d/ui/mainwindow/view/Viewport$ProjectionType
        at com.trolltech.qt.internal.MetaObjectTools.internalTypeName(Native 
Method)                                     
        at 
com.trolltech.qt.internal.MetaObjectTools.buildMetaData(MetaObjectTools.java:434)
        at 
com.trolltech.qt.opengl.QGLWidget.__qt_QGLWidget_QGLFormat_QWidget_QGLWidget_WindowFlags(Native
 
Method)
        at com.trolltech.qt.opengl.QGLWidget.<init>(QGLWidget.java:78)
        at com.trolltech.qt.opengl.QGLWidget.<init>(QGLWidget.java:66)
        at eu.moonlight3d.ml3d.ui.mainwindow.view.Viewport.<init>(Unknown 
Source)
        at 
eu.moonlight3d.ml3d.ui.mainwindow.view.ViewWindowSpace.createViewport(Unknown 
Source)
        at 
eu.moonlight3d.ml3d.ui.mainwindow.view.ViewWindowSpace.setupFourPaneView(Unknown
 
Source)
        at 
eu.moonlight3d.ml3d.ui.mainwindow.view.ViewWindowSpace.<init>(Unknown Source)
        at eu.moonlight3d.ml3d.ui.mainwindow.MainWindow.<init>(Unknown Source)
        at 
eu.moonlight3d.ml3d.ui.mainwindow.MainWindowFactory.createNew(Unknown Source)
        at 
eu.moonlight3d.framework.ui.UIManager.getMainWidget(UIManager.java:344)
        at 
eu.moonlight3d.framework.ui.ApplicationWindow.<init>(ApplicationWindow.java:80)
        at eu.moonlight3d.framework.State.createMainWindow(State.java:367)
        at eu.moonlight3d.framework.State.runInteractive(State.java:241)
        at eu.moonlight3d.ml3d.ML3D.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: 
eu.moonlight3d.ml3d.ui.mainwindow.view.Viewport$ProjectionType
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        ... 16 more
QtJambi: Exception pending in native code in file 'qtdynamicmetaobject.cpp':116
Exception in thread "main" java.lang.NoClassDefFoundError: 
eu/moonlight3d/ml3d/ui/mainwindow/view/Viewport$ProjectionType
        at com.trolltech.qt.internal.MetaObjectTools.internalTypeName(Native 
Method)
        at 
com.trolltech.qt.internal.MetaObjectTools.buildMetaData(MetaObjectTools.java:434)
        at 
com.trolltech.qt.opengl.QGLWidget.__qt_QGLWidget_QGLFormat_QWidget_QGLWidget_WindowFlags(Native
 
Method)
        at com.trolltech.qt.opengl.QGLWidget.<init>(QGLWidget.java:78)
        at com.trolltech.qt.opengl.QGLWidget.<init>(QGLWidget.java:66)
        at eu.moonlight3d.ml3d.ui.mainwindow.view.Viewport.<init>(Unknown 
Source)
        at 
eu.moonlight3d.ml3d.ui.mainwindow.view.ViewWindowSpace.createViewport(Unknown 
Source)
        at 
eu.moonlight3d.ml3d.ui.mainwindow.view.ViewWindowSpace.setupFourPaneView(Unknown
 
Source)
        at 
eu.moonlight3d.ml3d.ui.mainwindow.view.ViewWindowSpace.<init>(Unknown Source)
        at eu.moonlight3d.ml3d.ui.mainwindow.MainWindow.<init>(Unknown Source)
        at 
eu.moonlight3d.ml3d.ui.mainwindow.MainWindowFactory.createNew(Unknown Source)
        at 
eu.moonlight3d.framework.ui.UIManager.getMainWidget(UIManager.java:344)
        at 
eu.moonlight3d.framework.ui.ApplicationWindow.<init>(ApplicationWindow.java:80)
        at eu.moonlight3d.framework.State.createMainWindow(State.java:367)
        at eu.moonlight3d.framework.State.runInteractive(State.java:241)
        at eu.moonlight3d.ml3d.ML3D.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: 
eu.moonlight3d.ml3d.ui.mainwindow.view.Viewport$ProjectionType
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        ... 16 more

After that I get a VM crash. I find it strange that the NoClassDefFoundError is 
thrown, although the class is definitely there and must have been loaded. It 
must be noted, however, that the class in question is loaded through a 
classloader that is created at runtime, after Qt Jambi has been loaded and 
initialised through the default system classloader. 

A further indication that this would be the case is that everything works fine 
when I start the program from Eclipse, where the contents of the plugins is 
(improperly) added to the system classpath at VM startup.

So, could it be that the Jambi internals fail to query the correct class 
definition because they are looking for it in the wrong classloader? If so, is 
there a workaround for this? I need my own classloader to be able to load 
plugins.

Regards,
Gregor

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to