Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Teneo]: Two issues with version 1.0.1
[Teneo]: Two issues with version 1.0.1 [message #425978] Mon, 15 December 2008 08:59 Go to next message
Matthias Treitler is currently offline Matthias TreitlerFriend
Messages: 117
Registered: July 2009
Senior Member
Hello Martin!

I upgraded my Eclipse version from 3.4 to 3.4.1 and this release also
includes an update in EMF Teneo to version 1.0.1v20080921xxx.

Without making any changes in my code I get the following two errors:

1) In my meta-model I have a containment reference to an EObject with
min=1 and max=1 cardinality. Teneo throws an Mapping exception caused by
this:

Caused by: org.xml.sax.SAXParseException: Attribute "not-null" must be
declared for element type "any".
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper. createSAXParseException(ErrorHandlerWrapper.java:195)
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper. error(ErrorHandlerWrapper.java:131)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.rep ortError(XMLErrorReporter.java:384)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.rep ortError(XMLErrorReporter.java:318)
at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. addDTDDefaultAttrsAndValidate(XMLDTDValidator.java:1275)
at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. handleStartElement(XMLDTDValidator.java:1940)
at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. startElement(XMLDTDValidator.java:764)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScanner Impl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(XMLDocumentFragmentSca nnerImpl.java:2740)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(XMLDocumentScannerImpl.java:647)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScanner Impl.next(XMLNSDocumentScannerImpl.java:140)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 508)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:807)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:737)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:107)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1205)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(SAXParserImpl.java:522)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.dom4j.io.SAXReader.read(SAXReader.java:365)
at org.hibernate.cfg.Configuration.addXML(Configuration.java:46 8)
... 46 more

2) The code below does not work any more because the internal exentsion
hash map has no ClassLoaderStrategy key! Has the usage of this extension
changed?! I have not found any changelog.

Code:
dataStore.getExtensionManager().registerExtension(ClassLoade rStrategy.class.getName(),
ClassClassLoaderStrategy.class.getName());

I need the setting of the class loader because of the issue discussed
here:
http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg05670

All issues stated above are working with Teneo version 1.0.0.v20080611xxx .

Thank you for your help,
Matthias
Re: [Teneo]: Two issues with version 1.0.1 [message #425981 is a reply to message #425978] Mon, 15 December 2008 11:58 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Matthias,
I would recommend to download the latest maintenance release of Teneo from a the 7th of December.
Can you check if the issue 1 still occurs then?

Regarding issue 2, you can do:
ClassLoaderResolver.setClassLoaderStrategy(..)

Before creating/initializing the datastore.

gr. Martin

Matthias Treitler wrote:
> Hello Martin!
>
> I upgraded my Eclipse version from 3.4 to 3.4.1 and this release also
> includes an update in EMF Teneo to version 1.0.1v20080921xxx.
>
> Without making any changes in my code I get the following two errors:
>
> 1) In my meta-model I have a containment reference to an EObject with
> min=1 and max=1 cardinality. Teneo throws an Mapping exception caused by
> this:
>
> Caused by: org.xml.sax.SAXParseException: Attribute "not-null" must be
> declared for element type "any".
> at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper. createSAXParseException(ErrorHandlerWrapper.java:195)
>
> at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper. error(ErrorHandlerWrapper.java:131)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.rep ortError(XMLErrorReporter.java:384)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.rep ortError(XMLErrorReporter.java:318)
>
> at
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. addDTDDefaultAttrsAndValidate(XMLDTDValidator.java:1275)
>
> at
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. handleStartElement(XMLDTDValidator.java:1940)

>
> at
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. startElement(XMLDTDValidator.java:764)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScanner Impl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(XMLDocumentFragmentSca nnerImpl.java:2740)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(XMLDocumentScannerImpl.java:647)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScanner Impl.next(XMLNSDocumentScannerImpl.java:140)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 508)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:807)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:737)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:107)
>
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1205)
>
> at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(SAXParserImpl.java:522)
>
> at org.dom4j.io.SAXReader.read(SAXReader.java:465)
> at org.dom4j.io.SAXReader.read(SAXReader.java:365)
> at org.hibernate.cfg.Configuration.addXML(Configuration.java:46 8)
> ... 46 more
>
> 2) The code below does not work any more because the internal exentsion
> hash map has no ClassLoaderStrategy key! Has the usage of this extension
> changed?! I have not found any changelog.
>
> Code:
> dataStore.getExtensionManager().registerExtension(ClassLoade rStrategy.class.getName(),
> ClassClassLoaderStrategy.class.getName());
>
> I need the setting of the class loader because of the issue discussed
> here:
> http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg05670
>
> All issues stated above are working with Teneo version 1.0.0.v20080611xxx .
>
> Thank you for your help,
> Matthias
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
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]: Two issues with version 1.0.1 [message #426051 is a reply to message #425981] Mon, 15 December 2008 12:38 Go to previous messageGo to next message
Matthias Treitler is currently offline Matthias TreitlerFriend
Messages: 117
Registered: July 2009
Senior Member
Hi Martin,

thank you for your quick answer!

I have upgraded to the latest milestone build of Teneo as you suggested
but the problem still remains... The same exception is thrown.
The attribute where the problem occurs: <xsd:element
ecore:resolveProxies="true" name="diagram"
teneo:appinfo="@OneToOne(fetch=LAZY)" type="xsd:anyType"/>


Regarding issue 2 I set the class loader with the following API:
ClassLoaderResolver.setClassLoaderStrategy( new ClassClassLoaderStrategy()
). Thanks!

Bye,
matthias
Re: [Teneo]: Two issues with version 1.0.1 [message #426054 is a reply to message #426051] Mon, 15 December 2008 12:58 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Matthias,
Can you enter a bugzilla for this one? It could be great if you can also add (in the bugzilla) the
small part of the hbm with the ant tag and the not-null attribute.

gr. Martin

Matthias Treitler wrote:
> Hi Martin,
>
> thank you for your quick answer!
>
> I have upgraded to the latest milestone build of Teneo as you suggested
> but the problem still remains... The same exception is thrown.
> The attribute where the problem occurs: <xsd:element
> ecore:resolveProxies="true" name="diagram"
> teneo:appinfo="@OneToOne(fetch=LAZY)" type="xsd:anyType"/>
>
>
> Regarding issue 2 I set the class loader with the following API:
> ClassLoaderResolver.setClassLoaderStrategy( new
> ClassClassLoaderStrategy() ). Thanks!
>
> Bye,
> matthias
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
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]: Two issues with version 1.0.1 [message #426057 is a reply to message #426054] Mon, 15 December 2008 13:26 Go to previous message
Matthias Treitler is currently offline Matthias TreitlerFriend
Messages: 117
Registered: July 2009
Senior Member
I have entered Bug 258806, just if someone has the same problem!

Thank you for helping,
Matthias
Previous Topic:using UUID for/in HREF
Next Topic:DnD in Sample Ecore Editor
Goto Forum:
  


Current Time: Sat Jun 06 05:47:49 GMT 2020

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

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

Back to the top