[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: (HHH-4864) "Cannot read files twice on NativeScanner" exception when using multiple persistence.xml
by Bouiaw (JIRA)
"Cannot read files twice on NativeScanner" exception when using multiple persistence.xml
----------------------------------------------------------------------------------------
Key: HHH-4864
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4864
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.0-Beta-3
Reporter: Bouiaw
When subclassing DefaultPersistenceUnitManager as described in http://ancientprogramming.blogspot.com/2007/05/multiple-persistencexml-fi... in order to have my entities in different jars, Hibernate 3.5-Beta3 throw the following exception (it worked with previous version of Hibernate) :
java.lang.RuntimeException: error trying to scan <jar-file>: file:/Users/bouiaw/resthub/resthub-core/target/classes/
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:700)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:465)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:165)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:225)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:288)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1457)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1397)
... 51 more
Caused by: org.hibernate.AssertionFailure: Cannot read files twice on NativeScanner
at org.hibernate.ejb.packaging.NativeScanner.getFilesInJar(NativeScanner.java:168)
at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:393)
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:697)
... 57 more
--
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: (HHH-4938) Multiple errors reported during legacy FooBarTest with Ingres
by Ray Fan (JIRA)
Multiple errors reported during legacy FooBarTest with Ingres
-------------------------------------------------------------
Key: HHH-4938
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4938
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.0-Beta-4
Environment: 3.5.0-Beta-4, Ingres 9.3.1
Reporter: Ray Fan
Attachments: IngresAmbiguousColumnTest.java, legacy.zip
During test org.hibernate.test.legacy.FooBarTest multiple tests fail with ambiguous column defined in the select list.
{noformat}
<error message="could not initialize a collection: [org.hibernate.test.legacy.Abstract.abstracts#ff80808126e244920126e246eeb10001]" type="org.hibernate.exception.GenericJDBCException">org.hibernate.exception.GenericJDBCException: could not initialize a collection: [org.hibernate.test.legacy.Abstract.abstracts#ff80808126e244920126e246eeb10001]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:132)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:120)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.loadCollection(Loader.java:2048)
at org.hibernate.loader.collection.BatchingCollectionInitializer.initialize(BatchingCollectionInitializer.java:86)
at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:628)
at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:83)
at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1853)
at org.hibernate.collection.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:476)
at org.hibernate.engine.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:899)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:276)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1907)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:71)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:65)
at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3212)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:496)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:477)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1080)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:997)
at org.hibernate.event.def.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.java:386)
at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:234)
at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:84)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdateCopy(SessionImpl.java:914)
at org.hibernate.impl.SessionImpl.saveOrUpdateCopy(SessionImpl.java:878)
at org.hibernate.impl.SessionImpl.saveOrUpdateCopy(SessionImpl.java:882)
at org.hibernate.test.legacy.FooBarTest.testSaveOrUpdateCopyAny(FooBarTest.java:126)
Caused by: com.ingres.gcf.util.SqlEx: line 1, Column 'str' found in more than one FROM list table.
at com.ingres.gcf.jdbc.DrvObj.readError(Unknown Source)
at com.ingres.gcf.jdbc.DrvObj.readResults(Unknown Source)
at com.ingres.gcf.jdbc.DrvPrep.prepare(Unknown Source)
at com.ingres.gcf.jdbc.DrvConn.createPrepStmt(Unknown Source)
at com.ingres.gcf.jdbc.JdbcPrep.<init>(Unknown Source)
at com.ingres.gcf.jdbc.JdbcConn.createPrep(Unknown Source)
at com.ingres.gcf.jdbc.JdbcConn.prepareStatement(Unknown Source)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
{noformat}
The generate SQL query select list contains multiple columns named 'str'.
--
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
[Hibernate-JIRA] Created: (HHH-4912) testManyToManyWithFormula induces error with Ingres dialect
by Ray Fan (JIRA)
testManyToManyWithFormula induces error with Ingres dialect
-----------------------------------------------------------
Key: HHH-4912
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4912
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 3.5.0-Beta-4
Environment: Hibernate 3.5.0-Beta-4, Ingres 9.3.1
Reporter: Ray Fan
Attachments: manytomany-logs.zip
During test org.hibernate.test.manytomany.ManyToManyTest an error is encountered when using the Ingres dialect.
{noformat}
testcase time="0.806" classname="org.hibernate.test.manytomany.ManyToManyTest" name="testManyToManyWithFormula">
<error message="could not execute query" type="org.hibernate.exception.GenericJDBCException">org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:132)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:120)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2257)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2151)
at org.hibernate.loader.Loader.list(Loader.java:2146)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:448)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:859)
at org.hibernate.test.manytomany.ManyToManyTest.testManyToManyWithFormula(ManyToManyTest.java:92)
Caused by: com.ingres.gcf.util.SqlEx: line 1, Column 'username' found in more than one FROM list table.
at com.ingres.gcf.jdbc.DrvObj.readError(Unknown Source)
at com.ingres.gcf.jdbc.DrvObj.readResults(Unknown Source)
at com.ingres.gcf.jdbc.DrvPrep.prepare(Unknown Source)
at com.ingres.gcf.jdbc.DrvConn.createPrepStmt(Unknown Source)
at com.ingres.gcf.jdbc.JdbcPrep.<init>(Unknown Source)
at com.ingres.gcf.jdbc.JdbcConn.createPrep(Unknown Source)
at com.ingres.gcf.jdbc.JdbcConn.prepareStatement(Unknown Source)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1597)
at org.hibernate.loader.Loader.doQuery(Loader.java:718)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:271)
at org.hibernate.loader.Loader.doList(Loader.java:2254)
... 39 more
{noformat}
The generated SQL query from HQL: from org.hibernate.test.manytomany.User u join fetch u.groups g join fetch g.users
{noformat}
select
user0_.name as name3854_0_,
user0_.org as org3854_0_,
group2_.name as name3856_1_,
group2_.org as org3856_1_,
user4_.name as name3854_2_,
user4_.org as org3854_2_,
group2_.description as descript3_3856_1_,
groups1_.userName as userName0__,
groups1_.org as org0__,
groups1_.groupName as groupName0__,
groups1_.org as formula31_0__,
users3_.groupName as groupName1__,
users3_.org as org1__,
userName as userName1__,
users3_.org as formula32_1__
from
'User' user0_
inner join
UserGroup groups1_
on user0_.name=groups1_.userName
and user0_.org=groups1_.org
inner join
'Group' group2_
on groups1_.groupName=group2_.name
and groups1_.org=group2_.org
inner join
UserGroup users3_
on group2_.name=users3_.groupName
and group2_.org=users3_.org
inner join
'User' user4_
on users3_.userName=user4_.name
and users3_.org=user4_.org
{noformat}
seems to includes userName as userName1__ in the select list without table qualification. Ingres is unable to disambiguate the column from groups1_ or users3_ and raises the error.
Attaching test logs.
--
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