[Hibernate-JIRA] Created: (HBX-1144) Weird Column Length problem - new length value in annotation being ignored
by Duncan Kinnear (JIRA)
Weird Column Length problem - new length value in annotation being ignored
--------------------------------------------------------------------------
Key: HBX-1144
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1144
Project: Hibernate Tools
Issue Type: Bug
Affects Versions: 3.2.0.GA
Environment: Tar file was hibernate-3.2.6.ga.tar. Glassfish version 2.0 ur2. PostgreSQL version 8.x (various)
Reporter: Duncan Kinnear
We are using Hibernate as our persistence layer with NetBeans 6.7.1, EJB3, Glassfish and PostgreSQL.
We have almost 200 tables defined as EJB entities. We use annotations on the entities to define the tables/columns. As we are still in an early testing phase, we regularly drop all the tables in the database and use the Hibernate auto schema update to recreate them.
Recently we changed the length of a standard field that appears in many of our tables. The column is called ID_ORDER and is defined in the entities using the following code:
@Column(name = "ID_ORDER", length = STANDARD_ID_ORDER_LENGTH, nullable = false)
private String idOrder;
where STANDARD_ID_ORDER_LENGTH is defined as a public static final int in the superclass of these tables.
This length used to be 20, but we increased this to 50, recompiled all the affected classes, dropped all the tables and redeployed.
Now, on 2 developer machines this change worked correctly, with the new tables having their ID_ORDER columns all length 50.
However, on the other 2 developer machines, one table (called FEED_TYPE) gets recreated with the ID_ORDER column with length 20. This also occurs when we deploy the resulting EAR file to another server running Glassfish.
We have tried all sorts of things on these machines to try and 'fix' this. We have removed the column completely, recreated the table and it is still there! We have explicitly set the length in the annotation of the column of this one table and the length is always ignored. We have renamed the existing column and deployed, but the new column is always length 20. We have renamed the table and then recreated it - still wrong. We have even dropped the entire database and recreated it, but the length of 20 remains!
We are pulling our hair out on this one, it just doesn't make any sense. Where is hibernate 'caching' the length definition of this one column in one table?
--
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
14 years, 8 months
[Hibernate-JIRA] Created: (HSEARCH-320) Hibernate Search conflicts with Spring's class path scanning
by Paul Middelkoop (JIRA)
Hibernate Search conflicts with Spring's class path scanning
------------------------------------------------------------
Key: HSEARCH-320
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-320
Project: Hibernate Search
Issue Type: Bug
Affects Versions: 3.1.0.GA, 3.1.0.CR1
Reporter: Paul Middelkoop
Hibernate Search conflicts with Spring's class path scanning. When Hibernate Search is on the classpath Spring throws an exception while reading annotation metadata.
3.1.0 Beta1 and 3.0.x versions had no problems.
Stacktrace:
Caused by: java.lang.ArrayIndexOutOfBoundsException: 50432
at org.springframework.asm.ClassReader.readUTF8(Unknown Source)
at org.springframework.asm.ClassReader.accept(Unknown Source)
at org.springframework.asm.ClassReader.accept(Unknown Source)
at org.springframework.core.type.classreading.SimpleMetadataReader.getAnnotationMetadata(SimpleMetadataReader.java:55)
at org.springframework.core.type.filter.AnnotationTypeFilter.matchSelf(AnnotationTypeFilter.java:68)
at org.springframework.core.type.filter.AbstractTypeHierarchyTraversingFilter.match(AbstractTypeHierarchyTraversingFilter.java:55)
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.isCandidateComponent(ClassPathScanningCandidateComponentProvider.java:224)
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:182)
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:201)
at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:85)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1255)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1245)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
--
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
14 years, 9 months
[Hibernate-JIRA] Created: (HSEARCH-386) In a Transaction, Delete on unindexed entities referenced by indexed entities with ContainedIn throw LazyInitializationException
by Grégoire Rolland (JIRA)
In a Transaction, Delete on unindexed entities referenced by indexed entities with ContainedIn throw LazyInitializationException
--------------------------------------------------------------------------------------------------------------------------------
Key: HSEARCH-386
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-386
Project: Hibernate Search
Issue Type: Bug
Affects Versions: 3.1.1.GA, 3.1.0.GA
Environment: Hibernate 3.3.1.GA, PostgreSQL 8.3
Reporter: Grégoire Rolland
Priority: Critical
Attachments: hsearch.tar.gz
Delete on unindexed entities referenced by indexed entities with ContainedIn annotation failed.
On PostCommit Transaction, I get a LazyInitializationException on the collection with the ContainedIn annotation.
I upload a test case to reproduce this, run the Boot class.
1/ Entity2 is not lacking @DocumentId, I read the doc again and again (my english is very poor, but ...) : "In fact since the 3.1.0 release of Hibernate Search @DocumentId is optional in the case where an @Id annotation exists."
2/ Entity2 is not lacking @IndexedEmbedded, see the "entity1" association.
3/ From Hibernate Entity Manager Doc : "In an EXTENDED persistence context, all read only operations of the entity manager can be executed outside a transaction (find(), getReference(), refresh(), and read queries). Some modifications operations can be executed outside a transaction, but they are queued until the persistence context join a transaction. This is the case of persist(), merge(), remove(). Some operations cannot be called outside a transaction: flush(), lock(), and update/delete queries.". This is the case of the attached test. I attach a second testcase with all the operation in a transaction, the result is the same.
4/ I check 3.1.1-GA, the problem occurs alway.
5/ All the operation are in a transaction.
Please read and run my testcase and if I missuse hibernate say me where.
I can't reopen the bug HSEARCH-342, I open a new bug because the resolution of the bug HSEARCH-178 don't resolve this problem.
Thank you.
--
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
14 years, 9 months