Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] DBStore postresql
[CDO] DBStore postresql [message #1388217] Thu, 26 June 2014 06:13 Go to next message
Thomas Gerlitz is currently offline Thomas GerlitzFriend
Messages: 9
Registered: November 2013
Junior Member
Hello everybody,

I started using CDO with the Hibernate/Teneo store and recently tried out the other stores that are available. One of the stores I am currently looking at is the dbstore with the postgresql dbAdapter. When importing one of my models into the repository I get the following exception:

org.eclipse.emf.cdo.util.CommitException: Rollback in DBStore: org.eclipse.net4j.db.DBException: org.postgresql.util.PSQLException: Die Typwandlung für eine Instanz von [B nach Types.BLOB ist nicht möglich. (Cannot cast an instance of [B to type Types.BLOB)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalAuditClassMapping.writeValues(HorizontalAuditClassMapping.java:428)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.writeRevision(AbstractHorizontalClassMapping.java:515)
	at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.writeRevision(DBStoreAccessor.java:590)
	at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.writeRevisions(DBStoreAccessor.java:570)
	at org.eclipse.emf.cdo.spi.server.StoreAccessor.doWrite(StoreAccessor.java:98)
	at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.write(StoreAccessorBase.java:152)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:651)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:47)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
	at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
	at org.eclipse.emf.cdo.internal.server.Repository.commitUnsynced(Repository.java:1033)
	at org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:1026)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:320)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:105)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:110)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:87)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:92)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:331)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:65)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:66)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:256)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.postgresql.util.PSQLException: Die Typwandlung für eine Instanz von [B nach Types.BLOB ist nicht möglich.
	at org.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statement.java:1724)
	at org.postgresql.jdbc3.AbstractJdbc3Statement.setObject(AbstractJdbc3Statement.java:1483)
	at org.postgresql.jdbc3g.AbstractJdbc3gStatement.setObject(AbstractJdbc3gStatement.java:47)
	at org.postgresql.jdbc4.AbstractJdbc4Statement.setObject(AbstractJdbc4Statement.java:69)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statement.java:1751)
	at org.eclipse.net4j.db.jdbc.DelegatingPreparedStatement.setObject(DelegatingPreparedStatement.java:257)
	at org.eclipse.emf.cdo.server.db.mapping.AbstractTypeMapping.doSetValue(AbstractTypeMapping.java:254)
	at org.eclipse.emf.cdo.server.db.mapping.AbstractTypeMapping.setValue(AbstractTypeMapping.java:148)
	at org.eclipse.emf.cdo.server.db.mapping.AbstractTypeMapping.setValueFromRevision(AbstractTypeMapping.java:106)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalAuditClassMapping.writeValues(HorizontalAuditClassMapping.java:408)
	... 24 more


At the same time the server throws the following exception:


	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapPackageInfos(AbstractMappingStrategy.java:637)
	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapPackageUnits(AbstractMappingStrategy.java:630)
	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.removeMapping(AbstractMappingStrategy.java:595)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalMappingStrategy.removeMapping(HorizontalMappingStrategy.java:149)
	at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.doRollback(DBStoreAccessor.java:744)
	at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.rollback(StoreAccessorBase.java:203)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.rollback(TransactionCommitContext.java:1266)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.handleException(TransactionCommitContext.java:722)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:660)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:47)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
	at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
	at org.eclipse.emf.cdo.internal.server.Repository.commitUnsynced(Repository.java:1033)
	at org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:1026)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:320)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:105)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:110)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:87)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:92)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:331)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:65)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:66)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:256)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)

!ENTRY org.eclipse.emf.cdo.server 2 0 2014-06-25 19:47:27.946
!MESSAGE Problem while rolling back the transaction
!STACK 0
java.lang.NullPointerException
	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapPackageInfos(AbstractMappingStrategy.java:637)
	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapPackageUnits(AbstractMappingStrategy.java:630)
	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.removeMapping(AbstractMappingStrategy.java:595)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalMappingStrategy.removeMapping(HorizontalMappingStrategy.java:149)
	at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.doRollback(DBStoreAccessor.java:744)
	at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.rollback(StoreAccessorBase.java:203)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.rollback(TransactionCommitContext.java:1266)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.handleException(TransactionCommitContext.java:722)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:660)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:47)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
	at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
	at org.eclipse.emf.cdo.internal.server.Repository.commitUnsynced(Repository.java:1033)
	at org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:1026)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:320)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:105)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:110)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:87)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:92)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:331)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:65)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:66)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:256)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)



Does anyone have an idea what might be wrong with my model or my configuration? The dbstore (mysql) and hibernate/teneo store work just fine with the models that I use.

I am currently using CDO 4.3.0.v20140520-18231 and PostgreSQL 9.3.

Thanks in advance!

Thomas
Re: [CDO] DBStore postresql [message #1388408 is a reply to message #1388217] Thu, 26 June 2014 11:53 Go to previous message
Per Sterner is currently offline Per SternerFriend
Messages: 91
Registered: October 2011
Member
Hi,

I have/had the same problem. Perhaps there is a real solution?

For now had to modify org.eclipse.emf.cdo.server.internal.db.mapping.CoreTypeMappings$TMBytes. Instead of DBType.BLOB I use DBType.BINARY for the FACTORY instance.
Previous Topic:[CDO] starnge error after aproximately 200 requests to db
Next Topic:MissingResourceException in Maven project
Goto Forum:
  


Current Time: Fri Aug 23 22:01:37 GMT 2019

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

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

Back to the top