From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7035 invoked by alias); 13 Aug 2009 10:02:51 -0000 Received: (qmail 6726 invoked by uid 22791); 13 Aug 2009 10:02:48 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,WEIRD_PORT X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 13 Aug 2009 10:02:31 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7DA2Tvf017060; Thu, 13 Aug 2009 06:02:29 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n7DA2S5c017332; Thu, 13 Aug 2009 06:02:29 -0400 Received: from zebedee.pink (vpn2-8-99.ams2.redhat.com [10.36.8.99]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n7DA2RZQ003965; Thu, 13 Aug 2009 06:02:27 -0400 Message-ID: <4A83E4B2.4000105@redhat.com> Date: Thu, 13 Aug 2009 10:02:00 -0000 From: Andrew Haley User-Agent: Thunderbird 2.0.0.17 (X11/20081009) MIME-Version: 1.0 To: David Michel CC: java@gcc.gnu.org Subject: Re: Apache CXF wsdl2java with gcc References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/msg00022.txt.bz2 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 * -db * -wv > * -p <[wsdl-namespace =]package-name>* -sn > -b * -catalog -d > -compile -classdir > -impl -server -client -all -autoNameResolution > -allowElementReferences<=true> > -defaultValues<=class-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=/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.(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.(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.