Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] MySQL database is broken after restart of CDO server
icon5.gif  [CDO] MySQL database is broken after restart of CDO server [message #1415199] Tue, 02 September 2014 09:46 Go to next message
Stefan Weise is currently offline Stefan WeiseFriend
Messages: 8
Registered: July 2009
Junior Member
We have a problem with the CDO server connecting to a MySQL database. The first startup which creates the tables is ok. But sometimes after a shutdown and a restart the CDO server detects a crash of the repository and reports the exitcode 10000. Here is the log output:

[INFO] CDO server stopping
[INFO] Net4j extension stopping
[INFO] Net4j extension stopped
[INFO] Security extension stopping
[INFO] Security extension stopped
[INFO] CDO server stopped
Start VM: /usr/bin/java
-Xms40m
-Xmx2G
-Dnet4j.config=/opt/cdo-server/config
-Dorg.eclipse.emf.cdo.server.browser.port=7777
-Dorg.osgi.service.http.port=8080
-Dosgi.console.enable.builtin=true
-Ddebug=true
-jar /opt/cdo-server/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
-os linux
-ws gtk
-arch x86_64
-showsplash
-launcher /opt/cdo-server/cdo-server
-name Cdo-server
--launcher.library /opt/cdo-server/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140116-2212/eclipse_1508.so
-startup /opt/cdo-server/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.overrideVmargs
-exitdata 10000
-debug
-console 5555
-vm /usr/bin/java
-vmargs
-Xms40m
-Xmx2G
-Dnet4j.config=/opt/cdo-server/config
-Dorg.eclipse.emf.cdo.server.browser.port=7777
-Dorg.osgi.service.http.port=8080
-Dosgi.console.enable.builtin=true
-Ddebug=true
-jar /opt/cdo-server/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar 
Install location:
    file:/opt/cdo-server/
Configuration file:
    file:/opt/cdo-server/configuration/config.ini loaded
Configuration location:
    file:/opt/cdo-server/configuration/
Framework located:
    file:/opt/cdo-server/plugins/org.eclipse.osgi_3.9.1.v20140110-1610.jar
Framework classpath:
    file:/opt/cdo-server/plugins/org.eclipse.osgi_3.9.1.v20140110-1610.jar
Splash location:
    null
Debug options:
    file:/opt/cdo-server/.options not found
Listening on port 0.0.0.0/0.0.0.0:5555 ... 
Time to load bundles: 53
Starting application: 1830
[INFO] CDO server starting
[WARN] Detected crash of repository yt_repo
[ERROR] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'cdo_repo.cdo_objects' doesn't exist
org.eclipse.net4j.db.DBException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'cdo_repo.cdo_objects' doesn't exist
        at org.eclipse.emf.cdo.server.internal.db.DBStore.visitAllTables(DBStore.java:288)
        at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalMappingStrategy.getMinLocalID(AbstractHorizontalMappingStrategy.java:467)
        at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalMappingStrategy.repairAfterCrash(AbstractHorizontalMappingStrategy.java:105)
        at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalMappingStrategy.repairAfterCrash(HorizontalMappingStrategy.java:204)
        at org.eclipse.emf.cdo.server.internal.db.DBStore.repairAfterCrash(DBStore.java:778)
        at org.eclipse.emf.cdo.server.internal.db.DBStore.reStart(DBStore.java:760)
        at org.eclipse.emf.cdo.server.internal.db.DBStore.doActivate(DBStore.java:653)
        at org.eclipse.net4j.util.lifecycle.Lifecycle.internalActivate(Lifecycle.java:76)
        at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:162)
        at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:114)
        at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:104)
        at org.eclipse.emf.cdo.internal.server.Repository.doActivate(Repository.java:1980)
        at org.eclipse.net4j.util.lifecycle.Lifecycle.internalActivate(Lifecycle.java:76)
        at org.eclipse.net4j.util.lifecycle.ShareableLifecycle.internalActivate(ShareableLifecycle.java:43)
        at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:162)
        at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:114)
        at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:104)
        at org.eclipse.emf.cdo.server.CDOServerUtil.addRepository(CDOServerUtil.java:291)
        at org.eclipse.emf.cdo.spi.server.RepositoryConfigurator.configure(RepositoryConfigurator.java:116)
        at org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplication.doStart(CDOServerApplication.java:61)
        at org.eclipse.net4j.util.om.OSGiApplication.start(OSGiApplication.java:63)
        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:745)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'cdo_repo.cdo_objects' doesn't exist
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at com.mysql.jdbc.Util.getInstance(Util.java:381)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1051)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3563)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3495)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2687)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2616)
        at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1464)
        at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalMappingStrategy$1.visitTable(AbstractHorizontalMappingStrategy.java:477)
        at org.eclipse.emf.cdo.server.internal.db.DBStore.visitAllTables(DBStore.java:272)
        ... 23 more
Start VM: /usr/bin/java
-Xms40m
-Xmx2G
-Dnet4j.config=/opt/cdo-server/config
-Dorg.eclipse.emf.cdo.server.browser.port=7777
-Dorg.osgi.service.http.port=8080
-Dosgi.console.enable.builtin=true
-Ddebug=true
-jar /opt/cdo-server/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
-os linux
-ws gtk
-arch x86_64
-showsplash
-launcher /opt/cdo-server/cdo-server
-name Cdo-server
--launcher.library /opt/cdo-server/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140116-2212/eclipse_1508.so
-startup /opt/cdo-server/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.overrideVmargs
-exitdata 0
-debug
-console 5555
-vm /usr/bin/java
-vmargs
-Xms40m
-Xmx2G
-Dnet4j.config=/opt/cdo-server/config
-Dorg.eclipse.emf.cdo.server.browser.port=7777
-Dorg.osgi.service.http.port=8080
-Dosgi.console.enable.builtin=true
-Ddebug=true
-jar /opt/cdo-server/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar 
Re: [CDO] MySQL database is broken after restart of CDO server [message #1415204 is a reply to message #1415199] Tue, 02 September 2014 10:01 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Stefan,

How exactly are you shutting your server down?

Cheers
/Eike

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


Am 02.09.2014 um 11:46 schrieb Stefan Weise:
> We have a problem with the CDO server connecting to a MySQL database. The first startup which creates the tables is
> ok. But sometimes after a shutdown and a restart the CDO server detects a crash of the repository and reports the
> exitcode 10000. Here is the log output:
>
>
> [INFO] CDO server stopping
> [INFO] Net4j extension stopping
> [INFO] Net4j extension stopped
> [INFO] Security extension stopping
> [INFO] Security extension stopped
> [INFO] CDO server stopped
> Start VM: /usr/bin/java
> -Xms40m
> -Xmx2G
> -Dnet4j.config=/opt/cdo-server/config
> -Dorg.eclipse.emf.cdo.server.browser.port=7777
> -Dorg.osgi.service.http.port=8080
> -Dosgi.console.enable.builtin=true
> -Ddebug=true
> -jar /opt/cdo-server/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
> -os linux
> -ws gtk
> -arch x86_64
> -showsplash
> -launcher /opt/cdo-server/cdo-server
> -name Cdo-server
> --launcher.library
> /opt/cdo-server/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140116-2212/eclipse_1508.so
> -startup /opt/cdo-server/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
> --launcher.overrideVmargs
> -exitdata 10000
> -debug
> -console 5555
> -vm /usr/bin/java
> -vmargs
> -Xms40m
> -Xmx2G
> -Dnet4j.config=/opt/cdo-server/config
> -Dorg.eclipse.emf.cdo.server.browser.port=7777
> -Dorg.osgi.service.http.port=8080
> -Dosgi.console.enable.builtin=true
> -Ddebug=true
> -jar /opt/cdo-server/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar Install location:
> file:/opt/cdo-server/
> Configuration file:
> file:/opt/cdo-server/configuration/config.ini loaded
> Configuration location:
> file:/opt/cdo-server/configuration/
> Framework located:
> file:/opt/cdo-server/plugins/org.eclipse.osgi_3.9.1.v20140110-1610.jar
> Framework classpath:
> file:/opt/cdo-server/plugins/org.eclipse.osgi_3.9.1.v20140110-1610.jar
> Splash location:
> null
> Debug options:
> file:/opt/cdo-server/.options not found
> Listening on port 0.0.0.0/0.0.0.0:5555 ... Time to load bundles: 53
> Starting application: 1830
> [INFO] CDO server starting
> [WARN] Detected crash of repository yt_repo
> [ERROR] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'cdo_repo.cdo_objects' doesn't exist
> org.eclipse.net4j.db.DBException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table
> 'cdo_repo.cdo_objects' doesn't exist
> at org.eclipse.emf.cdo.server.internal.db.DBStore.visitAllTables(DBStore.java:288)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalMappingStrategy.getMinLocalID(AbstractHorizontalMappingStrategy.java:467)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalMappingStrategy.repairAfterCrash(AbstractHorizontalMappingStrategy.java:105)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalMappingStrategy.repairAfterCrash(HorizontalMappingStrategy.java:204)
> at org.eclipse.emf.cdo.server.internal.db.DBStore.repairAfterCrash(DBStore.java:778)
> at org.eclipse.emf.cdo.server.internal.db.DBStore.reStart(DBStore.java:760)
> at org.eclipse.emf.cdo.server.internal.db.DBStore.doActivate(DBStore.java:653)
> at org.eclipse.net4j.util.lifecycle.Lifecycle.internalActivate(Lifecycle.java:76)
> at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:162)
> at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:114)
> at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:104)
> at org.eclipse.emf.cdo.internal.server.Repository.doActivate(Repository.java:1980)
> at org.eclipse.net4j.util.lifecycle.Lifecycle.internalActivate(Lifecycle.java:76)
> at org.eclipse.net4j.util.lifecycle.ShareableLifecycle.internalActivate(ShareableLifecycle.java:43)
> at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:162)
> at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:114)
> at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:104)
> at org.eclipse.emf.cdo.server.CDOServerUtil.addRepository(CDOServerUtil.java:291)
> at org.eclipse.emf.cdo.spi.server.RepositoryConfigurator.configure(RepositoryConfigurator.java:116)
> at org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplication.doStart(CDOServerApplication.java:61)
> at org.eclipse.net4j.util.om.OSGiApplication.start(OSGiApplication.java:63)
> 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:745)
> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'cdo_repo.cdo_objects' doesn't exist
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
> at com.mysql.jdbc.Util.getInstance(Util.java:381)
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1051)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3563)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3495)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2687)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2616)
> at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1464)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalMappingStrategy$1.visitTable(AbstractHorizontalMappingStrategy.java:477)
> at org.eclipse.emf.cdo.server.internal.db.DBStore.visitAllTables(DBStore.java:272)
> ... 23 more
> Start VM: /usr/bin/java
> -Xms40m
> -Xmx2G
> -Dnet4j.config=/opt/cdo-server/config
> -Dorg.eclipse.emf.cdo.server.browser.port=7777
> -Dorg.osgi.service.http.port=8080
> -Dosgi.console.enable.builtin=true
> -Ddebug=true
> -jar /opt/cdo-server/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
> -os linux
> -ws gtk
> -arch x86_64
> -showsplash
> -launcher /opt/cdo-server/cdo-server
> -name Cdo-server
> --launcher.library
> /opt/cdo-server/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140116-2212/eclipse_1508.so
> -startup /opt/cdo-server/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
> --launcher.overrideVmargs
> -exitdata 0
> -debug
> -console 5555
> -vm /usr/bin/java
> -vmargs
> -Xms40m
> -Xmx2G
> -Dnet4j.config=/opt/cdo-server/config
> -Dorg.eclipse.emf.cdo.server.browser.port=7777
> -Dorg.osgi.service.http.port=8080
> -Dosgi.console.enable.builtin=true
> -Ddebug=true
> -jar /opt/cdo-server/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar


Re: [CDO] MySQL database is broken after restart of CDO server [message #1415207 is a reply to message #1415204] Tue, 02 September 2014 10:10 Go to previous messageGo to next message
Stefan Weise is currently offline Stefan WeiseFriend
Messages: 8
Registered: July 2009
Junior Member
Hi Eike,

since we are on Linux we are using a script to start and stop the server. To shut the server down we are using telnet with the following command
stop() {
   echo -n "Shutting down $DAEMON"
   { echo "shutdown"; echo "close"; } | telnet localhost 5555
   echo $!
}


This works when we call it manually. But when we restart the server this will fail with the described message.

Regards,
Stefan
Re: [CDO] MySQL database is broken after restart of CDO server [message #1415210 is a reply to message #1415207] Tue, 02 September 2014 10:18 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 02.09.2014 um 12:10 schrieb Stefan Weise:
> Hi Eike,
>
> since we are on Linux we are using a script to start and stop the server. To shut the server down we are using telnet
> with the following command
>
> stop() {
> echo -n "Shutting down $DAEMON"
> { echo "shutdown"; echo "close"; } | telnet localhost 5555
I think only "close" would be good.

Cheers
/Eike

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


Re: [CDO] MySQL database is broken after restart of CDO server [message #1415215 is a reply to message #1415210] Tue, 02 September 2014 10:29 Go to previous messageGo to next message
Stefan Weise is currently offline Stefan WeiseFriend
Messages: 8
Registered: July 2009
Junior Member
Same result. Seems to be a timing problem when the system goes down. Perhaps the database server is already down before CDO can close the connection.
But why is CDO unable to repair the database tables? When I use an embedded derby instead this works.

Regards,
Stefan
Re: [CDO] MySQL database is broken after restart of CDO server [message #1415235 is a reply to message #1415215] Tue, 02 September 2014 11:32 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 02.09.2014 um 12:29 schrieb Stefan Weise:
> Same result. Seems to be a timing problem when the system goes down. Perhaps the database server is already down
> before CDO can close the connection.
I guess that's generally possible.

> But why is CDO unable to repair the database tables? When I use an embedded derby instead this works.
A missing table is a severe problem that shouldn't happen in the first place. Are you sure your connection is transactional?

Cheers
/Eike

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


Re: [CDO] MySQL database is broken after restart of CDO server [message #1415254 is a reply to message #1415235] Tue, 02 September 2014 12:20 Go to previous messageGo to next message
Stefan Weise is currently offline Stefan WeiseFriend
Messages: 8
Registered: July 2009
Junior Member
Eike Stepper wrote on Tue, 02 September 2014 11:32
Am 02.09.2014 um 12:29 schrieb Stefan Weise:
> Same result. Seems to be a timing problem when the system goes down. Perhaps the database server is already down
> before CDO can close the connection.
I guess that's generally possible.

Yes, that was the reason. The database was already down but the CDO server wasn't.

Quote:

> But why is CDO unable to repair the database tables? When I use an embedded derby instead this works.
A missing table is a severe problem that shouldn't happen in the first place. Are you sure your connection is transactional?

We just have an empty database at the moment. So I don't know if this could be the reason. But here is our current cdo-server configuration:
<?xml version="1.0" encoding="UTF-8"?>
<cdoServer>

  <!-- ============================================================== -->
  <!-- See http://wiki.eclipse.org/CDO/Server_Configuration_Reference -->
  <!-- ============================================================== -->

  <acceptor type="tcp" listenAddr="0.0.0.0" port="2036"/>

  <repository name="yt_repo">

    <property name="overrideUUID" value=""/>
    <property name="supportingAudits" value="true"/>
    <property name="supportingBranches" value="true"/>
    <property name="ensureReferentialIntegrity" value="false"/>
    <property name="allowInterruptRunningQueries" value="true"/>
    <property name="idGenerationLocation" value="STORE"/> <!-- Possible values: STORE | CLIENT -->
    <property name="serializeCommits" value="false"/>
    <property name="optimisticLockingTimeout" value="10000"/>

    <store type="db">
      <!-- Period at which to execute an SQL statement to keep DB connection alive, in minutes -->
      <property name="connectionKeepAlivePeriod" value="60"/>

      <!-- Maximum number of store accessors (JDBC connections) to keep in the reader pool. The default value is 15.  -->
      <property name="readerPoolCapacity" value="20"/>

      <!-- Maximum number of store accessors (JDBC connections) to keep in the writer pool. The default value is 15.  -->
      <property name="writerPoolCapacity" value="20"/>

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

      <dbAdapter name="mysql"/>
      <dataSource class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
        url="jdbc:mysql://localhost/yt_repo?createDatabaseIfNotExist=true"
        user="cdo-user" 
        password="cdo-password"
      />
    </store>
  </repository>
</cdoServer>


~Stefan

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] MySQL database is broken after restart of CDO server [message #1424717 is a reply to message #1415254] Tue, 16 September 2014 10:14 Go to previous messageGo to next message
Stefan Weise is currently offline Stefan WeiseFriend
Messages: 8
Registered: July 2009
Junior Member
Update:

The problem occurs when the MYSQL database is running on Linux because here the file system is case sensitive. Each table within a database corresponds to at least one file within the database directory. See http://dev.mysql.com/doc/refman/5.7/en/identifier-case-sensitivity.html for more information about that.

The CDO server seems to use different spellings for the creation and the access of the tables even after a unclean restart of the database server. These are the table names in the database after setting up the database:
+----------------------------------------+
| Tables_in_cdo_repo                     |
+----------------------------------------+
| CDO_BRANCHES                           |
| CDO_COMMIT_INFOS                       |
| CDO_EXTERNAL_REFS                      |
| CDO_LOBS                               |
| CDO_LOCKS                              |
| CDO_LOCK_AREAS                         |
| CDO_OBJECTS                            |
| CDO_PACKAGE_INFOS                      |
| CDO_PACKAGE_UNITS                      |
| CDO_PROPERTIES                         |
| ERESOURCE_CDOBINARYRESOURCE            |
| ERESOURCE_CDORESOURCE                  |
| ERESOURCE_CDORESOURCEFOLDER            |
| ERESOURCE_CDORESOURCEFOLDER_NODES_LIST |
| ERESOURCE_CDORESOURCE_CONTENTS_LIST    |
| ERESOURCE_CDOTEXTRESOURCE              |
+----------------------------------------+

But after an unclean restart of the CDO server I get the following exception:
[INFO] CDO server starting
[WARN] Detected crash of repository yt_repo
[ERROR] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'cdo_repo.cdo_objects' doesn't exist
org.eclipse.net4j.db.DBException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'cdo_repo.cdo_objects' doesn't exist
	at org.eclipse.emf.cdo.server.internal.db.DBStore.visitAllTables(DBStore.java:288)

Now the server wants to access the table 'cdo_repo.cdo_objects' which does not exist in the database. But 'cdo_repo.CDO_OBJECTS' does exist.

mysql> select * from cdo_objects;
ERROR 1146 (42S02): Table 'cdo_repo.cdo_objects' doesn't exist

mysql> select * from CDO_OBJECTS;
+--------+-----------+---------------+
| CDO_ID | CDO_CLASS | CDO_CREATED   |
+--------+-----------+---------------+
|      1 |        -5 | 1410862129468 |
+--------+-----------+---------------+
1 row in set (0.00 sec)


Do you have an idea where this different spelling comes from and how we can avoid it?

Regards,

Stefan
Re: [CDO] MySQL database is broken after restart of CDO server [message #1424789 is a reply to message #1424717] Tue, 16 September 2014 12:23 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
On 16-09-14 12:14, Stefan Weise wrote:
> Update:
>
> The problem occurs when the MYSQL database is running on Linux because
> here the file system is case sensitive. Each table within a database
> corresponds to at least one file within the database directory. See
> http://dev.mysql.com/doc/refman/5.7/en/identifier-case-sensitivity.html
> for more information about that.
>
> The CDO server seems to use different spellings for the creation and the
> access of the tables even after a unclean restart of the database
> server. These are the table names in the database after setting up the
> database:
>
> +----------------------------------------+
> | Tables_in_cdo_repo |
> +----------------------------------------+
> | CDO_BRANCHES |
> | CDO_COMMIT_INFOS |
> | CDO_EXTERNAL_REFS |
> | CDO_LOBS |
> | CDO_LOCKS |
> | CDO_LOCK_AREAS |
> | CDO_OBJECTS |
> | CDO_PACKAGE_INFOS |
> | CDO_PACKAGE_UNITS |
> | CDO_PROPERTIES |
> | ERESOURCE_CDOBINARYRESOURCE |
> | ERESOURCE_CDORESOURCE |
> | ERESOURCE_CDORESOURCEFOLDER |
> | ERESOURCE_CDORESOURCEFOLDER_NODES_LIST |
> | ERESOURCE_CDORESOURCE_CONTENTS_LIST |
> | ERESOURCE_CDOTEXTRESOURCE |
> +----------------------------------------+
>
> But after an unclean restart of the CDO server I get the following
> exception:
>
> [INFO] CDO server starting
> [WARN] Detected crash of repository yt_repo
> [ERROR] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table
> 'cdo_repo.cdo_objects' doesn't exist
> org.eclipse.net4j.db.DBException:
> com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table
> 'cdo_repo.cdo_objects' doesn't exist
> at
> org.eclipse.emf.cdo.server.internal.db.DBStore.visitAllTables(DBStore.java:288)
>
>
> Now the server wants to access the table 'cdo_repo.cdo_objects' which
> does not exist in the database. But 'cdo_repo.CDO_OBJECTS' does exist.
>
>
> mysql> select * from cdo_objects;
> ERROR 1146 (42S02): Table 'cdo_repo.cdo_objects' doesn't exist
>
> mysql> select * from CDO_OBJECTS;
> +--------+-----------+---------------+
> | CDO_ID | CDO_CLASS | CDO_CREATED |
> +--------+-----------+---------------+
> | 1 | -5 | 1410862129468 |
> +--------+-----------+---------------+
> 1 row in set (0.00 sec)
>
>
> Do you have an idea where this different spelling comes from and how we
> can avoid it?
>
Hi, This sounds very much like a problem we have as well.
We also have Linux and MySQL. We have done extensive troubleshooting and
found the issue. (But still need a patch).

The bug is in the class DBNamedElement, this method.

public static String name(String name)
{
return name.toUpperCase().intern();
}

The CDO Bug report is this one:

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

The bug was introduced somewhere in March 2013. (Judging from the GIT
logs). where this bug is very active:

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


> Regards,
>
> Stefan
Re: [CDO] MySQL database is broken after restart of CDO server [message #1424816 is a reply to message #1424789] Tue, 16 September 2014 13:03 Go to previous messageGo to next message
Stefan Weise is currently offline Stefan WeiseFriend
Messages: 8
Registered: July 2009
Junior Member
Hi.

Thank you for sharing this information. I've already voted for this bug Cool

The problem only seems to occur in maintenance mode when the database is getting upgraded or repaired. During normal operation this error does not appear.

~Stefan

Christophe Bouhier wrote on Tue, 16 September 2014 12:23

Hi, This sounds very much like a problem we have as well.
We also have Linux and MySQL. We have done extensive troubleshooting and
found the issue. (But still need a patch).

The bug is in the class DBNamedElement, this method.

public static String name(String name)
{
return name.toUpperCase().intern();
}

The CDO Bug report is this one:

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

The bug was introduced somewhere in March 2013. (Judging from the GIT
logs). where this bug is very active:

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

[Updated on: Tue, 16 September 2014 13:03]

Report message to a moderator

Re: [CDO] MySQL database is broken after restart of CDO server [message #1424842 is a reply to message #1424816] Tue, 16 September 2014 13:47 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
On 16-09-14 15:03, Stefan Weise wrote:
> Hi.
>
> Thank you for sharing this information. I've already voted for this bug 8)
> The problem only seems to occur in maintenance mode when the database is
> getting upgraded or repaired. During normal operation this error does
> not appear.
Yes, we noticed a relation with a CDO schema migration. (Which can not
be skipped).

> ~Stefan
>
> Christophe Bouhier wrote on Tue, 16 September 2014 12:23
>> On 16-09-14 12:14, Stefan Weise wrote:
>> Hi, This sounds very much like a problem we have as well.
>> We also have Linux and MySQL. We have done extensive troubleshooting
>> and found the issue. (But still need a patch).
>>
>> The bug is in the class DBNamedElement, this method.
>>
>> public static String name(String name)
>> {
>> return name.toUpperCase().intern();
>> }
>>
>> The CDO Bug report is this one:
>>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=412520
>>
>> The bug was introduced somewhere in March 2013. (Judging from the GIT
>> logs). where this bug is very active:
>>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=401763
>
>
Re: [CDO] MySQL database is broken after restart of CDO server [message #1428856 is a reply to message #1424816] Mon, 22 September 2014 13:06 Go to previous message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
On 16-09-14 15:03, Stefan Weise wrote:
> Hi.
>
> Thank you for sharing this information. I've already voted for this bug 8)
@Eike, I can provide a patch, which simply removes, toUpperCase(), which
will likely fix the problem. Is this OK?

> The problem only seems to occur in maintenance mode when the database is
> getting upgraded or repaired. During normal operation this error does
> not appear.
> ~Stefan
>
> Christophe Bouhier wrote on Tue, 16 September 2014 12:23
>> On 16-09-14 12:14, Stefan Weise wrote:
>> Hi, This sounds very much like a problem we have as well.
>> We also have Linux and MySQL. We have done extensive troubleshooting
>> and found the issue. (But still need a patch).
>>
>> The bug is in the class DBNamedElement, this method.
>>
>> public static String name(String name)
>> {
>> return name.toUpperCase().intern();
>> }
>>
>> The CDO Bug report is this one:
>>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=412520
>>
>> The bug was introduced somewhere in March 2013. (Judging from the GIT
>> logs). where this bug is very active:
>>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=401763
>
>
Previous Topic:EMF Databinding for CheckboxTableViewer.checkedElements
Next Topic:[EMF/CDO] - Exact meaning of 'Resolve Proxies'
Goto Forum:
  


Current Time: Fri Mar 29 11:42:58 GMT 2024

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

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

Back to the top