Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » CDO Table 'tnt6.cdoresourcenode' doesn't exist
CDO Table 'tnt6.cdoresourcenode' doesn't exist [message #743237] Fri, 21 October 2011 08:52 Go to next message
Herve Ferreira is currently offline Herve FerreiraFriend
Messages: 31
Registered: October 2011
Member

Hi,

Just got the CDO 4.0 and wanted to start the server.

When I start the HSQL it works ok.

For my SQL no automatically table creation is done. How do I know which tables must be created?

I've checked in the logs that when I start with HSQL some create tables are done, but not sure if these are all it's required.

Bug? Any special configuration that's required to automatically create table in MySQL?

Thanks in Advance
Re: CDO Table 'tnt6.cdoresourcenode' doesn't exist [message #743286 is a reply to message #743237] Fri, 21 October 2011 09:59 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Herve,

There are generally no manual steps required to run CDO with a DBStore. I guess that you're Mysql setup is not correct.
Do you get an exception? How does your cdo-server.xml look like?

Cheers
/Eike

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



Am 21.10.2011 10:52, schrieb Herve Ferreira:
>
> Hi,
>
> Just got the CDO 4.0 and wanted to start the server.
>
> When I start the HSQL it works ok.
>
> For my SQL no automatically table creation is done. How do I know which tables must be created?
>
> I've checked in the logs that when I start with HSQL some create tables are done, but not sure if these are all it's
> required.
>
> Bug? Any special configuration that's required to automatically create table in MySQL?
>
> Thanks in Advance


Re: CDO Table 'tnt6.cdoresourcenode' doesn't exist [message #743304 is a reply to message #743286] Fri, 21 October 2011 10:29 Go to previous messageGo to next message
Herve Ferreira is currently offline Herve FerreiraFriend
Messages: 31
Registered: October 2011
Member
This is the cdo-server.xml

<?xml version="1.0" encoding="UTF-8"?>
<cdoServer>

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

	<repository name="repo1">
		<property name="overrideUUID" value=""/>
		<property name="supportingAudits" value="false"/>

			<!-- The following value must be set normally like this, use this in your app also -->
			<property name="teneo.mapping.cascade_policy_on_non_containment" value="PERSIST,MERGE"/>

			<!-- some demo settings -->
			<property name="teneo.mapping.persistence_xml" value="/META-INF/company_model_teneo_annotations.xml"/>
			<!-- create tables for each subclass with joining to the parent table -->
			<property name="teneo.mapping.inheritance" value="JOINED"/>
			<!-- create an index for each fk -->
			<property name="teneo.mapping.add_index_for_fk" value="true"/>


			<!-- Hibernate properties , see: http://docs.jboss.org/hibernate/stable/core/reference/en/html_single/#configuration-optional -->
			<property name="hibernate.hbm2ddl.auto" value="update"/>
			<property name="hibernate.show_sql" value="true"/>
			<property name="hibernate.connection.pool_size" value="10"/>
			<property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>

			<!-- Setting for mysql -->
			<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>
			<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
			<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/cdohibernate"/>
			<property name="hibernate.connection.username" value="root"/>
			<property name="hibernate.connection.password" value="mysql"/>

		<store type="hibernate">
			<mappingProvider type="teneo">
				<extension name="org.eclipse.emf.teneo.annotations.mapper.EFeatureAnnotator"
					value="org.eclipse.emf.cdo.examples.hibernate.server.CDOExampleEFeatureAnnotator"/>
			</mappingProvider>
		</store>
	</repository>

</cdoServer>



And this is the fully exception

Hibernate: select this_.id as id2_0_, this_.creationTime as creation2_2_0_ from cdo_system_information this_
[ERROR] could not execute query
org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2536)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
at org.hibernate.loader.Loader.list(Loader.java:2271)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1716)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
at org.eclipse.emf.cdo.server.internal.hibernate.HibernatePackageHandler.getSystemInformation(HibernatePackageHandler.java:391)
at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore.getSystemInformation(HibernateStore.java:575)
at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore.getCreationTime(HibernateStore.java:409)
at org.eclipse.emf.cdo.internal.server.Repository.doActivate(Repository.java:1567)
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(Unknown Source)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'cdohibernate.cdo_system_information' doesn't exist
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
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:2693)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2102)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2261)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
at org.hibernate.loader.Loader.doQuery(Loader.java:802)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
at org.hibernate.loader.Loader.doList(Loader.java:2533)
... 19 more
Re: CDO Table 'tnt6.cdoresourcenode' doesn't exist [message #743310 is a reply to message #743304] Fri, 21 October 2011 10:37 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Herve,
I guess that hibernate was not able to create the tables. Hibnerate will log errors but will continue without stopping.
So you should check the beginning of the log to see if you see any errors.

gr. Martin

On 10/21/2011 12:29 PM, Herve Ferreira wrote:
> This is the cdo-server.xml
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <cdoServer>
>
> <acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
> </acceptor>
>
> <repository name="repo1">
> <property name="overrideUUID" value=""/>
> <property name="supportingAudits" value="false"/>
>
> <!-- The following value must be set normally like this, use this in your app also -->
> <property name="teneo.mapping.cascade_policy_on_non_containment" value="PERSIST,MERGE"/>
>
> <!-- some demo settings -->
> <property name="teneo.mapping.persistence_xml" value="/META-INF/company_model_teneo_annotations.xml"/>
> <!-- create tables for each subclass with joining to the parent table -->
> <property name="teneo.mapping.inheritance" value="JOINED"/>
> <!-- create an index for each fk -->
> <property name="teneo.mapping.add_index_for_fk" value="true"/>
>
>
> <!-- Hibernate properties , see:
> http://docs.jboss.org/hibernate/stable/core/reference/en/html_single/#configuration-optional -->
> <property name="hibernate.hbm2ddl.auto" value="update"/>
> <property name="hibernate.show_sql" value="true"/>
> <property name="hibernate.connection.pool_size" value="10"/>
> <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
>
> <!-- Setting for mysql -->
> <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>
> <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
> <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/cdohibernate"/>
> <property name="hibernate.connection.username" value="root"/>
> <property name="hibernate.connection.password" value="mysql"/>
>
> <store type="hibernate">
> <mappingProvider type="teneo">
> <extension name="org.eclipse.emf.teneo.annotations.mapper.EFeatureAnnotator"
> value="org.eclipse.emf.cdo.examples.hibernate.server.CDOExampleEFeatureAnnotator"/>
> </mappingProvider>
> </store>
> </repository>
>
> </cdoServer>
>
>
>
> And this is the fully exception
>
> Hibernate: select this_.id as id2_0_, this_.creationTime as creation2_2_0_ from cdo_system_information this_
> [ERROR] could not execute query
> org.hibernate.exception.SQLGrammarException: could not execute query
> at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
> at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
> at org.hibernate.loader.Loader.doList(Loader.java:2536)
> at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
> at org.hibernate.loader.Loader.list(Loader.java:2271)
> at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119)
> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1716)
> at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernatePackageHandler.getSystemInformation(HibernatePackageHandler.java:391)
>
> at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore.getSystemInformation(HibernateStore.java:575)
> at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore.getCreationTime(HibernateStore.java:409)
> at org.eclipse.emf.cdo.internal.server.Repository.doActivate(Repository.java:1567)
> 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(Unknown Source)
> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'cdohibernate.cdo_system_information'
> doesn't exist
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
> at java.lang.reflect.Constructor.newInstance(Unknown Source)
> 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:2693)
> at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2102)
> at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2261)
> at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
> at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
> at org.hibernate.loader.Loader.doQuery(Loader.java:802)
> at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
> at org.hibernate.loader.Loader.doList(Loader.java:2533)
> ... 19 more
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: CDO Table 'tnt6.cdoresourcenode' doesn't exist [message #743495 is a reply to message #743310] Fri, 21 October 2011 14:31 Go to previous message
Herve Ferreira is currently offline Herve FerreiraFriend
Messages: 31
Registered: October 2011
Member
Dialect problem, I'm now using MySQLDialect instead of MySQLInnoDBDialect and all works ok
Previous Topic:Subtyping Ecore classes
Next Topic:[Dawn] Problem in Dawn***CanonicalEditPolicy getCreateViewRequest
Goto Forum:
  


Current Time: Thu Apr 25 22:58:38 GMT 2024

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

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

Back to the top