[JBossCache] - Problem in Optimistic Locking
by shanthi_jira
Hi ,
I have used pessimisticlocking scheme in jboss cache.I have faced dead lock and time out problem. In Forum I saw that Optimistic locking supports concurrency and it will not lead to dead lock problem . I have changed to optimistic locking .
But still I am facing the dead lock problem like below
when CacheInstance1 commits a tx, it issues a local prepare (already holds locks on the nodes) and broadcasts a remote prepare to acquire locks on the other cache instances.
If at the same time, CacheInstance2 commits a tx ON THE SAME DATA (acquires local locks before CacheInstance1's remote prepare is received) and attempts to do a remote prepare, both caches will deadlock since they both want locks on each other's data.
More over it is not releasing lock on the nodes once this lock timeout exception comes.It will be released after restarting the server only.
I saw in the forum that this bug will be fixed in 1.4.1 sp6.When it will be released?
I am using jboss cache 1.4.1.sp4. Is it bug? Is this issue resolved in 2.0.0 GA?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099115#4099115
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099115
18Â years, 6Â months
[JNDI/Naming/Network] - Re: ClassCastException on PortableRemoteObject.narrow(object
by lavkul
Here is the entire stack trace, right from server startup to ejb exception.
| cmd /c D:\jboss-4.2.1.GA\bin\run.bat -c default
|
| D:\jboss-4.2.1.GA\bin>echo off
| ===============================================================================
|
| JBoss Bootstrap Environment
|
| JBOSS_HOME: D:\jboss-4.2.1.GA
|
| JAVA: D:\Program Files\Java\jdk1.5.0_06\bin\java
|
| JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
|
| CLASSPATH: D:\Program Files\Java\jdk1.5.0_06\lib\tools.jar;D:\jboss-4.2.1.GA\bin\run.jar
|
| ===============================================================================
|
| 20:54:59,843 INFO [Server] Starting JBoss (MX MicroKernel)...
| 20:54:59,843 INFO [Server] Release ID: JBoss [Trinity] 4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)
| 20:54:59,843 INFO [Server] Home Dir: D:\jboss-4.2.1.GA
| 20:54:59,843 INFO [Server] Home URL: file:/D:/jboss-4.2.1.GA/
| 20:54:59,843 INFO [Server] Patch URL: null
| 20:54:59,843 INFO [Server] Server Name: default
| 20:54:59,843 INFO [Server] Server Home Dir: D:\jboss-4.2.1.GA\server\default
| 20:54:59,843 INFO [Server] Server Home URL: file:/D:/jboss-4.2.1.GA/server/default/
| 20:54:59,843 INFO [Server] Server Log Dir: D:\jboss-4.2.1.GA\server\default\log
| 20:54:59,843 INFO [Server] Server Temp Dir: D:\jboss-4.2.1.GA\server\default\tmp
| 20:54:59,843 INFO [Server] Root Deployment Filename: jboss-service.xml
| 20:55:01,140 INFO [ServerInfo] Java version: 1.5.0_06,Sun Microsystems Inc.
| 20:55:01,140 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_06-b05,Sun Microsystems Inc.
| 20:55:01,140 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
| 20:55:03,390 INFO [Server] Core system initialized
| 20:55:10,249 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
| 20:55:10,249 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
| 20:55:11,921 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
| 20:55:11,921 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
| 20:55:12,968 INFO [TransactionManagerService] Starting recovery manager
| 20:55:13,499 INFO [TransactionManagerService] Recovery manager started
| 20:55:13,499 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
| 20:55:23,718 INFO [EJB3Deployer] Starting java:comp multiplexer
| 20:55:29,046 INFO [ServiceEndpointManager] jbossws-1.2.1.GA (build=200704151756)
| 20:55:33,234 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files\Java\jdk1.5.0_06\bin;.;D:\WINDOWS\System32;D:\WINDOWS;D:\WINDOWS\system32;D:\WINDOWS;D:\WINDOWS\System32\Wbem;C:\orawin95\bin
| 20:55:34,062 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
| 20:55:34,062 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
| 20:55:34,062 INFO [Catalina] Initialization processed in 1847 ms
| 20:55:34,062 INFO [StandardService] Starting service jboss.web
| 20:55:34,062 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.0.GA
| 20:55:34,140 INFO [Catalina] Server startup in 80 ms
| 20:55:34,499 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
| 20:55:36,468 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
| 20:55:38,031 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp7398jbossws-context-exp.war/
| 20:55:38,577 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
| 20:55:42,296 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
| 20:55:43,671 INFO [MailService] Mail Service bound to java:/Mail
| 20:55:44,015 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
| 20:55:44,140 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
| 20:55:44,234 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
| 20:55:44,452 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
| 20:55:44,702 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
| 20:55:44,749 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
| 20:55:44,765 INFO [QuartzResourceAdapter] start quartz!!!
| 20:55:44,874 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
| 20:55:44,921 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
| 20:55:44,952 INFO [RAMJobStore] RAMJobStore initialized.
| 20:55:44,952 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
| 20:55:44,952 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
| 20:55:44,952 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
| 20:55:47,202 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
| 20:55:48,077 INFO [A] Bound to JNDI name: queue/A
| 20:55:48,077 INFO [B] Bound to JNDI name: queue/B
| 20:55:48,077 INFO [C] Bound to JNDI name: queue/C
| 20:55:48,077 INFO [D] Bound to JNDI name: queue/D
| 20:55:48,077 INFO [ex] Bound to JNDI name: queue/ex
| 20:55:48,109 INFO [testTopic] Bound to JNDI name: topic/testTopic
| 20:55:48,140 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
| 20:55:48,140 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
| 20:55:48,140 INFO [testQueue] Bound to JNDI name: queue/testQueue
| 20:55:48,202 INFO [UILServerILService] JBossMQ UIL service available at : /127.0.0.1:8093
| 20:55:48,249 INFO [DLQ] Bound to JNDI name: queue/DLQ
| 20:55:48,562 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
| 20:55:51,577 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
| 20:55:51,593 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=MyEjb.jar,name=Hello,service=EJB3 with dependencies:
| 20:55:52,109 INFO [EJBContainer] STARTED EJB: com.wiley.examples.HelloBean ejbName: Hello
| 20:55:52,234 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
| 20:55:52,234 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=MyEjb.jar,name=TesterBean,service=EJB3 with dependencies:
| 20:55:52,296 INFO [EJBContainer] STARTED EJB: com.wiley.examples.TesterEJB ejbName: TesterBean
| 20:55:52,312 INFO [EJB3Deployer] Deployed: file:/D:/jboss-4.2.1.GA/server/default/deploy/MyEjb.jar
| 20:55:52,468 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
| 20:55:53,468 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
| 20:55:53,499 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
| 20:55:53,640 INFO [Server] JBoss (MX MicroKernel) [4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)] Started in 53s:781ms
| Connected to server
| [2007-10-16 08:55:53,671] Module myWebEar: Module is being deployed, please wait...
| 20:55:53,749 INFO [EARDeployer] Init J2EE application: file:/E:/web/WebApp/myWebEar/myWebEar.ear
| 20:55:54,734 INFO [TomcatDeployer] deploy, ctxPath=/WebModule, warUrl=.../tmp/deploy/tmp7428myWebEar.ear-contents/WebModule-exp.war/
| 20:55:55,015 INFO [STDOUT] Filter Intialized
| 20:55:55,140 WARN [TomcatDeployer] Failed to setup clustering, clustering disabled. NoClassDefFoundError: org/jgroups/blocks/MethodCall
| 20:55:55,187 INFO [EARDeployer] Started J2EE application: file:/E:/web/WebApp/myWebEar/myWebEar.ear
| [2007-10-16 08:55:55,187] Module myWebEar: Module is deployed successfully
| 20:55:55,390 INFO [STDOUT] Request initialized
| 20:55:55,718 INFO [STDOUT] Request destroyed
| 20:55:55,968 INFO [STDOUT] Request initialized
| 20:55:55,968 INFO [STDOUT] Request destroyed
| 20:56:18,296 INFO [EJBContainer] STOPPED EJB: com.wiley.examples.HelloBean ejbName: Hello
| 20:56:18,296 WARN [JmxKernelAbstraction] jboss.j2ee:jar=MyEjb.jar,name=Hello,service=EJB3 is not registered
| 20:56:18,312 INFO [EJBContainer] STOPPED EJB: com.wiley.examples.TesterEJB ejbName: TesterBean
| 20:56:18,312 WARN [JmxKernelAbstraction] jboss.j2ee:jar=MyEjb.jar,name=TesterBean,service=EJB3 is not registered
| 20:56:19,249 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
| 20:56:19,249 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=MyEjb.jar,name=Hello,service=EJB3 with dependencies:
| 20:56:19,327 INFO [EJBContainer] STARTED EJB: com.wiley.examples.HelloBean ejbName: Hello
| 20:56:19,359 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
| 20:56:19,359 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=MyEjb.jar,name=TesterBean,service=EJB3 with dependencies:
| 20:56:19,390 INFO [EJBContainer] STARTED EJB: com.wiley.examples.TesterEJB ejbName: TesterBean
| 20:56:19,406 INFO [EJB3Deployer] Deployed: file:/D:/jboss-4.2.1.GA/server/default/deploy/MyEjb.jar
| 20:56:33,624 INFO [STDOUT] Request initialized
| 20:56:33,656 ERROR [STDERR] java.lang.ClassCastException
| 20:56:33,671 ERROR [STDERR] at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)
| 20:56:33,671 ERROR [STDERR] at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
| 20:56:33,671 ERROR [STDERR] at com.ejb.EjbServlet.doPost(EjbServlet.java:46)
| 20:56:33,671 ERROR [STDERR] at com.ejb.EjbServlet.doGet(EjbServlet.java:20)
| 20:56:33,671 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
| 20:56:33,671 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| 20:56:33,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| 20:56:33,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| 20:56:33,671 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| 20:56:33,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| 20:56:33,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| 20:56:33,671 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| 20:56:33,671 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| 20:56:33,671 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| 20:56:33,671 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| 20:56:33,671 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| 20:56:33,671 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| 20:56:33,671 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| 20:56:33,671 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| 20:56:33,671 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| 20:56:33,671 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| 20:56:33,671 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| 20:56:33,671 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| 20:56:33,671 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
| 20:56:33,671 ERROR [STDERR] Caused by: java.lang.ClassCastException: $Proxy86
| 20:56:33,671 ERROR [STDERR] at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:212)
| 20:56:33,671 ERROR [STDERR] ... 23 more
| 20:56:33,671 INFO [STDOUT] Request destroyed
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099106#4099106
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099106
18Â years, 6Â months