[JBoss Cache Users] - Commit fails using JBoss applications server Transaction Man
by kurtu2
Hi,
I'm currently using the Jboss cache version 1.4.1 togheter with the jboss application server 4.2.2 (the chaceh version is the one shiped by default on this application server version). I configured the cache .xml file to use the JDBC Class loader to make the cache persistent towards a database.
My use case is the following one: an external client application calls a method of a stateless session bean, which is deployed on the jboss application server. This stateless bean method looks up the local cache and puts inside the cache an element and finally it returns a value to the client application.
As a first step, I didn't configure the cache to use a Transaction manager, so the cache started without transaction support. This time, when I tried to test the use case, everything worked fine: the stateless bean method is called, it inserts an element in the cache and it returns the value. As result I can see also the persisted element in the database. Obviously, since there is no transaction support, if a runtime exception occurs during the stateless bean method execution, the cache insertion process will be not rolled back.
Therefore as a second step I set up the cache to use the JBoss Transaction manager (defined in the cache configuration file to use JBossTransactionManagerLookup) and I tested again the use case. But this time I get an exception when the application tries to commit: Transaction is not ACTIVE (obviously as result, the cache element is not persisted on the database). This exception occurs at the end, when the stateless session bean method has ended without exception and the JBoss application server tries to commit the operation (the insertion of the element of the cache) on the database using the TWO-PHASE-COMMIT protocol. If I put the logging on TRACE level I can clearly see that when the stateless session bean method is executing the operations and the cache is altered, there is a global transaction used, but at the end when it's time to commit, the server throws the exception saying that the transaction is not anymore active. Do you have any idea of the reason of the exception? Can it be linked to the fact that I'm using the REPLY_ASYNC
cache mode?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261946#4261946
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4261946
16 years, 6 months
[Persistence] - Re: dedicated server process results in ORA-24777 error
by h2kinfosys
Hello All,
I set the parameters in Oracle as per the instructions and my oracle-xa-ds.xml and oracle-ds.xml files has below. Still I am getting the exception. Any input on this ?
<connection-url>jdbc:oracle:thin:@(description=(address_list=(address=(protocol=tcp)(host=mana-jb)(port=1521)))(connect_data=(server=shared)(service_name=rrm)))</connection-url>
=================================
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Io exception: End of TNS data channel)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:225)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:195)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:633)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:267)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:622)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:46)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1573)
at org.hibernate.loader.Loader.doQuery(Loader.java:696)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:2228)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
at org.hibernate.loader.Loader.list(Loader.java:2120)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67)
at net.cox.customerprofile.data.ControllerEAOBean.getControllers(ControllerEAOBean.java:93)
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.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
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.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)
at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_1524522201.invoke(InvocationContextInterceptor_z_fillMethod_1524522201.java)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)
at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_1524522201.invoke(InvocationContextInterceptor_z_setup_1524522201.java)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
at org.jboss.ejb3.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:114)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:176)
at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:216)
at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
at $Proxy743.getControllers(Unknown Source)
at net.cox.web.admin.ControllerDetails.pageBeginRender(ControllerDetails.java:74)
at org.apache.tapestry.AbstractPage.firePageBeginRender(AbstractPage.java:409)
at org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:244)
at org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:397)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.renderResponse(DefaultResponseBuilder.java:151)
at org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(ResponseRendererImpl.java:33)
at $ResponseRenderer_12482ed255e.renderResponse($ResponseRenderer_12482ed255e.java)
at $ResponseRenderer_12482ed255d.renderResponse($ResponseRenderer_12482ed255d.java)
at org.apache.tapestry.engine.PageService.service(PageService.java:68)
at $IEngineService_12482ed25d5.service($IEngineService_12482ed25d5.java)
at org.apache.tapestry.services.impl.EngineServiceInnerProxy.service(EngineServiceInnerProxy.java:77)
at org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)
at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:241)
at org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54)
at $WebRequestServicer_12482ed25b4.service($WebRequestServicer_12482ed25b4.java)
at $WebRequestServicer_12482ed25b3.service($WebRequestServicer_12482ed25b3.java)
at $WebRequestServicer_12482ed25b0.service($WebRequestServicer_12482ed25b0.java)
at $WebRequestServicer_12482ed25af.service($WebRequestServicer_12482ed25af.java)
at org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61)
at $ServletRequestServicer_12482ed2596.service($ServletRequestServicer_12482ed2596.java)
at $ServletRequestServicer_12482ed2595.service($ServletRequestServicer_12482ed2595.java)
at org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
at $ServletRequestServicerFilter_12482ed2592.service($ServletRequestServicerFilter_12482ed2592.java)
at $ServletRequestServicerFilter_12482ed2591.service($ServletRequestServicerFilter_12482ed2591.java)
at $ServletRequestServicer_12482ed2597.service($ServletRequestServicer_12482ed2597.java)
at org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
at $ServletRequestServicerFilter_12482ed2590.service($ServletRequestServicerFilter_12482ed2590.java)
at $ServletRequestServicerFilter_12482ed258f.service($ServletRequestServicerFilter_12482ed258f.java)
at $ServletRequestServicer_12482ed2597.service($ServletRequestServicer_12482ed2597.java)
at org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
at $ServletRequestServicerFilter_12482ed2594.service($ServletRequestServicerFilter_12482ed2594.java)
at $ServletRequestServicerFilter_12482ed2593.service($ServletRequestServicerFilter_12482ed2593.java)
at $ServletRequestServicer_12482ed2597.service($ServletRequestServicer_12482ed2597.java)
at $ServletRequestServicer_12482ed258a.service($ServletRequestServicer_12482ed258a.java)
at $ServletRequestServicer_12482ed2589.service($ServletRequestServicer_12482ed2589.java)
at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:126)
at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:103)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
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 org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
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:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.service.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:135)
at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:94)
at org.jboss.web.tomcat.service.session.LockingValve.invoke(LockingValve.java:62)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:905)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:592)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2036)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: Io exception: End of TNS data channel
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:494)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:411)
at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:490)
at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:202)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
at oracle.jdbc.driver.OracleDriver._connect_2(OracleDriver.java:465)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:207)
... 139 more
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261923#4261923
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4261923
16 years, 6 months
[Clustering] - Re: Failure when cleaning up HTTP Session in JBoss AS Cluste
by bstansberry@jboss.com
Re: FileCacheLoader, I think it would be strange if some corruption happened to the same session on 2 different systems.
The limitiations of the FCL are:
* Due to the way the FileCacheLoader represents a tree structure on disk (directories and files) traversal is inefficient for deep trees.
* Usage on shared filesystems like NFS, Windows shares, etc. should be avoided as these do not implement proper file locking and can cause data corruption.
* Usage with an isolation level of NONE can cause corrupt writes as multiple threads attempt to write to the same file.
* File systems are inherently not transactional, so when attempting to use your cache in a transactional context, failures when writing to the file (which happens during the commit phase) cannot be recovered.
I assume you aren't using a shared filesystem for the session store. The isolation level NONE caveat doesn't apply. The problem with not being able to recover if a write failure occurs in a tx is semi-relevant, but I'd expect then you'd have seen some errors in the logs when the session was persisted.
Re: the pattern of failures, how close is the timing of the logging between the servers?
You're using buddy replication, right? That would explain only 2 servers being involved -- the server handling the session and its buddy.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261919#4261919
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4261919
16 years, 6 months