Hello everyone!
I am upgrading our software to use the 1.7 jdk which includes JAXB now in the rt.jar. I am running into a problem that is mysterious... if I debug it I can get it to work, but if I let it just run, it always fails on some property. Here is the stack trace of the failure. It seems like an iterator is trying to get an element that has already been consumed. Can you help me determine what is the problem here? What can I change to fix this? Let me know if I can provide any additional information about the object that fails. I am kind of new to this but I know that there is the WSDL file and the actual XSD schema, and the "ref" elements are part of the schema. This object is failing to even generate that schema, and it seems on the ref elements. Another thing is that it feels like this is threading related because if I do a clean build, parts of the stack trash "smash" each other due to not having synchronization on System.out. I have an example of a smashed stack trace output below the cleaner stack trace showing the issue. Any help is greatly appreciated.
[WSGenerator] Caused by: java.lang.NullPointerException
[WSGenerator] at $Proxy37.required(Unknown Source)
[WSGenerator] at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl.getTypes(ElementPropertyInfoImpl.java:143)
[WSGenerator] at com.sun.xml.bind.v2.model.impl.RuntimeElementPropertyInfoImpl.getTypes(RuntimeElementPropertyInfoImpl.java:90)
[WSGenerator] at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.size(ElementPropertyInfoImpl.java:82)
[WSGenerator] at java.util.AbstractList$Itr.hasNext(AbstractList.java:351)
[WSGenerator] at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:259)
[WSGenerator] at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:104)
[WSGenerator] at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:85)
[WSGenerator] at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:213)
[WSGenerator] at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:99)
[WSGenerator] at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:85)
[WSGenerator] at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:319)
[WSGenerator] at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:334)
[WSGenerator] at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:460)
[WSGenerator] at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:298)
[WSGenerator] at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:141)
[WSGenerator] at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1157)
[WSGenerator] at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:188)
[WSGenerator] at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:167)
[WSGenerator] at com.ams.core.xml.jaxb.ContextFactory.createContext(ContextFactory.java:265)
[WSGenerator] at com.ams.core.renderer2.schema.JaxbSchemaGenerator.createJAXBContext(JaxbSchemaGenerator.java:400)
[WSGenerator] at com.ams.core.renderer2.schema.JaxbSchemaGenerator.generateSchemaForParameters(JaxbSchemaGenerator.java:203)
[WSGenerator] at org.apache.axis2.jaxbri.JaxbSchemaGenerator.generateSchema(JaxbSchemaGenerator.java:66)
[WSGenerator] at com.ams.core.renderer2.schema.JaxbSchemaGenerator.generateSchema(JaxbSchemaGenerator.java:173)
[WSGenerator] at org.apache.axis2.description.AxisService.createService(AxisService.java:2529)
A smashed one:
[WSGenerator] Caused by: java.lang.NullPointerException
[WSGenerator] at $Proxy37.required(Unknowt com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:298)
[WSGenerator] at com.sun.xml.bind.v2.runtime.JAXBContextImpl.n Source)
[WSGenerator] at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl.getTypes(ElementPropertyInfoImpl.java:143)
[WSGenerator] at com.sun.xm<init>(JAXBContextImpl.java:141)
[WSGenerator] at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:l.bind.v2.model.impl.RuntimeElementPropertyInfoImpl.getTypes(RuntimeElementPropertyInfoImpl.java:90)
[WSGenerator] at com.sun.xml.bind.v2.mo1157)
[WSGenerator] at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:188)
[WSGenerator] at com.sun.xml.bind.v2.ContextFactory.credel.impl.ElementPropertyInfoImpl$1.size(ElementPropertyInfoImpl.java:82)
[WSGenerator] at java.util.AbstractList$Itr.hasNext(AbstractList.jaateContext(ContextFactory.java:167)
[WSGenerator] at com.ams.core.xml.jaxb.ContextFactory.createContext(ContextFactory.java:265)
[WSGenerator] at com.amva:351)
[WSGenerator] at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:259)
[WSGenerator] at com.sun.xml.bind.v2.model.impls.core.renderer2.schema.JaxbSchemaGenerator.createJAXBContext(JaxbSchemaGenerator.java:400)
[WSGenerator] at com.ams.core.renderer2.schema.J.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:104)
[WSGenerator] at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassaxbSchemaGenerator.generateSchemaForParameters(JaxbSchemaGenerator.java:203)
[WSGenerator] at org.apache.axis2.jaxbri.JaxbSchemaGenerator.geInfo(RuntimeModelBuilder.java:85)
Thank you for taking a look!
Jeremy