db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Bradbury <Stan.Bradb...@gmail.com>
Subject Re: Cause of Can't start Databases/JPetStoreDB?
Date Tue, 22 Nov 2005 19:06:55 GMT
Martin Streicher wrote:

> Anyone know what the root cause of this error is? I am trying to run 
> the JPetStore demo under Derby and Geronimo. 
>
> Help! Quick! 
>
> Martin
>
>
>
> *Error!*
>
> *com.ibatis.struts.BeanActionException*
> Error dispatching bean action via URL pattern ('viewCategory'). Cause: 
> java.lang.reflect.InvocationTargetException
>
> *Stack*
>
> /com.ibatis.struts.BeanActionException: Error dispatching bean action 
> via URL pattern ('viewCategory').//  //Cause: 
> java.lang.reflect.InvocationTargetException/
> /Caused by: java.lang.reflect.InvocationTargetException/
> /at com.ibatis.struts.BeanAction.execute(BeanAction.java:140)/
> /at 
> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)/
> /at 
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)/
> /at 
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)/
> /at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)/
> /at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)/
> /at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)/
> /at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)/
> /at 
> org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:92)/
> /at 
> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:832)/
> /at 
> org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171)/
> /at 
> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:823)/
> /at 
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)/
> /at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)/
> /at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)/
> /at 
> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:635)/
> /at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)/
> /at org.mortbay.http.HttpServer.service(HttpServer.java:954)/
> /at org.mortbay.http.HttpConnection.service(HttpConnection.java:814)/
> /at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)/
> /at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)/
> /at 
> org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)/
> /at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)/
> /at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)/
> /Caused by: java.lang.reflect.InvocationTargetException/
> /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:324)/
> /at com.ibatis.struts.BeanAction.execute(BeanAction.java:138)/
> /... 23 more/
> /Caused by: com.ibatis.dao.client.DaoException: Error starting SQL Map 
> transaction.//  //Cause: SQL Exception: Failed to start database 
> 'Databases/JPetstoreDB', see the next exception for details./
> /Caused by: SQL Exception: Failed to start database 
> 'Databases/JPetstoreDB', see the next exception for details./
> /at 
> com.ibatis.dao.engine.transaction.sqlmap.SqlMapDaoTransaction.(SqlMapDaoTransaction.java:25)/
> /at 
> com.ibatis.dao.engine.transaction.sqlmap.SqlMapDaoTransactionManager.startTransaction(SqlMapDaoTransactionManager.java:48)/
> /at 
> com.ibatis.dao.engine.impl.DaoContext.startTransaction(DaoContext.java:82)/
> /at com.ibatis.dao.engine.impl.DaoProxy.invoke(DaoProxy.java:60)/
> /at $Proxy5.getProductListByCategory(Unknown Source)/
> /at 
> com.ibatis.jpetstore.service.CatalogService.getProductListByCategory(CatalogService.java:60)/
> /at 
> com.ibatis.jpetstore.presentation.CatalogBean.viewCategory(CatalogBean.java:134)/
> /... 28 more/
> /Caused by: SQL Exception: Failed to start database 
> 'Databases/JPetstoreDB', see the next exception for details./
> /at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java)/
> /at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java)/
> /at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java)/
> /at 
> org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(EmbedConnection.java)/
> /at 
> org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnection.java)/
> /at org.apache.derby.impl.jdbc.EmbedConnection.(EmbedConnection.java)/
> /at org.apache.derby.impl.jdbc.EmbedConnection20.(EmbedConnection20.java)/
> /at org.apache.derby.impl.jdbc.EmbedConnection30.(EmbedConnection30.java)/
> /at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Driver30.java)/
> /at org.apache.derby.jdbc.Driver169.connect(Driver169.java)/
> /at org.apache.derby.jdbc.EmbeddedDriver.connect(EmbeddedDriver.java)/
> /at 
> org.tranql.connector.jdbc.JDBCDriverMCF.getPhysicalConnection(JDBCDriverMCF.java:90)/
> /at 
> org.tranql.connector.jdbc.JDBCDriverMCF.createManagedConnection(JDBCDriverMCF.java:70)/
> /at 
> org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:41)/
> /at 
> org.apache.geronimo.connector.outbound.LocalXAResourceInsertionInterceptor.getConnection(LocalXAResourceInsertionInterceptor.java:41)/
> /at 
> org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor.internalGetConnection(SinglePoolConnectionInterceptor.java:60)/
> /at 
> org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:70)/
> /at 
> org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:47)/
> /at 
> org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:86)/
> /at 
> org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnection(ConnectionHandleInterceptor.java:43)/
> /at 
> org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39)/
> /at 
> org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.getConnection(ConnectionTrackingInterceptor.java:66)/
> /at 
> org.apache.geronimo.connector.outbound.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:60)/
> /at 
> org.tranql.connector.jdbc.DataSource.getConnection(DataSource.java:56)/
> /at $javax.sql.DataSource$$FastClassByCGLIB$$6525cafd.invoke()/
> /at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)/
> /at 
> org.apache.geronimo.connector.ConnectorMethodInterceptor.intercept(ConnectorMethodInterceptor.java:53)/
> /at $javax.sql.DataSource$$EnhancerByCGLIB$$5faece95.getConnection()/
> /at 
> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.(JdbcTransaction.java:26)/
> /at 
> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransactionConfig.newTransaction(JdbcTransactionConfig.java:32)/
> /at 
> com.ibatis.sqlmap.engine.transaction.TransactionManager.begin(TransactionManager.java:35)/
> /at 
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.startTransaction(SqlMapExecutorDelegate.java:408)/
> /at 
> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.startTransaction(SqlMapSessionImpl.java:113)/
> /at 
> com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.startTransaction(SqlMapClientImpl.java:87)/
> /at 
> com.ibatis.dao.engine.transaction.sqlmap.SqlMapDaoTransaction.(SqlMapDaoTransaction.java:22)/
> /... 34 more/
>
> /Caused by:// /
> /java.lang.reflect.InvocationTargetException/
> /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:324)/
> /at com.ibatis.struts.BeanAction.execute(BeanAction.java:138)/
> /at 
> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)/
> /at 
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)/
> /at 
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)/
> /at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)/
> /at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)/
> /at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)/
> /at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)/
> /at 
> org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:92)/
> /at 
> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:832)/
> /at 
> org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171)/
> /at 
> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:823)/
> /at 
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)/
> /at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)/
> /at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)/
> /at 
> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:635)/
> /at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)/
> /at org.mortbay.http.HttpServer.service(HttpServer.java:954)/
> /at org.mortbay.http.HttpConnection.service(HttpConnection.java:814)/
> /at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)/
> /at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)/
> /at 
> org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)/
> /at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)/
> /at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)/
> /Caused by: com.ibatis.dao.client.DaoException: Error starting SQL Map 
> transaction.//  //Cause: SQL Exception: Failed to start database 
> 'Databases/JPetstoreDB', see the next exception for details./
> /Caused by: SQL Exception: Failed to start database 
> 'Databases/JPetstoreDB', see the next exception for details./
> /at 
> com.ibatis.dao.engine.transaction.sqlmap.SqlMapDaoTransaction.(SqlMapDaoTransaction.java:25)/
> /at 
> com.ibatis.dao.engine.transaction.sqlmap.SqlMapDaoTransactionManager.startTransaction(SqlMapDaoTransactionManager.java:48)/
> /at 
> com.ibatis.dao.engine.impl.DaoContext.startTransaction(DaoContext.java:82)/
> /at com.ibatis.dao.engine.impl.DaoProxy.invoke(DaoProxy.java:60)/
> /at $Proxy5.getProductListByCategory(Unknown Source)/
> /at 
> com.ibatis.jpetstore.service.CatalogService.getProductListByCategory(CatalogService.java:60)/
> /at 
> com.ibatis.jpetstore.presentation.CatalogBean.viewCategory(CatalogBean.java:134)/
> /... 28 more/
> /Caused by: SQL Exception: Failed to start database 
> 'Databases/JPetstoreDB', see the next exception for details./
> /at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java)/
> /at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java)/
> /at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java)/
> /at 
> org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(EmbedConnection.java)/
> /at 
> org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnection.java)/
> /at org.apache.derby.impl.jdbc.EmbedConnection.(EmbedConnection.java)/
> /at org.apache.derby.impl.jdbc.EmbedConnection20.(EmbedConnection20.java)/
> /at org.apache.derby.impl.jdbc.EmbedConnection30.(EmbedConnection30.java)/
> /at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Driver30.java)/
> /at org.apache.derby.jdbc.Driver169.connect(Driver169.java)/
> /at org.apache.derby.jdbc.EmbeddedDriver.connect(EmbeddedDriver.java)/
> /at 
> org.tranql.connector.jdbc.JDBCDriverMCF.getPhysicalConnection(JDBCDriverMCF.java:90)/
> /at 
> org.tranql.connector.jdbc.JDBCDriverMCF.createManagedConnection(JDBCDriverMCF.java:70)/
> /at 
> org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:41)/
> /at 
> org.apache.geronimo.connector.outbound.LocalXAResourceInsertionInterceptor.getConnection(LocalXAResourceInsertionInterceptor.java:41)/
> /at 
> org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor.internalGetConnection(SinglePoolConnectionInterceptor.java:60)/
> /at 
> org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:70)/
> /at 
> org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:47)/
> /at 
> org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:86)/
> /at 
> org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnection(ConnectionHandleInterceptor.java:43)/
> /at 
> org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39)/
> /at 
> org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.getConnection(ConnectionTrackingInterceptor.java:66)/
> /at 
> org.apache.geronimo.connector.outbound.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:60)/
> /at 
> org.tranql.connector.jdbc.DataSource.getConnection(DataSource.java:56)/
> /at $javax.sql.DataSource$$FastClassByCGLIB$$6525cafd.invoke()/
> /at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)/
> /at 
> org.apache.geronimo.connector.ConnectorMethodInterceptor.intercept(ConnectorMethodInterceptor.java:53)/
> /at $javax.sql.DataSource$$EnhancerByCGLIB$$5faece95.getConnection()/
> /at 
> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.(JdbcTransaction.java:26)/
> /at 
> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransactionConfig.newTransaction(JdbcTransactionConfig.java:32)/
> /at 
> com.ibatis.sqlmap.engine.transaction.TransactionManager.begin(TransactionManager.java:35)/
> /at 
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.startTransaction(SqlMapExecutorDelegate.java:408)/
> /at 
> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.startTransaction(SqlMapSessionImpl.java:113)/
> /at 
> com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.startTransaction(SqlMapClientImpl.java:87)/
> /at 
> com.ibatis.dao.engine.transaction.sqlmap.SqlMapDaoTransaction.(SqlMapDaoTransaction.java:22)/

Hi Martin -
The Geronimo Integration article shows how to get JPetStore working with 
Geronimo v 1 M4.  This can be found at:
http://db.apache.org/derby/integrate/JPetStoreGeronimo.html

Usually start failures aee caused by either
a) 'Database not found'  meaning eihter derby.system.home has to be set 
properly or the URL must specify the exact location (these problems are 
usually solved by using a datasource - The article on the Derby 
integrations page shows how to do this).
b) 'Database already locked by another instance' - again using a 
datasource will avoid this problem.

I need to see the next exception as alluded to in the message to know 
for sure:
Caused by: SQL Exception: Failed to start database 
'Databases/JPetstoreDB', see the next exception for details.

The full trace will usually be found in the geronimo.log file 
(GEROMINO_HOME/var/log).   A proper start (for DS named: 
JPetstoreDerbyDataSource  ...using the database: JPetStoreDB) will look 
something like:

    ... Stuff removed ...
15:39:00,991 INFO  [Daemon] Server startup completed
15:39:11,977 INFO  [LocalConfigStore:config-store] Loaded Configuration 
geronimo.config:name="JPetStoreDB"
15:39:11,987 DEBUG [GBeanInstanceState] GBeanInstanceState for: 
geronimo.config:name="JPetStoreDB" State changed from stopped to starting
15:39:12,027 DEBUG [Configuration] ClassPath for JPetStoreDB resolved to 
[file:/C:/Stan/Geronimo/geronimo-1.0-169186/repository/derby/Jars10.0.2/derby.jar, 
file:/C:/Stan/Geronimo/geronimo-1.0-169186/config-store/24/rar/tranql-connector-1.0-SNAPSHOT.jar]
15:39:12,218 INFO  [Configuration] Started configuration JPetStoreDB
15:39:12,218 DEBUG [GBeanInstanceState] GBeanInstanceState for: 
geronimo.config:name="JPetStoreDB" State changed from starting to running
15:39:12,218 DEBUG [GBeanInstanceState] GBeanInstanceState for: 
geronimo.server:J2EEApplication=null,J2EEServer=geronimo,JCAResource=JPetStoreDB,j2eeType=JCAConnectionManager,name=JPetstoreDerbyDataSource

State changed from stopped to starting
15:39:12,218 DEBUG [GBeanInstanceState] GBeanInstanceState for: 
geronimo.server:J2EEApplication=null,J2EEServer=geronimo,JCAResource=JPetStoreDB,j2eeType=JCAConnectionManager,name=JPetstoreDerbyDataSource

State changed from starting to running
15:39:12,218 DEBUG [GBeanInstanceState] GBeanInstanceState for: 
geronimo.server:J2EEApplication=null,J2EEServer=geronimo,JCAResource=JPetStoreDB,j2eeType=JCAConnectionFactory,name=JPetstoreDerbyDataSource

State changed from stopped to starting





Mime
View raw message