Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » problems configuring CDO Hibernate store with Oracle database
problems configuring CDO Hibernate store with Oracle database [message #740165] Tue, 18 October 2011 04:19 Go to next message
Dmitry  is currently offline Dmitry
Messages: 3
Registered: October 2011
Junior Member
Hi everybody.
Does anyone have an experience of configuring CDO Hibernate store with Orcale 10g?
I've met some problems here.
When I start the server on a clean database, it fails with this stacktrace:

47270 [app thread - org.eclipse.emf.cdo.server.app.0] DEBUG org.hibernate.SQL - insert into wazdev240_e2am_usr.cdo_package_unit (originalType, timeStamp, EPackageBlob, nsUri) values (?, ?, ?, ?)
Hibernate: insert into wazdev240_e2am_usr.cdo_package_unit (originalType, timeStamp, EPackageBlob, nsUri) values (?, ?, ?, ?)
java.lang.ClassCastException: $Proxy4 cannot be cast to oracle.sql.BLOB
at oracle.jdbc.driver.OraclePreparedStatement.setBlob(OraclePreparedStatement.java:6859)
at org.hibernate.type.descriptor.sql.BlobTypeDescriptor$1.doBind(BlobTypeDescriptor.java:65)
at org.hibernate.type.descriptor.sql.BasicBinder.bind(BasicBinder.java:89)
at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:282)
at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:277)
at org.hibernate.type.AbstractSingleColumnStandardBasicType.nullSafeSet(AbstractSingleColumnStandardBasicType.java:85)
at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2166)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2412)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2856)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
at org.eclipse.emf.cdo.server.internal.hibernate.HibernatePackageHandler.writePackageUnits(HibernatePackageHandler.java:106)
at org.eclipse.emf.cdo.server.internal.hibernate.HibernatePackageHandler.writePackageUnits(HibernatePackageHandler.java:199)
at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStoreAccessor.writePackageUnits(HibernateStoreAccessor.java:829)
at org.eclipse.emf.cdo.internal.server.Repository.initSystemPackages(Repository.java:1394)
at org.eclipse.emf.cdo.internal.server.Repository.doActivate(Repository.java:1573)
at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:72)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:99)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:89)
at org.eclipse.emf.cdo.server.CDOServerUtil.addRepository(CDOServerUtil.java:201)
at org.eclipse.emf.cdo.spi.server.RepositoryConfigurator.configure(RepositoryConfigurator.java:110)
at org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplication.doStart(CDOServerApplication.java:61)
at org.eclipse.net4j.util.om.OSGiApplication.start(OSGiApplication.java:61)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:26)
at java.lang.Thread.run(Thread.java:619)

If I restart the server after that, it rises normally. But I can see some tables missed (comparing with CDO+MySQL bundle). And I get NPE on client if trying to operate with a new transaction in CDO explorer. But I don't see any errors in server log.

Any ideas, folks?
Re: problems configuring CDO Hibernate store with Oracle database [message #740174 is a reply to message #740165] Tue, 18 October 2011 04:30 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal Karaca
Messages: 729
Registered: July 2009
Senior Member
There is an experimental Oracle db adapter which enables Oracle as backend storage without using hibernate:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=270428

I have used it and it works for me.
Re: problems configuring CDO Hibernate store with Oracle database [message #740271 is a reply to message #740174] Tue, 18 October 2011 06:30 Go to previous messageGo to next message
Dmitry  is currently offline Dmitry
Messages: 3
Registered: October 2011
Junior Member
Thank you, I've tried it out, but got this exception on startup:

app thread - org.eclipse.emf.cdo.server.app.0 [debug.lifecycle] Activating DBStore@5
[ERROR] Problem with table cdo_lobs: SELECT id, size, bdata, cdata FROM cdo_lobs
org.eclipse.net4j.db.DBException: Problem with table cdo_lobs: SELECT id, size, bdata, cdata FROM cdo_lobs
at org.eclipse.net4j.spi.db.DBAdapter.validateTable(DBAdapter.java:439)
at org.eclipse.net4j.spi.db.DBAdapter.createTable(DBAdapter.java:146)
at org.eclipse.net4j.spi.db.DBAdapter.createTables(DBAdapter.java:111)
at org.eclipse.net4j.spi.db.DBSchema.create(DBSchema.java:118)
at org.eclipse.emf.cdo.server.internal.db.DBStore.doActivate(DBStore.java:521)
at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:72)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:99)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:89)
at org.eclipse.emf.cdo.internal.server.Repository.doActivate(Repository.java:1543)
at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:72)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:99)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:89)
at org.eclipse.emf.cdo.server.CDOServerUtil.addRepository(CDOServerUtil.java:201)
at org.eclipse.emf.cdo.spi.server.RepositoryConfigurator.configure(RepositoryConfigurator.java:110)
at org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplication.doStart(CDOServerApplication.java:61)
at org.eclipse.net4j.util.om.OSGiApplication.start(OSGiApplication.java:61)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:26)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.sql.SQLException: ORA-00936: missing expression

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:801)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:841)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1274)
at org.eclipse.net4j.spi.db.DBAdapter.validateTable(DBAdapter.java:428)
... 18 more

Should I create the tables by hands before running the cdo server, or what?
Re: problems configuring CDO Hibernate store with Oracle database [message #740282 is a reply to message #740271] Tue, 18 October 2011 06:44 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal Karaca
Messages: 729
Registered: July 2009
Senior Member
There are some patches that you have to apply to your checked out CDO sources. AFAIK, in this case, 'size' is not a valid column name in Oracle.


- https://bugs.eclipse.org/bugs/show_bug.cgi?id=344232
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=344233
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=344805 (may be optional)
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=349689 (may be optional)
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=350036 (may be optional)

Once you apply the patches attached to the bug reports, it should work...
Re: problems configuring CDO Hibernate store with Oracle database [message #948680 is a reply to message #740165] Thu, 18 October 2012 05:02 Go to previous message
Silvestre Martins is currently offline Silvestre Martins
Messages: 41
Registered: July 2009
Member

Hello,

the first 2 bugs, which includes the one that is being reported on this thread about the column with name 'size', doesn't have any patch attached.
Does someone has the patch that could attach it to the bugzilla?

Thanks in advance.
Silvestre

Previous Topic:Re: Couple Graphiti Editor with XText DSL
Next Topic:[CDO] Evaluating CDO
Goto Forum:
  


Current Time: Fri Aug 01 01:57:25 EDT 2014

Powered by FUDForum. Page generated in 0.01633 seconds