I'll give those a shot. Luckily I have the source for the component that's causing the problem. The thing is... this works great under Tomcat/OracleJDK :S
/me shakes fist at IBM Craig. On Fri, Aug 31, 2012 at 3:31 PM, Glen Mazza <[email protected]> wrote: > Unsure, but I don't think the problem is related to your webapp not > reading in the CXF JARs, it looks like a standard JAXB configuration issue > (further testing might show: does the app work with Tomcat, or same error? > if you change the data type from XMLGregorianCalendar to String, does the > error go away?) That particular error "@XmlAttribute/@XmlValue need to > reference a Java type that maps to text in XML", when googled, returns > about 1500 hits, probably with many different solutions (here is one: > http://stackoverflow.com/**questions/8807296/jaxb-**generic-xmlvalue<http://stackoverflow.com/questions/8807296/jaxb-generic-xmlvalue> > ) > > You might want to try switching to java.util.Date instead of > XMLGregorianCalendar, you'll need a JAXB binding file for that: > http://cxf.apache.org/docs/**wsdl-to-java.html#WSDLtoJava-** > JAXWSCustomization<http://cxf.apache.org/docs/wsdl-to-java.html#WSDLtoJava-JAXWSCustomization>. > Note it has parseMethod and printMethod settings that could be another > solution causing that error to go away. If that works, see if plugging in > XMLGregorianCalendar into that config will also work for you, then you're > set. > > HTH, > Glen > > > > On 08/31/2012 03:51 PM, Craig Tataryn wrote: > >> Hello, whilst trying to deploy my webapp to WAS v8.0, I'm running into an >> issue where a component the webapp depends on uses CXF and has a few model >> objects annotated with JAXWS annotations, I get the following error: >> >> Caused by: >> com.ibm.jtc.jax.xml.bind.v2.**runtime.**IllegalAnnotationsException: >> 2 counts of IllegalAnnotationExceptions >> @XmlAttribute/@XmlValue need to reference a Java type that maps to text >> in XML. >> >> this problem is related to the following location: >> at protected javax.xml.datatype.**XMLGregorianCalendar >> corp.iam.spml2.suspend.**SuspendRequestType.**effectiveDate >> >> The model object itself looks like this: >> >> package corp.iam.spml2.suspend; >> >> import javax.xml.bind.annotation.**XmlAccessType; >> >> import javax.xml.bind.annotation.**XmlAccessorType; >> >> import javax.xml.bind.annotation.**XmlAttribute; >> >> import javax.xml.bind.annotation.**XmlElement; >> >> import javax.xml.bind.annotation.**XmlSchemaType; >> >> import javax.xml.bind.annotation.**XmlType; >> >> import javax.xml.datatype.**XMLGregorianCalendar; >> >> //... >> @XmlAccessorType(**XmlAccessType.FIELD) >> >> @XmlType(name = "SuspendRequestType", namespace = >> "urn:oasis:names:tc:SPML:2:0:**suspend", propOrder = { >> >> "psoID" >> }) >> public class SuspendRequestType >> >> extends RequestType >> >> { >> @XmlElement(namespace = "urn:oasis:names:tc:SPML:2:0:**suspend", >> required = true) >> >> protected PSOIdentifierType psoID; >> >> @XmlAttribute(name = "effectiveDate") >> >> @XmlSchemaType(name = "dateTime") >> >> protected XMLGregorianCalendar effectiveDate; >> >> //Plain old getter/setters make-up the rest of the class >> //... >> } >> >> Has anyone else run into the problem? >> >> Again, running Webshpere v8.0 with the following JVM: >> >> java version "1.6.0" >> Java(TM) SE Runtime Environment (build pap6460_26fp1-20110419_01) >> IBM J9 VM (build 2.6, JRE 1.6.0 AIX ppc64-64 20110418_80450 (JIT enabled, >> AOT enabled) >> J9VM - R26_Java626_GA_FP1_20110418_**1915_B80450 >> JIT - r11_20110215_18645ifx8 >> GC - R26_Java626_GA_FP1_20110418_**1915_B80450 >> J9CL - 20110418_80450) >> JCL - 20110401_01 >> >> I've gone through all the usual "convince WAS to let us use CXF" steps >> (short of creating a shared library), but can't get past this error. I've >> even tried adding a "type=javax.xml.datatype.**XMLGregorianCalendar.class" >> to the "@XmlSchemaType" for the effectiveDate field, but to no avail. >> >> I've attached a directory listing of my WEB-INF/lib folder as well. >> >> Any help would be greatly appreciated. >> >> Craig. >> >> -- >> Craig Tataryn >> site: http://www.basementcoders.com/ >> podcast:http://feeds.**feedburner.com/**TheBasementCoders<http://feeds.feedburner.com/TheBasementCoders> >> irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin >> twitter: craiger >> > > > -- > Glen Mazza > Talend Community Coders - coders.talend.com > blog: www.jroller.com/gmazza > > -- Craig Tataryn site: http://www.basementcoders.com/ podcast:http://feeds.feedburner.com/TheBasementCoders irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin twitter: craiger
