struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Danko Desancic <ddesan...@northernobjects.com>
Subject Re: microsoft sqlserver driver & struts
Date Mon, 01 Mar 2004 20:28:31 GMT
Hi,

newbie to struts and I have similar problem namely I added a datasource 
in my struts-config.xml and after that I can't even reload my app.
Non - struts applications are using this driver without problems. Bellow 
are stack trace from tomcat log (5.0.18) and part of my struts-config.
I have all three MS jar files in both my WEB-INF\lib and 
CATALINA-HOME\common\lib. I did try  both types  
"org.apache.commons.dbcp.BasicDataSource"
and "com.microsoft.jdbc.sqlserver.SQLServerDriver" without any success

<data-source key="ContactDB" type="org.apache.commons.dbcp.BasicDataSource">
    <set-property property="driverClassName" 
value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
    <set-property property="url" 
value="jdbc:microsoft:sqlserver://localhost:1433;databaseName=CONTACT"/>
    <set-property property="username" value="***"/>
    <set-property property="password" value="***"/>
    <set-property property="maxActive" value="20"/>
    <set-property property="maxWait" value="5000"/>
    <set-property property="defaultAutoCommit" value="true"/>
</data-source>


2004-03-01 15:18:02 StandardContext[/manager]Manager: restart: Reloading 
web application at '/contact-struts'
2004-03-01 15:18:03 
StandardContext[/contact-struts]StandardWrapper.Throwable
java.lang.NoClassDefFoundError: org/apache/struts/legacy/GenericDataSource
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at 
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1677)
    at 
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:900)
    at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1350)
    at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1230)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at 
org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1084)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
    at javax.servlet.GenericServlet.init(GenericServlet.java:256)
    at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044)
    at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:887)
    at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3960)
    at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4283)
    at 
org.apache.catalina.core.StandardContext.reload(StandardContext.java:2992)
    at 
org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:1019)
    at 
org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:377)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:587)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
    at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
    at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
    at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
    at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
    at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:534)

2004-03-01 15:18:03 StandardContext[/contact-struts]Servlet 
/contact-struts threw load() exception
javax.servlet.ServletException: Servlet.init() for servlet 
contact-struts threw exception
    at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1086)
    at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:887)
    at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3960)
    at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4283)
    at 
org.apache.catalina.core.StandardContext.reload(StandardContext.java:2992)
    at 
org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:1019)
    at 
org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:377)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:587)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
    at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
    at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
    at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
    at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
    at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:534)
----- Root Cause -----
java.lang.NoClassDefFoundError: org/apache/struts/legacy/GenericDataSource
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at 
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1677)
    at 
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:900)
    at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1350)
    at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1230)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at 
org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1084)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
    at javax.servlet.GenericServlet.init(GenericServlet.java:256)
    at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044)
    at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:887)
    at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3960)
    at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4283)
    at 
org.apache.catalina.core.StandardContext.reload(StandardContext.java:2992)
    at 
org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:1019)
    at 
org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:377)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:587)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
    at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
    at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
    at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
    at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
    at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:534)

Any suggestions?

Thanks  Danko

>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message