You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Bryan Hunt <bh...@mac.com> on 2007/05/13 05:44:54 UTC

Running samples from head throws exception

I downloaded the SDO code from head and tried to run the samples from  
Eclipse.  I get the following exception:


Demonstrates creating a DataObject from a String of XML, based upon  
section titled 'Creating DataObjects from XML documents'
***************************************
Use the following XML String: <purchaseOrder orderDate='1999-10-20'>  
<shipTo country='US'> <name>Alice Smith</name> <street>123 Maple  
Street</street> <city>Mill Valley</city> <state>PA</state>  
<zip>90952</zip></shipTo></purchaseOrder>
Creating DataObject
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/ 
stream/XMLStreamException
	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl 
$SDOXMLLoadImpl.makeDefaultHandler(SDOXMLResourceImpl.java:335)
	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.createDefaultHandler 
(XMLLoadImpl.java:306)
	at org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl.getDefaultHandler 
(XMLParserPoolImpl.java:186)
	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java: 
231)
	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad 
(XMLResourceImpl.java:666)
	at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad 
(SDOXMLResourceImpl.java:465)
	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load 
(XMLResourceImpl.java:634)
	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load 
(XMLDocumentImpl.java:259)
	at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load 
(XMLDocumentImpl.java:238)
	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load 
(XMLHelperImpl.java:92)
	at org.apache.tuscany.sdo.helper.XMLHelperImpl.load 
(XMLHelperImpl.java:69)
	at  
org.apache.tuscany.samples.sdo.specCodeSnippets.CreateDataObjectFromXmlS 
tring.createDataObjectFromXmlString 
(CreateDataObjectFromXmlString.java:86)
	at  
org.apache.tuscany.samples.sdo.specCodeSnippets.CreateDataObjectFromXmlS 
tring.main(CreateDataObjectFromXmlString.java:109)
	at org.apache.tuscany.samples.sdo.ExecuteSamples.main 
(ExecuteSamples.java:92)

Has anyone else tried running the samples from head?

Bryan


Re: Running samples from head throws exception

Posted by Bryan Hunt <bh...@mac.com>.
The samples run.  Now I get to learn how SDO works, then move on to  
DAS.  Thanks.

Bryan

On May 13, 2007, at 12:56 PM, Luciano Resende wrote:

> Could you please try updating the java/sdo/impl/pom.xml, and try
> changing the stax dependency scope to <scope>compile</scope> as the
> other dependencies above and also remove the <optional> element of the
> dependency. Then re-compile and re-import the samples to eclipse.
> These steps worked for me.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Running samples from head throws exception

Posted by Luciano Resende <lu...@gmail.com>.
Could you please try updating the java/sdo/impl/pom.xml, and try
changing the stax dependency scope to <scope>compile</scope> as the
other dependencies above and also remove the <optional> element of the
dependency. Then re-compile and re-import the samples to eclipse.
These steps worked for me.

On 5/13/07, Bryan Hunt <bh...@mac.com> wrote:
> I agree that sounds like the problem.  Where are the StAX jars
> located?  Do I have to download them separate?
>
> Bryan
>
> On May 13, 2007, at 5:09 AM, Mike Edwards wrote:
>
> > Bryan,
> >
> > I haven't tried running the samples, but this error looks
> > suspiciously like a failure to find a dependency - namely the StAX
> > parser jars.  Have you ensured that you've got all the dependecy
> > files loaded onto your machine?
> >
> > Yours,  Mike.
> >
> > Bryan Hunt wrote:
> >> I downloaded the SDO code from head and tried to run the samples
> >> from  Eclipse.  I get the following exception:
> >> Demonstrates creating a DataObject from a String of XML, based
> >> upon  section titled 'Creating DataObjects from XML documents'
> >> ***************************************
> >> Use the following XML String: <purchaseOrder
> >> orderDate='1999-10-20'>  <shipTo country='US'> <name>Alice Smith</
> >> name> <street>123 Maple  Street</street> <city>Mill Valley</city>
> >> <state>PA</state>  <zip>90952</zip></shipTo></purchaseOrder>
> >> Creating DataObject
> >> Exception in thread "main" java.lang.NoClassDefFoundError: javax/
> >> xml/ stream/XMLStreamException
> >>     at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl
> >> $SDOXMLLoadImpl.makeDefaultHandler(SDOXMLResourceImpl.java:335)
> >>     at
> >> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.createDefaultHandler
> >> (XMLLoadImpl.java:306)
> >>     at
> >> org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl.getDefaultHandler
> >> (XMLParserPoolImpl.java:186)
> >>     at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load
> >> (XMLLoadImpl.java: 231)
> >>     at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad
> >> (XMLResourceImpl.java:666)
> >>     at
> >> org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad
> >> (SDOXMLResourceImpl.java:465)
> >>     at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load
> >> (XMLResourceImpl.java:634)
> >>     at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load
> >> (XMLDocumentImpl.java:259)
> >>     at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load
> >> (XMLDocumentImpl.java:238)
> >>     at org.apache.tuscany.sdo.helper.XMLHelperImpl.load
> >> (XMLHelperImpl.java:92)
> >>     at org.apache.tuscany.sdo.helper.XMLHelperImpl.load
> >> (XMLHelperImpl.java:69)
> >>     at
> >> org.apache.tuscany.samples.sdo.specCodeSnippets.CreateDataObjectFromX
> >> mlS tring.createDataObjectFromXmlString
> >> (CreateDataObjectFromXmlString.java:86)
> >>     at
> >> org.apache.tuscany.samples.sdo.specCodeSnippets.CreateDataObjectFromX
> >> mlS tring.main(CreateDataObjectFromXmlString.java:109)
> >>     at org.apache.tuscany.samples.sdo.ExecuteSamples.main
> >> (ExecuteSamples.java:92)
> >> Has anyone else tried running the samples from head?
> >> Bryan
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-user-help@ws.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>


-- 
Luciano Resende
http://people.apache.org/~lresende

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Running samples from head throws exception

Posted by Bryan Hunt <bh...@mac.com>.
I agree that sounds like the problem.  Where are the StAX jars  
located?  Do I have to download them separate?

Bryan

On May 13, 2007, at 5:09 AM, Mike Edwards wrote:

> Bryan,
>
> I haven't tried running the samples, but this error looks  
> suspiciously like a failure to find a dependency - namely the StAX  
> parser jars.  Have you ensured that you've got all the dependecy  
> files loaded onto your machine?
>
> Yours,  Mike.
>
> Bryan Hunt wrote:
>> I downloaded the SDO code from head and tried to run the samples  
>> from  Eclipse.  I get the following exception:
>> Demonstrates creating a DataObject from a String of XML, based  
>> upon  section titled 'Creating DataObjects from XML documents'
>> ***************************************
>> Use the following XML String: <purchaseOrder  
>> orderDate='1999-10-20'>  <shipTo country='US'> <name>Alice Smith</ 
>> name> <street>123 Maple  Street</street> <city>Mill Valley</city>  
>> <state>PA</state>  <zip>90952</zip></shipTo></purchaseOrder>
>> Creating DataObject
>> Exception in thread "main" java.lang.NoClassDefFoundError: javax/ 
>> xml/ stream/XMLStreamException
>>     at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl  
>> $SDOXMLLoadImpl.makeDefaultHandler(SDOXMLResourceImpl.java:335)
>>     at  
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.createDefaultHandler  
>> (XMLLoadImpl.java:306)
>>     at  
>> org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl.getDefaultHandler  
>> (XMLParserPoolImpl.java:186)
>>     at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load 
>> (XMLLoadImpl.java: 231)
>>     at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad  
>> (XMLResourceImpl.java:666)
>>     at  
>> org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad  
>> (SDOXMLResourceImpl.java:465)
>>     at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load  
>> (XMLResourceImpl.java:634)
>>     at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load  
>> (XMLDocumentImpl.java:259)
>>     at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load  
>> (XMLDocumentImpl.java:238)
>>     at org.apache.tuscany.sdo.helper.XMLHelperImpl.load  
>> (XMLHelperImpl.java:92)
>>     at org.apache.tuscany.sdo.helper.XMLHelperImpl.load  
>> (XMLHelperImpl.java:69)
>>     at   
>> org.apache.tuscany.samples.sdo.specCodeSnippets.CreateDataObjectFromX 
>> mlS tring.createDataObjectFromXmlString  
>> (CreateDataObjectFromXmlString.java:86)
>>     at   
>> org.apache.tuscany.samples.sdo.specCodeSnippets.CreateDataObjectFromX 
>> mlS tring.main(CreateDataObjectFromXmlString.java:109)
>>     at org.apache.tuscany.samples.sdo.ExecuteSamples.main  
>> (ExecuteSamples.java:92)
>> Has anyone else tried running the samples from head?
>> Bryan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Running samples from head throws exception

Posted by Mike Edwards <mi...@gmail.com>.
Bryan,

I haven't tried running the samples, but this error looks suspiciously 
like a failure to find a dependency - namely the StAX parser jars.  Have 
you ensured that you've got all the dependecy files loaded onto your 
machine?

Yours,  Mike.

Bryan Hunt wrote:
> I downloaded the SDO code from head and tried to run the samples from  
> Eclipse.  I get the following exception:
> 
> 
> Demonstrates creating a DataObject from a String of XML, based upon  
> section titled 'Creating DataObjects from XML documents'
> ***************************************
> Use the following XML String: <purchaseOrder orderDate='1999-10-20'>  
> <shipTo country='US'> <name>Alice Smith</name> <street>123 Maple  
> Street</street> <city>Mill Valley</city> <state>PA</state>  
> <zip>90952</zip></shipTo></purchaseOrder>
> Creating DataObject
> Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/ 
> stream/XMLStreamException
>     at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl 
> $SDOXMLLoadImpl.makeDefaultHandler(SDOXMLResourceImpl.java:335)
>     at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.createDefaultHandler 
> (XMLLoadImpl.java:306)
>     at 
> org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl.getDefaultHandler 
> (XMLParserPoolImpl.java:186)
>     at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java: 
> 231)
>     at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad 
> (XMLResourceImpl.java:666)
>     at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad 
> (SDOXMLResourceImpl.java:465)
>     at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load 
> (XMLResourceImpl.java:634)
>     at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load 
> (XMLDocumentImpl.java:259)
>     at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load 
> (XMLDocumentImpl.java:238)
>     at org.apache.tuscany.sdo.helper.XMLHelperImpl.load 
> (XMLHelperImpl.java:92)
>     at org.apache.tuscany.sdo.helper.XMLHelperImpl.load 
> (XMLHelperImpl.java:69)
>     at  
> org.apache.tuscany.samples.sdo.specCodeSnippets.CreateDataObjectFromXmlS 
> tring.createDataObjectFromXmlString (CreateDataObjectFromXmlString.java:86)
>     at  
> org.apache.tuscany.samples.sdo.specCodeSnippets.CreateDataObjectFromXmlS 
> tring.main(CreateDataObjectFromXmlString.java:109)
>     at org.apache.tuscany.samples.sdo.ExecuteSamples.main 
> (ExecuteSamples.java:92)
> 
> Has anyone else tried running the samples from head?
> 
> Bryan
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org