Page 1 of 3

Use tomcat

PostPosted: Tue Oct 16, 2012 1:53 am
by sonnius
Is it possible to use the musiccabinet mod with tomcat?

I've tried to put in the subsonic.war in my webapps folder but it fails horribly, does the tomcat server need a specific build of the subsonic.war?

Thanks

Re: Use tomcat

PostPosted: Tue Oct 16, 2012 6:30 am
by hakko
What Tomcat version are you running? Are you sure it's Java 7 compatible? MusicCabinet depends on features introduced in Java 7 (for example for the library scanning), so there's no workaround to have it run on Java 6.

Re: Use tomcat

PostPosted: Tue Oct 16, 2012 12:59 pm
by GJ51
Music Cabinet runs fine for me.

Version Subsonic, originally written by Sindre Mehus. Built with MusicCabinet plugin, version 0.7.11, on October 7, 2012.
Server Apache Tomcat/6.0.35, java 1.7.0_07, Windows Server 2008 R2 (52.7 MB / 127.2 MB)

I'll be installing the latest drop sometime today nut I've had no problems with 0.7.11

EDIT: 0.7.12 version FAIL using my current setup! Apparently Tomcat 7 may be needed to run the latest version.

If you're currently running Tomcat 6.0.35 be sure to save the 0.7.11 war file before attempting the upgrade as I now have no way of going back. I will attempt to upgrade to Tomcat 7 and retest 0.7.12 sometime in the future, but for now I'm SOL and my Music Cabinet install is offline.

Re: Use tomcat

PostPosted: Tue Oct 16, 2012 4:15 pm
by hakko
The previous version of MusicCabinet (0.7.11) that GJ51 had running om Tomcat 6 is available here: http://dilerium.se/musiccabinet/subsonic-0.7.11.war

You could also post the exact error message that you get for feedback here. There are a few possible things that could go wrong but it's hard to know what without a log.

Re: Use tomcat

PostPosted: Tue Oct 16, 2012 5:02 pm
by GJ51
Reverting to 0.7.11 worked fine - all is well. :)

Re: Use tomcat

PostPosted: Fri Oct 19, 2012 8:02 am
by odt
i have a tomcat7 installation I could try musiccabinet on. Anyone written down a procedure to migrate so it would preserve the current config and data in pgsql?

Re: Use tomcat

PostPosted: Fri Oct 19, 2012 8:20 am
by hakko
I just tried dropping MusicCabinet 0.7.11 into Tomcat 7. After changing the file [catalina_home]/conf/context.xml from <Context> to <Context useHttpOnly="false"> (to get rid of CSRF Security Error popups), it seems to work. At least after ten seconds of testing, I'm sure there might appear issues.

But as stated previously, MusicCabinet 0.7.12 won't work, I have to create a special assembly for Tomcat to make them play together.

Re: Use tomcat

PostPosted: Sat Oct 20, 2012 8:10 pm
by hakko
0.7.12 is now also distributed for Tomcat: http://dilerium.se/musiccabinet/subsonic-tomcat.war

It has the same features as 0.7.12 distributed as a Windows installer / stand-alone version, it's just packaged slightly differently to work on Tomcat 6/7.

As I mentioned above, you might need to change your Tomcat configuration to avoid error messages from the Ajax scripts (CSRF Security Error popups). Change the file (catalina_home)/conf/context.xml from <Context> to <Context useHttpOnly="false">.

If it doesn't work as expected, please post bug reports here.

Re: Use tomcat

PostPosted: Mon Oct 22, 2012 3:32 pm
by mustangman5l
Hey Hakko,

Thanks for your continued work on this project. I thoroughly enjoy listening to my music in a radio type format. However, it seems like the latest build and/or context file change broke the players in Chrome. They play in IE perfect, but the player doesn't even load the music in Chrome. Thoughts?

Re: Use tomcat

PostPosted: Mon Oct 22, 2012 3:48 pm
by hakko
The latest update switched from JWPlayer 5.6 to JWPlayer 5.10, making it possible (but not necessary) to use HTML5 instead of Flash for audio playback.

However, the HTML5 playback will vary on different browsers, depending on the codecs supported. Firefox doesn't seem to support mp3 right now for example. So, Flash would still be the safest way (if you have that installed).

You can right-click the player to tell if it's Flash or HTML5?

Re: Use tomcat

PostPosted: Mon Oct 22, 2012 4:40 pm
by mustangman5l
It's using the Flash player in both IE and Chrome.

Don't know if this has anything to do with it, but in looking at the log file...

I am getting a StreamController error. WARN StreamController - throwable caught! ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error. I think, however, this has more to do with a song cutting off in the middle of it playing.

Re: Use tomcat

PostPosted: Mon Oct 22, 2012 4:52 pm
by hakko
I've tried the JWPlayer 5.10 on Chrome, both on Jetty and Tomcat (shouldn't matter, but hey). What OS are running it on? My next shot would be deleting the cookie "player" that Subsonic uses to keep track of which player to use for each browser.

Re: Use tomcat

PostPosted: Mon Oct 22, 2012 5:05 pm
by mustangman5l
Yeah, let me do a couple of things to see if I can get this to work. I'm running everything on a WHS2011 server which is just a modified version of Server 2008R2 x64.

Re: Use tomcat

PostPosted: Sat Oct 27, 2012 4:57 pm
by odt
When going into settings/personal there is an error:

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

Exception   org.apache.jasper.JasperException
Message   /WEB-INF/jsp/personalSettings.jsp (line: 28, column: 20) "${default}" contains invalid expression(s): javax.el.ELException: Failed to parse the expression [${default}]
Java version   Oracle Corporation 1.7.0_09
Operating system   Windows 8 6.2
Server   Apache Tomcat/7.0.32
Memory   Used 79 of 148 MB
Stack trace   org.apache.jasper.JasperException: /WEB-INF/jsp/personalSettings.jsp (line: 28, column: 20) "${default}" contains invalid expression(s): javax.el.ELException: Failed to parse the expression [${default}]
   at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
   at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
   at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:199)
   at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1223)
   at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:875)
   at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539)
   at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
   at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
   at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:894)
   at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539)
   at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
   at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
   at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:894)
   at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539)
   at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
   at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
   at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434)
   at org.apache.jasper.compiler.Node$Root.accept(Node.java:475)
   at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
   at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1795)
   at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217)
   at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
   at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
   at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
   at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
   at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
   at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
   at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
   at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
   at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
   at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1157)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:927)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
   at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
   at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
   at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
   at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
   at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
   at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
   at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
   at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
   at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
   at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
   at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
   at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
   at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
   at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
   at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at net.sourceforge.subsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:43)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at net.sourceforge.subsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:54)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Re: Use tomcat

PostPosted: Sat Oct 27, 2012 9:40 pm
by hakko
Thanks, I'll check that when I'm at my developer machine.