Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » genmodel problems(org.eclipse.emf.ecore.xmi.XMIException in genmodel)
genmodel problems [message #1816295] Fri, 25 October 2019 13:28 Go to next message
Florian Kunz is currently offline Florian KunzFriend
Messages: 21
Registered: September 2018
Junior Member
Hi,

in my latest project I have a problem with the .genmodel file. It always tells me that it encountered a problem. The error message is:

org.eclipse.emf.ecore.xmi.XMIException: org.xml.sax.SAXParseExceptionpublicId: platform:/resource/myProject /plugin.properties; systemId: platform:/resource/myProject/plugin.properties; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. (platform:/resource/myproject/plugin.properties, 1, 1)

From that error message I assumed, that the problem originates form the plugin.properties file. Thus I checked the file and it says:

#

pluginName = myProject Model
providerName = www.example.org


When I compare that file to any other freshly generated plugin.properties file in another project, there is no difference, but the new file does not show any problems. I have the exact same problem with the build.properties.

Has anyone any idea, how I can fix this?


Re: genmodel problems [message #1816304 is a reply to message #1816295] Fri, 25 October 2019 20:51 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Probably by not using a *.properties file where an XML file is expected. Seems like a typo, but without sharing your build script/commands with us it is hard to be sure. I have seen the bad publicId/systemId message many times from improperly configured models, but never from a *.properties file since *.properties files are not part of the primary genmodel process; they are just updated once genmodel is underway.

Regards

Ed Willink
Re: genmodel problems [message #1816306 is a reply to message #1816304] Sat, 26 October 2019 02:00 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
If you include the full stack trace then we can see from where this resource is being loaded. It's certainly not normal that there should be an attempt to load a *.properties file as if it were an XML file and it's hard to imagine what could possibility cause such a thing. A full stack trace would help clarify that point.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: genmodel problems [message #1816313 is a reply to message #1816306] Sat, 26 October 2019 10:36 Go to previous messageGo to next message
Florian Kunz is currently offline Florian KunzFriend
Messages: 21
Registered: September 2018
Junior Member
Hi,

sorry for the missing information.

The complete error message is:

org.eclipse.emf.ecore.xmi.XMIException: org.xml.sax.SAXParseExceptionpublicId: platform:/resource/myProject/plugin.properties; systemId: platform:/resource/myProject/plugin.properties; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. (platform:/resource/myProject/plugin.properties, 1, 1)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.toXMIException(XMLHandler.java:683)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.fatalError(XMLHandler.java:706)
	at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:181)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1471)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:978)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:541)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:324)
	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:261)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1563)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1342)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
	at org.eclipse.sirius.viewpoint.impl.DAnalysisImpl.getResource(DAnalysisImpl.java:226)
	at org.eclipse.sirius.viewpoint.impl.DAnalysisImpl.getModels(DAnalysisImpl.java:198)
	at org.eclipse.sirius.viewpoint.impl.DAnalysisImpl.eIsSet(DAnalysisImpl.java:462)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObjectImpl.java:1241)
	at org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.hasNext(EContentsEList.java:437)
	at org.eclipse.emf.edit.ui.provider.DiagnosticDecorator$LiveValidator$2.run(DiagnosticDecorator.java:522)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.xml.sax.SAXParseExceptionpublicId: platform:/resource/myProject/plugin.properties; systemId: platform:/resource/myProject/plugin.properties; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
	at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
	at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:178)
Re: genmodel problems [message #1816318 is a reply to message #1816313] Sat, 26 October 2019 20:16 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Looks like a Sirius-assisted bug. Whatever you do in Sirius should not make a *.properties a source file. As always, without a repro, you make it very hard for responses to be more than guesses.

Ragards

Ed Willink
Re: genmodel problems [message #1816324 is a reply to message #1816318] Sun, 27 October 2019 04:24 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
This is happening in a background job, and the GenModel editor does do "live validation" via a job like this. But in that case, the problem could only happen if your *.genmodel or *.ecore model (or some model on which either of them depend) has a reference to this Sirius view point model. It might also be happening directly via a job launched by Sirius. In either case, it is not a problem that I can fix. And as Ed suggests, if the Sirius folks are to fix it, they'll likely need a way to reproduce the problem. This is their forum:

https://www.eclipse.org/forums/index.php?t=thread&frm_id=262


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: genmodel problems [message #1816337 is a reply to message #1816324] Sun, 27 October 2019 20:45 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

One possibility....

Sirius has a fairly aggressive search for possible models that then get stuck in the *.aird file. It might be that you had some accident with the *.properties that fooled Sirius into treating it as a model file and now you are stuck with it. Search your *.aird files for any references to properties files and delete them manually. Put everything in GIT before you start manual deletions in case you make things worse.

Regards

Ed Willink
Previous Topic:Custom EMF Model Importer / Exporter Tutorial?
Next Topic:EMF Compare - ADD / DELETE differences list
Goto Forum:
  


Current Time: Thu Mar 28 20:34:50 GMT 2024

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

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

Back to the top