Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » [Teneo]: Hibernate fails to add index and create table.
[Teneo]: Hibernate fails to add index and create table. [message #75229] |
Mon, 12 March 2007 16:08 |
Duncan Alexander Messages: 90 Registered: July 2009 |
Member |
|
|
Hi,
I have successfully managed to create a Hibernate mapping through Teneo and then intialize an
HbDatastore which in turn creates the relevant database tables. However during the database creation
I am seeing four errors in the console BUT the initialization does seem to complete successfully.
Errors:
2007-03-12 15:42:17,359 ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
table `base_extendable` add index FKFD27C9A266397A3C (`extendable_superclass_e_id`), add constraint
FKFD27C9A266397A3C foreign key (`extendable_superclass_e_id`) references `kf_keyfamily`
(`structure_urn`)
2007-03-12 15:42:17,375 ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
'.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
2007-03-12 15:42:17,406 ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
table `base_extendable` add index FKFD27C9A27BCB6302 (`extendable_superclass_e_id`), add constraint
FKFD27C9A27BCB6302 foreign key (`extendable_superclass_e_id`) references `base_structure`
(`maintainable_urn`)
2007-03-12 15:42:17,406 ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
'.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
Setup: Teneo0.75, EMF2.2, Hibernate 3.2, JDK1.5
Persistence Options:
PersistenceOptions.PERSISTENCE_XML="annotations.xml"
PersistenceOptions.QUALIFY_ENTITY_NAME= PersistenceOptions.QUALIFY_ENTITY_NAME_NSPREFIX
PersistenceOptions.INHERITANCE_MAPPING="JOINED"
PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY="unique"
Does this indicate some type of illegal referencing in the model ?
It may be that I should be asking this question on a Hibernate list instead as Teneo has already
done its work by this stage.
Duncan
|
|
|
Re: [Teneo]: Hibernate fails to add index and create table. [message #75245 is a reply to message #75229] |
Mon, 12 March 2007 16:16 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Duncan,
Especially the failed create table can be a problem. I have encountered this when table names were
not valid according to mysql. Do you miss any tables?
gr. Martin
Duncan ALexander wrote:
> Hi,
> I have successfully managed to create a Hibernate mapping through
> Teneo and then intialize an HbDatastore which in turn creates the
> relevant database tables. However during the database creation I am
> seeing four errors in the console BUT the initialization does seem to
> complete successfully.
>
> Errors:
>
> 2007-03-12 15:42:17,359 ERROR
> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
> table `base_extendable` add index FKFD27C9A266397A3C
> (`extendable_superclass_e_id`), add constraint FKFD27C9A266397A3C
> foreign key (`extendable_superclass_e_id`) references `kf_keyfamily`
> (`structure_urn`)
>
> 2007-03-12 15:42:17,375 ERROR
> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>
> 2007-03-12 15:42:17,406 ERROR
> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
> table `base_extendable` add index FKFD27C9A27BCB6302
> (`extendable_superclass_e_id`), add constraint FKFD27C9A27BCB6302
> foreign key (`extendable_superclass_e_id`) references `base_structure`
> (`maintainable_urn`)
>
> 2007-03-12 15:42:17,406 ERROR
> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>
>
> Setup: Teneo0.75, EMF2.2, Hibernate 3.2, JDK1.5
>
> Persistence Options:
>
> PersistenceOptions.PERSISTENCE_XML="annotations.xml"
> PersistenceOptions.QUALIFY_ENTITY_NAME=
> PersistenceOptions.QUALIFY_ENTITY_NAME_NSPREFIX
> PersistenceOptions.INHERITANCE_MAPPING="JOINED"
> PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY="unique"
>
>
> Does this indicate some type of illegal referencing in the model ?
>
>
> It may be that I should be asking this question on a Hibernate list
> instead as Teneo has already done its work by this stage.
>
> Duncan
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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: [Teneo]: Hibernate fails to add index and create table. [message #75262 is a reply to message #75245] |
Mon, 12 March 2007 16:20 |
Duncan Alexander Messages: 90 Registered: July 2009 |
Member |
|
|
Do you mean...have I missed any tables in my mapping ?
Martin Taal wrote:
> Hi Duncan,
> Especially the failed create table can be a problem. I have encountered
> this when table names were not valid according to mysql. Do you miss any
> tables?
>
> gr. Martin
>
> Duncan ALexander wrote:
>> Hi,
>> I have successfully managed to create a Hibernate mapping through
>> Teneo and then intialize an HbDatastore which in turn creates the
>> relevant database tables. However during the database creation I am
>> seeing four errors in the console BUT the initialization does seem to
>> complete successfully.
>>
>> Errors:
>>
>> 2007-03-12 15:42:17,359 ERROR
>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>> table `base_extendable` add index FKFD27C9A266397A3C
>> (`extendable_superclass_e_id`), add constraint FKFD27C9A266397A3C
>> foreign key (`extendable_superclass_e_id`) references `kf_keyfamily`
>> (`structure_urn`)
>>
>> 2007-03-12 15:42:17,375 ERROR
>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>
>> 2007-03-12 15:42:17,406 ERROR
>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>> table `base_extendable` add index FKFD27C9A27BCB6302
>> (`extendable_superclass_e_id`), add constraint FKFD27C9A27BCB6302
>> foreign key (`extendable_superclass_e_id`) references `base_structure`
>> (`maintainable_urn`)
>>
>> 2007-03-12 15:42:17,406 ERROR
>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>
>>
>> Setup: Teneo0.75, EMF2.2, Hibernate 3.2, JDK1.5
>>
>> Persistence Options:
>>
>> PersistenceOptions.PERSISTENCE_XML="annotations.xml"
>> PersistenceOptions.QUALIFY_ENTITY_NAME=
>> PersistenceOptions.QUALIFY_ENTITY_NAME_NSPREFIX
>> PersistenceOptions.INHERITANCE_MAPPING="JOINED"
>> PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY="unique"
>>
>>
>> Does this indicate some type of illegal referencing in the model ?
>>
>>
>> It may be that I should be asking this question on a Hibernate list
>> instead as Teneo has already done its work by this stage.
>>
>> Duncan
>
>
|
|
|
Re: [Teneo]: Hibernate fails to add index and create table. [message #75279 is a reply to message #75245] |
Mon, 12 March 2007 16:21 |
Duncan Alexander Messages: 90 Registered: July 2009 |
Member |
|
|
Ah, I understand your question now....
I dont think Im missing any tables as far as I can see......but I cant tell what the table
'.\sdmx_teneo\#sql-170_a.frm' would have mapped to in my model.
Duncan
Martin Taal wrote:
> Hi Duncan,
> Especially the failed create table can be a problem. I have encountered
> this when table names were not valid according to mysql. Do you miss any
> tables?
>
> gr. Martin
>
> Duncan ALexander wrote:
>> Hi,
>> I have successfully managed to create a Hibernate mapping through
>> Teneo and then intialize an HbDatastore which in turn creates the
>> relevant database tables. However during the database creation I am
>> seeing four errors in the console BUT the initialization does seem to
>> complete successfully.
>>
>> Errors:
>>
>> 2007-03-12 15:42:17,359 ERROR
>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>> table `base_extendable` add index FKFD27C9A266397A3C
>> (`extendable_superclass_e_id`), add constraint FKFD27C9A266397A3C
>> foreign key (`extendable_superclass_e_id`) references `kf_keyfamily`
>> (`structure_urn`)
>>
>> 2007-03-12 15:42:17,375 ERROR
>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>
>> 2007-03-12 15:42:17,406 ERROR
>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>> table `base_extendable` add index FKFD27C9A27BCB6302
>> (`extendable_superclass_e_id`), add constraint FKFD27C9A27BCB6302
>> foreign key (`extendable_superclass_e_id`) references `base_structure`
>> (`maintainable_urn`)
>>
>> 2007-03-12 15:42:17,406 ERROR
>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>
>>
>> Setup: Teneo0.75, EMF2.2, Hibernate 3.2, JDK1.5
>>
>> Persistence Options:
>>
>> PersistenceOptions.PERSISTENCE_XML="annotations.xml"
>> PersistenceOptions.QUALIFY_ENTITY_NAME=
>> PersistenceOptions.QUALIFY_ENTITY_NAME_NSPREFIX
>> PersistenceOptions.INHERITANCE_MAPPING="JOINED"
>> PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY="unique"
>>
>>
>> Does this indicate some type of illegal referencing in the model ?
>>
>>
>> It may be that I should be asking this question on a Hibernate list
>> instead as Teneo has already done its work by this stage.
>>
>> Duncan
>
>
|
|
|
Re: [Teneo]: Hibernate fails to add index and create table. [message #75313 is a reply to message #75279] |
Tue, 13 March 2007 05:29 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Apparently the errno 150 indicates that mysql can't create a table because of an invalid foreign key
constraint. If you use innodb as the table type and have mysql root access then you can get more
information by typing the following in the mysql prompt just after getting this error:
mysql> show innodb status;
some more info is printed to the console and you probably have to scroll up to get to the constraint
violation part.
gr. Martin
Duncan ALexander wrote:
> Ah, I understand your question now....
>
> I dont think Im missing any tables as far as I can see......but I cant
> tell what the table '.\sdmx_teneo\#sql-170_a.frm' would have mapped to
> in my model.
>
> Duncan
>
> Martin Taal wrote:
>> Hi Duncan,
>> Especially the failed create table can be a problem. I have
>> encountered this when table names were not valid according to mysql.
>> Do you miss any tables?
>>
>> gr. Martin
>>
>> Duncan ALexander wrote:
>>> Hi,
>>> I have successfully managed to create a Hibernate mapping through
>>> Teneo and then intialize an HbDatastore which in turn creates the
>>> relevant database tables. However during the database creation I am
>>> seeing four errors in the console BUT the initialization does seem to
>>> complete successfully.
>>>
>>> Errors:
>>>
>>> 2007-03-12 15:42:17,359 ERROR
>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>>> table `base_extendable` add index FKFD27C9A266397A3C
>>> (`extendable_superclass_e_id`), add constraint FKFD27C9A266397A3C
>>> foreign key (`extendable_superclass_e_id`) references `kf_keyfamily`
>>> (`structure_urn`)
>>>
>>> 2007-03-12 15:42:17,375 ERROR
>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>>
>>> 2007-03-12 15:42:17,406 ERROR
>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>>> table `base_extendable` add index FKFD27C9A27BCB6302
>>> (`extendable_superclass_e_id`), add constraint FKFD27C9A27BCB6302
>>> foreign key (`extendable_superclass_e_id`) references
>>> `base_structure` (`maintainable_urn`)
>>>
>>> 2007-03-12 15:42:17,406 ERROR
>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>>
>>>
>>> Setup: Teneo0.75, EMF2.2, Hibernate 3.2, JDK1.5
>>>
>>> Persistence Options:
>>>
>>> PersistenceOptions.PERSISTENCE_XML="annotations.xml"
>>> PersistenceOptions.QUALIFY_ENTITY_NAME=
>>> PersistenceOptions.QUALIFY_ENTITY_NAME_NSPREFIX
>>> PersistenceOptions.INHERITANCE_MAPPING="JOINED"
>>> PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY="unique"
>>>
>>>
>>> Does this indicate some type of illegal referencing in the model ?
>>>
>>>
>>> It may be that I should be asking this question on a Hibernate list
>>> instead as Teneo has already done its work by this stage.
>>>
>>> Duncan
>>
>>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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: [Teneo]: Hibernate fails to add index and create table. [message #75329 is a reply to message #75313] |
Tue, 13 March 2007 09:36 |
Duncan Alexander Messages: 90 Registered: July 2009 |
Member |
|
|
Ok,
thanks for the info....Ill give that a go.
Martin Taal wrote:
> Apparently the errno 150 indicates that mysql can't create a table
> because of an invalid foreign key constraint. If you use innodb as the
> table type and have mysql root access then you can get more information
> by typing the following in the mysql prompt just after getting this error:
> mysql> show innodb status;
>
> some more info is printed to the console and you probably have to scroll
> up to get to the constraint violation part.
>
> gr. Martin
>
> Duncan ALexander wrote:
>> Ah, I understand your question now....
>>
>> I dont think Im missing any tables as far as I can see......but I cant
>> tell what the table '.\sdmx_teneo\#sql-170_a.frm' would have mapped to
>> in my model.
>>
>> Duncan
>>
>> Martin Taal wrote:
>>> Hi Duncan,
>>> Especially the failed create table can be a problem. I have
>>> encountered this when table names were not valid according to mysql.
>>> Do you miss any tables?
>>>
>>> gr. Martin
>>>
>>> Duncan ALexander wrote:
>>>> Hi,
>>>> I have successfully managed to create a Hibernate mapping
>>>> through Teneo and then intialize an HbDatastore which in turn
>>>> creates the relevant database tables. However during the database
>>>> creation I am seeing four errors in the console BUT the
>>>> initialization does seem to complete successfully.
>>>>
>>>> Errors:
>>>>
>>>> 2007-03-12 15:42:17,359 ERROR
>>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>>>> table `base_extendable` add index FKFD27C9A266397A3C
>>>> (`extendable_superclass_e_id`), add constraint FKFD27C9A266397A3C
>>>> foreign key (`extendable_superclass_e_id`) references `kf_keyfamily`
>>>> (`structure_urn`)
>>>>
>>>> 2007-03-12 15:42:17,375 ERROR
>>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>>>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>>>
>>>> 2007-03-12 15:42:17,406 ERROR
>>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>>>> table `base_extendable` add index FKFD27C9A27BCB6302
>>>> (`extendable_superclass_e_id`), add constraint FKFD27C9A27BCB6302
>>>> foreign key (`extendable_superclass_e_id`) references
>>>> `base_structure` (`maintainable_urn`)
>>>>
>>>> 2007-03-12 15:42:17,406 ERROR
>>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>>>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>>>
>>>>
>>>> Setup: Teneo0.75, EMF2.2, Hibernate 3.2, JDK1.5
>>>>
>>>> Persistence Options:
>>>>
>>>> PersistenceOptions.PERSISTENCE_XML="annotations.xml"
>>>> PersistenceOptions.QUALIFY_ENTITY_NAME=
>>>> PersistenceOptions.QUALIFY_ENTITY_NAME_NSPREFIX
>>>> PersistenceOptions.INHERITANCE_MAPPING="JOINED"
>>>> PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY="unique"
>>>>
>>>>
>>>> Does this indicate some type of illegal referencing in the model ?
>>>>
>>>>
>>>> It may be that I should be asking this question on a Hibernate list
>>>> instead as Teneo has already done its work by this stage.
>>>>
>>>> Duncan
>>>
>>>
>
>
|
|
|
Re: [Teneo]: Hibernate fails to add index and create table. [message #75340 is a reply to message #75329] |
Tue, 13 March 2007 16:01 |
Duncan Alexander Messages: 90 Registered: July 2009 |
Member |
|
|
Aha!, Success at last. I have managed to persist and load a very large EMF model in and out of the
DB using Teneo and Hibernate.
Im sure I will have lots more questions but just wanted to let you know Martin that your advice was
invaluable in getting it working.
cheers
Duncan
Duncan ALexander wrote:
> Ok,
> thanks for the info....Ill give that a go.
>
>
> Martin Taal wrote:
>> Apparently the errno 150 indicates that mysql can't create a table
>> because of an invalid foreign key constraint. If you use innodb as the
>> table type and have mysql root access then you can get more
>> information by typing the following in the mysql prompt just after
>> getting this error:
>> mysql> show innodb status;
>>
>> some more info is printed to the console and you probably have to
>> scroll up to get to the constraint violation part.
>>
>> gr. Martin
>>
>> Duncan ALexander wrote:
>>> Ah, I understand your question now....
>>>
>>> I dont think Im missing any tables as far as I can see......but I
>>> cant tell what the table '.\sdmx_teneo\#sql-170_a.frm' would have
>>> mapped to in my model.
>>>
>>> Duncan
>>>
>>> Martin Taal wrote:
>>>> Hi Duncan,
>>>> Especially the failed create table can be a problem. I have
>>>> encountered this when table names were not valid according to mysql.
>>>> Do you miss any tables?
>>>>
>>>> gr. Martin
>>>>
>>>> Duncan ALexander wrote:
>>>>> Hi,
>>>>> I have successfully managed to create a Hibernate mapping
>>>>> through Teneo and then intialize an HbDatastore which in turn
>>>>> creates the relevant database tables. However during the database
>>>>> creation I am seeing four errors in the console BUT the
>>>>> initialization does seem to complete successfully.
>>>>>
>>>>> Errors:
>>>>>
>>>>> 2007-03-12 15:42:17,359 ERROR
>>>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>>>>> table `base_extendable` add index FKFD27C9A266397A3C
>>>>> (`extendable_superclass_e_id`), add constraint FKFD27C9A266397A3C
>>>>> foreign key (`extendable_superclass_e_id`) references
>>>>> `kf_keyfamily` (`structure_urn`)
>>>>>
>>>>> 2007-03-12 15:42:17,375 ERROR
>>>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>>>>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>>>>
>>>>> 2007-03-12 15:42:17,406 ERROR
>>>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>>>>> table `base_extendable` add index FKFD27C9A27BCB6302
>>>>> (`extendable_superclass_e_id`), add constraint FKFD27C9A27BCB6302
>>>>> foreign key (`extendable_superclass_e_id`) references
>>>>> `base_structure` (`maintainable_urn`)
>>>>>
>>>>> 2007-03-12 15:42:17,406 ERROR
>>>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>>>>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>>>>
>>>>>
>>>>> Setup: Teneo0.75, EMF2.2, Hibernate 3.2, JDK1.5
>>>>>
>>>>> Persistence Options:
>>>>>
>>>>> PersistenceOptions.PERSISTENCE_XML="annotations.xml"
>>>>> PersistenceOptions.QUALIFY_ENTITY_NAME=
>>>>> PersistenceOptions.QUALIFY_ENTITY_NAME_NSPREFIX
>>>>> PersistenceOptions.INHERITANCE_MAPPING="JOINED"
>>>>> PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY="unique"
>>>>>
>>>>>
>>>>> Does this indicate some type of illegal referencing in the model ?
>>>>>
>>>>>
>>>>> It may be that I should be asking this question on a Hibernate list
>>>>> instead as Teneo has already done its work by this stage.
>>>>>
>>>>> Duncan
>>>>
>>>>
>>
>>
|
|
|
Re: [Teneo]: Hibernate fails to add index and create table. [message #603542 is a reply to message #75229] |
Mon, 12 March 2007 16:16 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Duncan,
Especially the failed create table can be a problem. I have encountered this when table names were
not valid according to mysql. Do you miss any tables?
gr. Martin
Duncan ALexander wrote:
> Hi,
> I have successfully managed to create a Hibernate mapping through
> Teneo and then intialize an HbDatastore which in turn creates the
> relevant database tables. However during the database creation I am
> seeing four errors in the console BUT the initialization does seem to
> complete successfully.
>
> Errors:
>
> 2007-03-12 15:42:17,359 ERROR
> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
> table `base_extendable` add index FKFD27C9A266397A3C
> (`extendable_superclass_e_id`), add constraint FKFD27C9A266397A3C
> foreign key (`extendable_superclass_e_id`) references `kf_keyfamily`
> (`structure_urn`)
>
> 2007-03-12 15:42:17,375 ERROR
> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>
> 2007-03-12 15:42:17,406 ERROR
> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
> table `base_extendable` add index FKFD27C9A27BCB6302
> (`extendable_superclass_e_id`), add constraint FKFD27C9A27BCB6302
> foreign key (`extendable_superclass_e_id`) references `base_structure`
> (`maintainable_urn`)
>
> 2007-03-12 15:42:17,406 ERROR
> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>
>
> Setup: Teneo0.75, EMF2.2, Hibernate 3.2, JDK1.5
>
> Persistence Options:
>
> PersistenceOptions.PERSISTENCE_XML="annotations.xml"
> PersistenceOptions.QUALIFY_ENTITY_NAME=
> PersistenceOptions.QUALIFY_ENTITY_NAME_NSPREFIX
> PersistenceOptions.INHERITANCE_MAPPING="JOINED"
> PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY="unique"
>
>
> Does this indicate some type of illegal referencing in the model ?
>
>
> It may be that I should be asking this question on a Hibernate list
> instead as Teneo has already done its work by this stage.
>
> Duncan
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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: [Teneo]: Hibernate fails to add index and create table. [message #603545 is a reply to message #75245] |
Mon, 12 March 2007 16:20 |
Duncan Alexander Messages: 90 Registered: July 2009 |
Member |
|
|
Do you mean...have I missed any tables in my mapping ?
Martin Taal wrote:
> Hi Duncan,
> Especially the failed create table can be a problem. I have encountered
> this when table names were not valid according to mysql. Do you miss any
> tables?
>
> gr. Martin
>
> Duncan ALexander wrote:
>> Hi,
>> I have successfully managed to create a Hibernate mapping through
>> Teneo and then intialize an HbDatastore which in turn creates the
>> relevant database tables. However during the database creation I am
>> seeing four errors in the console BUT the initialization does seem to
>> complete successfully.
>>
>> Errors:
>>
>> 2007-03-12 15:42:17,359 ERROR
>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>> table `base_extendable` add index FKFD27C9A266397A3C
>> (`extendable_superclass_e_id`), add constraint FKFD27C9A266397A3C
>> foreign key (`extendable_superclass_e_id`) references `kf_keyfamily`
>> (`structure_urn`)
>>
>> 2007-03-12 15:42:17,375 ERROR
>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>
>> 2007-03-12 15:42:17,406 ERROR
>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>> table `base_extendable` add index FKFD27C9A27BCB6302
>> (`extendable_superclass_e_id`), add constraint FKFD27C9A27BCB6302
>> foreign key (`extendable_superclass_e_id`) references `base_structure`
>> (`maintainable_urn`)
>>
>> 2007-03-12 15:42:17,406 ERROR
>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>
>>
>> Setup: Teneo0.75, EMF2.2, Hibernate 3.2, JDK1.5
>>
>> Persistence Options:
>>
>> PersistenceOptions.PERSISTENCE_XML="annotations.xml"
>> PersistenceOptions.QUALIFY_ENTITY_NAME=
>> PersistenceOptions.QUALIFY_ENTITY_NAME_NSPREFIX
>> PersistenceOptions.INHERITANCE_MAPPING="JOINED"
>> PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY="unique"
>>
>>
>> Does this indicate some type of illegal referencing in the model ?
>>
>>
>> It may be that I should be asking this question on a Hibernate list
>> instead as Teneo has already done its work by this stage.
>>
>> Duncan
>
>
|
|
|
Re: [Teneo]: Hibernate fails to add index and create table. [message #603552 is a reply to message #75245] |
Mon, 12 March 2007 16:21 |
Duncan Alexander Messages: 90 Registered: July 2009 |
Member |
|
|
Ah, I understand your question now....
I dont think Im missing any tables as far as I can see......but I cant tell what the table
'.\sdmx_teneo\#sql-170_a.frm' would have mapped to in my model.
Duncan
Martin Taal wrote:
> Hi Duncan,
> Especially the failed create table can be a problem. I have encountered
> this when table names were not valid according to mysql. Do you miss any
> tables?
>
> gr. Martin
>
> Duncan ALexander wrote:
>> Hi,
>> I have successfully managed to create a Hibernate mapping through
>> Teneo and then intialize an HbDatastore which in turn creates the
>> relevant database tables. However during the database creation I am
>> seeing four errors in the console BUT the initialization does seem to
>> complete successfully.
>>
>> Errors:
>>
>> 2007-03-12 15:42:17,359 ERROR
>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>> table `base_extendable` add index FKFD27C9A266397A3C
>> (`extendable_superclass_e_id`), add constraint FKFD27C9A266397A3C
>> foreign key (`extendable_superclass_e_id`) references `kf_keyfamily`
>> (`structure_urn`)
>>
>> 2007-03-12 15:42:17,375 ERROR
>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>
>> 2007-03-12 15:42:17,406 ERROR
>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>> table `base_extendable` add index FKFD27C9A27BCB6302
>> (`extendable_superclass_e_id`), add constraint FKFD27C9A27BCB6302
>> foreign key (`extendable_superclass_e_id`) references `base_structure`
>> (`maintainable_urn`)
>>
>> 2007-03-12 15:42:17,406 ERROR
>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>
>>
>> Setup: Teneo0.75, EMF2.2, Hibernate 3.2, JDK1.5
>>
>> Persistence Options:
>>
>> PersistenceOptions.PERSISTENCE_XML="annotations.xml"
>> PersistenceOptions.QUALIFY_ENTITY_NAME=
>> PersistenceOptions.QUALIFY_ENTITY_NAME_NSPREFIX
>> PersistenceOptions.INHERITANCE_MAPPING="JOINED"
>> PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY="unique"
>>
>>
>> Does this indicate some type of illegal referencing in the model ?
>>
>>
>> It may be that I should be asking this question on a Hibernate list
>> instead as Teneo has already done its work by this stage.
>>
>> Duncan
>
>
|
|
|
Re: [Teneo]: Hibernate fails to add index and create table. [message #603566 is a reply to message #75279] |
Tue, 13 March 2007 05:29 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Apparently the errno 150 indicates that mysql can't create a table because of an invalid foreign key
constraint. If you use innodb as the table type and have mysql root access then you can get more
information by typing the following in the mysql prompt just after getting this error:
mysql> show innodb status;
some more info is printed to the console and you probably have to scroll up to get to the constraint
violation part.
gr. Martin
Duncan ALexander wrote:
> Ah, I understand your question now....
>
> I dont think Im missing any tables as far as I can see......but I cant
> tell what the table '.\sdmx_teneo\#sql-170_a.frm' would have mapped to
> in my model.
>
> Duncan
>
> Martin Taal wrote:
>> Hi Duncan,
>> Especially the failed create table can be a problem. I have
>> encountered this when table names were not valid according to mysql.
>> Do you miss any tables?
>>
>> gr. Martin
>>
>> Duncan ALexander wrote:
>>> Hi,
>>> I have successfully managed to create a Hibernate mapping through
>>> Teneo and then intialize an HbDatastore which in turn creates the
>>> relevant database tables. However during the database creation I am
>>> seeing four errors in the console BUT the initialization does seem to
>>> complete successfully.
>>>
>>> Errors:
>>>
>>> 2007-03-12 15:42:17,359 ERROR
>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>>> table `base_extendable` add index FKFD27C9A266397A3C
>>> (`extendable_superclass_e_id`), add constraint FKFD27C9A266397A3C
>>> foreign key (`extendable_superclass_e_id`) references `kf_keyfamily`
>>> (`structure_urn`)
>>>
>>> 2007-03-12 15:42:17,375 ERROR
>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>>
>>> 2007-03-12 15:42:17,406 ERROR
>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>>> table `base_extendable` add index FKFD27C9A27BCB6302
>>> (`extendable_superclass_e_id`), add constraint FKFD27C9A27BCB6302
>>> foreign key (`extendable_superclass_e_id`) references
>>> `base_structure` (`maintainable_urn`)
>>>
>>> 2007-03-12 15:42:17,406 ERROR
>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>>
>>>
>>> Setup: Teneo0.75, EMF2.2, Hibernate 3.2, JDK1.5
>>>
>>> Persistence Options:
>>>
>>> PersistenceOptions.PERSISTENCE_XML="annotations.xml"
>>> PersistenceOptions.QUALIFY_ENTITY_NAME=
>>> PersistenceOptions.QUALIFY_ENTITY_NAME_NSPREFIX
>>> PersistenceOptions.INHERITANCE_MAPPING="JOINED"
>>> PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY="unique"
>>>
>>>
>>> Does this indicate some type of illegal referencing in the model ?
>>>
>>>
>>> It may be that I should be asking this question on a Hibernate list
>>> instead as Teneo has already done its work by this stage.
>>>
>>> Duncan
>>
>>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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: [Teneo]: Hibernate fails to add index and create table. [message #603572 is a reply to message #75313] |
Tue, 13 March 2007 09:36 |
Duncan Alexander Messages: 90 Registered: July 2009 |
Member |
|
|
Ok,
thanks for the info....Ill give that a go.
Martin Taal wrote:
> Apparently the errno 150 indicates that mysql can't create a table
> because of an invalid foreign key constraint. If you use innodb as the
> table type and have mysql root access then you can get more information
> by typing the following in the mysql prompt just after getting this error:
> mysql> show innodb status;
>
> some more info is printed to the console and you probably have to scroll
> up to get to the constraint violation part.
>
> gr. Martin
>
> Duncan ALexander wrote:
>> Ah, I understand your question now....
>>
>> I dont think Im missing any tables as far as I can see......but I cant
>> tell what the table '.\sdmx_teneo\#sql-170_a.frm' would have mapped to
>> in my model.
>>
>> Duncan
>>
>> Martin Taal wrote:
>>> Hi Duncan,
>>> Especially the failed create table can be a problem. I have
>>> encountered this when table names were not valid according to mysql.
>>> Do you miss any tables?
>>>
>>> gr. Martin
>>>
>>> Duncan ALexander wrote:
>>>> Hi,
>>>> I have successfully managed to create a Hibernate mapping
>>>> through Teneo and then intialize an HbDatastore which in turn
>>>> creates the relevant database tables. However during the database
>>>> creation I am seeing four errors in the console BUT the
>>>> initialization does seem to complete successfully.
>>>>
>>>> Errors:
>>>>
>>>> 2007-03-12 15:42:17,359 ERROR
>>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>>>> table `base_extendable` add index FKFD27C9A266397A3C
>>>> (`extendable_superclass_e_id`), add constraint FKFD27C9A266397A3C
>>>> foreign key (`extendable_superclass_e_id`) references `kf_keyfamily`
>>>> (`structure_urn`)
>>>>
>>>> 2007-03-12 15:42:17,375 ERROR
>>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>>>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>>>
>>>> 2007-03-12 15:42:17,406 ERROR
>>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>>>> table `base_extendable` add index FKFD27C9A27BCB6302
>>>> (`extendable_superclass_e_id`), add constraint FKFD27C9A27BCB6302
>>>> foreign key (`extendable_superclass_e_id`) references
>>>> `base_structure` (`maintainable_urn`)
>>>>
>>>> 2007-03-12 15:42:17,406 ERROR
>>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>>>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>>>
>>>>
>>>> Setup: Teneo0.75, EMF2.2, Hibernate 3.2, JDK1.5
>>>>
>>>> Persistence Options:
>>>>
>>>> PersistenceOptions.PERSISTENCE_XML="annotations.xml"
>>>> PersistenceOptions.QUALIFY_ENTITY_NAME=
>>>> PersistenceOptions.QUALIFY_ENTITY_NAME_NSPREFIX
>>>> PersistenceOptions.INHERITANCE_MAPPING="JOINED"
>>>> PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY="unique"
>>>>
>>>>
>>>> Does this indicate some type of illegal referencing in the model ?
>>>>
>>>>
>>>> It may be that I should be asking this question on a Hibernate list
>>>> instead as Teneo has already done its work by this stage.
>>>>
>>>> Duncan
>>>
>>>
>
>
|
|
|
Re: [Teneo]: Hibernate fails to add index and create table. [message #603576 is a reply to message #75329] |
Tue, 13 March 2007 16:01 |
Duncan Alexander Messages: 90 Registered: July 2009 |
Member |
|
|
Aha!, Success at last. I have managed to persist and load a very large EMF model in and out of the
DB using Teneo and Hibernate.
Im sure I will have lots more questions but just wanted to let you know Martin that your advice was
invaluable in getting it working.
cheers
Duncan
Duncan ALexander wrote:
> Ok,
> thanks for the info....Ill give that a go.
>
>
> Martin Taal wrote:
>> Apparently the errno 150 indicates that mysql can't create a table
>> because of an invalid foreign key constraint. If you use innodb as the
>> table type and have mysql root access then you can get more
>> information by typing the following in the mysql prompt just after
>> getting this error:
>> mysql> show innodb status;
>>
>> some more info is printed to the console and you probably have to
>> scroll up to get to the constraint violation part.
>>
>> gr. Martin
>>
>> Duncan ALexander wrote:
>>> Ah, I understand your question now....
>>>
>>> I dont think Im missing any tables as far as I can see......but I
>>> cant tell what the table '.\sdmx_teneo\#sql-170_a.frm' would have
>>> mapped to in my model.
>>>
>>> Duncan
>>>
>>> Martin Taal wrote:
>>>> Hi Duncan,
>>>> Especially the failed create table can be a problem. I have
>>>> encountered this when table names were not valid according to mysql.
>>>> Do you miss any tables?
>>>>
>>>> gr. Martin
>>>>
>>>> Duncan ALexander wrote:
>>>>> Hi,
>>>>> I have successfully managed to create a Hibernate mapping
>>>>> through Teneo and then intialize an HbDatastore which in turn
>>>>> creates the relevant database tables. However during the database
>>>>> creation I am seeing four errors in the console BUT the
>>>>> initialization does seem to complete successfully.
>>>>>
>>>>> Errors:
>>>>>
>>>>> 2007-03-12 15:42:17,359 ERROR
>>>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>>>>> table `base_extendable` add index FKFD27C9A266397A3C
>>>>> (`extendable_superclass_e_id`), add constraint FKFD27C9A266397A3C
>>>>> foreign key (`extendable_superclass_e_id`) references
>>>>> `kf_keyfamily` (`structure_urn`)
>>>>>
>>>>> 2007-03-12 15:42:17,375 ERROR
>>>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>>>>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>>>>
>>>>> 2007-03-12 15:42:17,406 ERROR
>>>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Unsuccessful: alter
>>>>> table `base_extendable` add index FKFD27C9A27BCB6302
>>>>> (`extendable_superclass_e_id`), add constraint FKFD27C9A27BCB6302
>>>>> foreign key (`extendable_superclass_e_id`) references
>>>>> `base_structure` (`maintainable_urn`)
>>>>>
>>>>> 2007-03-12 15:42:17,406 ERROR
>>>>> org.hibernate.tool.hbm2ddl.SchemaUpdate[main] - Can't create table
>>>>> '.\sdmx_teneo\#sql-170_c.frm' (errno: 150)
>>>>>
>>>>>
>>>>> Setup: Teneo0.75, EMF2.2, Hibernate 3.2, JDK1.5
>>>>>
>>>>> Persistence Options:
>>>>>
>>>>> PersistenceOptions.PERSISTENCE_XML="annotations.xml"
>>>>> PersistenceOptions.QUALIFY_ENTITY_NAME=
>>>>> PersistenceOptions.QUALIFY_ENTITY_NAME_NSPREFIX
>>>>> PersistenceOptions.INHERITANCE_MAPPING="JOINED"
>>>>> PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY="unique"
>>>>>
>>>>>
>>>>> Does this indicate some type of illegal referencing in the model ?
>>>>>
>>>>>
>>>>> It may be that I should be asking this question on a Hibernate list
>>>>> instead as Teneo has already done its work by this stage.
>>>>>
>>>>> Duncan
>>>>
>>>>
>>
>>
|
|
|
Goto Forum:
Current Time: Sat Apr 20 10:24:47 GMT 2024
Powered by FUDForum. Page generated in 0.04398 seconds
|