Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » [ATL] EMFTVM: PackageNotFoundException: Package with uri not found
[ATL] EMFTVM: PackageNotFoundException: Package with uri not found [message #1047483] Tue, 23 April 2013 09:13 Go to next message
Gunnar Arndt is currently offline Gunnar ArndtFriend
Messages: 82
Registered: June 2012
Member
I have just switched my transformation from atl2010 to emftvm, and now I get the error message
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://com.ourCustomer.dat/modeltransformation/1.0' not found. (file:/c:/otx-test/self_adjustment_of_mixture_formation.0.modeltransformation, 2, 251)

when calling a launch config, although the uri in the model file matches the one given in the Ecore metamodel, and both of them are registered in the launch config:
http://i36.tinypic.com/s33lti.png

The header of my ATL file:
-- @atlcompiler emftvm

module transformate2otx;
create OUT: otx, time: otxDateTime, diag: otxDiagCom, data: otxDiagDataBrowsing, event:
		otxEvent, flash: otxFlash, hmi: otxHmi, i18n: otxI18n, job: otxJob, log:
		otxLogging, math: otxMath, measure: otxMeasure, quant: otxQuantities, string:
		otxStringUtil from IN: transformate;


Do you have an idea what to do? As far as I understand what's going on, the matching between model and metamodel is done in the header anyway, so there should be no need to do that automatically by the URI.
Thank you for any suggestion!
Re: [ATL] EMFTVM: PackageNotFoundException: Package with uri not found [message #1047533 is a reply to message #1047483] Tue, 23 April 2013 10:48 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

Op 23-04-13 11:13, Gunnar Arndt schreef:
> I have just switched my transformation from atl2010 to emftvm, and now I get
> the error message
>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException:
> org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri
> 'http://com.ourCustomer.dat/modeltransformation/1.0' not found.
> (file:/c:/otx-test/self_adjustment_of_mixture_formation.0.modeltransformation,
> 2, 251)
>
> when calling a launch config, although the uri in the model file matches the
> one given in the Ecore metamodel, and both of them are registered in the
> launch config:
>
>
> The header of my ATL file:
>
> -- @atlcompiler emftvm
>
> module transformate2otx;
> create OUT: otx, time: otxDateTime, diag: otxDiagCom, data:
> otxDiagDataBrowsing, event:
> otxEvent, flash: otxFlash, hmi: otxHmi, i18n: otxI18n, job: otxJob, log:
> otxLogging, math: otxMath, measure: otxMeasure, quant: otxQuantities,
> string:
> otxStringUtil from IN: transformate;
>
>
> Do you have an idea what to do? As far as I understand what's going on, the
> matching between model and metamodel is done in the header anyway, so there
> should be no need to do that automatically by the URI.
> Thank you for any suggestion!

EMFTVM used to not automatically register EPackage namespace URIs, and stick
to the default EMF behaviour. Today's snapshot release (3.4.0.201304231212)
departs from this strategy, as it triggers errors like this, as well as
aliasing problems where multiple versions of the same metamodel linger in memory.

That said, if you have a generated metamodel, you should always load it via
the namespace URI, not from file. Only dynamic metamodels may be loaded from
their .ecore file.

Kind regards,
Dennis Wagelaar


Cheers,
Dennis
Re: [ATL] EMFTVM: PackageNotFoundException: Package with uri not found [message #1047575 is a reply to message #1047483] Tue, 23 April 2013 11:57 Go to previous messageGo to next message
Gunnar Arndt is currently offline Gunnar ArndtFriend
Messages: 82
Registered: June 2012
Member
Dennis, thank you once more for your help, but how to do that?
You have seen my launch config, what would I change there?
This way, I get the same error message:

http://i38.tinypic.com/4vmhq9.png
Re: [ATL] EMFTVM: PackageNotFoundException: Package with uri not found [message #1047585 is a reply to message #1047575] Tue, 23 April 2013 12:16 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
I think it's "uri:http......".
Or just use the "EMF registry..." button it will do everything for you.
Re: [ATL] EMFTVM: PackageNotFoundException: Package with uri not found [message #1047604 is a reply to message #1047483] Tue, 23 April 2013 12:40 Go to previous messageGo to next message
Gunnar Arndt is currently offline Gunnar ArndtFriend
Messages: 82
Registered: June 2012
Member
Sylvain, thanks for the hint, but that doesn't work either; the model is not in the registry, as I haven't deployed it. It works without that with the standard ATL compiler. Do I really have to register it for EMFTVM?
Re: [ATL] EMFTVM: PackageNotFoundException: Package with uri not found [message #1047764 is a reply to message #1047604] Tue, 23 April 2013 16:01 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

Op 23-04-13 14:40, Gunnar Arndt schreef:
> Sylvain, thanks for the hint, but that doesn't work either; the model is not
> in the registry, as I haven't deployed it. It works without that with the
> standard ATL compiler. Do I really have to register it for EMFTVM?

If it worked with the other ATL VMs, please try first with today's EMFTVM
release from http://soft.vub.ac.be/eclipse/update-3.7/

This release adds support for dynamically registering EPackage nsURIs.

Dennis


Cheers,
Dennis
Re: [ATL] EMFTVM: PackageNotFoundException: Package with uri not found [message #1047776 is a reply to message #1047483] Tue, 23 April 2013 16:24 Go to previous messageGo to next message
Gunnar Arndt is currently offline Gunnar ArndtFriend
Messages: 82
Registered: June 2012
Member
I've just done that - no change, the message comes up.
Re: [ATL] EMFTVM: PackageNotFoundException: Package with uri not found [message #1047889 is a reply to message #1047776] Tue, 23 April 2013 20:00 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

Op 23/04/13 18:24, Gunnar Arndt schreef:
> I've just done that - no change, the message comes up.

Hmm, what happens after you try this:

1. Switch to ATL perspective
2. Right-click the "ModelTransformation.ecore" file, and select "Register
Metamodel"
3. Now run the transformation again.

If this works, there is still a bug in the EMFTVM launcher...

Regards,
Dennis


Cheers,
Dennis
Re: [ATL] EMFTVM: PackageNotFoundException: Package with uri not found [message #1048260 is a reply to message #1047483] Wed, 24 April 2013 08:28 Go to previous messageGo to next message
Gunnar Arndt is currently offline Gunnar ArndtFriend
Messages: 82
Registered: June 2012
Member
Dennis, thanks for the hint; I had not done that yet, as I usually work in the Plug-in perspective.
The message is now gone, instead nothing happens when running the transformation.

But I get this error when compiling with yesterday's build, although output (emftvm and asm files) is created:

Cannot set EMFTVM!CodeBlock::nested to latestHandler:ATL!NavigationOrAttributeCallExp for 326c52e3:EMFTVM!CodeBlock: containment references cannot span across models
org.eclipse.m2m.atl.emftvm.util.VMException: java.lang.ClassCastException
at abstract rule BindingStat@applier#77(platform:/plugin/org.eclipse.m2m.atl.emftvm.compiler/transformations/ATLtoEMFTVM.atl#[824:34-824:54])
	Local variables: [__trace__: TRACE!TraceLink = 739274bc:TRACE!TraceLink, s: ATL!BindingStat = 42e9ac30:ATL!BindingStat, cb: EMFTVM!CodeBlock = 326c52e3:EMFTVM!CodeBlock, ln: EMFTVM!LineNumber = 7042d019:EMFTVM!LineNumber, invokeCb: EMFTVM!InvokeCb = 3256462:EMFTVM!InvokeCb, invokeCb2: EMFTVM!InvokeCb = be15f8b:EMFTVM!InvokeCb, set: EMFTVM!FieldInstruction = 7947a4c4:EMFTVM!Set]
at static EMFTVM!ExecEnv::main() : Object(platform:/plugin/org.eclipse.m2m.atl.emftvm.compiler/transformations/ATLtoEMFTVM.atl)
	Local variables: []
	at org.eclipse.m2m.atl.emftvm.impl.CodeBlockImpl.internalExecute(CodeBlockImpl.java:989)
	at org.eclipse.m2m.atl.emftvm.impl.CodeBlockImpl.execute(CodeBlockImpl.java:728)
	at org.eclipse.m2m.atl.emftvm.impl.RuleImpl$WithApplierWithoutPostApplyCbState.applyFor(RuleImpl.java:1204)
	at org.eclipse.m2m.atl.emftvm.impl.RuleImpl.applyFor(RuleImpl.java:2229)
	at org.eclipse.m2m.atl.emftvm.impl.RuleImpl$IsNotAbstractState.apply(RuleImpl.java:981)
	at org.eclipse.m2m.atl.emftvm.impl.RuleImpl.apply(RuleImpl.java:2199)
	at org.eclipse.m2m.atl.emftvm.impl.ExecEnvImpl.matchAllSingle(ExecEnvImpl.java:2180)
	at org.eclipse.m2m.atl.emftvm.impl.ExecEnvImpl.run(ExecEnvImpl.java:2028)
	at org.eclipse.m2m.atl.emftvm.compiler.AtlToEmftvmCompiler.compileWithProblemModel(AtlToEmftvmCompiler.java:189)
	at org.eclipse.m2m.atl.emftvm.compiler.AtlToEmftvmCompiler.compileWithProblemModel(AtlToEmftvmCompiler.java:138)
	at org.eclipse.m2m.atl.emftvm.compiler.AtlToEmftvmCompiler.compileWithProblemModel(AtlToEmftvmCompiler.java:107)
	at org.eclipse.m2m.atl.engine.compiler.AtlCompiler.compile(AtlCompiler.java:156)
	at org.eclipse.m2m.atl.engine.compiler.AtlCompiler.compile(AtlCompiler.java:125)
	at org.eclipse.m2m.atl.adt.AtlBuildVisitor.visit(AtlBuildVisitor.java:115)
	at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:126)
	at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:85)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:82)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:127)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:95)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:52)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:124)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:108)
	at org.eclipse.m2m.atl.adt.AtlBuilder.fullBuild(AtlBuilder.java:68)
	at org.eclipse.m2m.atl.adt.AtlBuilder$1.run(AtlBuilder.java:49)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2326)
	at org.eclipse.m2m.atl.adt.AtlBuilder.run(AtlBuilder.java:108)
	at org.eclipse.m2m.atl.adt.AtlBuilder.build(AtlBuilder.java:52)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: java.lang.ClassCastException
Cannot set EMFTVM!CodeBlock::nested to latestHandler:ATL!NavigationOrAttributeCallExp for 4b5432a8:EMFTVM!CodeBlock: containment references cannot span across models
org.eclipse.m2m.atl.emftvm.util.VMException: java.lang.ClassCastException
at abstract rule BindingStat@applier#77(platform:/plugin/org.eclipse.m2m.atl.emftvm.compiler/transformations/ATLtoEMFTVM.atl#[824:34-824:54])
	Local variables: [__trace__: TRACE!TraceLink = 2d591708:TRACE!TraceLink, s: ATL!BindingStat = 64bc7e34:ATL!BindingStat, cb: EMFTVM!CodeBlock = 4b5432a8:EMFTVM!CodeBlock, ln: EMFTVM!LineNumber = d35dd4e:EMFTVM!LineNumber, invokeCb: EMFTVM!InvokeCb = 601659f1:EMFTVM!InvokeCb, invokeCb2: EMFTVM!InvokeCb = 5b6b0e7f:EMFTVM!InvokeCb, set: EMFTVM!FieldInstruction = 5184e2bc:EMFTVM!Set]
at static EMFTVM!ExecEnv::main() : Object(platform:/plugin/org.eclipse.m2m.atl.emftvm.compiler/transformations/ATLtoEMFTVM.atl)
	Local variables: []
	at org.eclipse.m2m.atl.emftvm.impl.CodeBlockImpl.internalExecute(CodeBlockImpl.java:989)
	at org.eclipse.m2m.atl.emftvm.impl.CodeBlockImpl.execute(CodeBlockImpl.java:728)
	at org.eclipse.m2m.atl.emftvm.impl.RuleImpl$WithApplierWithoutPostApplyCbState.applyFor(RuleImpl.java:1204)
	at org.eclipse.m2m.atl.emftvm.impl.RuleImpl.applyFor(RuleImpl.java:2229)
	at org.eclipse.m2m.atl.emftvm.impl.RuleImpl$IsNotAbstractState.apply(RuleImpl.java:981)
	at org.eclipse.m2m.atl.emftvm.impl.RuleImpl.apply(RuleImpl.java:2199)
	at org.eclipse.m2m.atl.emftvm.impl.ExecEnvImpl.matchAllSingle(ExecEnvImpl.java:2180)
	at org.eclipse.m2m.atl.emftvm.impl.ExecEnvImpl.run(ExecEnvImpl.java:2028)
	at org.eclipse.m2m.atl.emftvm.compiler.AtlToEmftvmCompiler.compileWithProblemModel(AtlToEmftvmCompiler.java:189)
	at org.eclipse.m2m.atl.emftvm.compiler.AtlToEmftvmCompiler.compileWithProblemModel(AtlToEmftvmCompiler.java:138)
	at org.eclipse.m2m.atl.emftvm.compiler.AtlToEmftvmCompiler.compileWithProblemModel(AtlToEmftvmCompiler.java:107)
	at org.eclipse.m2m.atl.engine.compiler.AtlCompiler.compile(AtlCompiler.java:156)
	at org.eclipse.m2m.atl.engine.compiler.AtlCompiler.compile(AtlCompiler.java:125)
	at org.eclipse.m2m.atl.adt.AtlBuildVisitor.visit(AtlBuildVisitor.java:115)
	at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:126)
	at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:85)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:82)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86)
	at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:127)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:95)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:52)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:124)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:108)
	at org.eclipse.m2m.atl.adt.AtlBuilder.fullBuild(AtlBuilder.java:68)
	at org.eclipse.m2m.atl.adt.AtlBuilder$1.run(AtlBuilder.java:49)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2326)
	at org.eclipse.m2m.atl.adt.AtlBuilder.run(AtlBuilder.java:108)
	at org.eclipse.m2m.atl.adt.AtlBuilder.build(AtlBuilder.java:52)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: java.lang.ClassCastException
Re: [ATL] EMFTVM: PackageNotFoundException: Package with uri not found [message #1049384 is a reply to message #1048260] Thu, 25 April 2013 19:39 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

Got it:
do {
  object.property.property <- thisModule.property;
--                                     ^^^ something goes wrong here
}



Cheers,
Dennis
Re: [ATL] EMFTVM: PackageNotFoundException: Package with uri not found [message #1049653 is a reply to message #1049384] Fri, 26 April 2013 05:44 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

Try putting braces as a workaround:
Dennis Wagelaar wrote on Thu, 25 April 2013 15:39

do {
  object.property.property <- (thisModule.property);
}




Cheers,
Dennis
Re: [ATL] EMFTVM: PackageNotFoundException: Package with uri not found [message #1050165 is a reply to message #1049653] Fri, 26 April 2013 20:08 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

Op 26-04-13 07:44, Dennis Wagelaar schreef:
> Try putting braces as a workaround:
> Dennis Wagelaar wrote on Thu, 25 April 2013 15:39
>> do {
>> object.property.property <- (thisModule.property);
>> }
>
>

Fixed as part of https://bugs.eclipse.org/bugs/show_bug.cgi?id=406372


Cheers,
Dennis
Previous Topic:Escape from a for loop
Next Topic:code genetaion
Goto Forum:
  


Current Time: Fri Mar 29 10:13:41 GMT 2024

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

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

Back to the top