Exception after installation

Need help? Post your questions here.

Moderator: moderators

Exception after installation

Postby wuzzy » Wed Jun 14, 2006 10:46 am

Hi all!

I have followed the install instructions but the subsonic servlet will not start. Tomcat shows me this exception report:

Code: Select all
javax.servlet.ServletException: Servlet.init() for servlet subsonic threw exception
   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
   org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
   org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
   org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
   org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   java.lang.Thread.run(Thread.java:595)

root cause

org.springframework.beans.factory.BeanDefinitionStoreException: Error 'Class that bean class [net.sourceforge.subsonic.service.ServiceFactory] depends on not found' in resource 'ServletContext resource [/WEB-INF/subsonic-servlet.xml]' at:
Bean 'searchService'; nested exception is java.lang.NoClassDefFoundError
   org.springframework.beans.factory.xml.FailFastProblemReporter.error(FailFastProblemReporter.java:46)
   org.springframework.beans.factory.support.ReaderContext.error(ReaderContext.java:69)
   org.springframework.beans.factory.xml.XmlBeanDefinitionParserHelper.error(XmlBeanDefinitionParserHelper.java:1117)
   org.springframework.beans.factory.xml.XmlBeanDefinitionParserHelper.parseBeanDefinitionElement(XmlBeanDefinitionParserHelper.java:497)
   org.springframework.beans.factory.xml.XmlBeanDefinitionParserHelper.parseBeanDefinitionElement(XmlBeanDefinitionParserHelper.java:373)
   org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseDefaultElement(DefaultXmlBeanDefinitionParser.java:162)
   org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:143)
   org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:87)
   org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:509)
   org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
   org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
   org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:277)
   org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:129)
   org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:145)
   org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:126)
   org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
   org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
   org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:279)
   org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:155)
   org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:308)
   org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:252)
   org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:221)
   org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:114)
   javax.servlet.GenericServlet.init(GenericServlet.java:211)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:585)
   org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
   java.security.AccessController.doPrivileged(Native Method)
   javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
   org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
   org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
   org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:114)
   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
   org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
   org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
   org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
   org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   java.lang.Thread.run(Thread.java:595)

root cause

java.lang.NoClassDefFoundError
   java.lang.Class.forName0(Native Method)
   java.lang.Class.forName(Class.java:242)
   org.springframework.util.ClassUtils.forName(ClassUtils.java:163)
   org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition(BeanDefinitionReaderUtils.java:65)
   org.springframework.beans.factory.xml.XmlBeanDefinitionParserHelper.parseBeanDefinitionElement(XmlBeanDefinitionParserHelper.java:411)
   org.springframework.beans.factory.xml.XmlBeanDefinitionParserHelper.parseBeanDefinitionElement(XmlBeanDefinitionParserHelper.java:373)
   org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseDefaultElement(DefaultXmlBeanDefinitionParser.java:162)
   org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:143)
   org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:87)
   org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:509)
   org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
   org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
   org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:277)
   org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:129)
   org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:145)
   org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:126)
   org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
   org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
   org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:279)
   org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:155)
   org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:308)
   org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:252)
   org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:221)
   org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:114)
   javax.servlet.GenericServlet.init(GenericServlet.java:211)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:585)
   org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
   java.security.AccessController.doPrivileged(Native Method)
   javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
   org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
   org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
   org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:114)
   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
   org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
   org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
   org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
   org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   java.lang.Thread.run(Thread.java:595)

I am rnning Tomcat 5.0 under Ubuntu and the servlet and the included JSP examples work fine.

What to do?

Love,
wuzzy
wuzzy
 

Postby sindre_mehus » Wed Jun 14, 2006 11:55 am

Hi wuzzy,

I recommend upgrading to Tomcat 5.5. There are some issues (related to conflicting XML libraries) in 5.0.
See also this thread: http://forum.subsonic.org/forum/viewtopic.php?t=43

Please let us know if upgrading Tomcat solves the problem :-)

Sindre
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby wuzzy » Wed Jun 14, 2006 9:26 pm

Ahh, installing Tomcat 5.5 worked perfectly!

Thanks for the fast reply and a great piece of software!

Love,
wuzzy
wuzzy
 

Postby sindre_mehus » Thu Jun 15, 2006 4:54 am

No problem!
I'll state it more clearly on the download/install page that Tomcat 5.5 or later is required.

Happy listening,
Sindre
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Same problem with Tomcat 5.5

Postby Carlos » Mon Jun 19, 2006 12:31 pm

Hi,

I have the same problem mentioned above, i.e., the exact same exception after installation, but I'm already running Tomcat 5.5.12.

Here's what I see:
type Rapport d'exception

message

description Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête.

exception

javax.servlet.ServletException: "Servlet.init()" pour la servlet subsonic a généré une exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:595)

cause mère

org.springframework.beans.factory.BeanDefinitionStoreException: Error 'Class that bean class [net.sourceforge.subsonic.service.ServiceFactory] depends on not found' in resource 'ServletContext resource [/WEB-INF/subsonic-servlet.xml]' at:
Bean 'searchService'; nested exception is java.lang.NoClassDefFoundError
org.springframework.beans.factory.xml.FailFastProblemReporter.error(FailFastProblemReporter.java:46)
org.springframework.beans.factory.support.ReaderContext.error(ReaderContext.java:69)
org.springframework.beans.factory.xml.XmlBeanDefinitionParserHelper.error(XmlBeanDefinitionParserHelper.java:1117)
org.springframework.beans.factory.xml.XmlBeanDefinitionParserHelper.parseBeanDefinitionElement(XmlBeanDefinitionParserHelper.java:497)
org.springframework.beans.factory.xml.XmlBeanDefinitionParserHelper.parseBeanDefinitionElement(XmlBeanDefinitionParserHelper.java:373)
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseDefaultElement(DefaultXmlBeanDefinitionParser.java:162)
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:143)
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:87)
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:509)
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:277)
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:129)
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:145)
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:126)
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:279)
org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:155)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:308)
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:252)
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:221)
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:114)
javax.servlet.GenericServlet.init(GenericServlet.java:211)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:595)

cause mère

java.lang.NoClassDefFoundError
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:242)
org.springframework.util.ClassUtils.forName(ClassUtils.java:163)
org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition(BeanDefinitionReaderUtils.java:65)
org.springframework.beans.factory.xml.XmlBeanDefinitionParserHelper.parseBeanDefinitionElement(XmlBeanDefinitionParserHelper.java:411)
org.springframework.beans.factory.xml.XmlBeanDefinitionParserHelper.parseBeanDefinitionElement(XmlBeanDefinitionParserHelper.java:373)
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseDefaultElement(DefaultXmlBeanDefinitionParser.java:162)
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:143)
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:87)
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:509)
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:277)
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:129)
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:145)
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:126)
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:279)
org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:155)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:308)
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:252)
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:221)
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:114)
javax.servlet.GenericServlet.init(GenericServlet.java:211)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:595)

note La trace complète de la cause mère de cette erreur est disponible dans les fichiers journaux de Apache Tomcat/5.5.12.
Apache Tomcat/5.5.12

Running 'java -version' shows 1.5.0_05.

Any ideas or suggestions ?

TIA,

Carlos
Carlos
 

Postby sindre_mehus » Mon Jun 19, 2006 12:41 pm

Hi Carlos,

The French error message is an indication that Tomcat uses GNU Java, not Sun Java; see this thread:
http://forum.subsonic.org/forum/viewtopic.php?t=61

Please let us know how it goes :-)

Sindre
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Still have the same problem

Postby Carlos » Mon Jun 19, 2006 4:37 pm

Thanks for the rapid response.

I have uninstalled the GNU Java from my system but I still have exactly the same problem. I should point out that my system is a French language system.

I am running Debian 3.1, Tomcat 5.5.12, Java 1.5.0_05 (definitely the Sun version).

Any ideas as to where I should start looking now ?

TIA,

Carlos
Carlos
 
Posts: 3
Joined: Mon Jun 19, 2006 4:31 pm

Postby sindre_mehus » Mon Jun 19, 2006 5:23 pm

Hi,

Can you please check if you have any files in TOMCAT_HOME/common/endorsed/

Sindre
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby Carlos » Mon Jun 19, 2006 8:08 pm

Hi,

I have checked. The Tomcat common/endorsed directory is empty.

Cheers

Carlos
Carlos
 
Posts: 3
Joined: Mon Jun 19, 2006 4:31 pm

It works!

Postby Carlos » Tue Jun 20, 2006 12:22 pm

Hi,

It works!

It turned out to be my own fault (sorry :oops: ). I thought I had write access to /var when in fact I did not - I only had write access to /var/www.

I uninstalled everything and reinstalled it and it worked first time.

Thanks for the help anyway. Subsonic is a brilliant app, by the way :D

Cheers,

Carlos.
Carlos
 
Posts: 3
Joined: Mon Jun 19, 2006 4:31 pm

Postby sindre_mehus » Tue Jun 20, 2006 12:42 pm

Phew, thanks!
I was running out of suggestions ...

Happy listening,
Sindre
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway


Return to Help

Who is online

Users browsing this forum: No registered users and 31 guests