This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes A following eror occured while running an application in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "A following eror occured while running an application in Tomcat" Watch "A following eror occured while running an application in Tomcat" New topic
Author

A following eror occured while running an application in Tomcat

Manjari Mittal
Greenhorn

Joined: May 03, 2006
Posts: 1
I am getting an error give below while running Tomcat

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause:
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:243)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
at com.nokia.kmaa.dao.AbstractDAOImpl.getConnection(AbstractDAOImpl.java:37)
at com.nokia.kmaa.dao.UserProfileDAOImpl.get(UserProfileDAOImpl.java:215)
at com.nokia.kmaa.helper.UserProfileHelper.checkUser(UserProfileHelper.java:115)
at com.nokia.kmaa.action.SubmitLoginAction.perform(SubmitLoginAction.java:66)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
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 com.nokia.kmaa.filter.SynchronizationFilter.processDoFilter(SynchronizationFilter.java:81)
at com.nokia.kmaa.filter.AbstractFilter.doFilter(AbstractFilter.java:103)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at com.nokia.kmaa.filter.AuthenticationFilter.processDoFilter(AuthenticationFilter.java:84)
at com.nokia.kmaa.filter.AbstractFilter.doFilter(AbstractFilter.java:103)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
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.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:211)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:696)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
at java.lang.Thread.run(Thread.java:536)

I have made following changes in conf\server.xml of Tomcat5.0

<Context className="org.apache.catalina.core.StandardContext" cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper" cookies="true"
crossContext="false" debug="0" displayName="KMAA" docBase="kmaa"
mapperClass="org.apache.catalina.core.StandardContextMapper" path="/kmaa"
privileged="false" reloadable="true" swallowOutput="false" useNaming="true"
wrapperClass="org.apache.catalina.core.StandardWrapper">
<Environment name="tyrexDomainConfig" type="java.lang.String" value="tyrex.config"/>
<Environment name="tyrexDomainName" type="java.lang.String" value="myDomain"/>
<Resource name="jdbc/KMAA" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/KMAA">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/kmaa</value>
</parameter>
<parameter>
<name>password</name>
<value>kmaa01app</value>
</parameter>
<parameter>
<name>username</name>
<value>kmaaapp</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>4</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>2</value>
</parameter>
<parameter>
<name>logAbandoned</name>
<value>true</value>
</parameter>
</ResourceParams>
<Resource name="my-datasource" auth="Container" type="tyrex.resource.Resource"/>
<ResourceParams name="my-datasource">
<parameter>
<name>name</name>
<value>myDataSource</value>
</parameter>
</ResourceParams>
<Resource name="jta/UserTransaction" auth="Container" type="javax.transaction.UserTransaction"/>
</Context>


In web.xml

<resource-ref>
<description>DB Connection</description>

<res-ref-name>jdbc/KMAA</res-ref-name>

<res-type>javax.sql.DataSource</res-type>

<res-auth>Container</res-auth>
</resource-ref>

If anyone can suggest me its solution then please tell me I have tried a lot but unable to solve it.

Thanks in advance
Manjari
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A following eror occured while running an application in Tomcat
 
Similar Threads
Parsing error processing resource path /WEB-INF/struts-config.xml
Strange oracle datasource problem in tomcat4.06 under solaris
tomcat connection pool exception ,help!
jsp page not show oracle data
broken html causes an exception in Tomcat 5