• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[java] java. lang.NoClassDefFoundError: javax.xml.transform. Source

 
Bunny Singh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I m trying to run a JAXRPC example from the java webservices development kit. I have been able to deploy the server side and do everything but run the client. The moment I do ant run I get an error as given below. Also The "Source" is supposed to be in xalan.jar but I find it in jaxp-api.jar. This is vital for me .
Plz help what m I doing wrong. Thanx a Ton
Error:
C:\jwsdp-1.1\docs\tutorial\examples\jaxrpc\hello>ant run
Buildfile: build.xml
run:
[echo] Running the hello.HelloClient program....
[java] java.lang.NoClassDefFoundError: javax.xml.transform.Source
[java] at com.sun.xml.rpc.encoding.soap.StandardSOAPTypeMappings.class$
(StandardSOAPTypeMappings.java:28)
[java] at com.sun.xml.rpc.encoding.soap.StandardSOAPTypeMappings.<init>
(StandardSOAPTypeMappings.java:457)
[java] at com.sun.xml.rpc.encoding.StandardTypeMappings.getSoap(Standar
dTypeMappings.java:28)
[java] at com.sun.xml.rpc.client.BasicService.createSoapMappings(BasicS
ervice.java:170)
[java] at com.sun.xml.rpc.client.BasicService.createStandardTypeMapping
Registry(BasicService.java:160)
[java] at hello.MyHello_SerializerRegistry.getRegistry(MyHello_Serializ
erRegistry.java:22)
[java] at hello.MyHello_Impl.<init>(MyHello_Impl.java:25)
[java] at hello.HelloClient.createProxy(Unknown Source)
[java] at hello.HelloClient.main(Unknown Source)
[java] Exception in thread "main"
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 1 second
C:\jwsdp-1.1\docs\tutorial\examples\jaxrpc\hello>
 
Bunny Singh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello...
nebody at the ranch...??? :roll:
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Classically speaking, you get that kind of error when there is some sort of clash of jar versions. The Java equivalent of "DLL hell."
Probably, somewhere else on your system is a jar of an earlier version that has com.sun.xml.* class files - for some reason the JVM is finding that jar before the one you want to use.
Bill
 
Bunny Singh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi William,
I also had some kind of idea of this problem. I searched for all the jar files and then tried locating the file "javax.xml.transform.Source". I could locate only in a jar called XML4J.jar inside lotus notes. However there is no other jar file containing the above mentioned class file. I m still getting the same problem. Plz throw some light
Regards
 
Amol Desai
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try setting the jaxrpc-api.jar to your classpath
in your build.xml file
In your build.xml say the target is run, then add classpath to your java element
<target name="run">
<java classpath="c:/jwsdp1.2/jaxrpc-1.3\lib\jaxrpc-api.jar:${build.classpath}"
classname="..." >
</java>
<target>
 
San-Yih Pan
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I encountered the similar error message in Unix. The machine only has jaxrpc.java but no jaxrpc-api.jar. How to fix it?

Thanks,
San-Yih
-----------------------------------------------------------------
[java] Exception in thread "main" java.lang.NoClassDefFoundError: javax.xml.transform.Source
[java] at org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory.class$(JAFDataHandlerSerializerFactory.java:37)
[java] at org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory.getSerializerClass(JAFDataHandlerSerializerFactory.java:48)
[java] at org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory.<init>(JAFDataHandlerSerializerFactory.java:34)
[java] at org.apache.axis.encoding.DefaultTypeMappingImpl.initMappings(DefaultTypeMappingImpl.java:308)
[java] at org.apache.axis.encoding.DefaultTypeMappingImpl.<init>(DefaultTypeMappingImpl.java:91)
[java] at org.apache.axis.encoding.DefaultTypeMappingImpl.getSingletonDelegate(DefaultTypeMappingImpl.java:85)
[java] at org.apache.axis.encoding.TypeMappingRegistryImpl.<init>(TypeMappingRegistryImpl.java:155)
[java] at org.apache.axis.encoding.TypeMappingRegistryImpl.<init>(TypeMappingRegistryImpl.java:149)
[java] at org.apache.axis.wsdl.toJava.Emitter.<init>(Emitter.java:144)
[java] at org.apache.axis.wsdl.WSDL2Java.createParser(WSDL2Java.java:209)
[java] at org.apache.axis.wsdl.gen.WSDL2.<init>(WSDL2.java:96)
[java] at org.apache.axis.wsdl.WSDL2Java.<init>(WSDL2Java.java:194)
[java] at org.apache.axis.wsdl.WSDL2Java.main(WSDL2Java.java:371)
[java] Java Result: 1
[java] Exception in thread "main" java.lang.NoClassDefFoundError: javax.xml.transform.Source
[java] at org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory.class$(JAFDataHandlerSerializerFactory.java:37)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic