1

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.

3 Answers 3

5
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.

Sign up to request clarification or add additional context in comments.

7 Comments

I understand but the jars that I am adding are from the latest version: jaxws-ri-2.2.8 and I am using these jars are same in both of the places you mentioned...
"Wrong version" ---> Doesn't mean we need to get latest. 1) jars could be old in context of your code(in this case you need to get latest) 2) jars could be new in context of your code(in this case you need to downgrade).
Sorry I confused with the Sajal Dutta's answer. He mentioned downloading the latest version..
@lamostreta: Sorry! I am not sure about that.I would read release document to make sure.
@lamostreta: Well, you are just switching versions instead of finding out which source jar causing this issue. That may not help. For example, xyz.jar trying to invoke TubelineAssemblyController.java (which is in 123.jar), without knowing version xyz.jar, you can't find out what version 123.jar will help you. Find out what is xyz.jar version in your case.
|
1

"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.

2 Comments

The jars that I used are from the latest version: jaxws-ri-2.2.8
@lamostreta Check if you jar has this class: com.sun.xml.ws.assembler.TubelineAssemblyController. If not, download the right one which has it.
0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.