Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] can't deserialize EObjects which contain Teneo proxies
[Teneo] can't deserialize EObjects which contain Teneo proxies [message #91780] Wed, 25 July 2007 19:06 Go to next message
Eclipse UserFriend
Originally posted by: eclipse_news.firstnamelastname.ch

Hi,

I have a problem when I try to deserialize a XMI that contains Teneo
Proxies:

ResourceSet rs = new ResourceSetImpl();
Resource teneoRes = rs.createResource(
URI.createURI("hibernate://?dsname=library&query1=from Book"));
teneoRes.load(null);

Resource xmiStoreRes = rs.createResource(
URI.createFileURI("transfer.xmi"));

xmiStoreRes.getContents().addAll(teneoRes.getContents());
xmiStoreRes.save(null);

Resource xmiLoadRes = rs.createResource(
URI.createFileURI("transfer.xmi"));
xmiLoadRes.load(null);


results in:

Exception in thread "main"
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
reference to entity "query1" must end with the ';' delimiter.
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)

the saved xmi looks like this:

<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:org.eclipse.example.library="http:///org/eclipse/example/library.ecore">
<org.eclipse.example.library:Book title="b1" id="196608">
<titlePage href="hibernate://?dsname=library&query1=from
Book#TitlePage|id=131072"/>
</org.eclipse.example.library:Book>
<org.eclipse.example.library:Book title="b2" id="196609">
<author href="hibernate://?dsname=library&query1=from
Book#Writer|id=163840"/>
<titlePage href="hibernate://?dsname=library&query1=from
Book#TitlePage|id=131073"/>
</org.eclipse.example.library:Book>
</xmi:XMI>


Thanks in advance,

Tom.
Re: [Teneo] can't deserialize EObjects which contain Teneo proxies [message #91872 is a reply to message #91780] Thu, 26 July 2007 06:13 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Thomas,
Can you post the complete stacktrace? I mean is there an underlying sax (or other) exception?

gr. Martin

Thomas Kuhn wrote:
> Hi,
>
> I have a problem when I try to deserialize a XMI that contains Teneo
> Proxies:
>
> ResourceSet rs = new ResourceSetImpl();
> Resource teneoRes = rs.createResource(
> URI.createURI("hibernate://?dsname=library&query1=from Book"));
> teneoRes.load(null);
>
> Resource xmiStoreRes = rs.createResource(
> URI.createFileURI("transfer.xmi"));
>
> xmiStoreRes.getContents().addAll(teneoRes.getContents());
> xmiStoreRes.save(null);
>
> Resource xmiLoadRes = rs.createResource(
> URI.createFileURI("transfer.xmi"));
> xmiLoadRes.load(null);
>
>
> results in:
>
> Exception in thread "main"
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
> reference to entity "query1" must end with the ';' delimiter.
> at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
>
> the saved xmi looks like this:
>
> <?xml version="1.0" encoding="ASCII"?>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:org.eclipse.example.library="http:///org/eclipse/example/library.ecore">
>
> <org.eclipse.example.library:Book title="b1" id="196608">
> <titlePage href="hibernate://?dsname=library&query1=from
> Book#TitlePage|id=131072"/>
> </org.eclipse.example.library:Book>
> <org.eclipse.example.library:Book title="b2" id="196609">
> <author href="hibernate://?dsname=library&query1=from
> Book#Writer|id=163840"/>
> <titlePage href="hibernate://?dsname=library&query1=from
> Book#TitlePage|id=131073"/>
> </org.eclipse.example.library:Book>
> </xmi:XMI>
>
>
> Thanks in advance,
>
> Tom.


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] can't deserialize EObjects which contain Teneo proxies [message #91951 is a reply to message #91872] Thu, 26 July 2007 16:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse_news.firstnamelastname.ch

Hi Martin,

below the complete stack trace.

Thanks,

Thomas

Exception in thread "main"
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
reference to entity "query1" must end with the ';' delimiter.
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
at ch.thomaskuhn.library_test.RetrieveData.main(RetrieveData.ja va:39)
Caused by: org.xml.sax.SAXParseException: The reference to entity
"query1" must end with the ';' delimiter.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExc eption(Unknown
Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknow n Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAt tribute(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
... 4 moreException in thread "main"
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
reference to entity "query1" must end with the ';' delimiter.
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
at ch.thomaskuhn.library_test.RetrieveData.main(RetrieveData.ja va:39)
Caused by: org.xml.sax.SAXParseException: The reference to entity
"query1" must end with the ';' delimiter.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExc eption(Unknown
Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknow n Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAt tribute(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
... 4 more

Martin Taal wrote:
> Hi Thomas,
> Can you post the complete stacktrace? I mean is there an underlying sax
> (or other) exception?
>
> gr. Martin
>
> Thomas Kuhn wrote:
>> Hi,
>>
>> I have a problem when I try to deserialize a XMI that contains Teneo
>> Proxies:
>>
>> ResourceSet rs = new ResourceSetImpl();
>> Resource teneoRes = rs.createResource(
>> URI.createURI("hibernate://?dsname=library&query1=from Book"));
>> teneoRes.load(null);
>> Resource xmiStoreRes = rs.createResource(
>> URI.createFileURI("transfer.xmi"));
>> xmiStoreRes.getContents().addAll(teneoRes.getContents());
>> xmiStoreRes.save(null);
>>
>> Resource xmiLoadRes = rs.createResource(
>> URI.createFileURI("transfer.xmi"));
>> xmiLoadRes.load(null);
>>
>>
>> results in:
>>
>> Exception in thread "main"
>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
>> reference to entity "query1" must end with the ';' delimiter.
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
>>
>> the saved xmi looks like this:
>>
>> <?xml version="1.0" encoding="ASCII"?>
>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:org.eclipse.example.library="http:///org/eclipse/example/library.ecore">
>>
>> <org.eclipse.example.library:Book title="b1" id="196608">
>> <titlePage href="hibernate://?dsname=library&query1=from
>> Book#TitlePage|id=131072"/>
>> </org.eclipse.example.library:Book>
>> <org.eclipse.example.library:Book title="b2" id="196609">
>> <author href="hibernate://?dsname=library&query1=from
>> Book#Writer|id=163840"/>
>> <titlePage href="hibernate://?dsname=library&query1=from
>> Book#TitlePage|id=131073"/>
>> </org.eclipse.example.library:Book>
>> </xmi:XMI>
>>
>>
>> Thanks in advance,
>>
>> Tom.
>
>
Re: [Teneo] can't deserialize EObjects which contain Teneo proxies [message #92001 is a reply to message #91951] Thu, 26 July 2007 18:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------060807090600030702080102
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Thomas,

Probably you need to use this option if your URIs contain characters
with special XML meaning...

/**
* Skip escaping special characters, such as '&' char, in URIs
during XML serialization.
* The default is <code>Boolean.TRUE</code>. To enforce escaping
special characters, set this
* option to <code>Boolean.FALSE</code>.
*/
String OPTION_SKIP_ESCAPE_URI = "SKIP_ESCAPE_URI";


Thomas Kuhn wrote:
> Hi Martin,
>
> below the complete stack trace.
>
> Thanks,
>
> Thomas
>
> Exception in thread "main"
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
> reference to entity "query1" must end with the ';' delimiter.
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>
> at ch.thomaskuhn.library_test.RetrieveData.main(RetrieveData.ja va:39)
> Caused by: org.xml.sax.SAXParseException: The reference to entity
> "query1" must end with the ';' delimiter.
> at
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExc eption(Unknown
> Source)
> at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknow n
> Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> Source)
> at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
> at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAt tribute(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
> Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> at javax.xml.parsers.SAXParser.parse(Unknown Source)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
> ... 4 moreException in thread "main"
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
> reference to entity "query1" must end with the ';' delimiter.
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>
> at ch.thomaskuhn.library_test.RetrieveData.main(RetrieveData.ja va:39)
> Caused by: org.xml.sax.SAXParseException: The reference to entity
> "query1" must end with the ';' delimiter.
> at
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExc eption(Unknown
> Source)
> at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknow n
> Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> Source)
> at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
> at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAt tribute(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
> Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> at javax.xml.parsers.SAXParser.parse(Unknown Source)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
> ... 4 more
>
> Martin Taal wrote:
>> Hi Thomas,
>> Can you post the complete stacktrace? I mean is there an underlying
>> sax (or other) exception?
>>
>> gr. Martin
>>
>> Thomas Kuhn wrote:
>>> Hi,
>>>
>>> I have a problem when I try to deserialize a XMI that contains Teneo
>>> Proxies:
>>>
>>> ResourceSet rs = new ResourceSetImpl();
>>> Resource teneoRes = rs.createResource(
>>> URI.createURI("hibernate://?dsname=library&query1=from Book"));
>>> teneoRes.load(null);
>>> Resource xmiStoreRes = rs.createResource(
>>> URI.createFileURI("transfer.xmi"));
>>> xmiStoreRes.getContents().addAll(teneoRes.getContents());
>>> xmiStoreRes.save(null);
>>>
>>> Resource xmiLoadRes = rs.createResource(
>>> URI.createFileURI("transfer.xmi"));
>>> xmiLoadRes.load(null);
>>>
>>>
>>> results in:
>>>
>>> Exception in thread "main"
>>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
>>> reference to entity "query1" must end with the ';' delimiter.
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
>>>
>>> the saved xmi looks like this:
>>>
>>> <?xml version="1.0" encoding="ASCII"?>
>>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>>> xmlns:org.eclipse.example.library="http:///org/eclipse/example/library.ecore">
>>>
>>> <org.eclipse.example.library:Book title="b1" id="196608">
>>> <titlePage href="hibernate://?dsname=library&query1=from
>>> Book#TitlePage|id=131072"/>
>>> </org.eclipse.example.library:Book>
>>> <org.eclipse.example.library:Book title="b2" id="196609">
>>> <author href="hibernate://?dsname=library&query1=from
>>> Book#Writer|id=163840"/>
>>> <titlePage href="hibernate://?dsname=library&query1=from
>>> Book#TitlePage|id=131073"/>
>>> </org.eclipse.example.library:Book>
>>> </xmi:XMI>
>>>
>>>
>>> Thanks in advance,
>>>
>>> Tom.
>>
>>


--------------060807090600030702080102
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thomas,<br>
<br>
Probably you need to use this option if&nbsp; your URIs contain characters
with special XML meaning...<small><br>
</small>
<blockquote><small>&nbsp; /**</small><big><br>
</big><small>&nbsp;&nbsp; * Skip escaping special characters, such as '&amp;'
char, in URIs during XML serialization.</small><big><br>
</big><small>&nbsp;&nbsp; * The default is
&lt;code&gt;Boolean.TRUE&lt;/code&gt;. To enforce escaping special
characters, set this </small><big><br>
</big><small>&nbsp;&nbsp; * option to &lt;code&gt;Boolean.FALSE&lt;/code&gt;.</small ><big><br>
</big><small>&nbsp;&nbsp; */</small><big><br>
</big><small>&nbsp; String OPTION_SKIP_ESCAPE_URI = "SKIP_ESCAPE_URI";</small><br>
</blockquote>
<br>
Thomas Kuhn wrote:
<blockquote cite="mid:f8aj9h$v4n$1@build.eclipse.org" type="cite">Hi
Martin,
<br>
<br>
below the complete stack trace.
<br>
<br>
Thanks,
<br>
<br>
Thomas
<br>
<br>
Exception in thread "main"
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
reference to entity "query1" must end with the ';' delimiter.
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
ch.thomaskuhn.library_test.RetrieveData.main(RetrieveData.ja va:39)
<br>
Caused by: org.xml.sax.SAXParseException: The reference to entity
"query1" must end with the ';' delimiter.
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExc eption(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknow n
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAt tribute(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at javax.xml.parsers.SAXParser.parse(Unknown Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;... 4 moreException in thread "main"
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
reference to entity "query1" must end with the ';' delimiter.
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
ch.thomaskuhn.library_test.RetrieveData.main(RetrieveData.ja va:39)
<br>
Caused by: org.xml.sax.SAXParseException: The reference to entity
"query1" must end with the ';' delimiter.
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExc eption(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknow n
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAt tribute(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at javax.xml.parsers.SAXParser.parse(Unknown Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;... 4 more
<br>
<br>
Martin Taal wrote:
<br>
<blockquote type="cite">Hi Thomas,
<br>
Can you post the complete stacktrace? I mean is there an underlying sax
(or other) exception?
<br>
<br>
gr. Martin
<br>
<br>
Thomas Kuhn wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
I have a problem when I try to deserialize a XMI that contains Teneo
Proxies:
<br>
<br>
&nbsp; ResourceSet rs = new ResourceSetImpl();
<br>
&nbsp; Resource teneoRes = rs.createResource(
<br>
&nbsp;&nbsp;&nbsp; URI.createURI("hibernate://?dsname=library&amp;query1=from Book"));
<br>
&nbsp; teneoRes.load(null);
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Resource xmiStoreRes = rs.createResource(
<br>
&nbsp;&nbsp;&nbsp; URI.createFileURI("transfer.xmi"));
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; xmiStoreRes.getContents().addAll(teneoRes.getContents());
<br>
&nbsp; xmiStoreRes.save(null);
<br>
<br>
&nbsp; Resource xmiLoadRes = rs.createResource(
<br>
&nbsp;&nbsp;&nbsp; URI.createFileURI("transfer.xmi"));
<br>
&nbsp; xmiLoadRes.load(null);
<br>
<br>
<br>
results in:
<br>
<br>
&nbsp; Exception in thread "main"
<br>
&nbsp; org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
<br>
&nbsp; reference to entity "query1" must end with the ';' delimiter.
<br>
&nbsp; at
org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
<br>
<br>
the saved xmi looks like this:
<br>
<br>
&nbsp; &lt;?xml version="1.0" encoding="ASCII"?&gt;
<br>
&nbsp; &lt;xmi:XMI xmi:version="2.0" xmlns:xmi=<a class="moz-txt-link-rfc2396E" href="http://www.omg.org/XMI">"http://www.omg.org/XMI"</a>
xmlns:org.eclipse.example.library=<a class="moz-txt-link-rfc2396E" href="http:///org/eclipse/example/library.ecore">"http:///org/eclipse/example/library.ecore"</a>&gt;
<br>
&nbsp;&nbsp;&nbsp; &lt;org.eclipse.example.library:Book title="b1" id="196608"&gt;
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;titlePage href="hibernate://?dsname=library&amp;query1=from
Book#TitlePage|id=131072"/&gt;
<br>
&nbsp;&nbsp;&nbsp; &lt;/org.eclipse.example.library:Book&gt;
<br>
&nbsp;&nbsp;&nbsp; &lt;org.eclipse.example.library:Book title="b2" id="196609"&gt;
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;author href="hibernate://?dsname=library&amp;query1=from
Book#Writer|id=163840"/&gt;
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;titlePage href="hibernate://?dsname=library&amp;query1=from
Book#TitlePage|id=131073"/&gt;
<br>
&nbsp;&nbsp;&nbsp; &lt;/org.eclipse.example.library:Book&gt;
<br>
&nbsp; &lt;/xmi:XMI&gt;
<br>
<br>
<br>
Thanks in advance,
<br>
<br>
Tom.
<br>
</blockquote>
<br>
<br>
</blockquote>
</blockquote>
<br>
</body>
</html>

--------------060807090600030702080102--
Re: [Teneo] can't deserialize EObjects which contain Teneo proxies [message #92016 is a reply to message #92001] Sat, 28 July 2007 14:15 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse_news.firstnamelastname.ch

Hi Ed,

It works!

Thanks a lot,

Tom.

Ed Merks wrote:
> Thomas,
>
> Probably you need to use this option if your URIs contain characters
> with special XML meaning...
>
> /**
> * Skip escaping special characters, such as '&' char, in URIs
> during XML serialization.
> * The default is <code>Boolean.TRUE</code>. To enforce escaping
> special characters, set this
> * option to <code>Boolean.FALSE</code>.
> */
> String OPTION_SKIP_ESCAPE_URI = "SKIP_ESCAPE_URI";
>
>
> Thomas Kuhn wrote:
>> Hi Martin,
>>
>> below the complete stack trace.
>>
>> Thanks,
>>
>> Thomas
>>
>> Exception in thread "main"
>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
>> reference to entity "query1" must end with the ';' delimiter.
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>
>> at ch.thomaskuhn.library_test.RetrieveData.main(RetrieveData.ja va:39)
>> Caused by: org.xml.sax.SAXParseException: The reference to entity
>> "query1" must end with the ';' delimiter.
>> at
>> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExc eption(Unknown
>> Source)
>> at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknow n
>> Source)
>> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>> Source)
>> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>> Source)
>> at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
>> at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAt tribute(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
>> Source)
>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>> ... 4 moreException in thread "main"
>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
>> reference to entity "query1" must end with the ';' delimiter.
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>
>> at ch.thomaskuhn.library_test.RetrieveData.main(RetrieveData.ja va:39)
>> Caused by: org.xml.sax.SAXParseException: The reference to entity
>> "query1" must end with the ';' delimiter.
>> at
>> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExc eption(Unknown
>> Source)
>> at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknow n
>> Source)
>> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>> Source)
>> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>> Source)
>> at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
>> at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAt tribute(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
>> Source)
>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>> ... 4 more
>>
>> Martin Taal wrote:
>>> Hi Thomas,
>>> Can you post the complete stacktrace? I mean is there an underlying
>>> sax (or other) exception?
>>>
>>> gr. Martin
>>>
>>> Thomas Kuhn wrote:
>>>> Hi,
>>>>
>>>> I have a problem when I try to deserialize a XMI that contains Teneo
>>>> Proxies:
>>>>
>>>> ResourceSet rs = new ResourceSetImpl();
>>>> Resource teneoRes = rs.createResource(
>>>> URI.createURI("hibernate://?dsname=library&query1=from Book"));
>>>> teneoRes.load(null);
>>>> Resource xmiStoreRes = rs.createResource(
>>>> URI.createFileURI("transfer.xmi"));
>>>> xmiStoreRes.getContents().addAll(teneoRes.getContents());
>>>> xmiStoreRes.save(null);
>>>>
>>>> Resource xmiLoadRes = rs.createResource(
>>>> URI.createFileURI("transfer.xmi"));
>>>> xmiLoadRes.load(null);
>>>>
>>>>
>>>> results in:
>>>>
>>>> Exception in thread "main"
>>>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
>>>> reference to entity "query1" must end with the ';' delimiter.
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
>>>>
>>>> the saved xmi looks like this:
>>>>
>>>> <?xml version="1.0" encoding="ASCII"?>
>>>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>>>> xmlns:org.eclipse.example.library="http:///org/eclipse/example/library.ecore">
>>>>
>>>> <org.eclipse.example.library:Book title="b1" id="196608">
>>>> <titlePage href="hibernate://?dsname=library&query1=from
>>>> Book#TitlePage|id=131072"/>
>>>> </org.eclipse.example.library:Book>
>>>> <org.eclipse.example.library:Book title="b2" id="196609">
>>>> <author href="hibernate://?dsname=library&query1=from
>>>> Book#Writer|id=163840"/>
>>>> <titlePage href="hibernate://?dsname=library&query1=from
>>>> Book#TitlePage|id=131073"/>
>>>> </org.eclipse.example.library:Book>
>>>> </xmi:XMI>
>>>>
>>>>
>>>> Thanks in advance,
>>>>
>>>> Tom.
>>>
>>>
>
Re: [Teneo] can't deserialize EObjects which contain Teneo proxies [message #608928 is a reply to message #91780] Thu, 26 July 2007 06:13 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Thomas,
Can you post the complete stacktrace? I mean is there an underlying sax (or other) exception?

gr. Martin

Thomas Kuhn wrote:
> Hi,
>
> I have a problem when I try to deserialize a XMI that contains Teneo
> Proxies:
>
> ResourceSet rs = new ResourceSetImpl();
> Resource teneoRes = rs.createResource(
> URI.createURI("hibernate://?dsname=library&query1=from Book"));
> teneoRes.load(null);
>
> Resource xmiStoreRes = rs.createResource(
> URI.createFileURI("transfer.xmi"));
>
> xmiStoreRes.getContents().addAll(teneoRes.getContents());
> xmiStoreRes.save(null);
>
> Resource xmiLoadRes = rs.createResource(
> URI.createFileURI("transfer.xmi"));
> xmiLoadRes.load(null);
>
>
> results in:
>
> Exception in thread "main"
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
> reference to entity "query1" must end with the ';' delimiter.
> at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
>
> the saved xmi looks like this:
>
> <?xml version="1.0" encoding="ASCII"?>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:org.eclipse.example.library="http:///org/eclipse/example/library.ecore">
>
> <org.eclipse.example.library:Book title="b1" id="196608">
> <titlePage href="hibernate://?dsname=library&query1=from
> Book#TitlePage|id=131072"/>
> </org.eclipse.example.library:Book>
> <org.eclipse.example.library:Book title="b2" id="196609">
> <author href="hibernate://?dsname=library&query1=from
> Book#Writer|id=163840"/>
> <titlePage href="hibernate://?dsname=library&query1=from
> Book#TitlePage|id=131073"/>
> </org.eclipse.example.library:Book>
> </xmi:XMI>
>
>
> Thanks in advance,
>
> Tom.


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo] can't deserialize EObjects which contain Teneo proxies [message #608941 is a reply to message #91872] Thu, 26 July 2007 16:48 Go to previous message
Thomas Kuhn is currently offline Thomas KuhnFriend
Messages: 9
Registered: July 2009
Junior Member
Hi Martin,

below the complete stack trace.

Thanks,

Thomas

Exception in thread "main"
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
reference to entity "query1" must end with the ';' delimiter.
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
at ch.thomaskuhn.library_test.RetrieveData.main(RetrieveData.ja va:39)
Caused by: org.xml.sax.SAXParseException: The reference to entity
"query1" must end with the ';' delimiter.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExc eption(Unknown
Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknow n Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAt tribute(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
... 4 moreException in thread "main"
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
reference to entity "query1" must end with the ';' delimiter.
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
at ch.thomaskuhn.library_test.RetrieveData.main(RetrieveData.ja va:39)
Caused by: org.xml.sax.SAXParseException: The reference to entity
"query1" must end with the ';' delimiter.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExc eption(Unknown
Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknow n Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAt tribute(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
... 4 more

Martin Taal wrote:
> Hi Thomas,
> Can you post the complete stacktrace? I mean is there an underlying sax
> (or other) exception?
>
> gr. Martin
>
> Thomas Kuhn wrote:
>> Hi,
>>
>> I have a problem when I try to deserialize a XMI that contains Teneo
>> Proxies:
>>
>> ResourceSet rs = new ResourceSetImpl();
>> Resource teneoRes = rs.createResource(
>> URI.createURI("hibernate://?dsname=library&query1=from Book"));
>> teneoRes.load(null);
>> Resource xmiStoreRes = rs.createResource(
>> URI.createFileURI("transfer.xmi"));
>> xmiStoreRes.getContents().addAll(teneoRes.getContents());
>> xmiStoreRes.save(null);
>>
>> Resource xmiLoadRes = rs.createResource(
>> URI.createFileURI("transfer.xmi"));
>> xmiLoadRes.load(null);
>>
>>
>> results in:
>>
>> Exception in thread "main"
>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
>> reference to entity "query1" must end with the ';' delimiter.
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
>>
>> the saved xmi looks like this:
>>
>> <?xml version="1.0" encoding="ASCII"?>
>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:org.eclipse.example.library="http:///org/eclipse/example/library.ecore">
>>
>> <org.eclipse.example.library:Book title="b1" id="196608">
>> <titlePage href="hibernate://?dsname=library&query1=from
>> Book#TitlePage|id=131072"/>
>> </org.eclipse.example.library:Book>
>> <org.eclipse.example.library:Book title="b2" id="196609">
>> <author href="hibernate://?dsname=library&query1=from
>> Book#Writer|id=163840"/>
>> <titlePage href="hibernate://?dsname=library&query1=from
>> Book#TitlePage|id=131073"/>
>> </org.eclipse.example.library:Book>
>> </xmi:XMI>
>>
>>
>> Thanks in advance,
>>
>> Tom.
>
>
Re: [Teneo] can't deserialize EObjects which contain Teneo proxies [message #608947 is a reply to message #91951] Thu, 26 July 2007 18:31 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------060807090600030702080102
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Thomas,

Probably you need to use this option if your URIs contain characters
with special XML meaning...

/**
* Skip escaping special characters, such as '&' char, in URIs
during XML serialization.
* The default is <code>Boolean.TRUE</code>. To enforce escaping
special characters, set this
* option to <code>Boolean.FALSE</code>.
*/
String OPTION_SKIP_ESCAPE_URI = "SKIP_ESCAPE_URI";


Thomas Kuhn wrote:
> Hi Martin,
>
> below the complete stack trace.
>
> Thanks,
>
> Thomas
>
> Exception in thread "main"
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
> reference to entity "query1" must end with the ';' delimiter.
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>
> at ch.thomaskuhn.library_test.RetrieveData.main(RetrieveData.ja va:39)
> Caused by: org.xml.sax.SAXParseException: The reference to entity
> "query1" must end with the ';' delimiter.
> at
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExc eption(Unknown
> Source)
> at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknow n
> Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> Source)
> at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
> at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAt tribute(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
> Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> at javax.xml.parsers.SAXParser.parse(Unknown Source)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
> ... 4 moreException in thread "main"
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
> reference to entity "query1" must end with the ';' delimiter.
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>
> at ch.thomaskuhn.library_test.RetrieveData.main(RetrieveData.ja va:39)
> Caused by: org.xml.sax.SAXParseException: The reference to entity
> "query1" must end with the ';' delimiter.
> at
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExc eption(Unknown
> Source)
> at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknow n
> Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> Source)
> at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
> at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAt tribute(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
> Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> at javax.xml.parsers.SAXParser.parse(Unknown Source)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
> ... 4 more
>
> Martin Taal wrote:
>> Hi Thomas,
>> Can you post the complete stacktrace? I mean is there an underlying
>> sax (or other) exception?
>>
>> gr. Martin
>>
>> Thomas Kuhn wrote:
>>> Hi,
>>>
>>> I have a problem when I try to deserialize a XMI that contains Teneo
>>> Proxies:
>>>
>>> ResourceSet rs = new ResourceSetImpl();
>>> Resource teneoRes = rs.createResource(
>>> URI.createURI("hibernate://?dsname=library&query1=from Book"));
>>> teneoRes.load(null);
>>> Resource xmiStoreRes = rs.createResource(
>>> URI.createFileURI("transfer.xmi"));
>>> xmiStoreRes.getContents().addAll(teneoRes.getContents());
>>> xmiStoreRes.save(null);
>>>
>>> Resource xmiLoadRes = rs.createResource(
>>> URI.createFileURI("transfer.xmi"));
>>> xmiLoadRes.load(null);
>>>
>>>
>>> results in:
>>>
>>> Exception in thread "main"
>>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
>>> reference to entity "query1" must end with the ';' delimiter.
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
>>>
>>> the saved xmi looks like this:
>>>
>>> <?xml version="1.0" encoding="ASCII"?>
>>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>>> xmlns:org.eclipse.example.library="http:///org/eclipse/example/library.ecore">
>>>
>>> <org.eclipse.example.library:Book title="b1" id="196608">
>>> <titlePage href="hibernate://?dsname=library&query1=from
>>> Book#TitlePage|id=131072"/>
>>> </org.eclipse.example.library:Book>
>>> <org.eclipse.example.library:Book title="b2" id="196609">
>>> <author href="hibernate://?dsname=library&query1=from
>>> Book#Writer|id=163840"/>
>>> <titlePage href="hibernate://?dsname=library&query1=from
>>> Book#TitlePage|id=131073"/>
>>> </org.eclipse.example.library:Book>
>>> </xmi:XMI>
>>>
>>>
>>> Thanks in advance,
>>>
>>> Tom.
>>
>>


--------------060807090600030702080102
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thomas,<br>
<br>
Probably you need to use this option if&nbsp; your URIs contain characters
with special XML meaning...<small><br>
</small>
<blockquote><small>&nbsp; /**</small><big><br>
</big><small>&nbsp;&nbsp; * Skip escaping special characters, such as '&amp;'
char, in URIs during XML serialization.</small><big><br>
</big><small>&nbsp;&nbsp; * The default is
&lt;code&gt;Boolean.TRUE&lt;/code&gt;. To enforce escaping special
characters, set this </small><big><br>
</big><small>&nbsp;&nbsp; * option to &lt;code&gt;Boolean.FALSE&lt;/code&gt;.</small ><big><br>
</big><small>&nbsp;&nbsp; */</small><big><br>
</big><small>&nbsp; String OPTION_SKIP_ESCAPE_URI = "SKIP_ESCAPE_URI";</small><br>
</blockquote>
<br>
Thomas Kuhn wrote:
<blockquote cite="mid:f8aj9h$v4n$1@build.eclipse.org" type="cite">Hi
Martin,
<br>
<br>
below the complete stack trace.
<br>
<br>
Thanks,
<br>
<br>
Thomas
<br>
<br>
Exception in thread "main"
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
reference to entity "query1" must end with the ';' delimiter.
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
ch.thomaskuhn.library_test.RetrieveData.main(RetrieveData.ja va:39)
<br>
Caused by: org.xml.sax.SAXParseException: The reference to entity
"query1" must end with the ';' delimiter.
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExc eption(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknow n
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAt tribute(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at javax.xml.parsers.SAXParser.parse(Unknown Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;... 4 moreException in thread "main"
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
reference to entity "query1" must end with the ';' delimiter.
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
ch.thomaskuhn.library_test.RetrieveData.main(RetrieveData.ja va:39)
<br>
Caused by: org.xml.sax.SAXParseException: The reference to entity
"query1" must end with the ';' delimiter.
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExc eption(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknow n
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAt tribute(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at javax.xml.parsers.SAXParser.parse(Unknown Source)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
<br>
&nbsp;&nbsp;&nbsp;&nbsp;... 4 more
<br>
<br>
Martin Taal wrote:
<br>
<blockquote type="cite">Hi Thomas,
<br>
Can you post the complete stacktrace? I mean is there an underlying sax
(or other) exception?
<br>
<br>
gr. Martin
<br>
<br>
Thomas Kuhn wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
I have a problem when I try to deserialize a XMI that contains Teneo
Proxies:
<br>
<br>
&nbsp; ResourceSet rs = new ResourceSetImpl();
<br>
&nbsp; Resource teneoRes = rs.createResource(
<br>
&nbsp;&nbsp;&nbsp; URI.createURI("hibernate://?dsname=library&amp;query1=from Book"));
<br>
&nbsp; teneoRes.load(null);
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Resource xmiStoreRes = rs.createResource(
<br>
&nbsp;&nbsp;&nbsp; URI.createFileURI("transfer.xmi"));
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; xmiStoreRes.getContents().addAll(teneoRes.getContents());
<br>
&nbsp; xmiStoreRes.save(null);
<br>
<br>
&nbsp; Resource xmiLoadRes = rs.createResource(
<br>
&nbsp;&nbsp;&nbsp; URI.createFileURI("transfer.xmi"));
<br>
&nbsp; xmiLoadRes.load(null);
<br>
<br>
<br>
results in:
<br>
<br>
&nbsp; Exception in thread "main"
<br>
&nbsp; org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
<br>
&nbsp; reference to entity "query1" must end with the ';' delimiter.
<br>
&nbsp; at
org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
<br>
<br>
the saved xmi looks like this:
<br>
<br>
&nbsp; &lt;?xml version="1.0" encoding="ASCII"?&gt;
<br>
&nbsp; &lt;xmi:XMI xmi:version="2.0" xmlns:xmi=<a class="moz-txt-link-rfc2396E" href="http://www.omg.org/XMI">"http://www.omg.org/XMI"</a>
xmlns:org.eclipse.example.library=<a class="moz-txt-link-rfc2396E" href="http:///org/eclipse/example/library.ecore">"http:///org/eclipse/example/library.ecore"</a>&gt;
<br>
&nbsp;&nbsp;&nbsp; &lt;org.eclipse.example.library:Book title="b1" id="196608"&gt;
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;titlePage href="hibernate://?dsname=library&amp;query1=from
Book#TitlePage|id=131072"/&gt;
<br>
&nbsp;&nbsp;&nbsp; &lt;/org.eclipse.example.library:Book&gt;
<br>
&nbsp;&nbsp;&nbsp; &lt;org.eclipse.example.library:Book title="b2" id="196609"&gt;
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;author href="hibernate://?dsname=library&amp;query1=from
Book#Writer|id=163840"/&gt;
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;titlePage href="hibernate://?dsname=library&amp;query1=from
Book#TitlePage|id=131073"/&gt;
<br>
&nbsp;&nbsp;&nbsp; &lt;/org.eclipse.example.library:Book&gt;
<br>
&nbsp; &lt;/xmi:XMI&gt;
<br>
<br>
<br>
Thanks in advance,
<br>
<br>
Tom.
<br>
</blockquote>
<br>
<br>
</blockquote>
</blockquote>
<br>
</body>
</html>

--------------060807090600030702080102--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Teneo] can't deserialize EObjects which contain Teneo proxies [message #608950 is a reply to message #92001] Sat, 28 July 2007 14:15 Go to previous message
Thomas Kuhn is currently offline Thomas KuhnFriend
Messages: 9
Registered: July 2009
Junior Member
Hi Ed,

It works!

Thanks a lot,

Tom.

Ed Merks wrote:
> Thomas,
>
> Probably you need to use this option if your URIs contain characters
> with special XML meaning...
>
> /**
> * Skip escaping special characters, such as '&' char, in URIs
> during XML serialization.
> * The default is <code>Boolean.TRUE</code>. To enforce escaping
> special characters, set this
> * option to <code>Boolean.FALSE</code>.
> */
> String OPTION_SKIP_ESCAPE_URI = "SKIP_ESCAPE_URI";
>
>
> Thomas Kuhn wrote:
>> Hi Martin,
>>
>> below the complete stack trace.
>>
>> Thanks,
>>
>> Thomas
>>
>> Exception in thread "main"
>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
>> reference to entity "query1" must end with the ';' delimiter.
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>
>> at ch.thomaskuhn.library_test.RetrieveData.main(RetrieveData.ja va:39)
>> Caused by: org.xml.sax.SAXParseException: The reference to entity
>> "query1" must end with the ';' delimiter.
>> at
>> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExc eption(Unknown
>> Source)
>> at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknow n
>> Source)
>> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>> Source)
>> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>> Source)
>> at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
>> at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAt tribute(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
>> Source)
>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>> ... 4 moreException in thread "main"
>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
>> reference to entity "query1" must end with the ';' delimiter.
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>
>> at ch.thomaskuhn.library_test.RetrieveData.main(RetrieveData.ja va:39)
>> Caused by: org.xml.sax.SAXParseException: The reference to entity
>> "query1" must end with the ';' delimiter.
>> at
>> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExc eption(Unknown
>> Source)
>> at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknow n
>> Source)
>> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>> Source)
>> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>> Source)
>> at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
>> at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAt tribute(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(Unknown
>> Source)
>> at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(Unknown
>> Source)
>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>> ... 4 more
>>
>> Martin Taal wrote:
>>> Hi Thomas,
>>> Can you post the complete stacktrace? I mean is there an underlying
>>> sax (or other) exception?
>>>
>>> gr. Martin
>>>
>>> Thomas Kuhn wrote:
>>>> Hi,
>>>>
>>>> I have a problem when I try to deserialize a XMI that contains Teneo
>>>> Proxies:
>>>>
>>>> ResourceSet rs = new ResourceSetImpl();
>>>> Resource teneoRes = rs.createResource(
>>>> URI.createURI("hibernate://?dsname=library&query1=from Book"));
>>>> teneoRes.load(null);
>>>> Resource xmiStoreRes = rs.createResource(
>>>> URI.createFileURI("transfer.xmi"));
>>>> xmiStoreRes.getContents().addAll(teneoRes.getContents());
>>>> xmiStoreRes.save(null);
>>>>
>>>> Resource xmiLoadRes = rs.createResource(
>>>> URI.createFileURI("transfer.xmi"));
>>>> xmiLoadRes.load(null);
>>>>
>>>>
>>>> results in:
>>>>
>>>> Exception in thread "main"
>>>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The
>>>> reference to entity "query1" must end with the ';' delimiter.
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:199)
>>>>
>>>> the saved xmi looks like this:
>>>>
>>>> <?xml version="1.0" encoding="ASCII"?>
>>>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>>>> xmlns:org.eclipse.example.library="http:///org/eclipse/example/library.ecore">
>>>>
>>>> <org.eclipse.example.library:Book title="b1" id="196608">
>>>> <titlePage href="hibernate://?dsname=library&query1=from
>>>> Book#TitlePage|id=131072"/>
>>>> </org.eclipse.example.library:Book>
>>>> <org.eclipse.example.library:Book title="b2" id="196609">
>>>> <author href="hibernate://?dsname=library&query1=from
>>>> Book#Writer|id=163840"/>
>>>> <titlePage href="hibernate://?dsname=library&query1=from
>>>> Book#TitlePage|id=131073"/>
>>>> </org.eclipse.example.library:Book>
>>>> </xmi:XMI>
>>>>
>>>>
>>>> Thanks in advance,
>>>>
>>>> Tom.
>>>
>>>
>
Previous Topic:Fail to reload model
Next Topic:JpoxStoreException:Exception when determining refers to
Goto Forum:
  


Current Time: Fri Apr 19 07:33:34 GMT 2024

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

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

Back to the top