jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Enrico Drusiani <edrusi...@zensistemi.com>
Subject Jackrabbit + Mysql + Connection timeout
Date Tue, 05 Aug 2008 15:14:42 GMT
Hi everyone

I've tried to look for this problem in the archives but i didn't find 
anything that i could use to solve it

I've a web application that runs on jboss-4.2.2. with Hibernate and 
EJB3. I implemented the connection manager c3p0 for solving a problem of 
connection timeout with mysql database. now i've found out that 
jackrabbit has this problem too.

Maybe i'm understimating the problem, but i thought i just needed to 
implement c3p0 either in my jcr datasource or in the repository, but i 
can't understand how could i do that.Guess it isn't the right way to 
correct it.

Thanks in advance for any help!

Enrico Drusiani

my jcr-ds.xml

<connection-factories>
  <tx-connection-factory>

    <jndi-name>jcr/local</jndi-name>
    <adapter-display-name>JCR Adapter</adapter-display-name>
    <rar-name>jackrabbit-jca-1.4.rar</rar-name>
    <connection-definition>javax.jcr.Repository</connection-definition>
    <xa-transaction/>
 
    <!-- Configuration properties. -->
    <config-property name="homeDir">C:/jackrabbit</config-property>
    <config-property 
name="configFile">C:/jackrabbit/repository.xml</config-property>
    <config-property name="bindSessionToTrasaction" 
type="java.lang.Boolean">true</config-property>

  </tx-connection-factory>

</connection-factories>

my repository.xml (just the PersistenceManager part)

      <PersistenceManager 
class="org.apache.jackrabbit.core.state.db.JNDIDatabasePersistenceManager">
        <param name="driver" value="com.mysql.jdbc.Driver"/>
        <param name="url" value="jdbc:mysql://localhost:3306/jackrabbit"/>
        <param name="user" value="****"/>
        <param name="password" value="***"/>
        <param name="schema" value="mysql"/>
        <param name="schemaObjectPrefix" value="${wsp.name}_"/>
        <param name="externalBLOBs" value="true"/>
        <!-- test parameters -->
        <param name="c3p0.acquire_increment">1</param>
        <param name="c3p0.idle_test_period">100</param>
        <param name="c3p0.max_size">100</param>
        <param name="c3p0.max_statements">0</param>
        <param name="c3p0.min_size">5</param>
        <param name="c3p0.timeout">100</param>
        </PersistenceManager>


the stacktrace is the following.

12:39:24,165 ERROR [DatabasePersistenceManager] committing change log failed
com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: 
Communications link failure during commit(). Transaction resolution unknown.
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:980)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
    at com.mysql.jdbc.ConnectionImpl.commit(ConnectionImpl.java:1552)
    at 
org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:315)
    at 
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:704)
    at 
org.apache.jackrabbit.core.state.XAItemStateManager.commit(XAItemStateManager.java:164)
    at 
org.apache.jackrabbit.core.TransactionContext.commit(TransactionContext.java:189)
    at 
org.apache.jackrabbit.core.XASessionImpl.commit(XASessionImpl.java:339)
    at 
org.apache.jackrabbit.jca.TransactionBoundXAResource.commit(TransactionBoundXAResource.java:39)
    at 
org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper.commit(JcaXAResourceWrapper.java:53)
    at 
com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelOnePhaseCommit(XAResourceRecord.java:636)
    at 
com.arjuna.ats.arjuna.coordinator.BasicAction.onePhaseCommit(BasicAction.java:2619)
    at 
com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1779)
    at 
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:88)
    at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
    at 
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)
    at 
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
    at 
com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
    at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
    at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
    at 
org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253)
    at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at 
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
    at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at 
org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
    at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at 
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
    at 
org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
    at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at 
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
    at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at 
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
    at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at 
org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:206)
    at 
org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:119)
    at $Proxy110.getContenutoDocumentale(Unknown Source)
    at 
com.zensistemi.gedeone.server.module_doc.mgr.Doc.getContenutoDocumentale(Doc.java:150)
    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:585)
    at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
    at 
org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
    at 
org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
    at 
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:98)
    at 
org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
    at sun.reflect.GeneratedMethodAccessor120.invoke(Unknown Source)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at 
org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
    at 
org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
    at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at 
org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
    at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at 
org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
    at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
    at 
org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
    at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at 
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
    at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at 
org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
    at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at 
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
    at 
org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
    at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at 
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
    at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at 
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
    at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at 
org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:240)
    at 
org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210)
    at 
org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84)
    at $Proxy116.getContenutoDocumentale(Unknown Source)
    at 
com.zensistemi.gedeone.server.module_doc.DocProxy.getContenutoDocumentale(DocProxy.java:75)
    at 
com.zensistemi.gedeone.client.doc.action.DocDownloadAction.openDownload(DocDownloadAction.java:90)
    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:585)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
    at 
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
    at 
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
    at 
org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
    at 
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
    at 
org.jboss.seam.interceptors.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:54)
    at 
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
    at 
com.zensistemi.gedeone.client.utility.LoggedInInterceptor.checkLoggedIn(LoggedInInterceptor.java:47)
    at sun.reflect.GeneratedMethodAccessor151.invoke(Unknown Source)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
    at 
org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:178)
    at 
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:73)
    at 
org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
    at 
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
    at 
org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
    at 
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
    at 
org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
    at 
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
    at 
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
    at 
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
    at 
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)



Mime
View raw message