Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » SAXParseException on running Maven build for test that builds an Xtext model
SAXParseException on running Maven build for test that builds an Xtext model [message #1006704] Fri, 01 February 2013 08:55
Latha Shankara is currently offline Latha Shankara
Messages: 30
Registered: June 2012
Member
Hi,

I get the below exception while running the maven build for a test,

ERROR WorkflowRunner     - org.xml.sax.SAXParseException: Content is not allowed in prolog.
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:315)
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)


while the test runs fine when run as a Junit PluginTest.I pass new ResourceSetImpl() to a method which expects ResourceSet which then internally calls the methods mentioned in the stack trace. I also tried the code,

Injector injector = new MyModelStandaloneSetup().createInjectorAndDoEMFRegistration();
XtextResourceSet resourceSet = injector.getInstance(XtextResourceSet.class);


instead of creating a new object ResourceSetImpl but it does not build properly and the output is not generated.

Any hints on what the issue is?

Thanks in Advance,
Latha
Previous Topic:Resource.save output is invalid XMI file
Next Topic:Dynamic Syntax Highlighting
Goto Forum:
  


Current Time: Fri Aug 29 10:14:09 EDT 2014

Powered by FUDForum. Page generated in 0.01787 seconds