[Hibernate-JIRA] Created: (ANN-660) HHH-2545 Alive
by Eugene Batogov (JIRA)
HHH-2545 Alive
--------------
Key: ANN-660
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-660
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.3.0.ga
Environment: Gentoo Linux x86
JDK: 1.6. SUN and BEA
JBoss-4.2.1.GA
Hibernate: 3.2.5
Annotation: 3.3.0.GA
EntityManager: 3.3.1
Reporter: Eugene Batogov
Priority: Critical
I have a same problem how in HHH-2545 bug !
I update Hibernate to 3.2.5, hibernate-annotation to 3.3.0.GA
hibernate-entitymanager to 3.3.1.GA.
But this bug alive!
I use ehcache-1.3.0. jBoss-4.2.1.GA.
My query, which get from cache with null elements in collections:
Long customerAccount = customerIdentity.getCustomerAccount().getId();
try{
String sql = "select npvr.npvrChannels from NpvrServiceSpec npvr"+
" where npvr.id in ("+
" select ss.id from Customer cust join cust.accounts acc join
cust.subscriptions sub"+
" join sub.serviceSpecifications ss"+
" where acc.id =:customerAccount and"+
" ss in (from NpvrServiceSpec))";
Query query = emanager.createQuery(sql);
query.setParameter("customerAccount", customerAccount);
query.setHint("org.hibernate.cacheRegion", "query.findQueryNpvrChannelsBySubsription");
query.setHint("org.hibernate.cacheable", true);
result = query.getResultList();
Help me, please !
Thanks in advance.
--
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, 10 months
[Hibernate-JIRA] Created: (HV-66) 3.1.0.CR1 incompatible with Hibernate 3.3.0
by Juergen Zimmermann (JIRA)
3.1.0.CR1 incompatible with Hibernate 3.3.0
-------------------------------------------
Key: HV-66
URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-66
Project: Hibernate Validator
Issue Type: Bug
Affects Versions: 3.1.0.CR1
Environment: Hibernate 3.3.0, Hibernate Common Annotations 3.1.0.CR2, Hibernate Annotations 3.4.0.CR2, Hibernate EntityManager 3.4.0.CR2, Javassist, 3.8.1, CGLib 2.2, EHCache 1.5.0, SLF4J 1.5.2, JDK 1.6.0_07
Reporter: Juergen Zimmermann
I'm getting this stacktrace after upgrading from Hibernate 3.3.0.CR2 to 3.3.0:
java.lang.NoSuchMethodError: org.hibernate.event.PreUpdateEvent.getSource()Lorg/hibernate/engine/SessionImplementor;
at org.hibernate.validator.event.ValidateEventListener.onPreUpdate(ValidateEventListener.java:177)
at org.hibernate.action.EntityUpdateAction.preUpdate(EntityUpdateAction.java:237)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:88)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1141)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)
at de.hska.kundenverwaltung.db.KundenverwaltungDaoImpl.findKundenByNachname(KundenverwaltungDaoImpl.java:67)
at de.hska.kundenverwaltung.KundenverwaltungImpl.updateKunde(KundenverwaltungImpl.java:392)
at de.hska.kundenverwaltung.rest.KundenverwaltungResource.updateKunde(KundenverwaltungResource.java:194)
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:597)
at com.sun.jersey.impl.model.method.dispatch.EntityParamDispatchProvider$TypeOutInvoker._dispatch(EntityParamDispatchProvider.java:132)
at com.sun.jersey.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:81)
at com.sun.jersey.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:133)
at com.sun.jersey.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
at com.sun.jersey.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:71)
at com.sun.jersey.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
at com.sun.jersey.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:64)
at com.sun.jersey.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:680)
at com.sun.jersey.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:650)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:309)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at de.hska.util.HskaFilter.doFilter(HskaFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
at java.lang.Thread.run(Thread.java:619)
--
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, 10 months
[Hibernate-JIRA] Created: (HHH-3739) Problem using BTMTransactionManagerLookup with Tomcat
by Helder Sousa (JIRA)
Problem using BTMTransactionManagerLookup with Tomcat
-----------------------------------------------------
Key: HHH-3739
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3739
Project: Hibernate Core
Issue Type: Patch
Components: core
Affects Versions: 3.3.1
Environment: Hibernate 3.3.1 GA
Reporter: Helder Sousa
Attachments: BTMTransactionManagerLookup.patch
Hi.
When using Bitronix Transaction Manager with tomcat there is a problem resolving the TransactionManager by JNDI. Please take a look to this thread: http://www.nabble.com/Hibernate-JTATransactionFactory-and-BTMTransactionM...
In 5th post, Ludovic wrote: "The UserTransaction name is java:comp/UserTransaction and when a JNDI lookup happens in Tomcat, the Tomcat provider takes precedence because Tomcat registered a java: namespace handler."
So, when using BTM in Tomcat, the BTM users should configure in BTM Configuration a JNDI name that does not start with java:comp and the BTMTransactionManagerLookup class should read this configuration:
Here is the change to the BTMTransactionManagerLookup class (I attached the patch):
public String getUserTransactionName() {
try {
Class transactionManagerServiceClass = Class.forName("bitronix.tm.TransactionManagerServices");
Method getConfigurationMethod = transactionManagerServiceClass.getMethod("getConfiguration", null);
Object configurationInstance = getConfigurationMethod.invoke(null, null);
Class bitronixConfigurationClass = configurationInstance.getClass();
Method getJndiUserTransactionNameMethod = bitronixConfigurationClass
.getMethod("getJndiUserTransactionName", null);
String configuredJndiUserTransactionName = (String) getJndiUserTransactionNameMethod.invoke(
configurationInstance, null);
if (configuredJndiUserTransactionName != null && configuredJndiUserTransactionName.trim().length() >= 0) {
return configuredJndiUserTransactionName;
}
return "java:comp/UserTransaction";
}
catch (Exception e) {
throw new HibernateException("Could not obtain BTM UserTransactionName", e);
}
}
Can you apply the patch?
Best regards,
Helder Sousa
--
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, 10 months
[Hibernate-JIRA] Created: (HHH-4583) Wrong SQL constructed when CriteriaQuery.where(...) gets output from CriteriaBuilder.and() with zero args.
by Jaroslaw Lewandowski (JIRA)
Wrong SQL constructed when CriteriaQuery.where(...) gets output from CriteriaBuilder.and() with zero args.
----------------------------------------------------------------------------------------------------------
Key: HHH-4583
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4583
Project: Hibernate Core
Issue Type: Bug
Components: query-criteria
Affects Versions: 3.5.0-Beta-2
Reporter: Jaroslaw Lewandowski
Attachments: Client.java, CriteriaApiTest.java, Name.java
As spec says CriteriaBuilder.and(..) returns TRUE for a conjunction of zero predicates. Unfortunately Hibernate throws IllegalArgumentException with cause set to SQL syntax exception:
java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: null near line 1, column 65 [select generatedAlias0 from foo.Client as generatedAlias0 where ]
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:791)
at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:148)
at org.hibernate.ejb.criteria.CriteriaQueryCompiler.compile(CriteriaQueryCompiler.java:104)
at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:158)
at foo.CriteriaApiTest.noPredicatesInAnd(CriteriaApiTest.java:43)
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:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: null near line 1, column 65 [select generatedAlias0 from foo.Client as generatedAlias0 where ]
at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:54)
at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:47)
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:82)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:284)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:182)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1586)
at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:133)
... 27 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, 10 months