Hi Bob,
I'm not sure what you mean by lib dependency but thought this link
might be of some use

Are both baseschemas.jar and vendor1.jar on the classpath during execution?
Can you try doing a Class.getResource or something along those lines
and accessing a resource or file in baseschemas.jar before your call
to getClassA?
Please let me know if this works.


On Tue, Jan 10, 2012 at 6:59 AM, Bob Harvey
<robert.l.harvey...@gmail.com> wrote:
> 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
> 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!

To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org

Reply via email to