Hello:
I'm trying to start up PocketChange in Tomcat (version 6.0.24). I downloaded the version from http://github.com/tjweir/pocketchangeapp/tree on Feb 01, 2010.
When I try starting up using "mvn jetty:run" it's all fine. But when I deploy the WAR using Tomcat. I get the following error upon starting. The "SEVERE" debug statements repeat forever. Please advise on how I can use Tomcat for my development instead of Jetty.
PS: The other problem with this behavior is that eventually it starts throwing "Out-of-memory" errors and the whole JVM comes to a slow death.
Feb 1, 2010 1:20:34 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Feb 1, 2010 1:20:34 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 405 ms
Feb 1, 2010 1:20:34 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Feb 1, 2010 1:20:34 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.24
INFO - CREATE TABLE users (firstname VARCHAR(32) , lastname VARCHAR(32) , email VARCHAR(48) , locale VARCHAR(16) , timezone VARCHAR(32) , password_pw
VARCHAR(48) , password_slt VARCHAR(20) , validated BOOLEAN , superuser BOOLEAN , uniqueid VARCHAR(32) , id BIGINT NOT NULL AUTO_INCREMENT)
INFO - CREATE TABLE tag (account BIGINT , name VARCHAR(64) , id BIGINT NOT NULL AUTO_INCREMENT)
INFO - CREATE TABLE account (externalaccount VARCHAR(300) , balance DECIMAL(16,2) , is_public BOOLEAN , name VARCHAR(100) , id BIGINT NOT NULL AUTO_IN
CREMENT , description VARCHAR(300) , owner BIGINT)
INFO - CREATE TABLE accountadmin (administrator BIGINT , account BIGINT , id BIGINT NOT NULL AUTO_INCREMENT)
INFO - CREATE TABLE accountviewer (viewer BIGINT , account BIGINT , id BIGINT NOT NULL AUTO_INCREMENT)
INFO - CREATE TABLE accountnote (note LONGVARCHAR , account BIGINT , id BIGINT NOT NULL AUTO_INCREMENT)
INFO - CREATE TABLE expense (dateof TIMESTAMP , amount DECIMAL(16,2) , description VARCHAR(100) , notes VARCHAR(1000) , account BIGINT , serialnumber
BIGINT , currentbalance DECIMAL(16,2) , receiptmime VARCHAR(100) , receipt BINARY , id BIGINT NOT NULL AUTO_INCREMENT)
INFO - CREATE TABLE expensetag (expense BIGINT , id BIGINT NOT NULL AUTO_INCREMENT , tag BIGINT)
INFO - CREATE INDEX users_email ON users ( email )
INFO - CREATE INDEX users_uniqueid ON users ( uniqueid )
INFO - CREATE INDEX users_id ON users ( id )
INFO - CREATE INDEX tag_account ON tag ( account )
INFO - CREATE INDEX tag_id ON tag ( id )
INFO - CREATE INDEX account_id ON account ( id )
INFO - CREATE INDEX account_owner ON account ( owner )
INFO - CREATE INDEX accountadmin_administrator ON accountadmin ( administrator )
INFO - CREATE INDEX accountadmin_account ON accountadmin ( account )
INFO - CREATE INDEX accountadmin_id ON accountadmin ( id )
INFO - CREATE INDEX accountviewer_viewer ON accountviewer ( viewer )
INFO - CREATE INDEX accountviewer_account ON accountviewer ( account )
INFO - CREATE INDEX accountviewer_id ON accountviewer ( id )
INFO - CREATE INDEX accountnote_account ON accountnote ( account )
INFO - CREATE INDEX accountnote_id ON accountnote ( id )
INFO - CREATE INDEX expense_account ON expense ( account )
INFO - CREATE INDEX expense_id ON expense ( id )
INFO - CREATE INDEX expensetag_expense ON expensetag ( expense )
INFO - CREATE INDEX expensetag_id ON expensetag ( id )
INFO - CREATE INDEX expensetag_tag ON expensetag ( tag )
INFO - Bootstrap up
Feb 1, 2010 1:20:39 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Feb 1, 2010 1:20:39 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Feb 1, 2010 1:20:39 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/15 config=null
Feb 1, 2010 1:20:39 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5400 ms
Feb 1, 2010 1:20:49 PM org.apache.catalina.loader.WebappClassLoader modified
INFO: Additional JARs have been added : 'mail-1.4.jar'
Feb 1, 2010 1:20:49 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Feb 1, 2010 1:20:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: A web application registered the JBDC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Feb 1, 2010 1:20:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [Thread-12] but has failed to stop it. This is very likely to create a memory leak.
Feb 1, 2010 1:20:49 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal](value [java.lang.ThreadLocal@c70b0d]) and a value of type [net.liftweb.util.Full](value [Full%28java.util.PropertyResourceBundle@1a6a1a7%29]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
Feb 1, 2010 1:20:49 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal](value [java.lang.ThreadLocal@bef361]) and a value of type [scala.collection.mutable.HashMap](value [Map%28%29]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
INFO - Bootstrap up
Feb 1, 2010 1:21:01 PM org.apache.catalina.loader.WebappClassLoader modified
INFO: Additional JARs have been added : 'mail-1.4.jar'
Feb 1, 2010 1:21:01 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Feb 1, 2010 1:21:01 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: A web application registered the JBDC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Feb 1, 2010 1:21:01 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [Thread-22] but has failed to stop it. This is very likely to create a memory leak.
Feb 1, 2010 1:21:01 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal](value [java.lang.ThreadLocal@51e67c]) and a value of type [net.liftweb.util.Full](value [Full%28java.util.PropertyResourceBundle@f2da21%29]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
Feb 1, 2010 1:21:01 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal](value [java.lang.ThreadLocal@1cee361]) and a value of type [scala.collection.mutable.HashMap](value [Map%28%29]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
INFO - Bootstrap up
Feb 1, 2010 1:21:12 PM org.apache.catalina.loader.WebappClassLoader modified
INFO: Additional JARs have been added : 'mail-1.4.jar'
Feb 1, 2010 1:21:12 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Feb 1, 2010 1:21:12 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: A web application registered the JBDC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Feb 1, 2010 1:21:12 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [Thread-32] but has failed to stop it. This is very likely to create a memory leak.
Feb 1, 2010 1:21:12 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal](value [java.lang.ThreadLocal@99ff91]) and a value of type [net.liftweb.util.Full](value [Full%28java.util.PropertyResourceBundle@598d00%29]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
Feb 1, 2010 1:21:12 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal](value [java.lang.ThreadLocal@13816e0]) and a value of type [scala.collection.mutable.HashMap](value [Map%28%29]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
INFO - Bootstrap up
Any advise?
Additional Data >>>>>>>>>>>>>>>
I also tried to create a H2 DB outside of PocketChange and point it to that by modifying the DriverManager.getConnection in Boot.scala
From:
val dm = DriverManager.getConnection("jdbc:h2:pca_example")
To:
val dm = DriverManager.getConnection("jdbc:h2:tcp://localhost:9092/C:/db/PocketChangeDB", "admin", "admin")
After deploying the new WAR it to Tomcat. Here's what I'm getting now. No more continuous repeating errors and no "out-of-memory" issues. But when I bring up the app. I see the following message on interface:
"No Navigation Defined." and there are no options available to do anything.
Feb 1, 2010 1:43:41 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Feb 1, 2010 1:43:41 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 447 ms
Feb 1, 2010 1:43:41 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Feb 1, 2010 1:43:41 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.24
INFO - CREATE TABLE users (firstname VARCHAR(32) , lastname VARCHAR(32) , email VARCHAR(48) , locale VARCHAR(16) , timezone VARCHAR(32) , password_pw
VARCHAR(48) , password_slt VARCHAR(20) , validated BOOLEAN , superuser BOOLEAN , uniqueid VARCHAR(32) , id BIGINT NOT NULL AUTO_INCREMENT)
INFO - CREATE TABLE tag (account BIGINT , name VARCHAR(64) , id BIGINT NOT NULL AUTO_INCREMENT)
INFO - CREATE TABLE account (externalaccount VARCHAR(300) , balance DECIMAL(16,2) , is_public BOOLEAN , name VARCHAR(100) , id BIGINT NOT NULL AUTO_IN
CREMENT , description VARCHAR(300) , owner BIGINT)
INFO - CREATE TABLE accountadmin (administrator BIGINT , account BIGINT , id BIGINT NOT NULL AUTO_INCREMENT)
INFO - CREATE TABLE accountviewer (viewer BIGINT , account BIGINT , id BIGINT NOT NULL AUTO_INCREMENT)
INFO - CREATE TABLE accountnote (note LONGVARCHAR , account BIGINT , id BIGINT NOT NULL AUTO_INCREMENT)
INFO - CREATE TABLE expense (dateof TIMESTAMP , amount DECIMAL(16,2) , description VARCHAR(100) , notes VARCHAR(1000) , account BIGINT , serialnumber
BIGINT , currentbalance DECIMAL(16,2) , receiptmime VARCHAR(100) , receipt BINARY , id BIGINT NOT NULL AUTO_INCREMENT)
INFO - CREATE TABLE expensetag (expense BIGINT , id BIGINT NOT NULL AUTO_INCREMENT , tag BIGINT)
ERROR - Failed to Boot
java.util.NoSuchElementException: key not found: users
at scala.collection.Map$class.default(Map.scala:169)
at scala.collection.mutable.HashMap.default(HashMap.scala:33)
at scala.collection.Map$class.apply(Map.scala:80)
at scala.collection.mutable.HashMap.apply(HashMap.scala:33)
at net.liftweb.mapper.Schemifier$$anonfun$6$$anonfun$apply$7.apply(Schemifier.scala:189)
at net.liftweb.mapper.Schemifier$$anonfun$6$$anonfun$apply$7.apply(Schemifier.scala:189)
at net.liftweb.mapper.Schemifier$.net$liftweb$mapper$Schemifier$$using(Schemifier.scala:43)
at net.liftweb.mapper.Schemifier$$anonfun$6.apply(Schemifier.scala:189)
at net.liftweb.mapper.Schemifier$$anonfun$6.apply(Schemifier.scala:184)
at scala.List.flatMap(List.scala:1125)
at net.liftweb.mapper.Schemifier$.net$liftweb$mapper$Schemifier$$ensureColumns(Schemifier.scala:183)
at net.liftweb.mapper.Schemifier$$anonfun$schemify$1$$anonfun$2.apply(Schemifier.scala:61)
at net.liftweb.mapper.Schemifier$$anonfun$schemify$1$$anonfun$2.apply(Schemifier.scala:61)
at scala.List.foldLeft(List.scala:1059)
at net.liftweb.mapper.Schemifier$$anonfun$schemify$1.apply(Schemifier.scala:61)
at net.liftweb.mapper.Schemifier$$anonfun$schemify$1.apply(Schemifier.scala:54)
at net.liftweb.mapper.DB$.use(DB.scala:305)
at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:53)
at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:36)
at bootstrap.liftweb.Boot.boot(Boot.scala:23)
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:597)
at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:392)
at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:390)
at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:909)
at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:909)
at net.liftweb.util.Full.map(Box.scala:330)
at net.liftweb.http.DefaultBootstrap$.boot(LiftRules.scala:909)
at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:573)
at net.liftweb.http.LiftFilter.init(LiftServlet.scala:548)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4488)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Feb 1, 2010 1:43:46 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Feb 1, 2010 1:43:46 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Feb 1, 2010 1:43:46 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/32 config=null
Feb 1, 2010 1:43:46 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5437 ms