* Apache CXF wsdl2java with gcc
@ 2009-08-13 9:01 David Michel
2009-08-13 10:02 ` Andrew Haley
0 siblings, 1 reply; 5+ messages in thread
From: David Michel @ 2009-08-13 9:01 UTC (permalink / raw)
To: java
Hi All,
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)
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)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:286)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
at org.apache.cxf.tools.wsdlto.core.PluginLoader.init(PluginLoader.java:82)
at org.apache.cxf.tools.wsdlto.core.PluginLoader.<init>(PluginLoader.java:72)
at org.apache.cxf.tools.wsdlto.core.PluginLoader.getInstance(PluginLoader.java:121)
at org.apache.cxf.tools.wsdlto.WSDLToJava.<init>(WSDLToJava.java:48)
at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:181)
Caused by: javax.xml.datatype.DatatypeConfigurationException:
java.lang.ClassNotFoundException: gnu.xml.datatype.JAXPDatatypeFactory
at javax.xml.datatype.DatatypeFactory.newInstance(DatatypeFactory.java:112)
at com.sun.xml.bind.DatatypeConverterImpl.<clinit>(DatatypeConverterImpl.java:831)
...20 more
Caused by: java.lang.ClassNotFoundException:
gnu.xml.datatype.JAXPDatatypeFactory
at java.lang.Class.forName(natClass.cc:108)
at java.lang.Class.forName(Class.java:133)
at javax.xml.datatype.DatatypeFactory.newInstance(DatatypeFactory.java:107)
...21 more
Is this a known problem, i.e. bug report ? Is there a work around ? Is
there a webservices framework that works fine with gcc ?
Many thanks for your help
David
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Apache CXF wsdl2java with gcc
2009-08-13 9:01 Apache CXF wsdl2java with gcc David Michel
@ 2009-08-13 10:02 ` Andrew Haley
2009-08-13 13:11 ` David Michel
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Haley @ 2009-08-13 10:02 UTC (permalink / raw)
To: David Michel; +Cc: java
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Apache CXF wsdl2java with gcc
2009-08-13 10:02 ` Andrew Haley
@ 2009-08-13 13:11 ` David Michel
2009-08-14 14:25 ` David Michel
0 siblings, 1 reply; 5+ messages in thread
From: David Michel @ 2009-08-13 13:11 UTC (permalink / raw)
To: Andrew Haley; +Cc: java
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.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Apache CXF wsdl2java with gcc
2009-08-13 13:11 ` David Michel
@ 2009-08-14 14:25 ` David Michel
2009-08-14 14:28 ` Andrew Haley
0 siblings, 1 reply; 5+ messages in thread
From: David Michel @ 2009-08-14 14:25 UTC (permalink / raw)
To: Andrew Haley; +Cc: java
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.
>>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Apache CXF wsdl2java with gcc
2009-08-14 14:25 ` David Michel
@ 2009-08-14 14:28 ` Andrew Haley
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Haley @ 2009-08-14 14:28 UTC (permalink / raw)
To: David Michel; +Cc: java
David Michel wrote:
> 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 !
If you give me a complete, precise, step-by-step procedure for duplicating
the problem I'll have a look.
Don't omit anything.
Andrew.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-08-14 14:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-13 9:01 Apache CXF wsdl2java with gcc David Michel
2009-08-13 10:02 ` Andrew Haley
2009-08-13 13:11 ` David Michel
2009-08-14 14:25 ` David Michel
2009-08-14 14:28 ` Andrew Haley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).