From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16596 invoked by alias); 13 Aug 2009 13:11:12 -0000 Received: (qmail 16566 invoked by uid 22791); 13 Aug 2009 13:11:11 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS,WEIRD_PORT X-Spam-Check-By: sourceware.org Received: from mail-bw0-f214.google.com (HELO mail-bw0-f214.google.com) (209.85.218.214) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 13 Aug 2009 13:10:58 +0000 Received: by bwz10 with SMTP id 10so577361bwz.29 for ; Thu, 13 Aug 2009 06:10:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.162.198 with SMTP id w6mr648559bkx.4.1250169055383; Thu, 13 Aug 2009 06:10:55 -0700 (PDT) In-Reply-To: <4A83E4B2.4000105@redhat.com> References: <4A83E4B2.4000105@redhat.com> Date: Thu, 13 Aug 2009 13:11:00 -0000 Message-ID: Subject: Re: Apache CXF wsdl2java with gcc From: David Michel To: Andrew Haley Cc: java@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2009-08/txt/msg00026.txt.bz2 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 > > 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=3D/usr/lib/jvm/java-6-sun/ > > $ ./wsdl2java > > Missing argument: wsdlurl > > > > Usage : wsdl2java -fe * -db * -wv > > * -p <[wsdl-namespace =3D]package-name>* -sn > > -b * -catalog -d > > -compile -classdir > > -impl -server -client -all -autoNameResolution > > -allowElementReferences<=3Dtrue> > > -defaultValues<=3Dclass-name-for-DefaultValueProvider> -ant -nexclude > > * -exsh <(true, false)> -dns > > -dex <(true, false)> -validate -keep > > -wsdlLocation -xjc -noAddressBinding -h > > -v -verbose -quiet -wsdlList > > > > When using the gcc jvm, I get this: > > > > $ JAVA_HOME=3D/usr/lib/jvm/java-gcj/ > > $ ./wsdl2java > > Exception in thread "main" java.lang.Error: > > javax.xml.datatype.DatatypeConfigurationException: > > java.lang.ClassNotFoundException: gnu.xml.datatype.JAXPDatatypeFactory > > =A0 =A0at com.sun.xml.bind.DatatypeConverterImpl.(DatatypeConve= rterImpl.java:833) > > This really is weird. =A0Where is your DatatypeConverterImpl coming from? > java -verbose:class will tell you. =A0I think you've got some sort of mix > of classes from implementations. > > > =A0 =A0at java.lang.Class.initializeClass(natClass.cc:780) > > =A0 =A0at com.sun.xml.bind.v2.runtime.JAXBContextImpl$3.run(JAXBContext= Impl.java:287) > > =A0 =A0at com.sun.xml.bind.v2.runtime.JAXBContextImpl$3.run(JAXBContext= Impl.java:286) > > =A0 =A0at java.security.AccessController.doPrivileged(AccessController.= java:96) > > =A0 =A0at com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContex= tImpl.java:285) > > =A0 =A0at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilde= r.build(JAXBContextImpl.java:1136) > > =A0 =A0at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFacto= ry.java:154) > > =A0 =A0at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFacto= ry.java:121) > > =A0 =A0at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFacto= ry.java:202) > > =A0 =A0at java.lang.reflect.Method.invoke(natMethod.cc:205) > > =A0 =A0at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:1= 33) > > This is a private class that's part of Sun's JAXB. > > It seems to me that you aren't really running gcj. =A0Simply changing > JAVA_HOME doesn't control which Java you're using. > > Andrew. >