Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo]Multiple inheritance with multi-valued EReferences in second inherited class fails
[Teneo]Multiple inheritance with multi-valued EReferences in second inherited class fails [message #603605] Wed, 14 March 2007 12:26
Michael Kanaley is currently offline Michael KanaleyFriend
Messages: 89
Registered: July 2009
Member
Multiple inheritance works fine except when the second (or after) inherited
class has a multi-valued EReference.
I have attached a bundle that you can directly import into Eclipse.
I have removed hibernate and other third party JARs to keep the attachment
small so it will not run until you put all the jars in the lib directory. I
can send you the exact versions if necessary.
It will add a launcher called InheritanceTests.

These tests will fail with a "Could not execute JDBC batch update" exception
which I have included at the bottom of this message.

In this model, a model object called SomeResource extends SomeBaseClass and
SomeOtherBaseClass (in that order). SomeOtherBaseClass has a multi-valued
EReference property called "nameValuePairs" which is an EList of
NameValuePair objects. If you reverse the order of inheritance or remove the
nameValuePairs property then the tests will pass fine.

This test uses Teneo 0.8.0 with HSQLDB. The test suites will dynamically
remove the DB if it exists and regenerate it before each test.

If this is determined to be a bug, it would be great if this fix could also
be applied to a Teneo 0.7.5 release as well.

Thanks for all the work you put into this effort - IMO, it really makes EMF
viable.
-mike
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch
update

at
org.hibernate.exception.SQLStateConverter.handledNonSpecific Exception(SQLStateConverter.java:103)

at
org.hibernate.exception.SQLStateConverter.convert(SQLStateCo nverter.java:91)

at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExce ptionHelper.java:43)

at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatc her.java:249)

at org.hibernate.engine.ActionQueue.executeActions(ActionQueue. java:235)

at org.hibernate.engine.ActionQueue.executeActions(ActionQueue. java:143)

at
org.hibernate.event.def.AbstractFlushingEventListener.perfor mExecutions(AbstractFlushingEventListener.java:298)

at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(De faultFlushEventListener.java:27)

at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)

at
org.eclipse.emf.teneo.hibernate.resource.HibernateResource.s aveResource(HibernateResource.java:244)

at org.eclipse.emf.teneo.resource.StoreResource.save(StoreResou rce.java:365)

at
test.teneo.inheritance.InheritanceTests.testSavingAuthorizab les(InheritanceTests.java:96)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at junit.framework.TestCase.runTest(TestCase.java:154)

at junit.framework.TestCase.runBare(TestCase.java:127)

at junit.framework.TestResult$1.protect(TestResult.java:106)

at junit.framework.TestResult.runProtected(TestResult.java:124)

at junit.framework.TestResult.run(TestResult.java:109)

at junit.framework.TestCase.run(TestCase.java:118)

at junit.framework.TestSuite.runTest(TestSuite.java:208)

at junit.framework.TestSuite.run(TestSuite.java:203)

at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:128)

at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)

at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:460)

at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:673)

at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:386)

at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:196)

Caused by: java.sql.BatchUpdateException: failed batch

at org.hsqldb.jdbc.jdbcStatement.executeBatch(Unknown Source)

at org.hsqldb.jdbc.jdbcPreparedStatement.executeBatch(Unknown Source)

at
org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBa tcher.java:48)

at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatc her.java:242)

.... 26 more


Previous Topic:Query by Class question and potential problem
Next Topic:[Teneo] Problem mapping Ecore package
Goto Forum:
  


Current Time: Fri Oct 23 12:40:27 GMT 2020

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

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

Back to the top