[Persistence, JBoss/CMP, Hibernate, Database] - Exception Caused by: org.hibernate.QueryException: could not
by Gizdek
Inside my project i'm trying to do a cross join like:
assignedGroupsList = em.createQuery("select g.name from Groups as g, User2SecondaryGroup as s where s.gid = g.uid and s.uid = :userid").setParameter("userid", this.user.getUid()).getResultList();
and what i'm getting is an exception i can not resolve... maybe someone here can help me out... thanks do far - as i am a newbie , maybe there is a type mapping or something else needed
something like that works fine for example..
groupsList = em.createQuery("from Groups where " + "lower(name) like :search").setParameter("search", searchString).setHint("org.hibernate.cacheable", true).getResultList();
...
sorcecode:
---------------------------------------------------------
User2SecondaryGroup:
---------------------------------------------------------
package src;
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;
import org.hibernate.validator.Pattern;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import static org.jboss.seam.ScopeType.SESSION;
/**
* @author ls006
* @version 1.0
* user2secondarygroup entity instance corresponds a row of user2secondarygroup table
*/
@Entity
@Table(name="user2secondarygroup")
@Name("user2secondarygroup")
@Scope (SESSION)
public class User2SecondaryGroup implements Serializable {
private Integer uid;
private Integer gid;
public User2SecondaryGroup() {
uid = null;
gid = null;
}
@Id @NotNull
public Integer getUid() {
return uid;
}
public void setUid(Integer uid) {
this.uid = uid;
}
@Id @NotNull
public Integer getGid() {
return gid;
}
public void setGid(Integer gid) {
this.gid = gid;
}
@Override
public boolean equals(Object other) {
if (other == null || !(other instanceof User2SecondaryGroup)) {
return false;
}
User2SecondaryGroup otherUser2SecondaryGroup = (User2SecondaryGroup) other;
return (this.getUid().equals(otherUser2SecondaryGroup.getUid()) && this.getGid().equals(otherUser2SecondaryGroup.getUid()));
}
public String toString() {
return "User2SecondaryGroup (" + getUid().toString() + " " + getGid().toString() + " )";
}
}
18:01:24,346 ERROR [STDERR] javax.persistence.PersistenceException: org.hibernate.QueryException: could not resolve property: gid of: src.User2SecondaryGroup [select g.name from src.Groups as g, src.User2SecondaryGroup as s where s.gid = g.uid and s.uid = :userid]
18:01:24,346 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:567)
18:01:24,346 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:79)
18:01:24,346 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManager.createQuery(TransactionScopedEntityManager.java:127)
18:01:24,346 ERROR [STDERR] at src.User2SecondaryGroupManagerAction.loadUser2SecondaryGroupList(User2SecondaryGroupManagerAction.java:64)
18:01:24,346 ERROR [STDERR] at src.User2SecondaryGroupManagerAction.openSecondaryGroupAssignView(User2SecondaryGroupManagerAction.java:154)
18:01:24,346 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
18:01:24,346 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
18:01:24,346 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
18:01:24,346 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
18:01:24,346 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
18:01:24,346 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
18:01:24,346 ERROR [STDERR] at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
18:01:24,346 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
18:01:24,346 ERROR [STDERR] at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:51)
18:01:24,346 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor196.invoke(Unknown Source)
18:01:24,346 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
18:01:24,346 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
18:01:24,346 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
18:01:24,346 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
18:01:24,346 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
18:01:24,346 ERROR [STDERR] at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:79)
18:01:24,346 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor195.invoke(Unknown Source)
18:01:24,346 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
18:01:24,346 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
18:01:24,346 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
18:01:24,356 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
18:01:24,356 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
18:01:24,356 ERROR [STDERR] at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
18:01:24,356 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor194.invoke(Unknown Source)
18:01:24,356 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
18:01:24,356 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
18:01:24,356 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
18:01:24,356 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
18:01:24,356 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
18:01:24,356 ERROR [STDERR] at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:51)
18:01:24,356 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor193.invoke(Unknown Source)
18:01:24,356 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
18:01:24,356 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
18:01:24,356 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
18:01:24,356 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
18:01:24,356 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
18:01:24,356 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
18:01:24,356 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
18:01:24,356 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
18:01:24,356 ERROR [STDERR] at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:49)
18:01:24,356 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor192.invoke(Unknown Source)
18:01:24,356 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
18:01:24,356 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
18:01:24,356 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
18:01:24,356 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
18:01:24,356 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
18:01:24,356 ERROR [STDERR] at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
18:01:24,356 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
18:01:24,356 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
18:01:24,356 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
18:01:24,356 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
18:01:24,356 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
18:01:24,356 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
18:01:24,356 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
18:01:24,356 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
18:01:24,356 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
18:01:24,356 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
18:01:24,366 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
18:01:24,366 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
18:01:24,366 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
18:01:24,366 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
18:01:24,366 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
18:01:24,366 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
18:01:24,366 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
18:01:24,366 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
18:01:24,366 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:188)
18:01:24,366 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
18:01:24,366 ERROR [STDERR] at $Proxy104.openSecondaryGroupAssignView(Unknown Source)
18:01:24,366 ERROR [STDERR] at src.User2SecondaryGroupManager$$FastClassByCGLIB$$625cb2a5.invoke()
18:01:24,366 ERROR [STDERR] at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:69)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
18:01:24,466 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
18:01:24,466 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
18:01:24,466 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:38)
18:01:24,466 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source)
18:01:24,466 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
18:01:24,466 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.interceptors.SynchronizationInterceptor.serialize(SynchronizationInterceptor.java:30)
18:01:24,466 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor163.invoke(Unknown Source)
18:01:24,466 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
18:01:24,466 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:78)
18:01:24,466 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:47)
18:01:24,466 ERROR [STDERR] at src.User2SecondaryGroupManager$$EnhancerByCGLIB$$7ad38e5b.openSecondaryGroupAssignView()
18:01:24,466 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
18:01:24,466 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
18:01:24,466 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
18:01:24,466 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
18:01:24,466 ERROR [STDERR] at com.sun.el.parser.AstValue.invoke(AstValue.java:151)
18:01:24,466 ERROR [STDERR] at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
18:01:24,466 ERROR [STDERR] at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
18:01:24,466 ERROR [STDERR] at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
18:01:24,466 ERROR [STDERR] at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
18:01:24,466 ERROR [STDERR] at javax.faces.component.UICommand.broadcast(UICommand.java:106)
18:01:24,466 ERROR [STDERR] at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
18:01:24,466 ERROR [STDERR] at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
18:01:24,466 ERROR [STDERR] at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
18:01:24,466 ERROR [STDERR] at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
18:01:24,466 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
18:01:24,466 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
18:01:24,466 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
18:01:24,466 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
18:01:24,466 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
18:01:24,466 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
18:01:24,466 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
18:01:24,466 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
18:01:24,466 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
18:01:24,466 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
18:01:24,466 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
18:01:24,466 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
18:01:24,466 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
18:01:24,466 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
18:01:24,466 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
18:01:24,466 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
18:01:24,466 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
18:01:24,466 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
18:01:24,466 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
18:01:24,466 ERROR [STDERR] Caused by: org.hibernate.QueryException: could not resolve property: gid of: src.User2SecondaryGroup [select g.name from src.Groups as g, src.User2SecondaryGroup as s where s.gid = g.uid and s.uid = :userid]
18:01:24,466 ERROR [STDERR] at org.hibernate.persister.entity.AbstractPropertyMapping.throwPropertyException(AbstractPropertyMapping.java:43)
18:01:24,466 ERROR [STDERR] at org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:37)
18:01:24,466 ERROR [STDERR] at org.hibernate.persister.entity.AbstractEntityPersister.toType(AbstractEntityPersister.java:1302)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.ast.tree.FromElementType.getPropertyType(FromElementType.java:280)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.ast.tree.FromElement.getPropertyType(FromElement.java:373)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.ast.tree.DotNode.getDataType(DotNode.java:539)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.ast.tree.DotNode.prepareLhs(DotNode.java:221)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.ast.tree.DotNode.resolve(DotNode.java:172)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:94)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:90)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.ast.HqlSqlWalker.resolve(HqlSqlWalker.java:737)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1215)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4032)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3518)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1758)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1683)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:776)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:577)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:227)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:159)
18:01:24,476 ERROR [STDERR] at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:110)
18:01:24,476 ERROR [STDERR] at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:77)
18:01:24,476 ERROR [STDERR] at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:56)
18:01:24,476 ERROR [STDERR] at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
18:01:24,476 ERROR [STDERR] at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
18:01:24,476 ERROR [STDERR] at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
18:01:24,476 ERROR [STDERR] at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1612)
18:01:24,476 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:76)
18:01:24,476 ERROR [STDERR] ... 136 more
thanks a lot...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994285#3994285
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994285
19 years, 4 months
[JBossCache] - Re: Problem with JBoss JDBCCacheLoader
by hmesha
Are you sure this's your current cache configuration? It doesn't have even the JDBC cache loader configuration which was in your first post?!!
Anyway, I think based on the your first post cache configuration that more than one thread is accessing the data with read committed isolation level which means that Non-repeatable reads may occur. That would result in data retrieved in a SELECT statement may be modified by some other transaction when it commits.
anonymous wrote :
| Actually the scenario is like this:
| A thread gets a node on the cache and then does some modification on the node and tries to put it back on the cache.
| There may be multiple threads accessing the same node.
|
So when you do a get on the node (SELECT) the entry wasn't there and therefore loadNode() returns null but then when the transcation commit to the database trying to put the node (INSERT) rather than (UPDATE) the entry was already added by another transaction therefore the insert fails with the primary key violation.
try to set your Isolation Level in the cache config, from your first post,
FROM
<attribute name="IsolationLevel">READ_COMMITTED</attribute>
To
| <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
|
| OR
|
| <attribute name="IsolationLevel">SERIALIZABLE</attribute>
|
|
Rerun you performance testing and let's know if you're still seeing the issue.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994281#3994281
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994281
19 years, 4 months
[JBossCache] - [TreeCache] viewAccepted()
by ls1528
I have several Jboss clusters running on a dev/test Unix Server. Each cluster has a distinct partition name and a different multicast address and port. I modified the ../deploy/cluster-service.xml and changed the multicast address and port in the declaration of the JGroupsUDP protocol. The servers start without any errors.
I recently created a Jboss cluster on my Unix production server. It has a distinct partition name and a different multicast address and port than the ones I'm using on the dev/test Unix server. The server starts without any errors.
However, to my surprise, when I start the production Jboss server, the Tree Cache can see and knows about the Jboss servers on the dev/test Unix server. I see the message below in the production startup log file:
10:26:47,389 INFO [TreeCache] viewAccpeted(): [serverdev:61285|101] [serverdev:61285, serverdev:61290, serverdev:61325, serverdev:52951......
On the dev/test Unix server, I see the same message in all the Jboss server log files, however, the dev/test log files also contain a reference to the JBoss production server - "serverprod:56345".
How can I keep the Tree Cache for the two environments (production and dev/test) separated from each other? The Unix servers are on the same subnet. I am running Jboss V4.0.4.GA.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994279#3994279
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994279
19 years, 4 months
[JCA/JBoss] - Re: HSQLDB connection problem
by cesarcba
Hi..the problem is that im doing a DataBaseManagerImpl.java that connects to the hypersonic database, i made a web interface too, the App.ear is in server/default/deploy and works fine until I try to use this following method in the DatabaseManagerImpl.java:
private Connection getConnection (){
Connection conexion=null;
String URLConexion = "jdbc:hsqldb:hsql://localhost:1701";
try{
Class.forName("org.hsqldb.jdbcDriver");
}catch(Exception e){System.out.println("Error loading HSQLDB JDBC");}
try{
//Properties pr = new Properties();
//conexion = DriverManager.getConnection(URLConexion,pr);
conexion = DriverManager.getConnection(URLConexion);
}catch(SQLException e)
{
};
return conexion;
}
When I try to use a method that use getConnection() JBoss throws an Error that says Error loading HSQLDB JDBC..but the hsqldb libs are already in the jboss3.5.2/server/default/lib..they are hsqldb.jar and hasqldb-plugin.jar...could you help me??..could it be that hsqldb has another jdbc libs?? thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994275#3994275
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994275
19 years, 4 months