[SOLVED] Error at first start. SSLSocketFactory

Need help? Post your questions here.

Moderator: moderators

[SOLVED] Error at first start. SSLSocketFactory

Postby bomellberg » Mon May 07, 2012 7:29 am

Hi.

When I start SS up, I get this error message:


Code: Select all
Exception   java.lang.NoClassDefFoundError
Message   Could not initialize class org.apache.http.conn.ssl.SSLSocketFactory
Java version   Sun Microsystems Inc. 1.6.0_18
Operating system   Linux 2.6.32-5-amd64
Server   jetty-6.1.x
Memory   Used 49 of 88 MB
Stack trace   java.lang.NoClassDefFoundError: Could not initialize class org.apache.http.conn.ssl.SSLSocketFactory
   at org.apache.http.impl.client.DefaultHttpClient.createClientConnectionManager(DefaultHttpClient.java:219)
   at org.apache.http.impl.client.AbstractHttpClient.getConnectionManager(AbstractHttpClient.java:312)
   at net.sourceforge.subsonic.service.VersionService.readLatestVersion(VersionService.java:240)
   at net.sourceforge.subsonic.service.VersionService.refreshLatestVersion(VersionService.java:215)
   at net.sourceforge.subsonic.service.VersionService.getLatestFinalVersion(VersionService.java:98)
   at net.sourceforge.subsonic.service.VersionService.isNewFinalVersionAvailable(VersionService.java:154)
   at net.sourceforge.subsonic.controller.TopController.handleRequestInternal(TopController.java:59)
   at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
   at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
   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:135)
   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.ResponseHeaderFilter.doFilter(ResponseHeaderFilter.java:47)
   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)


The top Subsonic menu row is missing, but when I reload the page it appears, and the error goes away.
I've searched the forum, but there is only one hit on "SSLSocketFactory", and it doesn't answer to my problem.

Another hint might be that I can't change or update the album images of my music. It hangs at "Please wait..."

Is there something missing in my apache installation?

Regards,

/Bo
Last edited by bomellberg on Wed May 09, 2012 5:49 am, edited 1 time in total.
bomellberg
 
Posts: 4
Joined: Mon May 07, 2012 7:20 am

Re: Error at first start. SSLSocketFactory

Postby hakko » Mon May 07, 2012 8:32 am

Hi!

What version of Subsonic are you running? Does your Java 1.6.0_18 come straight out of the box, or have you somehow altered your Java settings (classpath, global parameters etc)?

What happens here is that the Subsonic code was compiled with access to the class SSLSocketFactory, but in it's running environment (your Apache server I guess), it cannot find the file org/apache/http/conn/ssl/SSLSocketFactory.class in any of the JAR files (basically a ZIP file actually) that's on the classpath. It could also be a matter of choosing the wrong SSLSocketFactory class, because you have configured Java to choose a specific one, rather than the one that comes bundled with Subsonic.
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: Error at first start. SSLSocketFactory

Postby bomellberg » Mon May 07, 2012 9:03 am

Hi hakko!

Thanks for trying to help. Here is a little more info. The java version is out of the box, no alterations have been made.

Code: Select all
About Subsonic
Version   4.6 (build 2585) – December 6, 2011
Server   jetty-6.1.x, java 1.6.0_18, Linux (50.0 MB / 80.4 MB)
Terms of use   Subsonic is free software distributed under the GPL open-source license. Subsonic uses licensed third-party libraries. Please note that Subsonic is not a tool for illegal distribution of copyrighted material. Always pay attention to and follow the relevant laws specific to your country.
Homepage   subsonic.org
Forum   forum.subsonic.org
Contact   Subsonic is developed and maintained by Sindre Mehus (sindre@activeobjects.no). If you have any questions, comments or suggestions for improvements, please visit the Subsonic Forum.
   Subsonic is free, but you can contribute to the project by giving a donation.
Log
[5/6/12 10:41:44 AM CEST]   INFO   PodcastService   Starting scheduled Podcast refresh.
[5/6/12 10:41:44 AM CEST]   INFO   PodcastService   Completed scheduled Podcast refresh.
[5/6/12 12:36:47 PM CEST]   WARN   NetworkService   Failed to unregister web address.
[5/6/12 12:36:47 PM CEST]   ERROR   NetworkService   Error executing URLRedirectionTask: Could not initialize class org.apache.http.conn.ssl.SSLSocketFactory
[5/6/12 2:36:47 PM CEST]   WARN   NetworkService   Failed to unregister web address.
[5/6/12 2:36:47 PM CEST]   ERROR   NetworkService   Error executing URLRedirectionTask: Could not initialize class org.apache.http.conn.ssl.SSLSocketFactory
[5/6/12 4:36:47 PM CEST]   WARN   NetworkService   Failed to unregister web address.
[5/6/12 4:36:47 PM CEST]   ERROR   NetworkService   Error executing URLRedirectionTask: Could not initialize class org.apache.http.conn.ssl.SSLSocketFactory
[5/6/12 6:36:47 PM CEST]   WARN   NetworkService   Failed to unregister web address.
[5/6/12 6:36:47 PM CEST]   ERROR   NetworkService   Error executing URLRedirectionTask: Could not initialize class org.apache.http.conn.ssl.SSLSocketFactory
[5/6/12 8:36:47 PM CEST]   WARN   NetworkService   Failed to unregister web address.
[5/6/12 8:36:47 PM CEST]   ERROR   NetworkService   Error executing URLRedirectionTask: Could not initialize class org.apache.http.conn.ssl.SSLSocketFactory
[5/6/12 10:36:47 PM CEST]   WARN   NetworkService   Failed to unregister web address.
[5/6/12 10:36:47 PM CEST]   ERROR   NetworkService   Error executing URLRedirectionTask: Could not initialize class org.apache.http.conn.ssl.SSLSocketFactory
[5/7/12 12:36:47 AM CEST]   WARN   NetworkService   Failed to unregister web address.
[5/7/12 12:36:47 AM CEST]   ERROR   NetworkService   Error executing URLRedirectionTask: Could not initialize class org.apache.http.conn.ssl.SSLSocketFactory
[5/7/12 2:36:47 AM CEST]   WARN   NetworkService   Failed to unregister web address.
bomellberg
 
Posts: 4
Joined: Mon May 07, 2012 7:20 am

Re: Error at first start. SSLSocketFactory

Postby hakko » Mon May 07, 2012 9:37 am

I hope that someone with a Linux install is able to compare their installation with yours! There should be a file called httpclient-4.0.1.jar that Subsonic needs to find, otherwise you'll get the error you see as it contains the SSLSocketFactory.class. It would be good to compare start-up scripts (how's Java invoked to start the Subsonic service), and is there something that could stop it from finding said jar file (lack of privileges, weird characters in path names etc).
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: Error at first start. SSLSocketFactory

Postby bomellberg » Mon May 07, 2012 12:29 pm

Hmm. These are the *jar-files I can find on my box:

Code: Select all
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/xml-apis-1.0.b2.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/oro-2.0.8.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/ehcache-1.6.0-beta3.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/httpcore-4.0.1.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/dwr-3.0.rc1.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/sbbi-upnplib-1.0.4.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/commons-io-1.3.1.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/jdom-1.0.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/hsqldb-1.8.0.7.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/jstl-1.1.2.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/commons-lang-2.1.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/commons-jxpath-1.1.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/spring-webmvc-2.5.6.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/acegi-security-1.0.5.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/lucene-core-3.0.3.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/log4j-1.2.9.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/jcommon-1.0.14.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/commons-logging-1.1.1.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/commons-fileupload-1.2.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/standard-1.1.2.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/weupnp-2009-10-16.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/commons-collections-3.1.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/jfreechart-1.0.11.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/radeox-1.0-b2.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/cglib-2.1_3.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/ant-zip-1.6.2.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/natpmp-0.1.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/jaudiotagger-2.0.2.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/spring-2.5.6.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/yuicompressor-2.3.6.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/string-1.1.0.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/asm-1.5.3.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/httpclient-4.0.1.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/commons-codec-1.2.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/commons-beanutils-1.4.jar
/var/subsonic/jetty/2585/webapp/WEB-INF/lib/ant-optional-1.5.1.jar
/files/work/admin-root/DAAPApplet-0.1.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/charsets.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/rhino.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/im/indicim.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/im/thaiim.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/javazic.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/compilefontconfig.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/jsse.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/jce.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/resources.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/ext/gnome-java-bridge.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/ext/sunjce_provider.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/ext/localedata.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/ext/dnsns.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/ext/pulse-java.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/ext/sunpkcs11.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/management-agent.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/about.jar
/usr/share/java/gnome-java-bridge.jar
/usr/share/java/libintl.jar
/usr/share/subsonic/subsonic-booter-jar-with-dependencies.jar


As you can see, httpclient-4.0.1.jar is there inside the subsonic installation. Are you saying that I need to point my java installation to the subsonic installation somehow?
bomellberg
 
Posts: 4
Joined: Mon May 07, 2012 7:20 am

Re: Error at first start. SSLSocketFactory

Postby hakko » Mon May 07, 2012 1:27 pm

No, you shouldn't need to change your Java installation, not at all. It should be that the Subsonic service calls something like "/path/to/java -classpath path-containing-all-jar-files", meaning the Subsonic server will start quietly and start accepting connections on configured port.

I've never installed it on a Linux box though so I'm a bit lost of exact details on how it works (if it's wrapped in a shell script, built into a binary file or whatever). I don't think I'm of much more help but I hope someone who's more familiar with how it works on Linux can guide you to sort it out!
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: Error at first start. SSLSocketFactory

Postby bomellberg » Wed May 09, 2012 5:49 am

Managed to solve it somehow.

I did an apt-get update; apt-get upgrade and then I noticed that java 1-7 was installed. Rolled it back and reinstalled subsonic. Now everything is spiffing, even the album art covers.

Thanks for you help, hakko!

/Bo
bomellberg
 
Posts: 4
Joined: Mon May 07, 2012 7:20 am


Return to Help

Who is online

Users browsing this forum: No registered users and 40 guests