vitor henriques wrote:It still doesn't work.
Stephan van Hulst wrote:It appears that you're trying to build a web service that has an embedded web container. That's why it's an executable JAR and not a WAR. This is fine, but the problem is that you're mixing build systems. You're using Maven to compile your application, but you're telling Eclipse to package your application as a fat JAR with dependencies.
I'm not too familiar with how Eclipse creates fat JARs. Can you tell us the exact steps you performed to export your application as a JAR in Eclipse? Can you also please show us your entire POM if possible?
Stephan van Hulst wrote:Thanks. I'm pretty certain the problem is caused by a mismatch between how Eclipse builds fat JARs and how it converts projects to Maven. I first need to find out of the maven-acr-plugin also creates a fat JAR. If it doesn't, then that is your problem: Maven builds a normal JAR where other libraries are in some folder relative to the built JAR. Eclipse packages all the JARs into the built JAR and uses a custom class loader. You are getting an exception because your application still assumes that it is being packaged by Eclipse, and that it uses the JarRsrcLoader. This is no longer the case.
Here are a few questions for you.
Why did you convert the project to Maven? Was it only to add the dependency on JAX-WS? Must the application be a fat JAR? That is, must all libraries be contained inside the executable JAR you're building?
Why did you convert the project to Maven? Was it only to add the dependency on JAX-WS?
to be able to access the POM, if there is any other way, please say
Must the application be a fat JAR? That is, must all libraries be contained inside the executable JAR you're building?