jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@gmail.com>
Subject Re: Problem with database filesystem
Date Mon, 05 Feb 2007 16:49:49 GMT
hi nick,

the crucial information is buried somewhere deep down your
(btw pretty daunting ;) stack trace:

> Caused by: java.sql.SQLException: Closed Connection

seems like the connection that jackrabbit's using got closed
unexpectedly somehow. i guess that weblogic's connection pooling
is causing the trouble. note that jackrabbit, since it is not a
regular application but a piece of infrastructure in its own,
should have exclusive control over its resources. therefore
i'd avoid using connection pools/wrappers, datasources et al
with jackrabbit.

btw: since version 1.2.1 jackrabbit tries to gracefully recover
from an unexpected connection loss (for more details see
http://issues.apache.org/jira/browse/JCR-645).

cheers
stefan


On 2/5/07, Nick Stolwijk <nick_stolwijk@planet.nl> wrote:
> I have got a problem with jackrabbit in combination with oracle and
> weblogic. I was not able to reconstruct the problem, because this
> happens on the test server of our customer. I was hoping someone could
> explain a little more about it.
>
> The error message and stacktrace:
> ####<Feb 2, 2007 2:04:26 PM CET> <Error> <HTTP> <servername>
> <autoportaal> <ExecuteThread: '10' for queue: 'weblogic.kernel.Default'>
> <<WLS Kernel>> <> <BEA-101017>
> <[ServletContext(id=32433685,name=autoportaal-web-0.4.17,context-path=/autoportaal)]
> Root cause of ServletException.
> org.springframework.dao.DataAccessResourceFailureException: Could not
> open Jcr Session; nested exception is javax.jcr.RepositoryException: I/O
> error while reading locks from '/locks': failed to check existence of
> file system entry: /locks: failed to check existence of file system
> entry: /locks
> Caused by: javax.jcr.RepositoryException: I/O error while reading locks
> from '/locks': failed to check existence of file system entry: /locks:
> failed to check existence of file system entry: /locks
>     at
> org.apache.jackrabbit.core.lock.LockManagerImpl.<init>(LockManagerImpl.java:126)
>     at
> org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getLockManager(RepositoryImpl.java:1538)
>     at
> org.apache.jackrabbit.core.RepositoryImpl.getLockManager(RepositoryImpl.java:759)
>     at
> org.apache.jackrabbit.core.WorkspaceImpl.getLockManager(WorkspaceImpl.java:325)
>     at
> org.apache.jackrabbit.core.XASessionImpl.getLockManager(XASessionImpl.java:169)
>     at org.apache.jackrabbit.core.XASessionImpl.init(XASessionImpl.java:127)
>     at
> org.apache.jackrabbit.core.XASessionImpl.<init>(XASessionImpl.java:100)
>     at
> org.apache.jackrabbit.core.RepositoryImpl.createSessionInstance(RepositoryImpl.java:1253)
>     at
> org.apache.jackrabbit.core.RepositoryImpl.createSession(RepositoryImpl.java:801)
>     at
> org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1132)
>     at
> org.springmodules.jcr.JcrSessionFactory.getSession(JcrSessionFactory.java:242)
>     at
> org.springmodules.jcr.SessionFactoryUtils.doGetSession(SessionFactoryUtils.java:79)
>     at
> org.springmodules.jcr.SessionFactoryUtils.getSession(SessionFactoryUtils.java:119)
>     at org.springmodules.jcr.JcrTemplate.getSession(JcrTemplate.java:121)
>     at org.springmodules.jcr.JcrTemplate.execute(JcrTemplate.java:68)
>     at org.springmodules.jcr.JcrTemplate.execute(JcrTemplate.java:108)
>     at
> nl.anwb.autoportaal.dao.jackrabbit.MediaRepositoryImpl.getMedia(MediaRepositoryImpl.java:37)
>     at
> nl.anwb.autoportaal.facade.impl.CommonContextFacadeImpl.getMedia(CommonContextFacadeImpl.java:108)
>     at sun.reflect.GeneratedMethodAccessor982.invoke(Unknown Source)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:324)
>     at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:280)
>     at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
>     at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
>     at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
>     at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
>     at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
>     at $Proxy14.getMedia(Unknown Source)
>     at
> nl.anwb.autoportaal.web.servlet.UitvoeringReviewServlet.handleRequestInternal(UitvoeringReviewServlet.java:39)
>     at
> org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
>     at
> org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45)
>     at
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:820)
>     at
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:755)
>     at
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
>     at
> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:350)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>     at
> weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
>     at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
>     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
>     at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
>     at
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
>     at
> org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
>     at
> org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
>     at
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
>     at
> org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
>     at
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
>     at
> org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
>     at
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
>     at
> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191)
>     at
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
>     at
> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
>     at
> org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90)
>     at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
>     at
> org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:61)
>     at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
>     at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
>     at
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
>     at
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
>     at
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
>     at
> weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
>     at
> weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
>     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
>     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
> Caused by: org.apache.jackrabbit.core.fs.FileSystemException: failed to
> check existence of file system entry: /locks
>     at
> org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.exists(DatabaseFileSystem.java:343)
>     at
> org.apache.jackrabbit.core.fs.FileSystemResource.exists(FileSystemResource.java:140)
>     at
> org.apache.jackrabbit.core.lock.LockManagerImpl.<init>(LockManagerImpl.java:122)
>     ... 63 more
> Caused by: java.sql.SQLException: Closed Connection
>     at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
>     at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
>     at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
>     at
> oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:698)
>     at
> oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:615)
>     at
> weblogic.jdbc.common.internal.ConnectionEnv.makeStatement(ConnectionEnv.java:1190)
>     at
> weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:981)
>     at
> weblogic.jdbc.wrapper.PreparedStatement.reCreateStatement(PreparedStatement.java:48)
>     at weblogic.jdbc.wrapper.Statement.checkStatement(Statement.java:237)
>     at
> weblogic.jdbc.wrapper.PreparedStatement.setString(PreparedStatement.java:636)
>     at
> org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.exists(DatabaseFileSystem.java:332)
>     ... 65 more
> org.apache.jackrabbit.core.fs.FileSystemException: failed to check
> existence of file system entry: /locks
>     at
> org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.exists(DatabaseFileSystem.java:343)
>     at
> org.apache.jackrabbit.core.fs.FileSystemResource.exists(FileSystemResource.java:140)
>     at
> org.apache.jackrabbit.core.lock.LockManagerImpl.<init>(LockManagerImpl.java:122)
>     at
> org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getLockManager(RepositoryImpl.java:1538)
>     at
> org.apache.jackrabbit.core.RepositoryImpl.getLockManager(RepositoryImpl.java:759)
>     at
> org.apache.jackrabbit.core.WorkspaceImpl.getLockManager(WorkspaceImpl.java:325)
>     at
> org.apache.jackrabbit.core.XASessionImpl.getLockManager(XASessionImpl.java:169)
>     at org.apache.jackrabbit.core.XASessionImpl.init(XASessionImpl.java:127)
>     at
> org.apache.jackrabbit.core.XASessionImpl.<init>(XASessionImpl.java:100)
>     at
> org.apache.jackrabbit.core.RepositoryImpl.createSessionInstance(RepositoryImpl.java:1253)
>     at
> org.apache.jackrabbit.core.RepositoryImpl.createSession(RepositoryImpl.java:801)
>     at
> org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1132)
>     at
> org.springmodules.jcr.JcrSessionFactory.getSession(JcrSessionFactory.java:242)
>     at
> org.springmodules.jcr.SessionFactoryUtils.doGetSession(SessionFactoryUtils.java:79)
>     at
> org.springmodules.jcr.SessionFactoryUtils.getSession(SessionFactoryUtils.java:119)
>     at org.springmodules.jcr.JcrTemplate.getSession(JcrTemplate.java:121)
>     at org.springmodules.jcr.JcrTemplate.execute(JcrTemplate.java:68)
>     at org.springmodules.jcr.JcrTemplate.execute(JcrTemplate.java:108)
>     at
> nl.anwb.autoportaal.dao.jackrabbit.MediaRepositoryImpl.getMedia(MediaRepositoryImpl.java:37)
>     at
> nl.anwb.autoportaal.facade.impl.CommonContextFacadeImpl.getMedia(CommonContextFacadeImpl.java:108)
>     at sun.reflect.GeneratedMethodAccessor982.invoke(Unknown Source)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:324)
>     at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:280)
>     at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
>     at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
>     at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
>     at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
>     at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
>     at $Proxy14.getMedia(Unknown Source)
>     at
> nl.anwb.autoportaal.web.servlet.UitvoeringReviewServlet.handleRequestInternal(UitvoeringReviewServlet.java:39)
>     at
> org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
>     at
> org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45)
>     at
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:820)
>     at
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:755)
>     at
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
>     at
> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:350)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>     at
> weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
>     at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
>     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
>     at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
>     at
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
>     at
> org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
>     at
> org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
>     at
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
>     at
> org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
>     at
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
>     at
> org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
>     at
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
>     at
> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191)
>     at
> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
>     at
> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
>     at
> org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90)
>     at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
>     at
> org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:61)
>     at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
>     at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
>     at
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
>     at
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
>     at
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
>     at
> weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
>     at
> weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
>     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
>     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
> Caused by: java.sql.SQLException: Closed Connection
>     at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
>     at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
>     at
> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
>     at
> oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:698)
>     at
> oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:615)
>     at
> weblogic.jdbc.common.internal.ConnectionEnv.makeStatement(ConnectionEnv.java:1190)
>     at
> weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:981)
>     at
> weblogic.jdbc.wrapper.PreparedStatement.reCreateStatement(PreparedStatement.java:48)
>     at weblogic.jdbc.wrapper.Statement.checkStatement(Statement.java:237)
>     at
> weblogic.jdbc.wrapper.PreparedStatement.setString(PreparedStatement.java:636)
>     at
> org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.exists(DatabaseFileSystem.java:332)
>     ... 65 more
>
>
> The code at the origin of this exception:
> DatabaseFileSystem.java
>     public boolean exists(String path) throws FileSystemException {
>         if (!initialized) {
>             throw new IllegalStateException("not initialized");
>         }
>
>         FileSystemPathUtil.checkFormat(path);
>
>         String parentDir = FileSystemPathUtil.getParentDir(path);
>         String name = FileSystemPathUtil.getName(path);
>
>         PreparedStatement stmt = selectExistStmt;
>         synchronized (stmt) {
>             ResultSet rs = null;
>             try {
>                 stmt.setString(1, parentDir); //This is line 332
>                 stmt.setString(2, name);
>                 stmt.execute();
>                 rs = stmt.getResultSet();
>
>                 // a file system entry exists if the result set
>                 // has at least one entry
>                 return rs.next();
>             } catch (SQLException e) {
>                 String msg = "failed to check existence of file system
> entry: " + path;
>                 log.error(msg, e);
>                 throw new FileSystemException(msg, e);
>             } finally {
>                 closeResultSet(rs);
>                 resetStatement(stmt);
>             }
>         }
>     }
>
>
>
> Does someone has any idea of what went wrong and how to avoid this problem?
>
> Hope someone can help,
>
> Nick Stolwijk
>

Mime
View raw message