Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[client] NoClassDefFoundError: javax/xml/soap/FactoryLoader

 
Alessandro Ilardo
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
I'm new with web services and JAX-WS. I'm trying to call a web service from a simple client application, but I'm getting this error.


Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/soap/FactoryLoader
at javax.xml.ws.spi.Provider.provider(Provider.java:91)
at javax.xml.ws.Service.<init>(Service.java:83)
at eu.virtualLab.busSchedule.webservice.artifacts.BusSessionBeanService.<init>(BusSessionBeanService.java:46)
at eu.virtualLab.busSchedule.webservice.client.Main.main(Main.java:38)
Java Result: 1


I tried to follow step by step the tutorials and keep it simple as much as I could, but I don't understand the error.
Below the clent code, the artifacts have been made by JBOSS tools.

Any help is appreciate.
Thanks in advance
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you are missing the jar file which contains javax/xml/soap/FactoryLoader class. I dont know the name of the jar (most probably its saaj.jar). You will have to place it in your applications classpath.
 
Alessandro Ilardo
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I spent some time on the Internet trying to figure out where I could find those classes.

saaj-api.jar
saaj-impl.jar

don't have it.
I can't even find the API docs.

 
Alessandro Ilardo
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solved it.
Don't use jboss client jars.

Thanks anyway for any help.
 
Mark Uppeteer
Ranch Hand
Posts: 159
C++ Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although you've solved it this way, it can be done with the jboss libraries.
There is also a 'client' folder in your jboss home, and there there is a jboss-saaj jar file.

Best regards,
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic