Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Error running CDO server with Oracle DB(Launching CDO Server with Oracle DB)
[CDO] Error running CDO server with Oracle DB [message #1458564] Sat, 01 November 2014 14:28 Go to next message
Vitaliy Chernenko is currently offline Vitaliy ChernenkoFriend
Messages: 4
Registered: November 2014
Junior Member
I am trying to run CDO server with Oracle DB. At first launch (when Oracle DB is clear) everything goes ok and CDO server launches successfully. But when I start CDO server at the second time I get this error:

!MESSAGE ORA-00955:
--> CREATE TABLE CDO_BRANCHES (ID NUMBER(12) NOT NULL, NAME VARCHAR2(255 CHAR), BASE_ID NUMBER(12), BASE_TIME NUMBER)
!STACK 0
org.eclipse.net4j.db.DBException: ORA-00955:
--> CREATE TABLE CDO_BRANCHES (ID NUMBER(12) NOT NULL, NAME VARCHAR2(255 CHAR), BASE_ID NUMBER(12), BASE_TIME NUMBER)
at org.eclipse.net4j.db.DBUtil.execute(DBUtil.java:830)
at org.eclipse.net4j.spi.db.DBAdapter.createTable(DBAdapter.java:437)
at org.eclipse.net4j.spi.db.DBAdapter$1.visit(DBAdapter.java:378)
at org.eclipse.net4j.internal.db.ddl.delta.DBTableDelta.doAccept(DBTableDelta.java:182)
at org.eclipse.net4j.internal.db.ddl.delta.DBDelta.accept(DBDelta.java:89)
at org.eclipse.net4j.internal.db.ddl.delta.DBDelta.accept(DBDelta.java:98)
at org.eclipse.net4j.spi.db.DBAdapter.updateSchema(DBAdapter.java:420)
at org.eclipse.net4j.internal.db.DBSchemaTransaction.run(DBSchemaTransaction.java:124)
at org.eclipse.net4j.internal.db.DBSchemaTransaction.run(DBSchemaTransaction.java:1)
at org.eclipse.net4j.db.DBUtil.execute(DBUtil.java:796)
...

Looks like CDO Server is trying to re-create some tables in Oracle DB, but these tables are already there. Tried the same CDO Server with H2 database everything was ok. What am I doing wrong or am I missing some parameters for CDO Server with Oracle?
Re: [CDO] Error running CDO server with Oracle DB [message #1460177 is a reply to message #1458564] Mon, 03 November 2014 09:22 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi Vitaliy,

It seems caused by a upper/lower case issue in SQL table name, we have
had the same issue with MySQL. The work-around was to have all table
named created in upper case.
If you test, tell me if it works for you.

Best Regards.

Le 02/11/2014 02:15, Vitaliy Chernenko a écrit :
> I am trying to run CDO server with Oracle DB. At first launch (when
> Oracle DB is clear) everything goes ok and CDO server launches
> successfully. But when I start CDO server at the second time I get this
> error:
>
> !MESSAGE ORA-00955: --> CREATE TABLE CDO_BRANCHES (ID NUMBER(12) NOT
> NULL, NAME VARCHAR2(255 CHAR), BASE_ID NUMBER(12), BASE_TIME NUMBER)
> !STACK 0
> org.eclipse.net4j.db.DBException: ORA-00955: --> CREATE TABLE
> CDO_BRANCHES (ID NUMBER(12) NOT NULL, NAME VARCHAR2(255 CHAR), BASE_ID
> NUMBER(12), BASE_TIME NUMBER)
> at org.eclipse.net4j.db.DBUtil.execute(DBUtil.java:830)
> at org.eclipse.net4j.spi.db.DBAdapter.createTable(DBAdapter.java:437)
> at org.eclipse.net4j.spi.db.DBAdapter$1.visit(DBAdapter.java:378)
> at
> org.eclipse.net4j.internal.db.ddl.delta.DBTableDelta.doAccept(DBTableDelta.java:182)
>
> at
> org.eclipse.net4j.internal.db.ddl.delta.DBDelta.accept(DBDelta.java:89)
> at
> org.eclipse.net4j.internal.db.ddl.delta.DBDelta.accept(DBDelta.java:98)
> at org.eclipse.net4j.spi.db.DBAdapter.updateSchema(DBAdapter.java:420)
> at
> org.eclipse.net4j.internal.db.DBSchemaTransaction.run(DBSchemaTransaction.java:124)
>
> at
> org.eclipse.net4j.internal.db.DBSchemaTransaction.run(DBSchemaTransaction.java:1)
>
> at org.eclipse.net4j.db.DBUtil.execute(DBUtil.java:796)
> ..
>
> Looks like CDO Server is trying to re-create some tables in Oracle DB,
> but these tables are already there. Tried the same CDO Server with H2
> database everything was ok. What am I doing wrong or am I missing some
> parameters for CDO Server with Oracle?



--
Esteban Dugueperoux - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: [CDO] Error running CDO server with Oracle DB [message #1460346 is a reply to message #1460177] Mon, 03 November 2014 13:15 Go to previous messageGo to next message
Vitaliy Chernenko is currently offline Vitaliy ChernenkoFriend
Messages: 4
Registered: November 2014
Junior Member
Hi Esteban,

Thank you for the reply.
It seems that problem appears before I place my EMF Data Model in CDO Server. In my case, the following sequence of actions leads to the error:
1. Start CDO Server
2. Correctly stop CDO Server
3. Start CDO Server again
I do not even open ANY CONNECTIONS to CDO Server, just do the three steps above and get the error.
First launch of CDO Server seems to be fully correct: I can connect to it, create a model and correctly save it.

Regards,
Vitaliy
Re: [CDO] Error running CDO server with Oracle DB [message #1460442 is a reply to message #1460346] Mon, 03 November 2014 15:15 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Which releases of CDO and Oracle do you use?
And on which OS do you have this issue?

Regards.

Le 03/11/2014 14:15, Vitaliy Chernenko a écrit :
> Hi Esteban,
>
> Thank you for the reply. It seems that problem appears before I place my
> EMF Data Model in CDO Server. In my case, the following sequence of
> actions leads to the error:
> 1. Start CDO Server
> 2. Correctly stop CDO Server
> 3. Start CDO Server again
> I do not even open ANY CONNECTIONS to CDO Server, just do the three
> steps above and get the error.
> First launch of CDO Server seems to be fully correct: I can connect to
> it, create a model and correctly save it.
>
> Regards,
> Vitaliy
>



--
Esteban Dugueperoux - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: [CDO] Error running CDO server with Oracle DB [message #1461282 is a reply to message #1460442] Tue, 04 November 2014 11:51 Go to previous messageGo to next message
Vitaliy Chernenko is currently offline Vitaliy ChernenkoFriend
Messages: 4
Registered: November 2014
Junior Member
I use the following:
CDO 4.3.0.v2014520-1823
Oracle 11

I tried Windows Server 2012 R2 and Windows 7
Re: [CDO] Error running CDO server with Oracle DB [message #1701741 is a reply to message #1461282] Wed, 15 July 2015 10:39 Go to previous messageGo to next message
Stephan Hildebrandt is currently offline Stephan HildebrandtFriend
Messages: 25
Registered: July 2015
Junior Member
Hi,

are there any news about this problem? I have the same problem on Windows 7, Oracle 11 and CDO 4.4.0.v20150610-1925.


Best regards,

Stephan
Re: [CDO] Error running CDO server with Oracle DB [message #1701743 is a reply to message #1701741] Wed, 15 July 2015 10:56 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6683
Registered: July 2009
Senior Member
Am 15.07.2015 um 12:39 schrieb Stephan Hildebrandt:
> Hi,
>
> are there any news about this problem? I have the same problem on Windows 7, Oracle 11 and CDO 4.4.0.v20150610-1925.
Nobody has worked on this. Can you please set a breakpoint in
org.eclipse.net4j.internal.db.DBSchemaTransaction.getSchemaDelta() and tell us if you see unexpected differences between
oldSchema and workingCopy?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] Error running CDO server with Oracle DB [message #1727365 is a reply to message #1701743] Tue, 22 March 2016 13:08 Go to previous messageGo to next message
Tobias Schneider is currently offline Tobias SchneiderFriend
Messages: 3
Registered: March 2016
Junior Member
Hi,

We have the same problems. Are there any new infos?

Thanx and best regards
Tobias
Re: [CDO] Error running CDO server with Oracle DB [message #1727474 is a reply to message #1727365] Wed, 23 March 2016 10:06 Go to previous messageGo to next message
Tobias Schneider is currently offline Tobias SchneiderFriend
Messages: 3
Registered: March 2016
Junior Member
Hi,

i tested the method Eike said: org.eclipse.net4j.internal.db.DBSchemaTransaction.getSchemaDelta() and tell us if you see unexpected differences between oldSchema and workingCopy?

The differences are the following (missing) tables:
CDO_PACKAGE_INFOS
CDO_COMMIT_INFOS
CDO_PROPERTIES
CDO_LOBS
CDO_BRANCHES

But all tables exists in the Oracle database so i get the Oracle Error: "ORA-00955: name is already used by an existing object" because CDO tried to create the tables.

Ideas?

Tobias

Re: [CDO] Error running CDO server with Oracle DB [message #1727475 is a reply to message #1727474] Wed, 23 March 2016 10:11 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6683
Registered: July 2009
Senior Member
Am 23.03.2016 um 11:06 schrieb Tobias Schneider:
> Hi,
>
> i tested the method Eike said: org.eclipse.net4j.internal.db.DBSchemaTransaction.getSchemaDelta() and tell us if you
> see unexpected differences between oldSchema and workingCopy?
>
> The differences are the following (missing) tables:
> CDO_PACKAGE_INFOS
> CDO_COMMIT_INFOS
> CDO_PROPERTIES
> CDO_LOBS
> CDO_BRANCHES
>
> But all tables exists in the Oracle database so i get the Oracle Error: "ORA-00955: name is already used by an
> existing object" because CDO tried to create the tables.
Could it be a problem with case-sensitivity of schema element names?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] Error running CDO server with Oracle DB [message #1727600 is a reply to message #1727475] Thu, 24 March 2016 10:42 Go to previous messageGo to next message
Tobias Schneider is currently offline Tobias SchneiderFriend
Messages: 3
Registered: March 2016
Junior Member
Hello Eike,

thx for your answer. I think i found the problem.


This is part of my cdo-server.xml configuration:
<repository name="repo">
               ... some properties ...

              <store type="db">
       		       <property name="connectionKeepAlivePeriod" value="60"/>
                      <property name="readerPoolCapacity" value="20"/>
                      <property name="writerPoolCapacity" value="20"/>

      	              <mappingStrategy type="horizontal"> 
        		    <property name="qualifiedNames" value="true"/>
      		      </mappingStrategy>

      		      <dbAdapter name="oracle"/>
      		
      		      <dataSource class="oracle.jdbc.pool.OracleDataSource"
				driverType="thin"
				serverName="myserver.mydomain.de"
				portNumber="1521"
				databaseName="mysid"
				user="testuser"
				password="testpwd"/>
    	       </store>
	</repository>


Ok, while create the schema delta the framework reads the DB schema in method
org.eclipse.net4j.spi.db.DBAdapter.readSchema(Connection connection, IDBSchema schema)
. Inside the method all DB schema names are compared with the configured repository name (in my example 'repo'). But this schema do not exist in Oracle. The Oracle schema name is the DB-username (here 'testuser'). So my solution is simple: i changed
<repository name="repo">
to
<repository name="testuser">
and everything is running!

Is this a bug OR was it my mistake while configured the CDO server for Oracle?

ciao Tobias
Re: [CDO] Error running CDO server with Oracle DB [message #1727605 is a reply to message #1727600] Thu, 24 March 2016 11:59 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6683
Registered: July 2009
Senior Member
Am 24.03.2016 um 11:42 schrieb Tobias Schneider:
> Hello Eike,
>
> thx for your answer. I think i found the problem.
>
> This is part of my cdo-server.xml configuration:
>
> <repository name="repo">
> ... some properties ...
>
> <store type="db">
> <property name="connectionKeepAlivePeriod" value="60"/>
> <property name="readerPoolCapacity" value="20"/>
> <property name="writerPoolCapacity" value="20"/>
>
> <mappingStrategy type="horizontal"> <property name="qualifiedNames"
> value="true"/>
> </mappingStrategy>
>
> <dbAdapter name="oracle"/>
>
> <dataSource class="oracle.jdbc.pool.OracleDataSource"
> driverType="thin"
> serverName="myserver.mydomain.de"
> portNumber="1521"
> databaseName="mysid"
> user="testuser"
> password="testpwd"/>
> </store>
> </repository>
>
>
> Ok, while create the schema delta the framework reads the DB schema in method
> org.eclipse.net4j.spi.db.DBAdapter.readSchema(Connection connection, IDBSchema schema). Inside the method all DB
> schema names are compared with the configured repository name (in my example 'repo'). But this schema do not exist in
> Oracle. The Oracle schema name is the DB-username (here 'testuser'). So my solution is simple: i changed <repository
> name="repo"> to <repository name="testuser"> and everything is running!
Very good! I'm glad that it works now.

>
> Is this a bug OR was it my mistake while configured the CDO server for Oracle?
Apparently the latter. But I imagine this could be better addressed somewhere in CDO or Net4j DB. I remember that I
never quite understood the different (vendor) interpretations of terms such as database and schema ;-(

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:Project level model constraints
Next Topic:CDO Bulk Add doesn't show in history in CDO Explorer
Goto Forum:
  


Current Time: Mon May 13 12:20:52 GMT 2024

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

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

Back to the top