• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Deploying .war containing JavaFX .jar to JBoss - NoClassDefFoundError

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
So there I was, trapped in the jungle. And at the last minute, I was saved by this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic