lamostreta
lamostreta

Reputation: 2409

java.lang.NoSuchMethodError

I am trying to run Tomcat 7 and getting following error:

java.lang.NoSuchMethodError: com.sun.xml.ws.assembler.TubelineAssemblyController: method <init>()V not found

According to this post (http://www.mkyong.com/webservices/jax-ws/deploy-jax-ws-web-services-on-tomcat/)

  1. gmbal-api-only.jar
  2. ha-api.jar
  3. jaxb-core.jar
  4. jaxb-impl.jar
  5. jaxws-api.jar
  6. jaxws-rt.jar
  7. management-api.jar
  8. policy.jar
  9. stax-ex.jar
  10. streambuffer.jar

I added these jars to Tomcat's libs (C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.37\lib), to my project's libs and even under JDK: C:\Program Files\Java\jdk1.7.0_15\lib, still no good.

The funny thing is there is nothing in my project that uses com.sun.xml.ws.assembler.TubelineAssemblyController class. Does anyone have any idea? Thanks in advance.

Upvotes: 1

Views: 8152

Answers (3)

John John
John John

Reputation: 4575

I'm with the same problem with Apache Commons and Tomcat 7. I have a new version in my lib folder, and tomcat has another version int the commmons lib folder.

Tomcat loads first the libs of its folder and after this the WEB/lib of my webapp. I got the same exception as you, once the method I'm using has only on the new version.

Try to localize different versions of the lib in your classpath.

Upvotes: 0

Saj
Saj

Reputation: 18702

"The funny thing is there is nothing in my project that uses com.sun.xml.ws.assembler.TubelineAssemblyController class."

But one of your jars' source is looking for it. You might have wrong version of jar file(s). Try redownloading the latest version.

Upvotes: 1

kosa
kosa

Reputation: 66637

java.lang.NoSuchMethodError

Generally happens when you have wrong version of jar in classpath.

For example, while development you have used stax-ex1.2.jar but runtime you have stax-ex.jar. Make sure you have same version of jar available in classpath for both compile time and run time.

Upvotes: 5

Related Questions