Problems with webApp MoDisco model and ATL transformation [message #869376] |
Thu, 03 May 2012 10:03 |
Victor Pavon Messages: 50 Registered: April 2012 Location: Spain |
Member |
|
|
Hi,
I'm tried use ATL to transform for m2m transformation, the source model is a webapp MoDisco metamodel, when I run the transformation occour the error:
Error loading platform:/resource/JSP&StrutsConfig2StrutsViewController/inputModel/web.xml_webapp.xmi: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'null' not found. (platform:/resource/JSP&StrutsConfig2StrutsViewController/inputModel/web.xml_webapp.xmi, 2, 25)
What am I doing wrong?
Thank you for your help.
Víctor Pavón,
Research at Quercus Software Engineering Group
University of Extremadura, Spain.
|
|
|
|
Re: Problems with webApp MoDisco model and ATL transformation [message #869773 is a reply to message #869561] |
Fri, 04 May 2012 09:35 |
Victor Pavon Messages: 50 Registered: April 2012 Location: Spain |
Member |
|
|
Hi Hugo,
The file input is a web.xml (version 2.3) [2.3_dtd_web.xml] which structure is defined in a *.dtd file. After execute webapp discoverer over this file I compare the input *.xml file and the output file [2.3_dtd_web.xml_webapp.xmi], the content of the files are the same the only differences between output and input is:
- Comment on output file are deleted
- White line on output file are deteled
- And the most important change that maybe is the cause of the error in ATL the <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" is deleted.
Mainly in the output file there isn`t any URI that reference the model and this is the cause of the problem that I talked in my first post. To solve this problem I delete de DOCTYPE definition and I add a reference to .*xsd file that defined the schema of web.xml version 2.3 [2.3_xsd_web.xml]. After execute the discoverer I obtain a new output file [2.3_xsd_web.xml_webapp.xmi], this file is a little bit different that input file and if I use this file as ATL input, the error that indicated null URI disappear. But I obtain another error:
Error loading platform:/resource/JSP&StrutsConfig2StrutsViewController/inputModel/web.xml_webapp.xmi: org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'web-app' is not found or is abstract. (platform:/resource/JSP&StrutsConfig2StrutsViewController/inputModel/web.xml_webapp.xmi, 2, 80)
I look into the 2.3_xsd_web.xml_webapp.xmi and I see that for example the element web-app appear in this file like web-app but in the metamodel this is name as WebAppType and the same occur with the other element. If I change this names by the class or feature names this errors disappear and I can execute ATL rules without problems.
My question now is how can I automated this process to obtain a model that work fine with ATL without edit it manually.
Thank you for your help.
Regard.
P. D. I attach all samples file that I use.
Víctor Pavón,
Research at Quercus Software Engineering Group
University of Extremadura, Spain.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04092 seconds