You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Edward Frederick <ep...@gmail.com> on 2006/02/01 21:57:05 UTC

Strange Type Resolution Error

Hello,

XMLBeans is working great for me, thank you to all contributors.

I'm having a strange problem:

When run within Tomcat (types are within a jar file in WEB-INF/lib):

XmlObject enclosure = (XmlObject)XmlObject.Factory.parse(someFooDom);

enclosure.getClass().getName() = my.xmlbeans.package.FooDocument (as expected)


When run outside of Tomcat (i.e. say when used within a JUnit test,
generated JARs are still inside classpath):


XmlObject enclosure = (XmlObject)XmlObject.Factory.parse(someFooDom);

enclosure.getClass().getName() = org.apache.xmlbeans.impl.values.XmlAnyTypeImpl


I verified that the passed documents are exactly the same. Does this
mean that in the second scenerio XMLBeans can't 'see' my schemas and
corresponding beans? Any ideas on how I can figure out why my document
isn't been 'seen' as a FooDocument?


I know this is a vague issue, but I'm hoping somewhere out there has
an 'aha' moment.

Thanks so much,

Ed

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


Re: Strange Type Resolution Error

Posted by Edward Frederick <ep...@gmail.com>.
New development:

I tried to instead directly instantiate the document type I want, and
a curious error happens in case#2:


 The document is not a foo@http://my.site/foo: document element
namespace mismatch expected "http://my.site/foo" got ""


But that's strange, since I never had problems before, and my document
clearly uses the NS:

<foo xmlns="http://my.site/foo">
<document-name>name</document-name>
</foo>


XSD specifies element form qualified. But again, I never had problems
when inside tomcat. All the elements are there, because if I replace
the doc element with a qualified QName it works (well, initially...
until it complains about the child elements being unqualified).

Damn namespaces.

Thanks!

Ed




On 2/1/06, Edward Frederick <ep...@gmail.com> wrote:
> Hello,
>
> XMLBeans is working great for me, thank you to all contributors.
>
> I'm having a strange problem:
>
> When run within Tomcat (types are within a jar file in WEB-INF/lib):
>
> XmlObject enclosure = (XmlObject)XmlObject.Factory.parse(someFooDom);
>
> enclosure.getClass().getName() = my.xmlbeans.package.FooDocument (as expected)
>
>
> When run outside of Tomcat (i.e. say when used within a JUnit test,
> generated JARs are still inside classpath):
>
>
> XmlObject enclosure = (XmlObject)XmlObject.Factory.parse(someFooDom);
>
> enclosure.getClass().getName() = org.apache.xmlbeans.impl.values.XmlAnyTypeImpl
>
>
> I verified that the passed documents are exactly the same. Does this
> mean that in the second scenerio XMLBeans can't 'see' my schemas and
> corresponding beans? Any ideas on how I can figure out why my document
> isn't been 'seen' as a FooDocument?
>
>
> I know this is a vague issue, but I'm hoping somewhere out there has
> an 'aha' moment.
>
> Thanks so much,
>
> Ed
>

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