error running example

176 views
Skip to first unread message

Sharique

unread,
May 14, 2009, 3:19:37 AM5/14/09
to qt4dotnet
Hi,
I'm trying to run first example I got this error. Why it is looking
for 'qtjambi-deployment.xml' file?

Unhandled Exception: System.TypeInitializationException: The type
initializer fo
r 'com.trolltech.qt.gui.QApplication' threw an exception. --->
System.TypeInitia
lizationException: The type initializer for
'com.trolltech.qt.core.QCoreApplicat
ion' threw an exception. ---> System.TypeInitializationException: The
type initi
alizer for 'com.trolltech.qt.core.QObject' threw an exception. --->
System.TypeI
nitializationException: The type initializer for
'com.trolltech.qt.QtJambiObject
' threw an exception. ---> System.TypeInitializationException: The
type initiali
zer for 'com.trolltech.qt.QtJambi_LibraryInitializer' threw an
exception. ---> j
ava.lang.RuntimeException: Loading library failed, progress so far:
No 'qtjambi-deployment.xml' found in classpath, loading libraries via
'java.libr
ary.path'
Loading library: 'QtCore4.dll'...
- using 'java.library.path'
- ok, path was: g:\Sharique\Sharp\Qt1\Qt1\bin\Debug\QtCore4.dll
Loading library: 'qtjambi.dll'...
- using 'java.library.path'
--
Sharique
--- End of inner exception stack trace ---
at com.trolltech.qt.QtJambi_LibraryInitializer.init()
at com.trolltech.qt.QtJambiObject..cctor()
--- End of inner exception stack trace ---
at com.trolltech.qt.QtJambiObject.__<clinit>()
at com.trolltech.qt.core.QObject..cctor()
--- End of inner exception stack trace ---
at com.trolltech.qt.core.QObject.__<clinit>()
at com.trolltech.qt.core.QCoreApplication..cctor()
--- End of inner exception stack trace ---
at com.trolltech.qt.core.QCoreApplication.__<clinit>()
at com.trolltech.qt.gui.QApplication..cctor()
--- End of inner exception stack trace ---
at com.trolltech.qt.gui.QApplication..ctor(String[] args)
at Qt1.Program.Main(String[] args) in g:\Sharique\Sharp
\Qt1\Qt1\Program.cs:li
ne 18

Sharique

unread,
May 14, 2009, 3:23:19 AM5/14/09
to qt4dotnet
I'm able to fix few things now the error is
--
Unhandled Exception: System.TypeInitializationException: An exception
was thrown
by the type initializer for com.trolltech.qt.core.QCoreApplication ---
> System.
TypeInitializationException: An exception was thrown by the type
initializer for
com.trolltech.qt.core.QObject --->
System.TypeInitializationException: An excep
tion was thrown by the type initializer for
com.trolltech.qt.QtJambiObject --->
System.TypeInitializationException: An exception was thrown by the
type initiali
zer for com.trolltech.qt.QtJambi_LibraryInitializer --->
java.lang.UnsatisfiedLi
nkError: com/trolltech/qt/internal/
QClassPathFileEngineHandler.initialize()V
--- End of inner exception stack trace ---
at com.trolltech.qt.QtJambiObject..cctor () [0x00000]
--- End of inner exception stack trace ---
at com.trolltech.qt.core.QObject..cctor () [0x00000]
--- End of inner exception stack trace ---
at com.trolltech.qt.core.QCoreApplication..cctor () [0x00000]
--- End of inner exception stack trace ---
at Qt1.Program.Main (System.String[] args) [0x00000]
-------
Sharique

Cameron Taggart

unread,
Dec 14, 2009, 10:48:42 PM12/14/09
to Sharique, qt4d...@googlegroups.com
Hi Sharique,

What did you do to get past this error?

No 'qtjambi-deployment.xml' found in classpath, loading libraries
via 'java.library.path'

I am also getting that error with the libraries from qtjambi-4.5.2-
all.zip + Mono 2.4.3 + Windows 7 64-bit.

cheers,
Cameron

david...@gmail.com

unread,
Dec 15, 2009, 4:32:33 AM12/15/09
to qt4dotnet
You have to make sure you have all the .dll files needed (Qt ones and
QtJambi ones) either in your app's directory or in a place where
Windows can find. Also make sure that the ikvm-native.dll file is
there. If you are using the Qt 64 bits files please use the ikvm-
native.dll built for 64 bits otherwise please compile your App for 32
bits specifically. If after doing that you still get an exception
please check the Inner Exceptions and paste them here to find a
solution to your problem.

Thanks!

David.

Cameron Taggart

unread,
Dec 15, 2009, 6:45:06 PM12/15/09
to qt4d...@googlegroups.com
Thank you David and Frank for your help,

I finally got a Hello World working with the 32 bit versions
(qtjambi-win32-lgpl-4.5.2_01.zip). Thank you for your help. I'll
probably post some more details in a blog tomorrow.

cheers,
Cameron
> --
>
> You received this message because you are subscribed to the Google Groups "qt4dotnet" group.
> To post to this group, send email to qt4d...@googlegroups.com.
> To unsubscribe from this group, send email to qt4dotnet+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/qt4dotnet?hl=en.
>
>
>

Cameron Taggart

unread,
Dec 16, 2009, 11:29:30 PM12/16/09
to qt4d...@googlegroups.com
Thanks for for helping me explore the Qt the last couple of days.
Here is my blog post on it:

http://blog.ctaggart.com/2009/12/qt-from-f.html

cheers,
Cameron

Frank Bergmann

unread,
Dec 17, 2009, 12:15:17 AM12/17/09
to qt4d...@googlegroups.com
great post thanks ... I'll probably put together a set of binaries for Win32 / OSX / recent linux that one could just download and run, after all we all had to go through the same hoops ... :)

cheers
Frank

Reply all
Reply to author
Forward
0 new messages