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.and...@oracle.com>
To: dev@xmlbeans.apache.org; Ankit Bhatnagar <ankit_impress...@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
>

Reply via email to