I guess xsd2jibx itself uses jibx to convert an xml schema document to a java object. But it cannot unmarshall the document because the jibx runtime that you are using (1.1.3) is a later version than the one which was used while building xsd2jibx beta2a version. So, first you have to run the jibx binding compiler on the ./src/main/org/jibx/xsd2jibx/xsd.jibx.xml (in the xsd2jibx installation/unzip directory) binding file and you should enhance those classes again before using xsd2jibx. Then put these classes to the beginning of your classpath and try executing xsd2jibx again..
hope this helps.. Waswani, Yuvraj wrote: > Hi, > > I downloaded the 1.1.3 (latest) version of jibx and the Xsd2jibx (beta2a > version) and simply tried to run this command on a helloworld kind of > schema (schema attached) ...it doesn't seem to run. Please find below > the trace. > > Please suggest... > > java org.jibx.xsd2jibx.Generate c:\easypo.xsd > > Where easypo.xsd = > > <xs:schema > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:po="http://citi.com/gwm/fpt/pilot/javaobj/xmlbeans" > targetNamespace="http://citi.com/gwm/fpt/pilot/javaobj/xmlbeans" > elementFormDefault="qualified"> > > <xs:element name="purchase-order"> > <xs:complexType> > <xs:sequence> > <xs:element name="customer" type="po:customer"/> > <xs:element name="date" type="xs:dateTime"/> > <xs:element name="line-item" type="xs:string" /> > <xs:element name="shipper" type="xs:string"/> > </xs:sequence> > </xs:complexType> > </xs:element> > > <xs:complexType name="customer"> > <xs:sequence> > <xs:element name="name" type="xs:string"/> > <xs:element name="address" type="xs:string"/> > </xs:sequence> > <xs:attribute name="age" type="xs:int"/> > </xs:complexType> > > > </xs:schema> > > > > Exception trace :-- > > org.jibx.xsd2jibx.GeneratorException: unable to unmarshall Root cause: > org.jibx.runtime.JiBXException: Binding information for class > org.jibx.xsd2jibx.XsdSchema must be recompiled with current binding > compiler (compiled with jibx-rc1, runtime is jibx_1_1_3) > at org.jibx.xsd2jibx.XsdSchema.unmarshall(XsdSchema.java:380) > at org.jibx.xsd2jibx.XsdSchema.unmarshall(XsdSchema.java:254) > at org.jibx.xsd2jibx.Generator.execute(Generator.java:170) > at org.jibx.xsd2jibx.Generate.generate(Generate.java:131) > at org.jibx.xsd2jibx.Generate.main(Generate.java:182) > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users