Apache CXF wsdl2java with gcc

David Michel dmichel76@googlemail.com
Fri Aug 14 14:25:00 GMT 2009


Actually, I thought it did solve the problem , but in fact the problem
is still there. Now, I have even removed Sun's java so that I only
have gcj/gij and still I get the error about DatatypeConverterImpl...

arggg... I'm getting crazy here...

Any idea is more than welcome !

David


2009/8/13 David Michel <dmichel76@googlemail.com>:
> yeah, you are right, it seems to be all mixed up in there. JAVA_HOME
> is indeed not sufficient as the links to java/javac have to be changed
> too, right ? Using, 'update-alternatives --config' for 'java' and
> 'javac' has solved the problem.
>
> Thanks for the tip about java -verbose:class ! that's quite useful !
>
> Cheers !
>
> David
>
> 2009/8/13 Andrew Haley <aph@redhat.com>
>>
>> David Michel wrote:
>>
>> > There is an issue with gcc 4.2.4 while trying to use the CXF
>> > (http://cxf.apache.org/index.html) libraries and tools for
>> > web-services, specifically using the wsdl2java tool.
>> >
>> > While with Sun's java, there is no problem:
>> >
>> > $ export JAVA_HOME=/usr/lib/jvm/java-6-sun/
>> > $ ./wsdl2java
>> > Missing argument: wsdlurl
>> >
>> > Usage : wsdl2java -fe <front-end-name>* -db <data-binding-name>* -wv
>> > <wsdl-version>* -p <[wsdl-namespace =]package-name>* -sn
>> > <service-name> -b <binding-file-name>* -catalog <catalog-file-name> -d
>> > <output-directory> -compile -classdir <compile-classes-directory>
>> > -impl -server -client -all -autoNameResolution
>> > -allowElementReferences<=true>
>> > -defaultValues<=class-name-for-DefaultValueProvider> -ant -nexclude
>> > <schema-namespace [= java-package-name]>* -exsh <(true, false)> -dns
>> > <Default value is true> -dex <(true, false)> -validate -keep
>> > -wsdlLocation <wsdlLocation> -xjc<xjc-arguments> -noAddressBinding -h
>> > -v -verbose -quiet -wsdlList <wsdlurl>
>> >
>> > When using the gcc jvm, I get this:
>> >
>> > $ JAVA_HOME=/usr/lib/jvm/java-gcj/
>> > $ ./wsdl2java
>> > Exception in thread "main" java.lang.Error:
>> > javax.xml.datatype.DatatypeConfigurationException:
>> > java.lang.ClassNotFoundException: gnu.xml.datatype.JAXPDatatypeFactory
>> >    at com.sun.xml.bind.DatatypeConverterImpl.<clinit>(DatatypeConverterImpl.java:833)
>>
>> This really is weird.  Where is your DatatypeConverterImpl coming from?
>> java -verbose:class will tell you.  I think you've got some sort of mix
>> of classes from implementations.
>>
>> >    at java.lang.Class.initializeClass(natClass.cc:780)
>> >    at com.sun.xml.bind.v2.runtime.JAXBContextImpl$3.run(JAXBContextImpl.java:287)
>> >    at com.sun.xml.bind.v2.runtime.JAXBContextImpl$3.run(JAXBContextImpl.java:286)
>> >    at java.security.AccessController.doPrivileged(AccessController.java:96)
>> >    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:285)
>> >    at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1136)
>> >    at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
>> >    at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:121)
>> >    at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:202)
>> >    at java.lang.reflect.Method.invoke(natMethod.cc:205)
>> >    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:133)
>>
>> This is a private class that's part of Sun's JAXB.
>>
>> It seems to me that you aren't really running gcj.  Simply changing
>> JAVA_HOME doesn't control which Java you're using.
>>
>> Andrew.
>>
>



More information about the Java mailing list