commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@yemtech.com>
Subject Can no one help me.
Date Wed, 29 Sep 2004 21:34:32 GMT
On Sunday I sent this message out, but I have yet to get a reply.  Could
someone please help me out so I can move forward on my project.

Thanks

I have setup my system to try to use datasources, but when I try
getConnection I get the the exception
"org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null', cause: No suitable driver"
I am using MySql 4.0.18-max-nt and tomcat 5.0.24 on a win2k box.
I have setup my server.xml as follows:
<Server>...
   <Service>...
      <Engine>...
         <Host name="localhost" debug="0" appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">

        <Context path="/" debug="5" reloadable="true" crossContext="true">
          <Logger className="org.apache.catalina.logger.FileLogger"
            prefix="localhost_yemtech_log." suffix=".txt" timestamp="true"/>

          <Resource name="jdbc/yemtech" scope="Sharable"
type="javax.sql.Datasource" auth="Container" description="mysql
yemtech db"/>

          <ResourceParams name="jdbc/yemtech">
              <parameter>
                 <name>factory</name>
                 <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
              </parameter>

              <parameter>
                 <name>maxActive</name>
                 <value>20</value>
              </parameter>

              <parameter>
                 <name>maxIdle</name>
                 <value>20</value>
              </parameter>

              <parameter>
                 <name>maxWait</name>
                 <value>10000</value>
              </parameter>

              <parameter>
                 <name>driverClassName</name>
                 <value>com.mysql.jdbc.Driver</value>
              </parameter>

              <parameter>
                 <name>url</name>
                 <value>jdbc:mysql://localhost/yemtech</value>
              </parameter>

              <parameter>
                 <name>username</name>
                 <value>yemtech</value>
              </parameter>

              <parameter>
                 <name>password</name>
                 <value>xxxx</value>
              </parameter>

          </ResourceParams>
        </Context>
        ...rest of <Host>
       </Host>
      </Engine>
     </Service>
    </Server>

my web.xml has this at the bottom of the file
        <resource-ref>
                <res-ref-name>jdbc/yemtech</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <res-auth>Container</res-auth>
        </resource-ref>

I have copied the mysql jdbc jar file to the config/lib dir.
I tried running the showJNDI.jsp that Dirk wrote, but I get an exception
when I visit that page, which is as follows:
org.apache.jasper.JasperException: /showJNDI.jsp(2,5) Invalid standard action
        org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
        org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:357)
        org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:81)
        org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1249)
        org.apache.jasper.compiler.Parser.parseElements(Parser.java:1559)
        org.apache.jasper.compiler.Parser.parse(Parser.java:126)
        org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
        org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
        org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:422)
        org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:507)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:810)


Any help would be appreciated.

-- 
Christopher Cullum
ccullum@yemtech.com





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


Mime
View raw message