Hi, I am developing in Netbeans and need to provide our customer APIs a
"base" XMLBean library (for example sake, call it "baseschemas.jar". This
base library will be used to support different vendors the ability to build
their own customized XMLBean objects.

In my testing, I have created a XMLBean library called Vendor1
(vendor1.jar). In vendor1.jar, I have Class B which contains a class
member, Class A, defined in baseschemas.jar. The Vendor1 Netbeans project
module compiles with no problems (baseschemas.jar is a lib dependency).
However, in my Netbeans app at runtime, when Class B attempts to access
Class A (getClassA), a null pointer exception occurs:

java.lang.NullPointerException<http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html>

at
org.apache.xmlbeans.impl.schema.SchemaPropertyImpl.getType(SchemaPropertyImpl.java:92)
at
org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createElementType(SchemaTypeImpl.java:965)
at
org.apache.xmlbeans.impl.values.XmlObjectBase.create_element_user(XmlObjectBase.java:924)
at org.apache.xmlbeans.impl.store.Xobj.getUser(Xobj.java:1669)
at org.apache.xmlbeans.impl.store.Xobj.find_element_user(Xobj.java:2074)
at vendors1.impl.ClassBImpl.getClassA(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at
groovy.lang.MetaClassImpl$GetBeanMethodMetaProperty.getProperty(MetaClassImpl.java:3460)
at
org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:61)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:237)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetPropertySafe(AbstractCallSite.java:343)

I have tried using XMLBeans 2.4 and 2.5 and the same result occurs.

Any help is much appreciated,
Thanks!

Reply via email to