Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Weird XML Parser error
Weird XML Parser error [message #417739] Tue, 25 March 2008 17:00 Go to next message
Eclipse UserFriend
Originally posted by: oemer.yildiz.semanticedge.com

Hi,

my co-worker is getting the following exception when she tries to load a
resource:

org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
org.xml.sax.SAXParseException: org.apache.crimson.parser/P-084
xmi:version (file:/C:/uip/mvv/test.uip, 2, -1) -
org.xml.sax.SAXParseException: org.apache.crimson.parser/P-084
xmi:version (file:/C:/uip/mvv/test.uip, 2, -1).

The code is executed in a Tomcat environment. She tried to run the same
loading code in a standalone java test class with success. Our guess is
that a different SAX parser implementation is used in the Tomcat
environment which causes this problem.

She can get it to work when she moves the xmi:version declaration to the
end of the root tag, but that's hardly a satisfying solution to this
problem :)

Any ideas (besides suggesting to use endorsed libs)?

Thanks in advance,
Cheers!
Re: Weird XML Parser error [message #417741 is a reply to message #417739] Tue, 25 March 2008 18:39 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Ömer,

I've never seen such a thing. Perhaps part of the issue is that crimson
was used in Sun JDK 1.4.x but is no longer used in Sun JDK 5.0.x. So
perhaps your using an older JDK with an EMF that expects a newer
version. Which JDK are you using and which version of EMF?


Ömer Yildiz wrote:
> Hi,
>
> my co-worker is getting the following exception when she tries to load
> a resource:
>
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
> org.xml.sax.SAXParseException: org.apache.crimson.parser/P-084
> xmi:version (file:/C:/uip/mvv/test.uip, 2, -1) -
> org.xml.sax.SAXParseException: org.apache.crimson.parser/P-084
> xmi:version (file:/C:/uip/mvv/test.uip, 2, -1).
>
> The code is executed in a Tomcat environment. She tried to run the
> same loading code in a standalone java test class with success. Our
> guess is that a different SAX parser implementation is used in the
> Tomcat environment which causes this problem.
>
> She can get it to work when she moves the xmi:version declaration to
> the end of the root tag, but that's hardly a satisfying solution to
> this problem :)
>
> Any ideas (besides suggesting to use endorsed libs)?
>
> Thanks in advance,
> Cheers!


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Weird XML Parser error [message #417745 is a reply to message #417741] Wed, 26 March 2008 11:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: oemer.yildiz.semanticedge.com

Hi Ed,

my colleague is using JDK 5.x and EMF 2.3 in a Tomcat 5.5 environment.

Ed Merks schrieb:
> Ömer,
>
> I've never seen such a thing. Perhaps part of the issue is that crimson
> was used in Sun JDK 1.4.x but is no longer used in Sun JDK 5.0.x. So
> perhaps your using an older JDK with an EMF that expects a newer
> version. Which JDK are you using and which version of EMF?
>
>
> Ömer Yildiz wrote:
>> Hi,
>>
>> my co-worker is getting the following exception when she tries to load
>> a resource:
>>
>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
>> org.xml.sax.SAXParseException: org.apache.crimson.parser/P-084
>> xmi:version (file:/C:/uip/mvv/test.uip, 2, -1) -
>> org.xml.sax.SAXParseException: org.apache.crimson.parser/P-084
>> xmi:version (file:/C:/uip/mvv/test.uip, 2, -1).
>>
>> The code is executed in a Tomcat environment. She tried to run the
>> same loading code in a standalone java test class with success. Our
>> guess is that a different SAX parser implementation is used in the
>> Tomcat environment which causes this problem.
>>
>> She can get it to work when she moves the xmi:version declaration to
>> the end of the root tag, but that's hardly a satisfying solution to
>> this problem :)
>>
>> Any ideas (besides suggesting to use endorsed libs)?
>>
>> Thanks in advance,
>> Cheers!
Re: Weird XML Parser error [message #417747 is a reply to message #417745] Wed, 26 March 2008 12:29 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Ömer,

That's very odd then. I don't expect to see a crimson parser coming
from the JDK in that case; I'd expect to see Xerces (a renamed version,
if it's the Sun JDK). Is it being installed by Tomcat? In any case,
it sounds like a buggy parser if it's not accepting well formed XML; it
sounds like it gets upset if an attribute uses a prefix before the xmlns
prefix declaration for that attribute's prefix appears, but that's not
correct behavior...


Ömer Yildiz wrote:
> Hi Ed,
>
> my colleague is using JDK 5.x and EMF 2.3 in a Tomcat 5.5 environment.
>
> Ed Merks schrieb:
>> Ömer,
>>
>> I've never seen such a thing. Perhaps part of the issue is that
>> crimson was used in Sun JDK 1.4.x but is no longer used in Sun JDK
>> 5.0.x. So perhaps your using an older JDK with an EMF that expects a
>> newer version. Which JDK are you using and which version of EMF?
>>
>>
>> Ömer Yildiz wrote:
>>> Hi,
>>>
>>> my co-worker is getting the following exception when she tries to
>>> load a resource:
>>>
>>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
>>> org.xml.sax.SAXParseException: org.apache.crimson.parser/P-084
>>> xmi:version (file:/C:/uip/mvv/test.uip, 2, -1) -
>>> org.xml.sax.SAXParseException: org.apache.crimson.parser/P-084
>>> xmi:version (file:/C:/uip/mvv/test.uip, 2, -1).
>>>
>>> The code is executed in a Tomcat environment. She tried to run the
>>> same loading code in a standalone java test class with success. Our
>>> guess is that a different SAX parser implementation is used in the
>>> Tomcat environment which causes this problem.
>>>
>>> She can get it to work when she moves the xmi:version declaration to
>>> the end of the root tag, but that's hardly a satisfying solution to
>>> this problem :)
>>>
>>> Any ideas (besides suggesting to use endorsed libs)?
>>>
>>> Thanks in advance,
>>> Cheers!


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:UML to XMI export programmatically?
Next Topic:Exchanging data between constraints
Goto Forum:
  


Current Time: Thu Apr 25 15:13:00 GMT 2024

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

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

Back to the top