File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant Tools 'java.lang.NoSuchMethodError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant Tools Watch "Ant Tools New topic

Ant Tools 'java.lang.NoSuchMethodError

M Mila

Joined: Aug 26, 2011
Posts: 1
I am seeing this Ant Build Error. Any help here ?

[axis-java2wsdl] java.lang.NoSuchMethodError: org.apache.axis.encoding.DefaultTypeMappingImpl.getSingleton()Lorg/apache/axis/encoding/TypeMapping;
[axis-java2wsdl] at
[axis-java2wsdl] at
[axis-java2wsdl] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[axis-java2wsdl] at sun.reflect.DelegatingMethodAccessorImpl.invoke(
[axis-java2wsdl] at java.lang.reflect.Method.invoke(
[axis-java2wsdl] at
[axis-java2wsdl] at
[axis-java2wsdl] at
[axis-java2wsdl] at
[axis-java2wsdl] at
[axis-java2wsdl] at
Peter Johnson

Joined: May 14, 2008
Posts: 5812

Looks like Ant is picking up the wrong JAR file for org.apache.axis.encoding.DefaultTypeMappingImpl. Dis you set CLASSPATH? If so, unset it and try again. Or do you have a copy of Axis in an endorsed directory? If so, remove it.

If neither of these help, set the ANT_OPTS env var to -verbose:class. Example:


Then run Ant again. This option causes the JVM to list each class loaded and the location of the JAR the class came from. Look at where the org.apache.axis.encoding.DefaultTypeMappingImpl class was loaded, that should give a a clue as to what is going on.

JBoss In Action
It is sorta covered in the JavaRanch Style Guide.
subject: Ant Tools 'java.lang.NoSuchMethodError
Similar Threads
How To :: Generating WSDL file from eclipse(java2wsdl & wsdl2java from eclipse)
Calling Axis-Ant targets
AXIS and Classpath
AXIS-JAVA2WSDL ClassNotFoundException
newbie to webservices