You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Nigel Smith <ni...@zurich.com.au> on 2008/05/08 07:25:44 UTC
Problems recreating a JAR file
I have a JAR file as part of a web application that was created via
xmlbeans.
All is working fine, the only problem is that I now need to make changes
to this JAR file but cannot locate any of the files that were used to
create the JAR in the first place.
What I've tried is to expand the JAR file and retrieve the XSD file
(CEDQuote.xsd). I then created an ANT task to create the JAR file. At this
point I haven't changed the XSD file; I'm just trying to recreate the
existing JAR file so that I know I have a good starting point for the
changes.
The JAR file is created successfully, however I get runtime errors when
trying to use the JAR.
when I compare the original JAR to that just created I do notice some
differences.
in the original JAR file, classes are created like this (sample only):
ClassCdDocument$1.class
ClassCdDocument$Factory.class
ClassCdDocument.class
ClassDescDocument$1.class
ClassDescDocument$Factory.class
ClassDescDocument.class
ClientNameDocument$1.class
ClientNameDocument$Factory.class
ClientNameDocument.class
However when I expand the newly created JAR, these are the classes:
ClassCdDocument$Factory.class
ClassCdDocument.class
ClassDescDocument$Factory.class
ClassDescDocument.class
ClientNameDocument$Factory.class
ClientNameDocument.class
It appears that all the $1 classes are missing. This is true for all of
the classes not just those listed here. What are these classes and why are
they not generated?
This is the ANT task used to create the JAR:
<target name="genCEDQuote" depends="init">
<!-- generate the Java xmlBean classes from the CEDQuote schema
-->
<echo message="Apache XMLBeans: Compiling CEDQuote.xsd "/>
<xmlbean schema=
"${cvs.project.dir}/GreenslipsWAR/WebContent/WEB-INF/config/xml/xsl/CEDQuote.xsd"
failonerror="true" destfile=
"${cvs.project.dir}/GreenslipsEAR\lib/testCEDQuote.jar" classpathref=
"xmlbean.jar.path" />
<echo message="Completed Compiling CEDQuote.xsd :-)"/>
</target>
and here's the XSD file:
<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XMLSpy v2007 rel. 3 (http://www.altova.com)-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Zone" type="xs:string"/>
<xs:element name="TotalCost" type="xs:decimal"/>
<xs:element name="Total" type="xs:decimal"/>
<xs:element name="QuoteNumber" type="xs:string"/>
<xs:element name="PreparedDate" type="xs:string"/>
<xs:element name="PreparedBy" type="xs:string"/>
<xs:element name="ExpiryDate" type="xs:string"/>
<xs:element name="Premium" type="xs:decimal"/>
<xs:element name="MCIS" type="xs:decimal"/>
<xs:element name="GSTTotal" type="xs:decimal"/>
<xs:element name="GST" type="xs:decimal"/>
<xs:element name="FleetType" type="xs:string"/>
<xs:element name="EffectiveDate" type="xs:string"/>
<xs:element name="PolicyExpiryDate" type="xs:string"/>
<xs:element name="CountTotal" type="xs:int"/>
<xs:element name="Count" type="xs:int"/>
<xs:element name="CostTotal" type="xs:decimal"/>
<xs:element name="ClientName" type="xs:string"/>
<xs:element name="ClassDesc" type="xs:string"/>
<xs:element name="ClassCd" type="xs:string"/>
<xs:element name="PremiumTotal" type="xs:decimal"/>
<xs:element name="MCISTotal" type="xs:decimal"/>
<xs:element name="UnitCostTotal" type="xs:decimal"/>
<xs:element name="CEDVehRiskSummary">
<xs:complexType>
<xs:sequence>
<xs:element ref="ClassCd"/>
<xs:element ref="ClassDesc"/>
<xs:element ref="Zone"/>
<xs:element ref="GST"/>
<xs:element ref="MCIS"/>
<xs:element ref="Premium"/>
<xs:element ref="Total"/>
<xs:element ref="Count"/>
<xs:element ref="TotalCost"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CEDQuote">
<xs:complexType>
<xs:sequence>
<xs:element ref="ClientName"/>
<xs:element ref="QuoteNumber"/>
<xs:element ref="FleetType"/>
<xs:element ref="EffectiveDate"/>
<xs:element ref="PolicyExpiryDate"/>
<xs:element ref="PreparedDate"/>
<xs:element ref="PreparedBy"/>
<xs:element ref="ExpiryDate"/>
<xs:element ref="GSTTotal"/>
<xs:element ref="CountTotal"/>
<xs:element ref="CostTotal"/>
<xs:element ref="MCISTotal"/>
<xs:element ref="PremiumTotal"/>
<xs:element ref="UnitCostTotal"/>
<xs:element ref="CEDVehRiskSummary"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Any help will be greatly appreciated.
Regards,
Nigel
----
This email is intended for the named recipient only. It may contain information which is confidential, commercially sensitive, or copyright. If you are not the intended recipient you must not reproduce or distribute any part of the email, disclose its contents, or take any action in reliance. If you have received this email in error, please contact the sender and delete the message. It is your responsibility to scan this email and any attachments for viruses and other defects.
To the extent permitted by law, Zurich and its associates will not be liable for any loss or damage arising in any way from this communication including any file attachments. We may monitor email you send to us, either as a reply to this email or any email you send to us, to confirm our systems are protected and for compliance with company policies. Although we take reasonable precautions to protect the confidentiality of our email systems, we do not warrant the confidentiality or security of email or attachments we receive.
Re: Problems recreating a JAR file
Posted by Nigel Smith <ni...@zurich.com.au>.
Ok - I've sorted this problem out. It was a Websphere deployment problem -
not xmlbeans at all.
Although I still dont understand, why the JARs are different and what
those $1 classes are all about.
Oh well...
Nigel
----
This email is intended for the named recipient only. It may contain information which is confidential, commercially sensitive, or copyright. If you are not the intended recipient you must not reproduce or distribute any part of the email, disclose its contents, or take any action in reliance. If you have received this email in error, please contact the sender and delete the message. It is your responsibility to scan this email and any attachments for viruses and other defects.
To the extent permitted by law, Zurich and its associates will not be liable for any loss or damage arising in any way from this communication including any file attachments. We may monitor email you send to us, either as a reply to this email or any email you send to us, to confirm our systems are protected and for compliance with company policies. Although we take reasonable precautions to protect the confidentiality of our email systems, we do not warrant the confidentiality or security of email or attachments we receive.