Hi

I've both tried the scomp you mentioned to compile the schema you passed
in and have run your test code using the file you sent below.
Unfortunately everything works fine for me - I have no problem either
running scomp or running your code. So I assume this must be some sort
of environment problem.

I did note a small typo in your scomp command - you used "javasource"
instead of "-javasource" but this appears to be silently ignored and
does not affect the result (although presumably you'll end up without
the JDK1.5 features if you make use of them at all).

Your original mail seemed to say that you got the exception when you ran
scomp. Yet the stack trace comes from the generated code - which means
that the scomp finished successfully?

So can I ask:

1. Did you get the exception when running scomp or when running your
test code?
2. Could you check over your classpaths for both the scomp and test run
to make sure you have everything you need?
3. Could you clean everything out and regenerate all the classes/jars,
make sure all the classes you expect to be there are in the jar and
re-run your test code? It's possible you might see something like this
if e.g. your jar file was missing one of the classes or something like
that.

Here are the commands I used just in case they're useful (you'll need to
change the paths for xbean.jar and jsr173_1.0_api.jar to suit your env):

For scomp:

scomp schema\vramu-sg01.xsd -src src -d classes -compiler
D:\programs\Java\jdk151_03\bin\javac -mx 1024M -javasource 1.5 -out
3A9_R_C-POC.jar

For compiling the test code:

javac -classpath
D:\svnwork\xmlbeans\trunk\build\lib\xbean.jar;D:\svnwork\xmlbeans\trunk\
build\lib\jsr173_1.0_api.jar;3A9_R_C-POC.jar;. -d testclasses
testsrc\pip3a9\*.java

For running the test code:

java -classpath
D:\svnwork\xmlbeans\trunk\build\lib\xbean.jar;D:\svnwork\xmlbeans\trunk\
build\lib\jsr173_1.0_api.jar;3A9_R_C-POC.jar;testclasses
pip3a9.TestPip3a9 %*

Cheers,

Lawrence

> -----Original Message-----
> From: vramu_sg [mailto:[EMAIL PROTECTED]
> Sent: Saturday, April 01, 2006 1:35 AM
> To: dev@xmlbeans.apache.org
> Subject: RE: Exception in thread "main" java.lang.ClassCastException:
> org.apache.
> 
> 
> the contents of the
> file C:/Awsp/Scs/Mappingguide/3A9-R-C-POC/POCancelRequest-3A9.xml
> 
> <?xml version="1.0"?>
> <Pip3A9PurchaseOrderCancellationRequest>
>     <fromRole>
>         <PartnerRoleDescription>
>             <ContactInformation>
>                 <contactName>
>                     <FreeFormText>John</FreeFormText>
>                 </contactName>
>                 <EmailAddress>[EMAIL PROTECTED]</EmailAddress>
>                 <facsimileNumber>
>
<CommunicationsNumber>63243431</CommunicationsNumber>
>                 </facsimileNumber>
>                 <telephoneNumber>
>
<CommunicationsNumber>67313543</CommunicationsNumber>
>                 </telephoneNumber>
>             </ContactInformation>
> 
>
<GlobalPartnerRoleClassificationCode>Seller</GlobalPartnerRoleClassifica
ti
> onCode>
>             <PartnerDescription>
>                 <BusinessDescription>
> 
> <GlobalBusinessIdentifier>G787889889</GlobalBusinessIdentifier>
> 
> <GlobalSupplyChainCode>SC234234234</GlobalSupplyChainCode>
>                 </BusinessDescription>
> 
>
<GlobalPartnerClassificationCode>Manufacturer</GlobalPartnerClassificati
on
> Code>
>             </PartnerDescription>
>         </PartnerRoleDescription>
>     </fromRole>
>     <GlobalDocumentFunctionCode>709099009</GlobalDocumentFunctionCode>
>     <PurchaseOrderCancellation>
> 
>
<GlobalPurchaseOrderCancellationCode>PC1413423</GlobalPurchaseOrderCance
ll
> ationCode>
>         <purchaseOrderIdentifier>
> 
>
<ProprietaryDocumentIdentifier>498898989</ProprietaryDocumentIdentifier>
>         </purchaseOrderIdentifier>
>         <RevisionNumber>1001</RevisionNumber>
>     </PurchaseOrderCancellation>
>     <thisDocumentGenerationDateTime>
>         <DateTimeStamp>2005/12/20 10:10</DateTimeStamp>
>     </thisDocumentGenerationDateTime>
>     <thisDocumentIdentifier>
> 
>
<ProprietaryDocumentIdentifier>ID113123</ProprietaryDocumentIdentifier>
>     </thisDocumentIdentifier>
>     <toRole>
>         <PartnerRoleDescription>
>             <ContactInformation>
>                 <contactName>
>                     <FreeFormText>David</FreeFormText>
>                 </contactName>
>                 <EmailAddress>[EMAIL PROTECTED]</EmailAddress>
>                 <facsimileNumber>
>
<CommunicationsNumber>61231231</CommunicationsNumber>
>                 </facsimileNumber>
>                 <telephoneNumber>
>
<CommunicationsNumber>67613131</CommunicationsNumber>
>                 </telephoneNumber>
>             </ContactInformation>
> 
>
<GlobalPartnerRoleClassificationCode>Seller</GlobalPartnerRoleClassifica
ti
> onCode>
>             <PartnerDescription>
>                 <BusinessDescription>
> 
> <GlobalBusinessIdentifier>79988989</GlobalBusinessIdentifier>
> 
> <GlobalSupplyChainCode>81341231243</GlobalSupplyChainCode>
>                 </BusinessDescription>
> 
>
<GlobalPartnerClassificationCode>Manufacturer</GlobalPartnerClassificati
on
> Code>
>             </PartnerDescription>
>         </PartnerRoleDescription>
>     </toRole>
> </Pip3A9PurchaseOrderCancellationRequest>
> --
> View this message in context:
http://www.nabble.com/Exception-in-thread-
> %22main%22-java.lang.ClassCastException%3A-org.apache.xmlb-
> t1367527.html#a3702243
> Sent from the Xml Beans - Dev forum at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

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

Reply via email to