Hi,
My JavaFX application requires a class in another .jar file. Both are deployed as part of a .war file.
When I deploy my WAR file to
JBoss and access the web app's index.jsp through my browser, the JavaFX Main class loads but cannot find the class contained in the required jar file. (I can deploy simple JavaFX apps that do not require other jar files in this way, so the problem is not JavaFX related.)
I am expecting the JavaFX
applet to look in WEB-INF/lib of the .war it is deployed in, where it would find the jar it needs, but instead I get:
09/03/2011 16:53:21 [0x0-0xc90c9].com.apple.Safari[2303] Exception in
thread "AWT-EventQueue-2" java.lang.NoClassDefFoundError: com/elakes/tolstoy/webservices/EchoServerWSService
09/03/2011 16:53:21 [0x0-0xc90c9].com.apple.Safari[2303] at java.lang.Class.forName0(Native Method)
09/03/2011 16:53:21 [0x0-0xc90c9].com.apple.Safari[2303] at java.lang.Class.forName(Class.java:247)
09/03/2011 16:53:21 [0x0-0xc90c9].com.apple.Safari[2303] at com.sun.javafx.runtime.adapter.AppletStartupRoutineEx.run(Unknown Source)
The contents of my .war file are:
META-INF/
META-INF/MANIFEST.MF
WEB-INF/
WEB-INF/classes/
WEB-INF/classes/META-INF/
WEB-INF/classes/com/
WEB-INF/classes/com/elakes/
WEB-INF/classes/com/elakes/tolstoy/
WEB-INF/classes/com/elakes/tolstoy/webservices/
WEB-INF/lib/
WEB-INF/classes/com/elakes/tolstoy/webservices/EchoServerWS.class
WEB-INF/lib/elakes-ws-client.jar
( <------ the .jar my JavaFX app requires )
WEB-INF/sun-web.xml
WEB-INF/web.xml
elakes-fx-client.jar
( <------ my JavaFX app )
index.jsp
The JavaFX jar is in the root of the .war so it can be seen by the applet markup in index.jsp
The contents of elakes-ws-client.jar is:
META-INF/
META-INF/MANIFEST.MF
META-INF/wsdl/
META-INF/wsdl/localhost_8080/
META-INF/wsdl/localhost_8080/elakes-ws/
com/
com/elakes/
com/elakes/tolstoy/
com/elakes/tolstoy/webservices/
META-INF/jax-ws-catalog.xml
META-INF/wsdl/localhost_8080/elakes-ws/EchoServerWSService.wsdl
META-INF/wsdl/localhost_8080/elakes-ws/EchoStringWSService.wsdl
META-INF/wsdl/localhost_8080/elakes-ws/EchoStringWSService.xsd_1.xsd
com/elakes/tolstoy/webservices/Echo.class
com/elakes/tolstoy/webservices/EchoResponse.class
com/elakes/tolstoy/webservices/EchoServerWS.class
com/elakes/tolstoy/webservices/EchoServerWSService.class
( <------- here it is! )
com/elakes/tolstoy/webservices/ObjectFactory.class
com/elakes/tolstoy/webservices/package-info.class
Can somebody help me understand why my JavaFX jar is not finding the EchoServerWSService class contained in WEB-INF/lib/elakes-ws-client.jar?
Thanks,
-scott