Exception org.springframework.jdbc.CannotGetJdbcConnectionEx

Need help? Post your questions here.

Moderator: moderators

Exception org.springframework.jdbc.CannotGetJdbcConnectionEx

Postby eivindcom » Sun Oct 21, 2007 4:15 pm

Any help with this?

I have restarted tomcat, and reinstalled subsonic, no luck.


Error
Subsonic encountered an internal error. You can report this error in the Subsonic Forum. Please include the information below.

Exception org.springframework.jdbc.CannotGetJdbcConnectionException
Message Could not get JDBC Connection; nested exception is java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@72a11e14[file =C:\subsonic\db\subsonic.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: The process cannot access the file because another process has locked a portion of the file : C:\subsonic\db\subsonic.lck
Java version Sun Microsystems Inc. 1.5.0_10
Operating system Windows 2003 5.2
Server Apache Tomcat/5.5.12
Memory Used 24 of 39 MB
Stack trace org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@72a11e14[file =C:\subsonic\db\subsonic.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: The process cannot access the file because another process has locked a portion of the file : C:\subsonic\db\subsonic.lck Caused by: java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@72a11e14[file =C:\subsonic\db\subsonic.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: The process cannot access the file because another process has locked a portion of the file : C:\subsonic\db\subsonic.lck at org.hsqldb.jdbc.Util.sqlException(Unknown Source) at org.hsqldb.jdbc.jdbcConnection.(Unknown Source) at org.hsqldb.jdbcDriver.getConnection(Unknown Source) at org.hsqldb.jdbcDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:291) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:277) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:259) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:240) at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:112) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:516) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:583) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:612) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:620) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:652) at net.sourceforge.subsonic.dao.UserDao.getUserByName(UserDao.java:50) at net.sourceforge.subsonic.service.SecurityService.getUserByName(SecurityService.java:78) at net.sourceforge.subsonic.service.SecurityService.loadUserByUsername(SecurityService.java:39) at org.acegisecurity.ui.rememberme.TokenBasedRememberMeServices.autoLogin(TokenBasedRememberMeServices.java:151) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:104) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178) 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.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229) 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:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at net.sourceforge.subsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:25) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:36) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at net.sourceforge.subsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:36) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Unknown Source)
eivindcom
 
Posts: 17
Joined: Tue Jan 17, 2006 10:50 am

Postby sindre_mehus » Mon Oct 22, 2007 6:34 am

This happens if more than one instance of Subsonic is running. Make sure that you have only one subsonic war file and corresponding directory in the Tomcat webapps dir. Otherwise, Tomcat will deploy multiple instances of Subsonic.

Hope this helps,
Sindre
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway


Return to Help

Who is online

Users browsing this forum: No registered users and 32 guests