jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sbarriba" <sbarr...@yahoo.co.uk>
Subject MySql 5.0 & JackRabbit: Connection issues
Date Fri, 13 Jul 2007 08:41:43 GMT
Hi all,

We're testing our application using JackRabbit 1.3 with MySql 5.0.27 and
mysql-connector-java-5.0.6-bin.jar. After the application has been running
for a period of time we start getting various persistence failures within
JCR mainly referencing "Connection.close() has already been called". The
full exception and our workspace persistence configuration are shown below.
The app has to be restarted.

 

This situation prompts the question:

.        Are there any other connection related parameters that we should be
using for MySql?  Do I need "autoReconnect=true"? I note that this is
'false' by default from 5.0.3 onwards
(http://dev.mysql.com/doc/connector/j/en/auto-reconnect.html)

.        I notice Magnolia are using JNDI instead of the bundle persistence
manager. In a previous thread Zukka confirmed "But if you just want to use
JNDI to externalize the database configuration and understand the
above-mentioned Jackrabbit usage pattern, then there is no downside to using
JNDI"
(http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200705.mbox/%3C86
d42bef0705241018l36d74badpb38dc2b0f0376700@mail.gmail.com%3E) . Can anyone
confirm if the bundle persistence manager will be much more performant that
the JNDI manager? If not, then JNDI would be much more consistent for us.

 

Any other guidance for configuring JackRabbit with MySql 5.0 is appreciated.

Regards,

Shaun

 

[Workspace Config]

 

<PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager
">

          <param name="driver" value="com.mysql.jdbc.Driver"/>

          <param name="url" value="jdbc:mysql://mysql-host:3306/acme"/>

          <param name="schemaObjectPrefix" value="${wsp.name}_"/>

          <param name="user" value="acme"/>

          <param name="password" value="acme"/>

          <param name="schema" value="mysql"/>

          <param name="externalBlobs" value="false"/>

        </PersistenceManager>

 

[Exception Stack]

 

Caused by: org.apache.jackrabbit.core.state.ItemStateException: setting
autocommit failed.

        at
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.sto
re(BundleDbPersistenceManager.java:499)

        at
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedIte
mStateManager.java:688)

        at
org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemSta
teManager.java:855)

        at
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemState
Manager.java:326)

        at
org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManage
r.java:313)

        at
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemState
Manager.java:302)

        at
org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemS
tateManager.java:306)

        at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1214)

        ... 65 more

Caused by: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException:
Connection.close() has already been called. Invalid operation in this state.

        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888)

        at com.mysql.jdbc.Connection.getMutex(Connection.java:3727)

        at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:5362)

        at
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.sto
re(BundleDbPersistenceManager.java:494)

        ... 72 more

org.apache.jackrabbit.core.state.ItemStateException: setting autocommit
failed.

        at
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.sto
re(BundleDbPersistenceManager.java:499)

        at
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedIte
mStateManager.java:688)

        at
org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemSta
teManager.java:855)

        at
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemState
Manager.java:326)

        at
org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManage
r.java:313)

        at
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemState
Manager.java:302)

        at
org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemS
tateManager.java:306)

        at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1214)

        at org.apache.jackrabbit.core.NodeImpl.lock(NodeImpl.java:4070)

        at
com.mobileiq.contentrepository.jcr.MIQNodeImpl.lock(MIQNodeImpl.java:343)

        at
com.mobileiq.cms.gwt.server.model.RepositoryAccessor.lockItem(RepositoryAcce
ssor.java:697)

        at
com.mobileiq.cms.gwt.server.service.RepositoryAccessorServiceImpl$32.execute
(RepositoryAccessorServiceImpl.java:792)

        at
com.mobileiq.cms.gwt.server.service.RepositoryAccessorServiceImpl.authentica
teAndExecute(RepositoryAccessorServiceImpl.java:185)

        at
com.mobileiq.cms.gwt.server.service.RepositoryAccessorServiceImpl.authentica
teAndExecute(RepositoryAccessorServiceImpl.java:167)

        at
com.mobileiq.cms.gwt.server.service.RepositoryAccessorServiceImpl.lockItem(R
epositoryAccessorServiceImpl.java:790)

        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.gwtwidgets.server.spring.enhancer.DelegatingCallback.intercept(Delegatin
gCallback.java:98)

        at
org.gwtwidgets.server.spring.GWTSpringController$$EnhancerByCGLIB$$ca490433.
lockItem(<generated>)

        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
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServic
eServlet.java:262)

        at
org.gwtwidgets.server.spring.GWTSpringController$$EnhancerByCGLIB$$ca490433.
CGLIB$processCall$3(<generated>)

        at
org.gwtwidgets.server.spring.GWTSpringController$$EnhancerByCGLIB$$ca490433$
$FastClassByCGLIB$$eae5dacf.invoke(<generated>)

        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:167)

        at
org.gwtwidgets.server.spring.enhancer.DelegatingCallback.intercept(Delegatin
gCallback.java:103)

        at
org.gwtwidgets.server.spring.GWTSpringController$$EnhancerByCGLIB$$ca490433.
processCall(<generated>)

        at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServ
let.java:146)

        at
org.gwtwidgets.server.spring.GWTSpringController.handleRequest(GWTSpringCont
roller.java:73)

        at
org.gwtwidgets.server.spring.GWTSpringController$$EnhancerByCGLIB$$ca490433.
CGLIB$handleRequest$1(<generated>)

        at
org.gwtwidgets.server.spring.GWTSpringController$$EnhancerByCGLIB$$ca490433$
$FastClassByCGLIB$$eae5dacf.invoke(<generated>)

        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:167)

        at
org.gwtwidgets.server.spring.enhancer.DelegatingCallback.intercept(Delegatin
gCallback.java:103)

        at
org.gwtwidgets.server.spring.GWTSpringController$$EnhancerByCGLIB$$ca490433.
handleRequest(<generated>)

        at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(Si
mpleControllerHandlerAdapter.java:45)

        at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServl
et.java:820)

        at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServle
t.java:755)

        at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkSer
vlet.java:396)

        at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.jav
a:360)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)

        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)

        at
com.mobileiq.contentrepository.springmodule.http.TransactionSynchronizationF
ilter.doFilterInternal(TransactionSynchronizationFilter.java:98)

        at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestF
ilter.java:77)

        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)

        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)

        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)

        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)

        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

        at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:198)

        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:152)

        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)

        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
)

        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)

        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118
)

        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)

        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)

        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)

        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)

        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:705)

        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)

        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)

        at java.lang.Thread.run(Thread.java:595)

Caused by: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException:
Connection.close() has already been called. Invalid operation in this state.

        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888)

        at com.mysql.jdbc.Connection.getMutex(Connection.java:3727)

        at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:5362)

        at
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.sto
re(BundleDbPersistenceManager.java:494)

        ... 72 more

 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message