Page 1 of 1

Unable to deploy war file

PostPosted: Mon Mar 25, 2013 6:24 pm
by trailofdead
I'm pretty new to subsonic. I'm running Subsonic from my Tomcat 7 server with java 7. I had to do a bunch of manual tweaks to get subsonic to work.

I'm trying to deploy subsonic-tomcar.war to get MusicCabinet running, but I'm not able to deploy it.

From my tomcat7 catalina log:

Code: Select all
INFO: Deploying web application archive /var/lib/tomcat7/webapps/subsonic-tomcat.war
Mar 24, 2013 5:47:01 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Mar 24, 2013 5:47:01 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/subsonic-tomcat] startup failed due to previous errors
Mar 24, 2013 5:47:01 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/subsonic-tomcat] registered the JDBC driver [org.hsqldb.jdbcDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Mar 24, 2013 5:47:01 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/subsonic-tomcat] appears to have started a thread named [HSQLDB Timer @74c6c41f] but has failed to stop it. This is very likely to create a memory leak.
Mar 24, 2013 5:47:01 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/subsonic-tomcat] appears to have started a thread named [net.sf.ehcache.CacheManager@46ec31f7] but has failed to stop it. This is very likely to create a memory leak.
Mar 24, 2013 5:47:02 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already.  Could not load net.sf.ehcache.util.ProductInfo.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1600)
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
   at net.sf.ehcache.util.UpdateChecker.buildParamsString(UpdateChecker.java:125)
   at net.sf.ehcache.util.UpdateChecker.buildUpdateCheckUrl(UpdateChecker.java:121)
   at net.sf.ehcache.util.UpdateChecker.doCheck(UpdateChecker.java:69)
   at net.sf.ehcache.util.UpdateChecker.checkForUpdate(UpdateChecker.java:60)
   at net.sf.ehcache.util.UpdateChecker.run(UpdateChecker.java:51)
   at java.util.TimerThread.mainLoop(Timer.java:555)
   at java.util.TimerThread.run(Timer.java:505)

Mar 24, 2013 5:47:07 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Mar 24, 2013 5:47:07 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/subsonic-tomcat] startup failed due to previous errors
Mar 24, 2013 5:47:07 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/subsonic-tomcat] registered the JDBC driver [org.hsqldb.jdbcDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Mar 24, 2013 5:47:07 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/subsonic-tomcat] appears to have started a thread named [HSQLDB Timer @531890e3] but has failed to stop it. This is very likely to create a memory leak.
Mar 24, 2013 5:47:07 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/subsonic-tomcat] appears to have started a thread named [net.sf.ehcache.CacheManager@5633d16b] but has failed to stop it. This is very likely to create a memory leak.
Mar 24, 2013 5:47:08 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already.  Could not load net.sf.ehcache.util.ProductInfo.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1600)
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
   at net.sf.ehcache.util.UpdateChecker.buildParamsString(UpdateChecker.java:125)
   at net.sf.ehcache.util.UpdateChecker.buildUpdateCheckUrl(UpdateChecker.java:121)
   at net.sf.ehcache.util.UpdateChecker.doCheck(UpdateChecker.java:69)
   at net.sf.ehcache.util.UpdateChecker.checkForUpdate(UpdateChecker.java:60)
   at net.sf.ehcache.util.UpdateChecker.run(UpdateChecker.java:51)
   at java.util.TimerThread.mainLoop(Timer.java:555)
   at java.util.TimerThread.run(Timer.java:505)


I'm not sure if I got postgresql up correctly or not. I installed from my package manager.

Any ideas?

Thanks

Re: Unable to deploy war file

PostPosted: Mon Mar 25, 2013 10:14 pm
by hakko
Does it give the same output if you restart Tomcat? I think that this error is due to Subsonic doesn't close some of it handlers correctly when you hot-deploy a new version, but it doesn't actually have an impact as Tomcat closes them for you. I'd need to look into it a little more though to be sure.

Re: Unable to deploy war file

PostPosted: Tue Mar 26, 2013 4:44 am
by trailofdead
Same output after restarting Tomcat. Do I need to create a folder inside /var for MusicCabinet? I had to create /var/subsonic for subsonic to deploy.

Re: Unable to deploy war file

PostPosted: Tue Mar 26, 2013 1:14 pm
by zosopage
I thought Subsonic did not support tomcat7? Is that not the case with MusicCabinet?

Re: Unable to deploy war file

PostPosted: Tue Mar 26, 2013 1:51 pm
by hakko
I have it running on Tomcat7 as we speak.. I had to change a few things in the code compared with Subsonic 4.7 to make it compatible though (Tomcat7 is slightly stricter than Tomcat6), but I did that months ago.

The Tomcat war will read your Subsonic settings directory (I think /var/subsonic is the default) to pick up your users etc. You shouldn't need to create a new directory for running it, unless you want parallel installations. You're not running both Subsonic 4.7 and MusicCabinet at the same time, as different wars? That will create a conflict as both of them will try to take a lock on the internal database.

Can you post full Tomcat logs so that I can check them for errors? Thanks.

Re: Unable to deploy war file

PostPosted: Wed Mar 27, 2013 1:50 am
by trailofdead
I modified subsonic.war so it would deploy on Tomcat 7.

I had subsonic.war deployed and was trying to deploy subsonic-tomcat.war (MusicCabinet). I thought that they would both deploy to their own directories. But you're saying that it will use /var/subsonic, so I'll do some testing by undeploying subsonic first.

edit: I was able to run the webapp from within eclipse on my linux box. not sure why I cant deploy it in Tomcat. I'm probably doing something stupid.

edit2: yes, it was something stupid. I figured it out looking at log. It needed to create subconic/ehcache directory.

Re: Unable to deploy war file

PostPosted: Wed Mar 27, 2013 8:28 pm
by hakko
trailofdead wrote:edit2: yes, it was something stupid. I figured it out looking at log. It needed to create subconic/ehcache directory.


Did it need to create that directory in a temp folder, or are you using 0.7.23 or earlier?

Re: Unable to deploy war file

PostPosted: Sat Apr 06, 2013 10:37 pm
by trailofdead
hakko wrote:
trailofdead wrote:edit2: yes, it was something stupid. I figured it out looking at log. It needed to create subconic/ehcache directory.


Did it need to create that directory in a temp folder, or are you using 0.7.23 or earlier?


I needed to create the folder in /usr/share/tomcat7/subsonic/ehcache. I'm using 0.7.22b.

BTW, just updated to 0.7.24c w/o issue