This looks like a classloader issue, specifically make sure that all
XmlBeans-generated JARs (including the one containing the .xsb files)
are on junit's classpath.

Radu

-----Original Message-----
From: Edward Frederick [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 01, 2006 1:35 PM
To: [email protected]
Subject: Re: Strange Type Resolution Error

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 [EMAIL PROTECTED]://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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to