Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo 3] Can't find my ecore model
[Acceleo 3] Can't find my ecore model [message #550152] Thu, 29 July 2010 10:19 Go to next message
mami  is currently offline mami Friend
Messages: 3
Registered: July 2010
Junior Member
Hi,

I try to be clear. I have a mtl template (schematron.mtl) that uses 2 ecore models (rules.erore and structure.ecore) through their Ns URI ([module schematron('http://www.bluexml.com/n4ds/rules/1.0','http://www.bluexml.com/n4ds/structure/1.0')/]).
The code generation is associated with a popup action (plugin project). Normally, I launch another eplipse application, I open my data model, but when I try to generate the code by clicking on the action, I have the following error:

java.io.FileNotFoundException: /Users/bluexmlbluexml/Documents/plugin/com.bluexml.n4ds/mode l/structure.ecore (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at org.eclipse.emf.ecore.resource.impl.FileURIHandlerImpl.creat eInputStream(FileURIHandlerImpl.java:105)
at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterIm pl.createInputStream(ExtensibleURIConverterImpl.java:301)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1254)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:255)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:270)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:397)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObje ct(ResourceSetImpl.java:216)
at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 202)
at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 262)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(Ba sicEObjectImpl.java:1483)
at org.eclipse.emf.ecore.impl.ETypedElementImpl.getEType(ETyped ElementImpl.java:321)
at org.eclipse.ocl.ecore.impl.OCLExpressionImpl.getType(OCLExpr essionImpl.java:173)
at org.eclipse.ocl.ecore.impl.OCLExpressionImpl.getType(OCLExpr essionImpl.java:1)
at org.eclipse.ocl.internal.EnvironmentRegistryImpl.getEnvironm entFor(EnvironmentRegistryImpl.java:61)
at org.eclipse.ocl.ecore.impl.OperationCallExpImpl.getOperation Code(OperationCallExpImpl.java:182)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitOperationCallExp(AcceleoEvaluationVisitor.j ava:990)
at org.eclipse.ocl.ecore.impl.OperationCallExpImpl.accept(Opera tionCallExpImpl.java:390)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor$ParameterInitExpression.accept(AcceleoEvaluation Visitor.java:1614)
at org.eclipse.ocl.EvaluationVisitorImpl.visitVariable(Evaluati onVisitorImpl.java:1976)
at org.eclipse.ocl.EvaluationVisitorDecorator.visitVariable(Eva luationVisitorDecorator.java:340)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoQueryInvocation(AcceleoEvaluationVis itor.java:667)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 500)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoForBlock(AcceleoEvaluationVisitor.ja va:332)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 480)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:781)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 467)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.ocl.internal.evaluation.QueryImpl.evaluate(Query Impl.java:152)
at org.eclipse.ocl.ecore.QueryImpl.evaluate(QueryImpl.java:62)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.doEvalua te(AcceleoEngine.java:265)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.evaluate (AcceleoEngine.java:130)
at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate Template(AcceleoService.java:544)
at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate (AcceleoService.java:380)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator. generate(AbstractAcceleoGenerator.java:120)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator. doGenerate(AbstractAcceleoGenerator.java:99)
at com.bluexml.n4ds.rules.generator.files.Schematron.doGenerate (Schematron.java:148)
at com.bluexml.n4ds.rules.editor.ui.popup.actions.GenerateSchem atronRules$1.run(GenerateSchematronRules.java:92)
at org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:121)


Note that "plugin", appears in the path above, doesn't belong to the right path. The right path is: /Users/bluexmlbluexml/Documents/workspace/com.bluexml.n4ds/m odel/structure.ecore !!!!

Question: Why it can't find my ecore model (structure.ecore), knowing that my template (schematron.mtl) recognizes it without any problem ? Mad

Configuration:
- eclipse 3.6 (helios)
- Mac OS X v10.5

Best regards
Re: [Acceleo 3] Can't find my ecore model [message #550198 is a reply to message #550152] Thu, 29 July 2010 13:17 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090105010608070804050709
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Mami,

This seems to resemble
https://bugs.eclipse.org/bugs/show_bug.cgi?id=306692 though your problem
is with the model and not the generation folder. Is your model
(structure.ecore) located physically in your workspace? If not, can you
try to copy it in a workspace-located project and see if you can reproduce?

Laurent Goubet
Obeo

mami wrote:
> Hi,
>
> I try to be clear. I have a mtl template (schematron.mtl) that uses 2
> ecore models (rules.erore and structure.ecore) through their Ns URI
> ([module
> schematron('http://www.bluexml.com/n4ds/rules/1.0','http://www.bluexml.com/n4ds/structure/1.0')/]).
>
> The code generation is associated with a popup action (plugin project).
> Normally, I launch another eplipse application, I open my data model,
> but when I try to generate the code by clicking on the action, I have
> the following error:
>
> java.io.FileNotFoundException:
> /Users/bluexmlbluexml/Documents/plugin/com.bluexml.n4ds/mode
> l/structure.ecore (No such file or directory)
> at java.io.FileInputStream.open(Native Method)
> at java.io.FileInputStream.<init>(FileInputStream.java:106)
> at org.eclipse.emf.ecore.resource.impl.FileURIHandlerImpl.creat
> eInputStream(FileURIHandlerImpl.java:105)
> at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterIm
> pl.createInputStream(ExtensibleURIConverterImpl.java:301)
> at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour
> ceImpl.java:1254)
> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo
> ad(ResourceSetImpl.java:255)
> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo
> adHelper(ResourceSetImpl.java:270)
> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou
> rce(ResourceSetImpl.java:397)
> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObje
> ct(ResourceSetImpl.java:216)
> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 202)
> at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java: 262)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(Ba
> sicEObjectImpl.java:1483)
> at org.eclipse.emf.ecore.impl.ETypedElementImpl.getEType(ETyped
> ElementImpl.java:321)
> at org.eclipse.ocl.ecore.impl.OCLExpressionImpl.getType(OCLExpr
> essionImpl.java:173)
> at org.eclipse.ocl.ecore.impl.OCLExpressionImpl.getType(OCLExpr
> essionImpl.java:1)
> at org.eclipse.ocl.internal.EnvironmentRegistryImpl.getEnvironm
> entFor(EnvironmentRegistryImpl.java:61)
> at org.eclipse.ocl.ecore.impl.OperationCallExpImpl.getOperation
> Code(OperationCallExpImpl.java:182)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitOperationCallExp(AcceleoEvaluationVisitor.j ava:990)
> at org.eclipse.ocl.ecore.impl.OperationCallExpImpl.accept(Opera
> tionCallExpImpl.java:390)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor$ParameterInitExpression.accept(AcceleoEvaluation
> Visitor.java:1614)
> at org.eclipse.ocl.EvaluationVisitorImpl.visitVariable(Evaluati
> onVisitorImpl.java:1976)
> at org.eclipse.ocl.EvaluationVisitorDecorator.visitVariable(Eva
> luationVisitorDecorator.java:340)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoQueryInvocation(AcceleoEvaluationVis itor.java:667)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 500)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoForBlock(AcceleoEvaluationVisitor.ja va:332)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 480)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:781)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 467)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
> at org.eclipse.ocl.internal.evaluation.QueryImpl.evaluate(Query
> Impl.java:152)
> at org.eclipse.ocl.ecore.QueryImpl.evaluate(QueryImpl.java:62)
> at org.eclipse.acceleo.engine.generation.AcceleoEngine.doEvalua
> te(AcceleoEngine.java:265)
> at org.eclipse.acceleo.engine.generation.AcceleoEngine.evaluate
> (AcceleoEngine.java:130)
> at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate
> Template(AcceleoService.java:544)
> at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate
> (AcceleoService.java:380)
> at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.
> generate(AbstractAcceleoGenerator.java:120)
> at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.
> doGenerate(AbstractAcceleoGenerator.java:99)
> at com.bluexml.n4ds.rules.generator.files.Schematron.doGenerate
> (Schematron.java:148)
> at com.bluexml.n4ds.rules.editor.ui.popup.actions.GenerateSchem
> atronRules$1.run(GenerateSchematronRules.java:92)
> at org.eclipse.jface.operation.ModalContext$ModalContextThread.
> run(ModalContext.java:121)
>
>
> Note that "plugin", appears in the path above, doesn't belong to the
> right path. The right path is:
> /Users/bluexmlbluexml/Documents/workspace/com.bluexml.n4ds/m
> odel/structure.ecore !!!!
>
> Question: Why it can't find my ecore model (structure.ecore), knowing
> that my template (schematron.mtl) recognizes it without any problem ? :x
> Configuration:
> - eclipse 3.6 (helios)
> - Mac OS X v10.5
>
> Best regards


--------------090105010608070804050709
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------090105010608070804050709--
Re: [Acceleo 3] Can't find my ecore model [message #551413 is a reply to message #550198] Fri, 06 August 2010 10:41 Go to previous messageGo to next message
mami  is currently offline mami Friend
Messages: 3
Registered: July 2010
Junior Member
Hi Laurent and thanks for the answer

All my projects are in the same workspace including my model (structure.ecore). The plugin workspace, where the secand eclipse instance is running, is empty, so I just import projects from the original workspace.
This problem still occurs sometimes, but despite the generation is done and that is enough for now Very Happy

Best regards...
Re: [Acceleo 3] Can't find my ecore model [message #551694 is a reply to message #551413] Mon, 09 August 2010 08:15 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070409080508020605010807
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Thanks Mami, we'll try and reproduce this failure when we fix the bug
with workspace outside of the Eclipse directory.

Laurent Goubet
Obeo

mami wrote:
> Hi Laurent and thanks for the answer
>
> All my projects are in the same workspace including my model
> (structure.ecore). The plugin workspace, where the secand eclipse
> instance is running, is empty, so I just import projects from the
> original workspace.
> This problem still occurs sometimes, but despite the generation is
> done and that is enough for now :d
> Best regards...


--------------070409080508020605010807
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------070409080508020605010807--
Previous Topic:[Xpand2] Where can I find CppBeautifier / org.eclipse.xpand.support.cdt ?
Next Topic:[Xpand2] Looping (for loop / do while loop / while loop)
Goto Forum:
  


Current Time: Fri Mar 29 01:38:59 GMT 2024

Powered by FUDForum. Page generated in 0.03012 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top