[prev in list] [next in list] [prev in thread] [next in thread]
List: xmlbeans-dev
Subject: Fw: Error with usertype
From: Ankit Bhatnagar <ankit_impression () yahoo ! com>
Date: 2011-11-23 20:57:30
Message-ID: 1322081850.46005.YahooMailNeo () web121606 ! mail ! ne1 ! yahoo ! com
[Download RAW message or body]
Hi Cezar,
I tried loading the xsd and xsd config differently and ow no error
However
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" \
xmlns:tns="blah">
<xb:usertype name="tns:duration"
javaname="com.xyz.Duration">
<xb:staticHandler>com.xyz.DurationTypeHandler</xb:staticHandler>
</xb:usertype>
</xb:config>
is never enforced.The Type in the generated class is always String instead of \
com.xyz.Duration
Actually wanted to check with you that- com.xyz.Duration above lies in a separate jar \
which I included in this project as a depedency
-Ankit
________________________________
From: Cezar Andrei <cezar.andrei@oracle.com>
To: dev@xmlbeans.apache.org; Ankit Bhatnagar <ankit_impression@yahoo.com>
Sent: Monday, November 21, 2011 6:46 PM
Subject: Re: Error with usertype
Ankit,
This seems to be related to some difference in the class loader. XMLBeans is making \
use of the class loader to load up the schema type system from files. These files \
need to be acessible as resources to the class-loader.
Cezar
On Nov 21, 2011, at 3:36 PM, Ankit Bhatnagar wrote:
Hi,
>
>
> I am getting a weird error while porting my build system to maven
>
>
> xml Error /pathtoconf/xyz.xsdconfig:3:3: error: cvc-complex-type.2.4a: Expected \
> elements 'namespace@http://xml.apache.org/xmlbeans/2004/02/xbean/config \
> qname@http://xml.apache.org/xmlbeans/2004/02/xbean/config \
> extension@http://xml.apache.org/xmlbeans/2004/02/xbean/config' instead of \
> 'usertype@http://xml.apache.org/xmlbeans/2004/02/xbean/config' here in element \
> config@http://xml.apache.org/xmlbeans/2004/02/xbean/config
>
>
> xyz.xsdconfig
>
> ==========
>
> <xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" \
> xmlns:tns="blah">
> <xb:usertype name="tns:duration"
javaname="com.xyz.Duration">
> <xb:staticHandler>com.xyz.DurationTypeHandler</xb:staticHandler>
> </xb:usertype>
>
> </xb:config>
>
>
>
> The xsdconfig works fine with ant task but fails with maven.
>
>
> Please ignore typos .
>
>
> Ankit
>
[Attachment #3 (text/html)]
<html><body><div style="color:#000; background-color:#fff; font-family:times new \
roman, new york, times, serif;font-size:12pt">Hi Cezar,<div style="font-family: times \
new roman,new york,times,serif; font-size: 12pt;"><div style="font-family: times new \
roman,new york,times,serif; font-size: 12pt;"><span></span><div \
id="yiv499440538"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, \
255, 255); font-family: times new roman,new york,times,serif; font-size: \
12pt;"><div><br><span></span></div><div><span>I tried loading the xsd and xsd config \
differently and ow no \
error</span></div><div>However<br><span></span></div><div><br><span></span></div><div><xb:config \
xmlns:xb="<a rel="nofollow" target="_blank" \
href="http://xml.apache.org/xmlbeans/2004/02/xbean/config">http://xml.apache.org/xmlbeans/2004/02/xbean/config</a>" \
xmlns:tns="blah"><br> <br> \
<xb:usertype name="tns:duration" \
javaname="com.xyz.Duration"><br> \
<xb:staticHandler>com.xyz.DurationTypeHandler</xb:staticHandler><br> \
</xb:usertype><br> \
<br></xb:config></div><div><br></div><div><br></div><div>is never enforced.The \
Type in the generated class is always String instead of \
com.xyz.Duration</div><div><br></div><div>Actually wanted to check with you that- \
<span style="font-weight: bold;">com.xyz.Duration above lies in a separate jar which \
I included in this project as a \
depedency<br></span></div><div><br></div><div><br></div><div>-Ankit<br></div><div><br></div> \
<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> \
<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> \
<font face="Arial" size="2"> <hr size="1"> <b><span style="font-weight: \
bold;">From:</span></b> Cezar Andrei <cezar.andrei@oracle.com><br> <b><span \
style="font-weight: bold;">To:</span></b> dev@xmlbeans.apache.org; Ankit Bhatnagar \
<ankit_impression@yahoo.com> <br> <b><span style="font-weight: \
bold;">Sent:</span></b> Monday, November 21, 2011 6:46 PM<br> <b><span \
style="font-weight: bold;">Subject:</span></b> Re: Error with usertype<br> </font> \
<br> <div id="yiv499440538"><div>Ankit,<div><br></div><div>This seems to be related \
to some difference in the class loader. XMLBeans is making use of the class loader to \
load up the schema type system from files. These files need to be acessible as \
resources to the class-loader. </div><div><br></div><div>Cezar \
</div><div><br><div><div>On Nov 21, 2011, at 3:36 PM, Ankit Bhatnagar \
wrote:</div><br class="yiv499440538Apple-interchange-newline"><blockquote \
type="cite"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, \
255); font-family: times new roman,new york,times,serif; font-size: \
12pt;"><div>Hi,<br><br><br>I am getting a weird error while porting my build system \
to maven<br><br><br>xml Error /pathtoconf/xyz.xsdconfig:3:3: error: \
cvc-complex-type.2.4a: Expected elements 'namespace@<a rel="nofollow" target="_blank" \
href="http://xml.apache.org/xmlbeans/2004/02/xbean/config">http://xml.apache.org/xmlbeans/2004/02/xbean/config</a>
qname@<a rel="nofollow" target="_blank" \
href="http://xml.apache.org/xmlbeans/2004/02/xbean/config">http://xml.apache.org/xmlbeans/2004/02/xbean/config</a> \
extension@<a rel="nofollow" target="_blank" \
href="http://xml.apache.org/xmlbeans/2004/02/xbean/config%27">http://xml.apache.org/xmlbeans/2004/02/xbean/config'</a> \
instead of 'usertype@<a rel="nofollow" target="_blank" \
href="http://xml.apache.org/xmlbeans/2004/02/xbean/config%27">http://xml.apache.org/xmlbeans/2004/02/xbean/config'</a> \
here in element config@<a rel="nofollow" target="_blank" \
href="http://xml.apache.org/xmlbeans/2004/02/xbean/config">http://xml.apache.org/xmlbe \
ans/2004/02/xbean/config</a><br><br><br><br>xyz.xsdconfig<br><br>==========<br><br><xb:config \
xmlns:xb="<a rel="nofollow" target="_blank" \
href="http://xml.apache.org/xmlbeans/2004/02/xbean/config">http://xml.apache.org/xmlbeans/2004/02/xbean/config</a>" \
xmlns:tns="blah"><br> <br> \
<xb:usertype name="tns:duration" \
javaname="com.xyz.Duration"><br> \
<xb:staticHandler>com.xyz.DurationTypeHandler</xb:staticHandler><br> \
</xb:usertype><br> \
<br></xb:config><br><br><br><br>The xsdconfig works fine with ant task but \
fails with maven.</div><div><br></div><div>Please ignore typos \
.<br><br><br>Ankit<br></div></div></div></blockquote></div><br></div></div></div><br><br> \
</div> </div> </div></div></div><meta http-equiv="x-dns-prefetch-control" \
content="on"><br><br> </div> </div> </div></body></html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic