Prohibited package name: java [message #865901] |
Mon, 30 April 2012 12:29  |
Eclipse User |
|
|
|
Hi, all.
I downloaded the Java metamodel Ecore file and generated the genmodel based on that file; then I generated the Model code from the genmodel and when I try to register the package, the ClassLoader says: Prohibited package name: java
ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());
resourceSet.getPackageRegistry().put(JavaPackage.eNS_URI,JavaPackage.eINSTANCE);
File file = new File("C:\\Users\\Dc3AdminEJB\\Dc3AdminEJB_java.xmi");
//System.out.println(file);
URI uri = URI.createFileURI(file.getAbsolutePath());
//System.out.println(uri);
Resource resource = resourceSet.getResource(uri, true);
System.out.println("Loaded " + uri + " " + resource);
How could I get rid of this?
|
|
|
|
|
|
Re: Prohibited package name: java [message #871048 is a reply to message #870940] |
Thu, 10 May 2012 12:23  |
Eclipse User |
|
|
|
Hi, thanks for your responses. Gregoire, I had to dowload the java.ecore and generate the model code in order to register packages for XMIResource and load the model discovered by MoDisco because in order to transform that model to another one in ATL I had a lot of problems with OCL; it is so much simpler to navigate the model in EMF than in ATL and its, in my opinion, unintuitive OCL. Thank you.
|
|
|
Powered by
FUDForum. Page generated in 0.03832 seconds