• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ant Tools 'java.lang.NoSuchMethodError

 
M Mila
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask.execute(Java2WsdlAntTask.java:221)
[axis-java2wsdl] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[axis-java2wsdl] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[axis-java2wsdl] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[axis-java2wsdl] at java.lang.reflect.Method.invoke(Method.java:597)
[axis-java2wsdl] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[axis-java2wsdl] at org.apache.tools.ant.Task.perform(Task.java:348)
[axis-java2wsdl] at org.apache.tools.ant.Target.execute(Target.java:390)
[axis-java2wsdl] at org.apache.tools.ant.Target.performTasks(Target.java:411)
[axis-java2wsdl] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[axis-java2wsdl] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:

ANT_OPTS=-verbose:class

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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic