[Hibernate-JIRA] Created: (HV-26) Which version of Hibernate Annotations does ClassValidator depend on?
by Steven Devijver (JIRA)
Which version of Hibernate Annotations does ClassValidator depend on?
---------------------------------------------------------------------
Key: HV-26
URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-26
Project: Hibernate Validator
Issue Type: Bug
Components: validators
Affects Versions: 3.0.0.ga
Reporter: Steven Devijver
According to the Compatibility Matrix on the Hibernate website (http://www.hibernate.org/6.html) Hiberbate Validator 3.3.0 GA depends on Hibernate Annotations 3.3.x.
The only 3.3.x release of Hibernate Annotations is 3.3.0 GA. However, the dependency in the compatibility matrix does not seem to be correct.
When I load ClassValidator in my project I get this error:
The type org.hibernate.annotations.common.reflection.ReflectionManager cannot be resolved. It
is indirectly referenced from required .class files
Version 3.3.0 GA of Hibernate Annotations however does not have the class org.hibernate.annotations.common.reflection.ReflectionManager. It does however contain org.hibernate.annotations.common.reflection.EJB3ReflectionManager.
So, which version of Hibernate Annotations should be used with Hibernate Validator 3.0.0 GA?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[Hibernate-JIRA] Created: (HHH-3076) Can not create Table with Many to Many relationships
by Farooq Ahmad (JIRA)
Can not create Table with Many to Many relationships
----------------------------------------------------
Key: HHH-3076
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3076
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.2.5
Environment: Hibernate 3.2.5
HSQL DB for Unit Testing
Hibernate Annotations with Spring
Reporter: Farooq Ahmad
Hi I am getting following error while using @ManytoMany relationships. Interesting thing is that my all unit tests are working fine.
**** 01-21@10:47:07 ERROR (SchemaExport.java:274) - Unsuccessful: alter table ClueGiver add constraint FK7E948E28D7D12F96 foreign key (id) references Interactor
**** 01-21@10:47:07 ERROR (SchemaExport.java:275) - Unexpected token: ALTER in statement [alter table ClueGiver add constraint FK7E948E28D7D12F96 foreign key (id) references Interactor]
**** 01-21@10:47:07 ERROR (SchemaExport.java:274) - Unsuccessful: alter table Emoticon add constraint FK49B622A68A1F97CD foreign key (AVAT_ID) references Avatar
**** 01-21@10:47:07 ERROR (SchemaExport.java:275) - Unexpected token: ALTER in statement [alter table Emoticon add constraint FK49B622A68A1F97CD foreign key (AVAT_ID) references Avatar]
**** 01-21@10:47:07 ERROR (SchemaExport.java:274) - Unsuccessful: alter table Interactor add constraint FK1744CAB9E1ED9A42 foreign key (information_fk) references Information
**** 01-21@10:47:07 ERROR (SchemaExport.java:275) - Unexpected token: ALTER in statement [alter table Interactor add constraint FK1744CAB9E1ED9A42 foreign key (information_fk) references Information]
**** 01-21@10:47:07 ERROR (SchemaExport.java:274) - Unsuccessful: alter table Inventory_InventoryItem add constraint FK23935CAC15C312C3 foreign key (inventoryItems_id) references InventoryItem
**** 01-21@10:47:07 ERROR (SchemaExport.java:275) - Unexpected token: ALTER in statement [alter table Inventory_InventoryItem add constraint FK23935CAC15C312C3 foreign key (inventoryItems_id) references InventoryItem]
**** 01-21@10:47:07 ERROR (SchemaExport.java:274) - Unsuccessful: alter table Inventory_InventoryItem add constraint FK23935CACE9836C18 foreign key (Inventory_id) references Inventory
**** 01-21@10:47:07 ERROR (SchemaExport.java:275) - Unexpected token: ALTER in statement [alter table Inventory_InventoryItem add constraint FK23935CACE9836C18 foreign key (Inventory_id) references Inventory]
**** 01-21@10:47:07 ERROR (SchemaExport.java:274) - Unsuccessful: alter table QuestAcceptor add constraint FK29C94BCDD7D12F96 foreign key (id) references Interactor
**** 01-21@10:47:07 ERROR (SchemaExport.java:275) - Unexpected token: ALTER in statement [alter table QuestAcceptor add constraint FK29C94BCDD7D12F96 foreign key (id) references Interactor]
**** 01-21@10:47:07 ERROR (SchemaExport.java:274) - Unsuccessful: alter table QuestAcceptor_Reward add constraint FK4CB17C01BC814F98 foreign key (QuestAcceptor_id) references QuestAcceptor
**** 01-21@10:47:07 ERROR (SchemaExport.java:275) - Unexpected token: ALTER in statement [alter table QuestAcceptor_Reward add constraint FK4CB17C01BC814F98 foreign key (QuestAcceptor_id) references QuestAcceptor]
**** 01-21@10:47:07 ERROR (SchemaExport.java:274) - Unsuccessful: alter table QuestAcceptor_Reward add constraint FK4CB17C0130F29C27 foreign key (rewards_id) references Reward
**** 01-21@10:47:07 ERROR (SchemaExport.java:275) - Unexpected token: ALTER in statement [alter table QuestAcceptor_Reward add constraint FK4CB17C0130F29C27 foreign key (rewards_id) references Reward]
**** 01-21@10:47:07 ERROR (SchemaExport.java:274) - Unsuccessful: alter table QuestGiver add constraint FK97D307DFD7D12F96 foreign key (id) references Interactor
**** 01-21@10:47:07 ERROR (SchemaExport.java:275) - Unexpected token: ALTER in statement [alter table QuestGiver add constraint FK97D307DFD7D12F96 foreign key (id) references Interactor]
**** 01-21@10:47:07 ERROR (SchemaExport.java:274) - Unsuccessful: alter table QuestParty_Avatar add constraint FK95530AD4405638B1 foreign key (questPartys_id) references QuestParty
**** 01-21@10:47:07 ERROR (SchemaExport.java:275) - Unexpected token: ALTER in statement [alter table QuestParty_Avatar add constraint FK95530AD4405638B1 foreign key (questPartys_id) references QuestParty]
**** 01-21@10:47:07 ERROR (SchemaExport.java:274) - Unsuccessful: alter table QuestParty_Avatar add constraint FK95530AD498005B7B foreign key (avatars_id) references Avatar
**** 01-21@10:47:07 ERROR (SchemaExport.java:275) - Unexpected token: ALTER in statement [alter table QuestParty_Avatar add constraint FK95530AD498005B7B foreign key (avatars_id) references Avatar]
**** 01-21@10:47:07 ERROR (SchemaExport.java:274) - Unsuccessful: alter table QuestParty_Quest add constraint FK5B23407405638B1 foreign key (questPartys_id) references QuestParty
**** 01-21@10:47:07 ERROR (SchemaExport.java:275) - Unexpected token: ALTER in statement [alter table QuestParty_Quest add constraint FK5B23407405638B1 foreign key (questPartys_id) references QuestParty]
**** 01-21@10:47:07 ERROR (SchemaExport.java:274) - Unsuccessful: alter table QuestParty_Quest add constraint FK5B23407B51E1009 foreign key (quests_id) references Quest
**** 01-21@10:47:07 ERROR (SchemaExport.java:275) - Unexpected token: ALTER in statement [alter table QuestParty_Quest add constraint FK5B23407B51E1009 foreign key (quests_id) references Quest]
**** 01-21@10:47:07 ERROR (SchemaExport.java:274) - Unsuccessful: alter table Quest_ClueGiver add constraint FKD4BF26EB1012D8F5 foreign key (clueGivers_id) references ClueGiver
**** 01-21@10:47:07 ERROR (SchemaExport.java:275) - Unexpected token: ALTER in statement [alter table Quest_ClueGiver add constraint FKD4BF26EB1012D8F5 foreign key (clueGivers_id) references ClueGiver]
**** 01-21@10:47:07 ERROR (SchemaExport.java:274) - Unsuccessful: alter table Quest_ClueGiver add constraint FKD4BF26EBB51E1009 foreign key (quests_id) references Quest
Best regards
Farooq ahmad
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[Hibernate-JIRA] Commented: (HHH-1258) startup time improvements
by Stefan Fleiter (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1258?page=c... ]
Stefan Fleiter commented on HHH-1258:
-------------------------------------
What's the state of this bug?
The startup time is the major disadvantage of using hibernate (during development).
This does not only cost money, but demotivates developers which is even more costly in the end.
> startup time improvements
> -------------------------
>
> Key: HHH-1258
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1258
> Project: Hibernate3
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.1 rc3
> Reporter: Max Rydahl Andersen
> Assignee: Max Rydahl Andersen
> Attachments: AbstractEntityTuplizer.patch, Environment.patch, LazyProxyFactory.patch, SessionFactoryImpl.java, SessionFactoryImpl.patch
>
>
> while doing some basic startup perf testing the following were found - this issue is mainly to track what I find, and then fix it:
> Initial tests where 100 classes, 30 sec for buildSessionFactory
> setting hibernate.cglib.use_reflection_optimizer false and it is 10 sec for buildSessionFactory.
> (maybe we should autodetect which jdk we are running on and disable it per default for 1.4/1.5 - needs to validate runtime impact)
> Another (22%) time stealer is the discovery of getter/setters - in worst case it iterates over all declared methods per property.
> (alternatively we could cache/sort this list or make a more efficient implementation if a class only contain default property accessors)
> Other 20% of the time is done in net.sf.cglib related classes for build time enhancement.
> The rest of the time is Configuration creation (can be cached) and other iteration code.
> (p.s. don't take the % numbers as hard values - these are definitly affected by how many methods/classes you have; this underlying tests
> is done on pojos with a "high" method count (approx 100)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[Hibernate-JIRA] Commented: (HHH-1123) Cannot put more than 1000 elements in a InExpression
by Shyamsunder (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1123?page=c... ]
Shyamsunder commented on HHH-1123:
----------------------------------
I have faced the same issue in my project. After failed trails to find a suitable solution, I have written the method addRestrictions(). This method divides the List of values into sublists with size<=1000. It creates LogicalExpression using Restrictions.in() for each sublist. These LogicalExpressions are joined with OR condition using Restictions.or(); This methods returns Criterion object.
private Criterion addRestrictions(String propertyName, List list) {
int size = list.size();
int fromIndex = 0;
int toIndex = (size>1000)?1000:size;
List subList = list.subList(fromIndex, toIndex);
Criterion lhs = Restrictions.in(propertyName, subList);
toIndex = subList.size();
size = size-toIndex;
while(size>0) {
fromIndex=toIndex;
toIndex += (size>1000)?1000:size;
subList = list.subList(fromIndex, toIndex);
Criterion rhs = Restrictions.in(propertyName, subList);
lhs = Restrictions.or(lhs, rhs);
size = size-subList.size();
}//while
return lhs;
}
How to Use it: I have a class Employee with many to one reference to Person. Now I need to search for employees where person is IN list of person objects. So here is my HQL using the above method:
List personsList; //Here personsList has more than 1000 entries.
Criteria criteria = session.createCriteria(Employee.class).add(addRestrictions("person", personsList);
List result = criteria.list();
P.S. I have executed this program with input size of 1050, 2100, 3100 and 3800 persons in personsList. I have recieved the following error message for all queries when personList.size>2000. So you have to increase shared memory on Oracle side.
# of _persons: 2007
Jan 18, 2008 1:12:42 PM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 4031, SQLState: 61000
Jan 18, 2008 1:12:42 PM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: ORA-04031: unable to allocate 96 bytes of shared memory ("shared pool","select this_.id as id4_0_, t...","sql area","optdef : apanlg")
> Cannot put more than 1000 elements in a InExpression
> ----------------------------------------------------
>
> Key: HHH-1123
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1123
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.1 rc2, 3.2.0.alpha1
> Environment: Oracle 9i
> Reporter: Alexis Seigneurin
> Attachments: patch.txt
>
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> The number of elements that we can put in a "in" expression is limited to a certain amount (1000 for Oracle, for instance). When creating a criteria query, the org.hibernate.criterion.InExpression class should split the expression into several smaller ones.
> Attached is a patch which splits the expression by slices of 500 elements. For example, if we have 1001 elements to put in the "in" expression, the result would be :
> (entity.field in (?, ?, ?...) or entity.field in (?, ?, ?...) or entity.field in (?))
> The surrounding parantheses are useful to avoid problems with other conditions (a "and" condition taking over the one of the "or" conditions).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[Hibernate-JIRA] Commented: (HHH-886) hbm2ddl generating too long index on MySQL
by James Carman (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-886?page=co... ]
James Carman commented on HHH-886:
----------------------------------
Okay, so we have to go in and set up all the names manually. Seems a bit tedious, but I guess it's not too bad. Thank you for clarifying. I'm sure others will appreciate it when they Google and find this issue.
> hbm2ddl generating too long index on MySQL
> ------------------------------------------
>
> Key: HHH-886
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-886
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.0.5
> Environment: MySQL 4.1.11-standard, MyISAMI, table with default charset utf8
> Reporter: Oleg Marchuk
>
> SchemaExport log:
> alter table CountryLocal drop foreign key FK610C39952D58FB2F;
> drop table if exists CountryLocal;
> drop table if exists schedule;
> create table CountryLocal (
> id varchar(255) not null,
> name varchar(255) not null,
> lang varchar(255) not null,
> primary key (id, lang)
> );
> 17:19:59,997 ERROR SchemaExport:167 - Unsuccessful: create table CountryLocal (id varchar(255) not null, name varchar(255) not null, lang varchar(255) not null, primary key (id, lang))
> 17:20:00,003 ERROR SchemaExport:168 - Syntax error or access violation message from server: "Specified key was too long; max key length is 1000 bytes"
> create table schedule (
> id varchar(255) not null,
> primary key (id)
> );
> alter table CountryLocal
> add index FK610C39952D58FB2F (id),
> add constraint FK610C39952D58FB2F
> foreign key (id)
> references schedule (id);
> 17:20:00,014 ERROR SchemaExport:167 - Unsuccessful: alter table CountryLocal add index FK610C39952D58FB2F (id), add constraint FK610C39952D58FB2F foreign key (id) references schedule (id)
> 17:20:00,015 ERROR SchemaExport:168 - Base table or view not found message from server: "Table 'test_oleg.CountryLocal' doesn't exist"
> Mapping:
> <?xml version="1.0"?>
> <!DOCTYPE hibernate-mapping PUBLIC
> "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
> "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
> <hibernate-mapping package="com.softzonenet">
> <class name="Test" table="schedule" lazy="false">
> <id name="id" type="string">
> <generator class="assigned" />
> </id>
> <map name="names" lazy="false" table="CountryLocal"
> cascade="delete">
> <key column="id" not-null="true" />
> <map-key type="string" column="lang" />
> <element type="string" column="name" not-null="true" />
> </map>
> </class>
> </hibernate-mapping>
> Class:
> package com.softzonenet;
> public class Test {
>
> private String id = null;
>
> Test() {
>
> }
> public String getId() {
> return id;
> }
> public void setId(String id) {
> this.id = id;
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[Hibernate-JIRA] Commented: (HHH-886) hbm2ddl generating too long index on MySQL
by Max Rydahl Andersen (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-886?page=co... ]
Max Rydahl Andersen commented on HHH-886:
-----------------------------------------
index="blahblah"
foreign-key="blablah"
from the docs.
> hbm2ddl generating too long index on MySQL
> ------------------------------------------
>
> Key: HHH-886
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-886
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.0.5
> Environment: MySQL 4.1.11-standard, MyISAMI, table with default charset utf8
> Reporter: Oleg Marchuk
>
> SchemaExport log:
> alter table CountryLocal drop foreign key FK610C39952D58FB2F;
> drop table if exists CountryLocal;
> drop table if exists schedule;
> create table CountryLocal (
> id varchar(255) not null,
> name varchar(255) not null,
> lang varchar(255) not null,
> primary key (id, lang)
> );
> 17:19:59,997 ERROR SchemaExport:167 - Unsuccessful: create table CountryLocal (id varchar(255) not null, name varchar(255) not null, lang varchar(255) not null, primary key (id, lang))
> 17:20:00,003 ERROR SchemaExport:168 - Syntax error or access violation message from server: "Specified key was too long; max key length is 1000 bytes"
> create table schedule (
> id varchar(255) not null,
> primary key (id)
> );
> alter table CountryLocal
> add index FK610C39952D58FB2F (id),
> add constraint FK610C39952D58FB2F
> foreign key (id)
> references schedule (id);
> 17:20:00,014 ERROR SchemaExport:167 - Unsuccessful: alter table CountryLocal add index FK610C39952D58FB2F (id), add constraint FK610C39952D58FB2F foreign key (id) references schedule (id)
> 17:20:00,015 ERROR SchemaExport:168 - Base table or view not found message from server: "Table 'test_oleg.CountryLocal' doesn't exist"
> Mapping:
> <?xml version="1.0"?>
> <!DOCTYPE hibernate-mapping PUBLIC
> "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
> "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
> <hibernate-mapping package="com.softzonenet">
> <class name="Test" table="schedule" lazy="false">
> <id name="id" type="string">
> <generator class="assigned" />
> </id>
> <map name="names" lazy="false" table="CountryLocal"
> cascade="delete">
> <key column="id" not-null="true" />
> <map-key type="string" column="lang" />
> <element type="string" column="name" not-null="true" />
> </map>
> </class>
> </hibernate-mapping>
> Class:
> package com.softzonenet;
> public class Test {
>
> private String id = null;
>
> Test() {
>
> }
> public String getId() {
> return id;
> }
> public void setId(String id) {
> this.id = id;
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[Hibernate-JIRA] Commented: (HHH-1473) hbm2ddl validate seems to fail when views are involved
by Max Rydahl Andersen (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1473?page=c... ]
Max Rydahl Andersen commented on HHH-1473:
------------------------------------------
workaround: don't run with validation enabled.
> hbm2ddl validate seems to fail when views are involved
> ------------------------------------------------------
>
> Key: HHH-1473
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1473
> Project: Hibernate3
> Issue Type: Bug
> Components: metamodel
> Affects Versions: 3.1
> Reporter: Emmanuel Bernard
> Assignee: Diego Pires Plentz
> Priority: Minor
>
> http://forum.hibernate.org/viewtopic.php?t=955341&start=0&postdays=0&post...
> CategoryRanking is a view
> org.hibernate.HibernateException: Missing table: CategoryRating
> at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:953)
> at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)
> at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:299)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1145)
> at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:358)
> at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:484)
> at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:202)
> at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:78)
> at org.jboss.ejb3.Ejb3Deployment.initializeManagedEntityManagerFactory(Ejb3Deployment.java:512)
> at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:253)
> at org.jboss.ejb3.Ejb3JmxDeployment.create(Ejb3JmxDeployment.java:230)
> at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:34)
> at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245)
> at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:228)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
> at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
> at $Proxy0.create(Unknown Source)
> at org.jboss.system.ServiceController.create(ServiceController.java:341)
> at org.jboss.system.ServiceController.create(ServiceController.java:284)
> at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
> at $Proxy10.create(Unknown Source)
> at org.jboss.ejb3.EJB3Deployer.create(EJB3Deployer.java:208)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
> at $Proxy11.create(Unknown Source)
> at org.jboss.deployment.MainDeployer.create(MainDeployer.java:935)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:789)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
> at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
> at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
> at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
> at $Proxy6.deploy(Unknown Source)
> at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
> at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:489)
> at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
> at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:203)
> at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:182)
> 09:13:51,528 INFO [EJB3Deployer] Deployed: file:/C:/work/jboss-4.0.3SP1/server/default/deploy/bizmerit.ejb3
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months
[Hibernate-JIRA] Commented: (HHH-886) hbm2ddl generating too long index on MySQL
by James Carman (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-886?page=co... ]
James Carman commented on HHH-886:
----------------------------------
Would it be possible for someone to maybe add a URL where we can get more information on this? I am running into the same problem. Googling comes up with this issue as the first place to find information, so it could be useful to other folks in the future.
> hbm2ddl generating too long index on MySQL
> ------------------------------------------
>
> Key: HHH-886
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-886
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.0.5
> Environment: MySQL 4.1.11-standard, MyISAMI, table with default charset utf8
> Reporter: Oleg Marchuk
>
> SchemaExport log:
> alter table CountryLocal drop foreign key FK610C39952D58FB2F;
> drop table if exists CountryLocal;
> drop table if exists schedule;
> create table CountryLocal (
> id varchar(255) not null,
> name varchar(255) not null,
> lang varchar(255) not null,
> primary key (id, lang)
> );
> 17:19:59,997 ERROR SchemaExport:167 - Unsuccessful: create table CountryLocal (id varchar(255) not null, name varchar(255) not null, lang varchar(255) not null, primary key (id, lang))
> 17:20:00,003 ERROR SchemaExport:168 - Syntax error or access violation message from server: "Specified key was too long; max key length is 1000 bytes"
> create table schedule (
> id varchar(255) not null,
> primary key (id)
> );
> alter table CountryLocal
> add index FK610C39952D58FB2F (id),
> add constraint FK610C39952D58FB2F
> foreign key (id)
> references schedule (id);
> 17:20:00,014 ERROR SchemaExport:167 - Unsuccessful: alter table CountryLocal add index FK610C39952D58FB2F (id), add constraint FK610C39952D58FB2F foreign key (id) references schedule (id)
> 17:20:00,015 ERROR SchemaExport:168 - Base table or view not found message from server: "Table 'test_oleg.CountryLocal' doesn't exist"
> Mapping:
> <?xml version="1.0"?>
> <!DOCTYPE hibernate-mapping PUBLIC
> "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
> "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
> <hibernate-mapping package="com.softzonenet">
> <class name="Test" table="schedule" lazy="false">
> <id name="id" type="string">
> <generator class="assigned" />
> </id>
> <map name="names" lazy="false" table="CountryLocal"
> cascade="delete">
> <key column="id" not-null="true" />
> <map-key type="string" column="lang" />
> <element type="string" column="name" not-null="true" />
> </map>
> </class>
> </hibernate-mapping>
> Class:
> package com.softzonenet;
> public class Test {
>
> private String id = null;
>
> Test() {
>
> }
> public String getId() {
> return id;
> }
> public void setId(String id) {
> this.id = id;
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 4 months