Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Service Oriented Architecture Tools Platform (STP) » Re: Open BPMN model in main method
Re: Open BPMN model in main method [message #593924] Fri, 28 September 2007 14:10 Go to next message
Eclipse User
Originally posted by: anders.ottosson3.telia.com

Hi, thanks for replying again ;)

It would seem to me that I need to build an RCP for the method you
suggested, since I need to add many jars, and it ends with that I can't
initialize org.eclipse.core.runtime.Platform (see below) or is there a
way around the problem?

Exception:
Exception in thread "main" java.lang.NoClassDefFoundError: Could not
initialize class org.eclipse.core.runtime.Platform
at org.eclipse.emf.transaction.util.Lock.<clinit>(Lock.java:75)
at
org.eclipse.emf.transaction.impl.TransactionalEditingDomainI mpl. <init>(TransactionalEditingDomainImpl.java:69)
at
org.eclipse.emf.workspace.WorkspaceEditingDomainFactory.crea teEditingDomain(WorkspaceEditingDomainFactory.java:83)
at
org.eclipse.emf.workspace.WorkspaceEditingDomainFactory.crea teEditingDomain(WorkspaceEditingDomainFactory.java:55)
at
com.implior.bpmn.converter.XmiBpmnConverter.main(XmiBpmnConv erter.java:19)

Regards
/Anders


Antoine Toulme wrote:
> Ed,
>
> Swordfish is a runtime project, while the STP project is hosted at
> eclipse.stp.
>
> I have already replied to this question on our newsgroup, and I added at
> the time that contacting you through the EMF newsgroup would be a good
> way to get help with EMF.
>
> Anders, please let us know if the code I gave you is not working in the
> thread we had began. I'll look at it again then.
>
> Thanks,
>
> Antoine
>
> Ed Merks wrote:
>> Anders,
>>
>> Isn't the BPMN modeling coming from the STP project? I think your
>> question should be directed toward their specific newsgroup. I think
>> I've added the right one to the "to" list of the reply.
>>
>> SOA Tools Platform Webmaster,
>>
>> Swordfish is a cool name. 8-) Could I ask that on your home page
>> your Newsgroups Navigation link that you direct your users to the
>> newsgroup you want them to use. I would suggest a page much like the
>> one we have for EMFT which will encourage your uses to search the
>> newsgroup first:
>>
>> http://www.eclipse.org/modeling/emft/newsgroup-mailing-list. php
>>
>>
>> Anders Ottosson wrote:
>>> Is there a way to open a bpmn-model in a standalone main method?
>>> Since I'm a n00b at Eclipse BPMN/GMF/EMF I have tried the FAQ (from
>>> EMF) examples with no luck, the result is always:
>>> ---
>>> Exception in thread "main"
>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>> org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 'version'
>>> not found. (file:/C:/src/test/BPMN/credit_report.bpmn, 2, 175)...
>>> ---
>>>
>>> The code I have tried with is:
>>> ...
>>> ResourceSet resourceSet = new ResourceSetImpl();
>>> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "bpmn",
>>> new BpmnResourceFactoryImpl());
>>>
>>> BpmnPackageImpl.eINSTANCE.eClass();
>>> Resource resource =
>>> resourceSet.getResource(URI.createFileURI(fileName), true);
>>>
>>> try {
>>> resource.load(null);
>>> } catch (Exception e) {
>>> e.printStackTrace();
>>> }
>>> ...
>>>
>>> I have added the following jars to the classpath:
>>> org.eclipse.core.runtime_3.2.0.v20060603.jar
>>> org.eclipse.emf.common_2.3.0.v200709042200.jar
>>> org.eclipse.emf.ecore.change_2.3.0.v200709042200.jar
>>> org.eclipse.emf.ecore.xmi_2.3.1.v200709042200.jar
>>> org.eclipse.emf.ecore_2.3.1.v200709042200.jar
>>> org.eclipse.stp.bpmn.diagram_1.0.0.061.jar
>>> org.eclipse.stp.bpmn.edit_1.0.0.061.jar
>>> org.eclipse.stp.bpmn_1.0.0.061.jar
>>>
>>> Any help would be greatly appreciated!
>>>
>>> Regards
>>> Anders
>>
>
>
Re: Open BPMN model in main method [message #593945 is a reply to message #593924] Fri, 28 September 2007 14:30 Go to previous messageGo to next message
Eclipse User
Originally posted by: atoulme.intalio.com

Sorry,

I was concentrated on making it work and forgot about the stand-alone
requirement.

So you did well, I'd say maybe you should change initially to do
something like :

ResourceSet resourceSet = new ResourceSetImpl();

resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put( "bpmn",
new BpmnResourceFactoryImpl());

BpmnPackageImpl.eINSTANCE.eClass();
Resource resource = resourceSet.getResource(URI.createFileURI(fileName),
true);

try {
resource.load(null);
} catch (Exception e) {
e.printStackTrace();
}

If that still does not work, try adding

EcoreFactory.eINSTANCE.eClass();

before the BpmnPackage registration line.

If that still doesn't work, please reply here and I'll help you more.

Antoine

Anders Ottosson wrote:
> Hi, thanks for replying again ;)
>
> It would seem to me that I need to build an RCP for the method you
> suggested, since I need to add many jars, and it ends with that I can't
> initialize org.eclipse.core.runtime.Platform (see below) or is there a
> way around the problem?
>
> Exception:
> Exception in thread "main" java.lang.NoClassDefFoundError: Could not
> initialize class org.eclipse.core.runtime.Platform
> at org.eclipse.emf.transaction.util.Lock.<clinit>(Lock.java:75)
> at
> org.eclipse.emf.transaction.impl.TransactionalEditingDomainI mpl. <init>(TransactionalEditingDomainImpl.java:69)
>
> at
> org.eclipse.emf.workspace.WorkspaceEditingDomainFactory.crea teEditingDomain(WorkspaceEditingDomainFactory.java:83)
>
> at
> org.eclipse.emf.workspace.WorkspaceEditingDomainFactory.crea teEditingDomain(WorkspaceEditingDomainFactory.java:55)
>
> at
> com.implior.bpmn.converter.XmiBpmnConverter.main(XmiBpmnConv erter.java:19)
>
> Regards
> /Anders
>
>
> Antoine Toulme wrote:
>> Ed,
>>
>> Swordfish is a runtime project, while the STP project is hosted at
>> eclipse.stp.
>>
>> I have already replied to this question on our newsgroup, and I added
>> at the time that contacting you through the EMF newsgroup would be a
>> good way to get help with EMF.
>>
>> Anders, please let us know if the code I gave you is not working in
>> the thread we had began. I'll look at it again then.
>>
>> Thanks,
>>
>> Antoine
>>
>> Ed Merks wrote:
>>> Anders,
>>>
>>> Isn't the BPMN modeling coming from the STP project? I think your
>>> question should be directed toward their specific newsgroup. I think
>>> I've added the right one to the "to" list of the reply.
>>>
>>> SOA Tools Platform Webmaster,
>>>
>>> Swordfish is a cool name. 8-) Could I ask that on your home page
>>> your Newsgroups Navigation link that you direct your users to the
>>> newsgroup you want them to use. I would suggest a page much like the
>>> one we have for EMFT which will encourage your uses to search the
>>> newsgroup first:
>>>
>>> http://www.eclipse.org/modeling/emft/newsgroup-mailing-list. php
>>>
>>>
>>> Anders Ottosson wrote:
>>>> Is there a way to open a bpmn-model in a standalone main method?
>>>> Since I'm a n00b at Eclipse BPMN/GMF/EMF I have tried the FAQ (from
>>>> EMF) examples with no luck, the result is always:
>>>> ---
>>>> Exception in thread "main"
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>>> org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature
>>>> 'version' not found. (file:/C:/src/test/BPMN/credit_report.bpmn, 2,
>>>> 175)...
>>>> ---
>>>>
>>>> The code I have tried with is:
>>>> ...
>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "bpmn",
>>>> new BpmnResourceFactoryImpl());
>>>>
>>>> BpmnPackageImpl.eINSTANCE.eClass();
>>>> Resource resource =
>>>> resourceSet.getResource(URI.createFileURI(fileName), true);
>>>>
>>>> try {
>>>> resource.load(null);
>>>> } catch (Exception e) {
>>>> e.printStackTrace();
>>>> }
>>>> ...
>>>>
>>>> I have added the following jars to the classpath:
>>>> org.eclipse.core.runtime_3.2.0.v20060603.jar
>>>> org.eclipse.emf.common_2.3.0.v200709042200.jar
>>>> org.eclipse.emf.ecore.change_2.3.0.v200709042200.jar
>>>> org.eclipse.emf.ecore.xmi_2.3.1.v200709042200.jar
>>>> org.eclipse.emf.ecore_2.3.1.v200709042200.jar
>>>> org.eclipse.stp.bpmn.diagram_1.0.0.061.jar
>>>> org.eclipse.stp.bpmn.edit_1.0.0.061.jar
>>>> org.eclipse.stp.bpmn_1.0.0.061.jar
>>>>
>>>> Any help would be greatly appreciated!
>>>>
>>>> Regards
>>>> Anders
>>>
>>
>>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: Open BPMN model in main method [message #593959 is a reply to message #593945] Mon, 01 October 2007 08:20 Go to previous messageGo to next message
Eclipse User
Originally posted by: anders.ottosson3.telia.com

No worries, just happy that someone takes an interest in my little
problem...

I tried the method you outlined below (see below) and it gives me the
same exception Feature 'version' not found as I got from my own tests
(also listed below).

Code:
....
ResourceSet resourceSet = new ResourceSetImpl();


resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put( "bpmn",
new BpmnResourceFactoryImpl());

EcoreFactory.eINSTANCE.eClass();
BpmnPackageImpl.eINSTANCE.eClass();
Resource resource =
resourceSet.getResource(URI.createFileURI(args[0]), true);

try {
resource.load(null);
} catch (Exception e) {
e.printStackTrace();
}
....


Exception:
Exception in thread "main"
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 'version'
not found. (file:/C://src//ibmtutorial//BPMN//credit_report.bpmn, 2, 175)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
at
com.implior.bpmn.converter.XmiBpmnConverter.main(XmiBpmnConv erter.java:25)
Caused by: org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature
'version' not found.
(file:/C://src//ibmtutorial//BPMN//credit_report.bpmn, 2, 175)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.reportUnknownFeatu re(XMLHandler.java:1856)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleUnknownFeatu re(XMLHandler.java:1820)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XML Handler.java:2570)
at
org.eclipse.emf.ecore.xmi.impl.SAXXMLHandler.handleObjectAtt ribs(SAXXMLHandler.java:74)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFa ctory(XMLHandler.java:2058)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1270)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1336)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:970)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:953)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:684)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. startElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$ContentDriver.scanRootElementHook(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDriver.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
... 2 more


Thanks
/Anders

Antoine Toulme wrote:
> Sorry,
>
> I was concentrated on making it work and forgot about the stand-alone
> requirement.
>
> So you did well, I'd say maybe you should change initially to do
> something like :
>
> ResourceSet resourceSet = new ResourceSetImpl();
>
> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put( "bpmn",
> new BpmnResourceFactoryImpl());
>
> BpmnPackageImpl.eINSTANCE.eClass();
> Resource resource = resourceSet.getResource(URI.createFileURI(fileName),
> true);
>
> try {
> resource.load(null);
> } catch (Exception e) {
> e.printStackTrace();
> }
>
> If that still does not work, try adding
>
> EcoreFactory.eINSTANCE.eClass();
>
> before the BpmnPackage registration line.
>
> If that still doesn't work, please reply here and I'll help you more.
>
> Antoine
>
> Anders Ottosson wrote:
>> Hi, thanks for replying again ;)
>>
>> It would seem to me that I need to build an RCP for the method you
>> suggested, since I need to add many jars, and it ends with that I
>> can't initialize org.eclipse.core.runtime.Platform (see below) or is
>> there a way around the problem?
>>
>> Exception:
>> Exception in thread "main" java.lang.NoClassDefFoundError: Could not
>> initialize class org.eclipse.core.runtime.Platform
>> at org.eclipse.emf.transaction.util.Lock.<clinit>(Lock.java:75)
>> at
>> org.eclipse.emf.transaction.impl.TransactionalEditingDomainI mpl. <init>(TransactionalEditingDomainImpl.java:69)
>>
>> at
>> org.eclipse.emf.workspace.WorkspaceEditingDomainFactory.crea teEditingDomain(WorkspaceEditingDomainFactory.java:83)
>>
>> at
>> org.eclipse.emf.workspace.WorkspaceEditingDomainFactory.crea teEditingDomain(WorkspaceEditingDomainFactory.java:55)
>>
>> at
>> com.implior.bpmn.converter.XmiBpmnConverter.main(XmiBpmnConv erter.java:19)
>>
>>
>> Regards
>> /Anders
>>
>>
>> Antoine Toulme wrote:
>>> Ed,
>>>
>>> Swordfish is a runtime project, while the STP project is hosted at
>>> eclipse.stp.
>>>
>>> I have already replied to this question on our newsgroup, and I added
>>> at the time that contacting you through the EMF newsgroup would be a
>>> good way to get help with EMF.
>>>
>>> Anders, please let us know if the code I gave you is not working in
>>> the thread we had began. I'll look at it again then.
>>>
>>> Thanks,
>>>
>>> Antoine
>>>
>>> Ed Merks wrote:
>>>> Anders,
>>>>
>>>> Isn't the BPMN modeling coming from the STP project? I think your
>>>> question should be directed toward their specific newsgroup. I
>>>> think I've added the right one to the "to" list of the reply.
>>>>
>>>> SOA Tools Platform Webmaster,
>>>>
>>>> Swordfish is a cool name. 8-) Could I ask that on your home page
>>>> your Newsgroups Navigation link that you direct your users to the
>>>> newsgroup you want them to use. I would suggest a page much like
>>>> the one we have for EMFT which will encourage your uses to search
>>>> the newsgroup first:
>>>>
>>>> http://www.eclipse.org/modeling/emft/newsgroup-mailing-list. php
>>>>
>>>>
>>>> Anders Ottosson wrote:
>>>>> Is there a way to open a bpmn-model in a standalone main method?
>>>>> Since I'm a n00b at Eclipse BPMN/GMF/EMF I have tried the FAQ (from
>>>>> EMF) examples with no luck, the result is always:
>>>>> ---
>>>>> Exception in thread "main"
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>>>> org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature
>>>>> 'version' not found. (file:/C:/src/test/BPMN/credit_report.bpmn, 2,
>>>>> 175)...
>>>>> ---
>>>>>
>>>>> The code I have tried with is:
>>>>> ...
>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "bpmn",
>>>>> new BpmnResourceFactoryImpl());
>>>>>
>>>>> BpmnPackageImpl.eINSTANCE.eClass();
>>>>> Resource resource =
>>>>> resourceSet.getResource(URI.createFileURI(fileName), true);
>>>>>
>>>>> try {
>>>>> resource.load(null);
>>>>> } catch (Exception e) {
>>>>> e.printStackTrace();
>>>>> }
>>>>> ...
>>>>>
>>>>> I have added the following jars to the classpath:
>>>>> org.eclipse.core.runtime_3.2.0.v20060603.jar
>>>>> org.eclipse.emf.common_2.3.0.v200709042200.jar
>>>>> org.eclipse.emf.ecore.change_2.3.0.v200709042200.jar
>>>>> org.eclipse.emf.ecore.xmi_2.3.1.v200709042200.jar
>>>>> org.eclipse.emf.ecore_2.3.1.v200709042200.jar
>>>>> org.eclipse.stp.bpmn.diagram_1.0.0.061.jar
>>>>> org.eclipse.stp.bpmn.edit_1.0.0.061.jar
>>>>> org.eclipse.stp.bpmn_1.0.0.061.jar
>>>>>
>>>>> Any help would be greatly appreciated!
>>>>>
>>>>> Regards
>>>>> Anders
>>>>
>>>
>>>
>
>
Re: Open BPMN model in main method [message #599906 is a reply to message #593959] Fri, 05 October 2007 12:51 Go to previous message
Eclipse User
Originally posted by: atoulme.intalio.com

Anders,

I haven't forgotten you, been very busy this week.

I'll update you ASAP.

Antoine

Anders Ottosson wrote:
> No worries, just happy that someone takes an interest in my little
> problem...
>
> I tried the method you outlined below (see below) and it gives me the
> same exception Feature 'version' not found as I got from my own tests
> (also listed below).
>
> Code:
> ...
> ResourceSet resourceSet = new ResourceSetImpl();
>
>
> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put( "bpmn",
> new BpmnResourceFactoryImpl());
>
> EcoreFactory.eINSTANCE.eClass();
> BpmnPackageImpl.eINSTANCE.eClass();
> Resource resource =
> resourceSet.getResource(URI.createFileURI(args[0]), true);
>
> try {
> resource.load(null);
> } catch (Exception e) {
> e.printStackTrace();
> }
> ...
>
>
> Exception:
> Exception in thread "main"
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
> org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 'version'
> not found. (file:/C://src//ibmtutorial//BPMN//credit_report.bpmn, 2, 175)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:316)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:275)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>
> at
> com.implior.bpmn.converter.XmiBpmnConverter.main(XmiBpmnConv erter.java:25)
> Caused by: org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature
> 'version' not found.
> (file:/C://src//ibmtutorial//BPMN//credit_report.bpmn, 2, 175)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.reportUnknownFeatu re(XMLHandler.java:1856)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleUnknownFeatu re(XMLHandler.java:1820)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XML Handler.java:2570)
>
> at
> org.eclipse.emf.ecore.xmi.impl.SAXXMLHandler.handleObjectAtt ribs(SAXXMLHandler.java:74)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFa ctory(XMLHandler.java:2058)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1270)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1336)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:970)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:953)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:684)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. startElement(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$ContentDriver.scanRootElementHook(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDriver.next(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown Source)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
> Source)
> at javax.xml.parsers.SAXParser.parse(Unknown Source)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>
> ... 2 more
>
>
> Thanks
> /Anders
>
> Antoine Toulme wrote:
>> Sorry,
>>
>> I was concentrated on making it work and forgot about the stand-alone
>> requirement.
>>
>> So you did well, I'd say maybe you should change initially to do
>> something like :
>>
>> ResourceSet resourceSet = new ResourceSetImpl();
>>
>> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put( "bpmn",
>> new BpmnResourceFactoryImpl());
>>
>> BpmnPackageImpl.eINSTANCE.eClass();
>> Resource resource =
>> resourceSet.getResource(URI.createFileURI(fileName), true);
>>
>> try {
>> resource.load(null);
>> } catch (Exception e) {
>> e.printStackTrace();
>> }
>>
>> If that still does not work, try adding
>>
>> EcoreFactory.eINSTANCE.eClass();
>>
>> before the BpmnPackage registration line.
>>
>> If that still doesn't work, please reply here and I'll help you more.
>>
>> Antoine
>>
>> Anders Ottosson wrote:
>>> Hi, thanks for replying again ;)
>>>
>>> It would seem to me that I need to build an RCP for the method you
>>> suggested, since I need to add many jars, and it ends with that I
>>> can't initialize org.eclipse.core.runtime.Platform (see below) or is
>>> there a way around the problem?
>>>
>>> Exception:
>>> Exception in thread "main" java.lang.NoClassDefFoundError: Could not
>>> initialize class org.eclipse.core.runtime.Platform
>>> at org.eclipse.emf.transaction.util.Lock.<clinit>(Lock.java:75)
>>> at
>>> org.eclipse.emf.transaction.impl.TransactionalEditingDomainI mpl. <init>(TransactionalEditingDomainImpl.java:69)
>>>
>>> at
>>> org.eclipse.emf.workspace.WorkspaceEditingDomainFactory.crea teEditingDomain(WorkspaceEditingDomainFactory.java:83)
>>>
>>> at
>>> org.eclipse.emf.workspace.WorkspaceEditingDomainFactory.crea teEditingDomain(WorkspaceEditingDomainFactory.java:55)
>>>
>>> at
>>> com.implior.bpmn.converter.XmiBpmnConverter.main(XmiBpmnConv erter.java:19)
>>>
>>>
>>> Regards
>>> /Anders
>>>
>>>
>>> Antoine Toulme wrote:
>>>> Ed,
>>>>
>>>> Swordfish is a runtime project, while the STP project is hosted at
>>>> eclipse.stp.
>>>>
>>>> I have already replied to this question on our newsgroup, and I
>>>> added at the time that contacting you through the EMF newsgroup
>>>> would be a good way to get help with EMF.
>>>>
>>>> Anders, please let us know if the code I gave you is not working in
>>>> the thread we had began. I'll look at it again then.
>>>>
>>>> Thanks,
>>>>
>>>> Antoine
>>>>
>>>> Ed Merks wrote:
>>>>> Anders,
>>>>>
>>>>> Isn't the BPMN modeling coming from the STP project? I think your
>>>>> question should be directed toward their specific newsgroup. I
>>>>> think I've added the right one to the "to" list of the reply.
>>>>>
>>>>> SOA Tools Platform Webmaster,
>>>>>
>>>>> Swordfish is a cool name. 8-) Could I ask that on your home page
>>>>> your Newsgroups Navigation link that you direct your users to the
>>>>> newsgroup you want them to use. I would suggest a page much like
>>>>> the one we have for EMFT which will encourage your uses to search
>>>>> the newsgroup first:
>>>>>
>>>>> http://www.eclipse.org/modeling/emft/newsgroup-mailing-list. php
>>>>>
>>>>>
>>>>> Anders Ottosson wrote:
>>>>>> Is there a way to open a bpmn-model in a standalone main method?
>>>>>> Since I'm a n00b at Eclipse BPMN/GMF/EMF I have tried the FAQ
>>>>>> (from EMF) examples with no luck, the result is always:
>>>>>> ---
>>>>>> Exception in thread "main"
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
>>>>>> org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature
>>>>>> 'version' not found. (file:/C:/src/test/BPMN/credit_report.bpmn,
>>>>>> 2, 175)...
>>>>>> ---
>>>>>>
>>>>>> The code I have tried with is:
>>>>>> ...
>>>>>> ResourceSet resourceSet = new ResourceSetImpl();
>>>>>> Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "bpmn",
>>>>>> new BpmnResourceFactoryImpl());
>>>>>>
>>>>>> BpmnPackageImpl.eINSTANCE.eClass();
>>>>>> Resource resource =
>>>>>> resourceSet.getResource(URI.createFileURI(fileName), true);
>>>>>>
>>>>>> try {
>>>>>> resource.load(null);
>>>>>> } catch (Exception e) {
>>>>>> e.printStackTrace();
>>>>>> }
>>>>>> ...
>>>>>>
>>>>>> I have added the following jars to the classpath:
>>>>>> org.eclipse.core.runtime_3.2.0.v20060603.jar
>>>>>> org.eclipse.emf.common_2.3.0.v200709042200.jar
>>>>>> org.eclipse.emf.ecore.change_2.3.0.v200709042200.jar
>>>>>> org.eclipse.emf.ecore.xmi_2.3.1.v200709042200.jar
>>>>>> org.eclipse.emf.ecore_2.3.1.v200709042200.jar
>>>>>> org.eclipse.stp.bpmn.diagram_1.0.0.061.jar
>>>>>> org.eclipse.stp.bpmn.edit_1.0.0.061.jar
>>>>>> org.eclipse.stp.bpmn_1.0.0.061.jar
>>>>>>
>>>>>> Any help would be greatly appreciated!
>>>>>>
>>>>>> Regards
>>>>>> Anders
>>>>>
>>>>
>>>>
>>
>>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Previous Topic:Cannot access SOA Preferences pages
Next Topic:New to SOA
Goto Forum:
  


Current Time: Tue Jul 29 19:07:03 EDT 2014

Powered by FUDForum. Page generated in 0.06914 seconds