Page 1 of 1

java.lang.ClassFormatError, Solutions?

PostPosted: Sat Oct 19, 2013 6:58 pm
by new_blood
Hey,
So I recently installed Subsonic on my raspberry pi to play play in jukebox mode. I followed this tutorial http://mj2p.co.uk/a-raspberry-pi-subson ... ng-java-8/

I have it set up, it's able to index my music files, and shows them in the side menu. However whenever I try to look inside the folders I get the following error:

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

Exception java.lang.ClassFormatError
Message Truncated class file
Java version Oracle Corporation 1.8.0-ea
Operating system Linux 3.6.11-rpi-aufs
Server jetty-6.1.x
Memory Used 68 of 80 MB
Stack trace java.lang.ClassFormatError: Truncated class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:752)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:442)
at java.net.URLClassLoader.access$100(URLClassLoader.java:64)
at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:133)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
at org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:596)
at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:315)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:268)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:236)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:257)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1183)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:902)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at net.sourceforge.subsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at net.sourceforge.subsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:54)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)


Judging by the few threads I've seen, it looks like there are java compatibility issues. Is this related? Am I missing a class in my JDK or something? I'm still learning my way around linux, so troubleshooting is tough for me yet. Was hoping someone here would have an idea of what to do.

Anyway, thanks for your help

Re: java.lang.ClassFormatError, Solutions?

PostPosted: Thu Oct 31, 2013 1:54 am
by new_blood
Try this again, might try and install an older JDK this weekend if I don't get any hits

Re: java.lang.ClassFormatError, Solutions?

PostPosted: Thu Oct 31, 2013 2:54 am
by alphawave7
new_blood wrote:Try this again, might try and install an older JDK this weekend if I don't get any hits

Once again, the S1000 error usually indicates a corrupt database. Removing and rebuilding the db has fixed it for others. Interestingly, this issue crops up on Windows when Java gets auto/manually updated when the SS service is running, so I'm a bit surprised it's happened on a pi. Edit: I'd also mention that OpenJDK was far less responsive on my Seagate Dockstar (hacked on Debian), go for the Sun version. G'Luck!

Re: java.lang.ClassFormatError, Solutions?

PostPosted: Thu Oct 31, 2013 3:59 am
by new_blood
alphawave7 wrote:
new_blood wrote:Try this again, might try and install an older JDK this weekend if I don't get any hits

Once again, the S1000 error usually indicates a corrupt database. Removing and rebuilding the db has fixed it for others. Interestingly, this issue crops up on Windows when Java gets auto/manually updated when the SS service is running, so I'm a bit surprised it's happened on a pi. Edit: I'd also mention that OpenJDK was far less responsive on my Seagate Dockstar (hacked on Debian), go for the Sun version. G'Luck!
Hey, thanks for the response.

Just want to make sure I'm understanding your post. I should basically uninstall then reinstall my JDK? Or is there a different db that you are referring too? And how would I go about getting the Sun version? I'm still pretty lost when it comes to linux so some of this goes pretty far over my head.

Thanks again for the reply, sorry if this issue has been brought up a lot

Re: java.lang.ClassFormatError, Solutions?

PostPosted: Thu Oct 31, 2013 3:09 pm
by baaldemon
I would recommend using a supported version of java rather than an experimental new version of java.

From your error:
"Java version Oracle Corporation 1.8.0-ea" ea stands for early access, so unless you are beta testing it and a strong developer I wouldnt recommend running anything on 1.8 yet.

I highly doubt subsonic has been tested on java 1.8 considering its still not in an open public release yet. Major versions of java always cause some issues and early release of major releases are generally buggy as hell. Download a supported and public release version of java 1.7 or java 1.6 and try.

EDIT: So basically you can still follow the instructions that you followed before but instead of downloading and referencing jdk1.8 change it to 1.7. You can get the file from http://www.oracle.com/technetwork/java/ ... 80260.html If you're still having issues when running 1.7 then youll probably be able to get more help here.