[Hibernate-JIRA] Created: (HHH-3876) collection [] was not processed by flush() triggering for unknown reasons
by Mark Derricutt (JIRA)
collection [] was not processed by flush() triggering for unknown reasons
-------------------------------------------------------------------------
Key: HHH-3876
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3876
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5
Reporter: Mark Derricutt
We've started to notice the following exceptions being triggered from Hibernate 3.5.0-SNAPSHOT (built locally), but only under certain circumstances (editing a specific user, whilst being logged into the application as a specific user). After stepping through both our application and hibernate through the whole update/commit process being run, I can't find anything that would be causing this problem.
During processing, I see calls to org.hibernate.engine.Collections#prepareCollectionForUpdate for CollectionEntry[smx3.schema.PartyRole.agreementsFrom#2006094] (and other elements in the same collection) which is listed in the trace below.
The collection which triggers the exception isn't consistently the same one, but seems to be localized to 4-5 different collections, I've also noticed that if I single-stepping through the process, if sometimes completes fine, which may indicate some race conditions somewhere.
As I'm not entirely sure why the exception is being thrown, I'm not sure if this is a problem with Hibernate, or something wrong in our application somewhere. Is there anyway I can identify why a collection entry wouldn't have been processed (and what does "processed" actually mean?).
24.04.2009 15:57:33.180 *ERROR* [btpool0-1] org.hibernate.AssertionFailure an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session) org.hibernate.AssertionFailure: collection [smx3.schema.PartyRole.agreementsFrom] was not processed by flush()
at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:228)
at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:356)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1031)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:369)
at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:88)
at com.atomikos.icatch.jta.Sync2Sync.beforeCompletion(Sync2Sync.java:73)
at com.atomikos.icatch.imp.TransactionStateHandler.commit(TransactionStateHandler.java:253)
at com.atomikos.icatch.imp.CompositeTransactionImp.doCommit(CompositeTransactionImp.java:509)
at com.atomikos.icatch.imp.CompositeTerminatorImp.commit(CompositeTerminatorImp.java:138)
at com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:297)
at com.atomikos.icatch.jta.TransactionManagerImp.commit(TransactionManagerImp.java:608)
at com.atomikos.icatch.jta.UserTransactionManager.commit(UserTransactionManager.java:148)
at smx3.envers.TransactionFilter.afterHandle(TransactionFilter.java:242)
at org.restlet.Filter.handle(Filter.java:197)
at org.restlet.Filter.doHandle(Filter.java:150)
at org.restlet.Filter.handle(Filter.java:195)
at org.restlet.Filter.doHandle(Filter.java:150)
at org.restlet.Filter.handle(Filter.java:195)
at org.restlet.Filter.doHandle(Filter.java:150)
at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
at org.restlet.Filter.handle(Filter.java:195)
at org.restlet.Filter.doHandle(Filter.java:150)
at org.restlet.Filter.handle(Filter.java:195)
at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112)
at org.restlet.Application.handle(Application.java:341)
at org.restlet.ext.wadl.WadlApplication.handle(WadlApplication.java:705)
at org.restlet.Filter.doHandle(Filter.java:150)
at org.restlet.Filter.handle(Filter.java:195)
at org.restlet.Router.handle(Router.java:504)
at org.restlet.Filter.doHandle(Filter.java:150)
at org.restlet.Filter.handle(Filter.java:195)
at org.restlet.Router.handle(Router.java:504)
at org.restlet.Filter.doHandle(Filter.java:150)
at org.restlet.Filter.handle(Filter.java:195)
at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
at org.restlet.Component.handle(Component.java:673)
at org.restlet.Server.handle(Server.java:331)
at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68)
at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147)
at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881)
at nz.co.smx.rest.RestActivator$RestActivatorClassLoaderServlet.service(RestActivator.java:182)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.ops4j.pax.web.service.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:51)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722)
at org.ops4j.pax.web.service.internal.HttpServiceContext.handle(HttpServiceContext.java:87)
at org.ops4j.pax.web.service.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:63)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
24.04.2009 15:57:33.183 *WARN* [btpool0-1] atomikos Unexpected error in beforeCompletion:
org.hibernate.AssertionFailure: collection [smx3.schema.PartyRole.agreementsFrom] was not processed by flush()
at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:228)
at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:356)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1031)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:369)
at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:88)
at com.atomikos.icatch.jta.Sync2Sync.beforeCompletion(Sync2Sync.java:73)
at com.atomikos.icatch.imp.TransactionStateHandler.commit(TransactionStateHandler.java:253)
at com.atomikos.icatch.imp.CompositeTransactionImp.doCommit(CompositeTransactionImp.java:509)
at com.atomikos.icatch.imp.CompositeTerminatorImp.commit(CompositeTerminatorImp.java:138)
at com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:297)
at com.atomikos.icatch.jta.TransactionManagerImp.commit(TransactionManagerImp.java:608)
at com.atomikos.icatch.jta.UserTransactionManager.commit(UserTransactionManager.java:148)
at smx3.envers.TransactionFilter.afterHandle(TransactionFilter.java:242)
at org.restlet.Filter.handle(Filter.java:197)
at org.restlet.Filter.doHandle(Filter.java:150)
at org.restlet.Filter.handle(Filter.java:195)
at org.restlet.Filter.doHandle(Filter.java:150)
at org.restlet.Filter.handle(Filter.java:195)
at org.restlet.Filter.doHandle(Filter.java:150)
at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
at org.restlet.Filter.handle(Filter.java:195)
at org.restlet.Filter.doHandle(Filter.java:150)
at org.restlet.Filter.handle(Filter.java:195)
at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112)
at org.restlet.Application.handle(Application.java:341)
at org.restlet.ext.wadl.WadlApplication.handle(WadlApplication.java:705)
at org.restlet.Filter.doHandle(Filter.java:150)
at org.restlet.Filter.handle(Filter.java:195)
at org.restlet.Router.handle(Router.java:504)
at org.restlet.Filter.doHandle(Filter.java:150)
at org.restlet.Filter.handle(Filter.java:195)
at org.restlet.Router.handle(Router.java:504)
at org.restlet.Filter.doHandle(Filter.java:150)
at org.restlet.Filter.handle(Filter.java:195)
at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
at org.restlet.Component.handle(Component.java:673)
at org.restlet.Server.handle(Server.java:331)
at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68)
at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147)
at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881)
at nz.co.smx.rest.RestActivator$RestActivatorClassLoaderServlet.service(RestActivator.java:182)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.ops4j.pax.web.service.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:51)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722)
at org.ops4j.pax.web.service.internal.HttpServiceContext.handle(HttpServiceContext.java:87)
at org.ops4j.pax.web.service.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:63)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
--
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
13 years, 5 months
[Hibernate-JIRA] Created: (HHH-5301) Add support for parametrizing TYPE(e) expressions
by Luis Fernando Planella Gonzalez (JIRA)
Add support for parametrizing TYPE(e) expressions
-------------------------------------------------
Key: HHH-5301
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5301
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 3.5.2
Environment: Hibernate 3.5.2, Java 6.0.20
Reporter: Luis Fernando Planella Gonzalez
Support parameters for JPA 2's TYPE(alias) function.
Test classes:
@Entity
@DiscriminatorColumn(name="subclass")
@Table(name="xs")
public abstract class XBase {
@Id
private Integer id;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
}
@Entity
@DiscriminatorValue("x1")
public class X1 extends XBase {
@Basic
private String x1;
public String getX1() {
return x1;
}
public void setX1(String x1) {
this.x1 = x1;
}
}
@Entity
@DiscriminatorValue("x2")
public class X2 extends XBase {
@Basic
private String x2;
public String getX2() {
return x2;
}
public void setX2(String x2) {
this.x2 = x2;
}
}
Running the following query works: "select x from XBase x where type(x) = X1"
However, the following one: "select x from XBase x where type(x) = :t" yelds
Exception in thread "main" java.lang.UnsupportedOperationException: At the moment this type is not the one actually used to map the discriminator.
at org.hibernate.persister.entity.DiscriminatorType.nullSafeSet(DiscriminatorType.java:111)
at org.hibernate.param.NamedParameterSpecification.bind(NamedParameterSpecification.java:67)
at org.hibernate.loader.hql.QueryLoader.bindParameterValues(QueryLoader.java:567)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1612)
at org.hibernate.loader.Loader.doQuery(Loader.java:717)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)
at org.hibernate.loader.Loader.doList(Loader.java:2294)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2172)
at org.hibernate.loader.Loader.list(Loader.java:2167)
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.ejb.QueryImpl.getResultList(QueryImpl.java:241)
at test.Main.main(Main.java:28)
JPA 2's spec explicitly shows querying by type using parameters in section 4.6.17.4.
--
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
13 years, 5 months
[Hibernate-JIRA] Created: (HHH-5795) Allow Criteria#add(null)
by Joachim Durchholz (JIRA)
Allow Criteria#add(null)
------------------------
Key: HHH-5795
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5795
Project: Hibernate Core
Issue Type: Improvement
Components: core
Affects Versions: 3.6.0
Environment: Irrelevant
Reporter: Joachim Durchholz
Please allow using null as a Criterion in Criteria#add.
I'd like to write Criterion createFooBarFilter(x,y). It inspects both x and y, and returns a Criterion that compares property foo with x and property bar with y, provided X resp. Y are non-null (null values mean: do not filter).
If x is not null, the function returns Restrictions.eq("foo",x).
Likewise for Y.
If both are not null, return Restrictions.and(Restrictions.eq("foo",x),Restrictions.eq("bar",y)).
I'd like to return null if both x and y are null. This would pass a null to Criteria#add(null), but that crashes and burns miserably as soon as Hibernate wants to get the SQL string from such a Criterion.
So... how about modifying CriteriaImpl#add like this:
public Criteria add(Criterion expression) {
if ( expression != null ) {
add( this, expression );
}
return this;
}
--
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
13 years, 5 months
[Hibernate-JIRA] Created: (HHH-6554) org.hibernate.QueryException: Unable to resolve path [a.uid]
by Rocky (JIRA)
org.hibernate.QueryException: Unable to resolve path [a.uid]
------------------------------------------------------------
Key: HHH-6554
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6554
Project: Hibernate Core
Issue Type: Bug
Components: query-sql
Affects Versions: 3.2.4.sp1
Environment: JBoss 4.2.2 GA
Reporter: Rocky
Priority: Critical
I'm using hibernate persistence.xml-
Why the hibernate is not creating alias a in the generated sql? Please let me know how to fix this issue.
17:27:13,154 ERROR [STDERR] java.lang.IllegalArgumentException: org.hibernate.QueryException: Unable to resolve path [a.uid], unexpected token [a] [select count(a) from com.tetratech.edas2.model.TrophicLevel where a.uid <> :uid and a.name = :name and a.code = :code]
17:27:13,155 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:616)
17:27:13,155 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:95)
17:27:13,155 ERROR [STDERR] at org.jboss.seam.persistence.EntityManagerProxy.createQuery(EntityManagerProxy.java:81)
17:27:13,155 ERROR [STDERR] at com.tetratech.edas2.session.TrophicLevelEditor.isItemUnique(TrophicLevelEditor.java:169)
17:27:13,155 ERROR [STDERR] at com.tetratech.edas2.session.TrophicLevelEditor.isItemUnique(TrophicLevelEditor.java:49)
17:27:13,155 ERROR [STDERR] at com.tetratech.edas2.session.DataGridEditor.addItem(DataGridEditor.java:156)
17:27:13,155 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
17:27:13,155 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
17:27:13,155 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
17:27:13,155 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:616)
17:27:13,155 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
17:27:13,155 ERROR [STDERR] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
17:27:13,155 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
17:27:13,155 ERROR [STDERR] at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
17:27:13,155 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
17:27:13,155 ERROR [STDERR] at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
17:27:13,155 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
17:27:13,155 ERROR [STDERR] at org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:65)
17:27:13,155 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
17:27:13,155 ERROR [STDERR] at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
17:27:13,156 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
17:27:13,156 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
17:27:13,156 ERROR [STDERR] at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
17:27:13,156 ERROR [STDERR] at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
17:27:13,156 ERROR [STDERR] at com.tetratech.edas2.session.TrophicLevelEditor_$$_javassist_seam_7.addItem(TrophicLevelEditor_$$_javassist_seam_7.java)
17:27:13,156 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
17:27:13,156 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
17:27:13,156 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
17:27:13,156 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:616)
17:27:13,156 ERROR [STDERR] at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335)
17:27:13,156 ERROR [STDERR] at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:280)
17:27:13,156 ERROR [STDERR] at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59)
17:27:13,156 ERROR [STDERR] at org.jboss.el.parser.AstMethodSuffix.invoke(AstMethodSuffix.java:65)
17:27:13,156 ERROR [STDERR] at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
17:27:13,156 ERROR [STDERR] at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
17:27:13,156 ERROR [STDERR] at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
17:27:13,156 ERROR [STDERR] at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
17:27:13,156 ERROR [STDERR] at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
17:27:13,156 ERROR [STDERR] at javax.faces.component.UICommand.broadcast(UICommand.java:383)
17:27:13,156 ERROR [STDERR] at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55)
17:27:13,156 ERROR [STDERR] at org.ajax4jsf.component.UIDataAdaptor.broadcast(UIDataAdaptor.java:1364)
17:27:13,156 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
17:27:13,156 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
17:27:13,157 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
17:27:13,157 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
17:27:13,157 ERROR [STDERR] at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
17:27:13,157 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
17:27:13,157 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
17:27:13,157 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
17:27:13,157 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
17:27:13,157 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
17:27:13,157 ERROR [STDERR] at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164)
17:27:13,157 ERROR [STDERR] at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
17:27:13,157 ERROR [STDERR] at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
17:27:13,157 ERROR [STDERR] at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)
17:27:13,157 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
17:27:13,157 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
17:27:13,157 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
17:27:13,164 ERROR [STDERR] at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
17:27:13,164 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
17:27:13,164 ERROR [STDERR] at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
17:27:13,164 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
17:27:13,164 ERROR [STDERR] at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
17:27:13,164 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
17:27:13,164 ERROR [STDERR] at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
17:27:13,164 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
17:27:13,164 ERROR [STDERR] at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
17:27:13,164 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
17:27:13,164 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
17:27:13,164 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
17:27:13,164 ERROR [STDERR] at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
17:27:13,164 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
17:27:13,165 ERROR [STDERR] at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
17:27:13,165 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
17:27:13,165 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
17:27:13,165 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
17:27:13,165 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
17:27:13,165 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
17:27:13,165 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
17:27:13,165 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
17:27:13,165 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
17:27:13,165 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
17:27:13,165 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
17:27:13,165 ERROR [STDERR] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
17:27:13,165 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
17:27:13,165 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
17:27:13,165 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
17:27:13,165 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
17:27:13,165 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
17:27:13,165 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
17:27:13,165 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
17:27:13,165 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
17:27:13,165 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
17:27:13,165 ERROR [STDERR] at java.lang.Thread.run(Thread.java:679)
17:27:13,166 ERROR [STDERR] Caused by: org.hibernate.QueryException: Unable to resolve path [a.uid], unexpected token [a] [select count(a) from com.tetratech.edas2.model.TrophicLevel where a.uid <> :uid and a.name = :name and a.code = :code]
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.ast.tree.IdentNode.resolveAsNakedComponentPropertyRefLHS(IdentNode.java:196)
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.ast.tree.IdentNode.resolve(IdentNode.java:85)
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.ast.tree.DotNode.resolveFirstChild(DotNode.java:153)
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.ast.HqlSqlWalker.lookupProperty(HqlSqlWalker.java:460)
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.addrExpr(HqlSqlBaseWalker.java:4326)
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1212)
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4041)
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3549)
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1762)
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1687)
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1687)
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:776)
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:577)
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281)
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229)
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:228)
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:160)
17:27:13,167 ERROR [STDERR] at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
17:27:13,167 ERROR [STDERR] at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
17:27:13,167 ERROR [STDERR] at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
17:27:13,167 ERROR [STDERR] at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
17:27:13,167 ERROR [STDERR] at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
17:27:13,168 ERROR [STDERR] at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
17:27:13,168 ERROR [STDERR] at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
17:27:13,168 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:92)
17:27:13,168 ERROR [STDERR] ... 92 more
17:27:13,176 INFO [TrophicLevelEditor] preparing results
<persistence-unit name="edas2" transaction-type="JTA">^M
<provider>org.hibernate.ejb.HibernatePersistence</provider>^M
<jta-data-source>java:/edas2Datasource</jta-data-source>^M
<properties>^M
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>^M
<property name="hibernate.hbm2ddl.auto" value="create-update"/>^M
<property name="hibernate.jdbc.batch_size" value="20"/>^M
<property name="hibernate.use_sql_comments" value="true"/>^M
<property name="hibernate.ejb.naming_strategy" value="org.hibernate.cfg.ImprovedNamingStrategy"/>^M
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>^M
</properties>^M
</persistence-unit>^M
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 5 months
[Hibernate-JIRA] Created: (HHH-6553) validate issue - char converted to varchar2(255) in Oracle
by Geoff Powdrell (JIRA)
validate issue - char converted to varchar2(255) in Oracle
----------------------------------------------------------
Key: HHH-6553
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6553
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.5.4
Environment: Oracle 10g, Spring 3.0.2, Hibernate 3.5.4
Reporter: Geoff Powdrell
Deployment in Tomcat I get this issue with one of my persistent object, deployment issue 'Wrong column type FGTADM.CABIN_CLASSES for column class_code. Found: char, expected: varchar2(255 char).
I think the issue is with the Oracle dialect and how it converts a java String type to varchar2(255); regardless of what is on set on the @Column annotation; in particular the columnDefinition='char' setting is ignored.
Currently the class that errors on deployment is annotated like this:
public class CabinClass extends FareGateObject {
@Id
@Column(name = "class_code", length=1, columnDefinition = "char")
private String classCode;
The Oracle cabin_class table is structured like this:
COLUMN_NAME TYPE_NAME COLUMN_SIZE
CLASS_CODE CHAR 1
CLASS_NAME VARCHAR2 15
DESCRIPTION VARCHAR2 200
Any help appreciated. Do I need to upgrade hibernate? Is the @Column annotation definition correct?
regards
geoffpowdrell
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 5 months