[Hibernate-JIRA] Created: (HHH-2557) NPE in IdentityMap.IdentityKey.equals()
by Anders Wallgren (JIRA)
NPE in IdentityMap.IdentityKey.equals()
---------------------------------------
Key: HHH-2557
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2557
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.3
Reporter: Anders Wallgren
The equals method in org.hibernate.util.IdentityMap.IdentityKey doesn't handle null objects:
{code}
java.lang.NullPointerException
at org.hibernate.util.IdentityMap$IdentityKey.equals(IdentityMap.java:103)
at java.util.HashMap.get(HashMap.java:305)
at org.apache.commons.collections.SequencedHashMap.get(SequencedHashMap.java:288)
at org.hibernate.util.IdentityMap.get(IdentityMap.java:135)
at org.hibernate.engine.StatefulPersistenceContext.getEntry(StatefulPersistenceContext.java:355)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:54)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:301)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at com.electriccloud.dao.HibernateFlushListener.onFlush(HibernateFlushListener.java:49)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:575)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:651)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:621)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:311)
at com.electriccloud.dao.TransactionAspect.withTransaction(TransactionAspect.java:121)
at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:576)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:562)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:60)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:76)
at com.electriccloud.operations.ConcurrentRetryAspect.performWithRetry(ConcurrentRetryAspect.java:168)
at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:576)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:562)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:60)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:76)
at com.electriccloud.operations.OperationTimingAspect.logOperationPerformance(OperationTimingAspect.java:110)
at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:576)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:562)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:60)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:203)
at $Proxy97.perform(Unknown Source)
at com.electriccloud.operations.OperationInvoker.invoke(OperationInvoker.java:190)
at com.electriccloud.operations.OperationCaller.call(OperationCaller.java:126)
at com.electriccloud.operations.OperationCaller.call(OperationCaller.java:36)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
at com.electriccloud.util.queue.CommanderThread.run(CommanderThread.java:78)
{code}
--
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
17 years, 6 months
[Hibernate-JIRA] Created: (HHH-2472) Error in HSQLDB Sequence Syntax
by Aaron Mulder (JIRA)
Error in HSQLDB Sequence Syntax
-------------------------------
Key: HHH-2472
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2472
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.2
Reporter: Aaron Mulder
I am using Hibernate via JPA. My persistence.xml has this:
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect"/>
</properties>
My Entity has this:
@SequenceGenerator(name = "GeneratePCSequence", sequenceName = "GEN_PC_SEQUENCE")
...
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "GeneratePCSequence")
private int id;
My DDL has this:
create sequence GEN_PC_SEQUENCE start with 100000 increment by 1;
The result I get when creating a new entity of this type is this:
java.sql.SQLException: Table not found in statement [select next value for GEN_PC_SEQUENCE from dual_GEN_PC_SEQUENCE]
org.hsqldb.jdbc.Util.throwError(Unknown Source)
org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:185)
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:278)
org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:497)
org.hibernate.jdbc.AbstractBatcher.prepareSelectStatement(AbstractBatcher.java:123)
org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:73)
org.hibernate.id.SequenceHiLoGenerator.generate(SequenceHiLoGenerator.java:58)
org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:99)
org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618)
org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592)
org.hibernate.impl.SessionImpl.persist(SessionImpl.java:596)
org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:212)
The "from dual_GEN_PC_SEQUENCE" looks sketchy to me, but I'm not real sure.
--
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
17 years, 6 months
[Hibernate-JIRA] Created: (HSEARCH-74) Ability to extract meta-information about search result
by Christian Bauer (JIRA)
Ability to extract meta-information about search result
-------------------------------------------------------
Key: HSEARCH-74
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-74
Project: Hibernate Search
Issue Type: New Feature
Components: engine
Affects Versions: 3.0.0.beta2
Reporter: Christian Bauer
I need the score of a hit. The only time when this information is available seems to be in FullTextQueryImpl.java in line 219:
for ( int index = first; index <= max; index++ ) {
Document document = hits.doc( index );
infos.add( extractor.extract( document ) );
}
Not sure what the API would look like and what other information from each Hit object would be considered metadata, except the score and maybe boost. Maybe this can be covered with magic projection properties, something like:
org.hibernate.search.FullTextQuery query = s.createFullTextQuery( luceneQuery, Book.class );
query.setIndexProjection( "hsearchScore", "this" );
List results = query.list();
Object[] firstResult = (Object[]) results.get(0);
Double score = firstResult[0];
Book book = firstResult[1];
--
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
17 years, 6 months
[Hibernate-JIRA] Created: (HHH-1988) Repeated column chack fails with SingleTable inheritance, biut not with TablePerClass
by Sergey Vladimirov (JIRA)
Repeated column chack fails with SingleTable inheritance, biut not with TablePerClass
-------------------------------------------------------------------------------------
Key: HHH-1988
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1988
Project: Hibernate3
Type: Bug
Components: metamodel
Versions: 3.2.0.cr3
Environment: HA last from SVN, HEM last from SVN, MySQL
Reporter: Sergey Vladimirov
Not sure about component.
Parent class introduce field, which is also discriminator field.
Hibernate reports error in child class if and only if strategy = InheritanceType.SINGLE_TABLE
org.hibernate.MappingException: Repeated column in mapping for entity: ru.arptek.arpsite.data.discriminator.IntegerSingleChild column: type (should be mapped with insert="false" update="false")
at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:590)
at org.hibernate.mapping.PersistentClass.checkPropertyColumnDuplication(PersistentClass.java:612)
at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:630)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:405)
at org.hibernate.mapping.SingleTableSubclass.validate(SingleTableSubclass.java:43)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1026)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1211)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:631)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:760)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:627)
at ru.arptek.arpsite.data.AbstractHibernateJUnitTest.setUp(AbstractHibernateJUnitTest.java:89)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Test cas works with strategy = InheritanceType.TABLE_PER_CLASS
--
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
17 years, 6 months