3 Replies Latest reply on Oct 1, 2005 8:00 PM by stelang stelang

    lock.TimeoutException

    Rahul Pilani Newbie

      Thanks bela,
      Stuck with another problem. Sorry to bug you so much! :P
      I am using the latest jgroups build, jboss 4.0.2, hibernate 2.1, jdk 1.5

      Getting this exception now:

      14:20:38,781 ERROR [com.tps.gen.ui.CalculatedProductHandler] - Unable to get the list. Returning an empty DataModel object
      net.sf.hibernate.cache.CacheException: org.jboss.cache.lock.TimeoutException: rsp=sender=192.168.1.108:2159, retval=null, received=fal
       at net.sf.hibernate.cache.TreeCache.put(TreeCache.java:35)
       at net.sf.hibernate.cache.TransactionalCache.put(TransactionalCache.java:44)
       at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2228)
       at net.sf.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:319)
       at net.sf.hibernate.loader.Loader.doQuery(Loader.java:309)
       at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138)
       at net.sf.hibernate.loader.Loader.doList(Loader.java:1063)
       at net.sf.hibernate.loader.Loader.list(Loader.java:1054)
       at net.sf.hibernate.loader.CriteriaLoader.list(CriteriaLoader.java:118)
       at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3660)
       at net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:238)
       at com.tps.framework.jsf.EntityHandler.getList(EntityHandler.java:373)
       at sun.reflect.GeneratedMethodAccessor440.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:386)
       at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:71)
       at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:533)
       at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
       at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:362)
       at javax.faces.component.UIData.getValue(UIData.java:760)
       at javax.faces.component.UIData.createDataModel(UIData.java:525)
       at javax.faces.component.UIData.getDataModel(UIData.java:514)
       at javax.faces.component.UIData.getRowCount(UIData.java:103)
       at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:122)
       at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:93)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:315)
       at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:444)
       at org.apache.myfaces.renderkit.RendererUtils.renderChildren(RendererUtils.java:427)
       at org.apache.myfaces.renderkit.html.HtmlGroupRendererBase.encodeEnd(HtmlGroupRendererBase.java:62)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:327)
       at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:349)
       at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:253)
       at org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:55)
       at org.apache.jsp.secure.calculatedProduct_jsp._jspx_meth_h_panelGroup_7(calculatedProduct_jsp.java:3043)
       at org.apache.jsp.secure.calculatedProduct_jsp._jspx_meth_h_form_0(calculatedProduct_jsp.java:2857)
       at org.apache.jsp.secure.calculatedProduct_jsp._jspService(calculatedProduct_jsp.java:352)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
       at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
       at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:228)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:299)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at com.tps.framework.servlet.HibernateFilter.doFilter(HibernateFilter.java:48)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at com.tps.framework.servlet.HivemindFilter.doFilter(HivemindFilter.java:55)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:112)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jboss.cache.lock.TimeoutException: rsp=sender=192.168.1.108:2159, retval=null, received=false, suspected=false
       at org.jboss.cache.TreeCache.callRemoteMethods(TreeCache.java:2205)
       at org.jboss.cache.TreeCache.callRemoteMethods(TreeCache.java:2227)
       at org.jboss.cache.interceptors.ReplicationInterceptor.handleReplicatedMethod(ReplicationInterceptor.java:120)
       at org.jboss.cache.interceptors.ReplicationInterceptor.invoke(ReplicationInterceptor.java:85)
       at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:3116)
       at org.jboss.cache.TreeCache.put(TreeCache.java:1762)
       at net.sf.hibernate.cache.TreeCache.put(TreeCache.java:32)
       ... 77 more
      14:20:38,781 INFO [com.tps.framework.service.impl.PersistenceImpl] - Closing Session & Transaction for Thread [http-0.0.0.0-8080-1].
      
      


      my treecache.xml looks like this:
      <?xml version="1.0" encoding="UTF-8"?>
      
      <server>
      
       <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar" />
       <mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=TreeCache">
      
       <depends>jboss:service=Naming</depends>
       <depends>jboss:service=TransactionManager</depends>
      
       <attribute name="ClusterName">MyCluster</attribute>
       <attribute name="CacheMode">REPL_SYNC</attribute>
       <attribute name="SyncReplTimeout">10000</attribute>
       <attribute name="LockAcquisitionTimeout">15000</attribute>
      
       <attribute name="FetchStateOnStartup">true</attribute>
       <attribute name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
       <attribute name="EvictionPolicyConfig">
       <config>
       <attribute name="wakeUpIntervalSeconds">5</attribute>
       <!-- Cache wide default -->
       <region name="/_default_">
       <attribute name="maxNodes">5000</attribute>
       <attribute name="timeToIdleSeconds">1000</attribute>
       </region>
       </config>
       </attribute>
       <attribute name="ClusterConfig">
       <config>
       <UDP bind_addr="192.168.1.109"
       mcast_addr="228.8.8.8"
       mcast_port="45566"
       ip_ttl="64"
       ip_mcast="true"
       mcast_send_buf_size="150000"
       mcast_recv_buf_size="80000"
       ucast_send_buf_size="150000"
       ucast_recv_buf_size="80000"
       loopback="true"
       max_bundle_size="60000"
       max_bundle_timeout="30"
       use_incoming_packet_handler="false"
       use_outgoing_packet_handler="false"
       enable_bundling="false"
       />
      
       <PING timeout="6000" num_initial_members="2" up_thread="false" down_thread="false" />
       <FD_SOCK />
       <pbcast.NAKACK gc_lag="50"
       retransmit_timeout="600,1200,2400,4800"
       max_xmit_size="8192"
       up_thread="false" down_thread="false" />
       <UNICAST timeout="600,1200,2400" window_size="100"
       min_threshold="10" down_thread="false" />
       <pbcast.STABLE desired_avg_gossip="20000" up_thread="false"
       down_thread="false" />
       <FRAG frag_size="8192" down_thread="false" up_thread="false" />
      
       <pbcast.GMS join_timeout="5000"
       join_retry_timeout="2000"
       shun="true" print_local_addr="true" />
      
       <pbcast.STATE_TRANSFER up_thread="true" down_thread="true" />
       </config>
       </attribute>
       </mbean>
      </server>
      


      Its in a 2 node configuration. It works for some objects some time and other times it doesnt work. I am thinking it must be some configuration issue that i have to get around..

      Thanks
      Rahul