On 16/06/2010 12:08, yucca...@live.co.za wrote:
> I manually added the "lib" dir to root of production server and am still
> stuck with same exception....

Adding "lib" to an installation that isn't expecting one isn't going to
make a jot of difference.


> I now have also remove mysql connector as provider instructed me t
> because there is already a connector on server-side...

"server-side"?  It's all server side - I don't know what you mean by this.

Where *exactly* is the mysql driver jar?


> My last hope, it would appear is that I missed something in config files
> so I am posting all 3 here in hope of moving on.

If your provider has given you a mangled installation, you need to go
back to them to figure out what they've done to it.

If the server was 5.x.x and they upgraded it to 6.0.x then ask them to
state exactly what they did to upgrade it.

N.B.  Just swapping the jars out is the wrong approach.

N.B.  There are more than 3 config files; tomcat/conf contains others.
The catalina.properties file for example, which defines which
directories act as classloader repositories.


p



> SERVER:
> 
> 
> <?xml version='1.0' encoding='utf-8'?>
> <!--
>  Licensed to the Apache Software Foundation (ASF) under one or more
>  contributor license agreements.  See the NOTICE file distributed with
>  this work for additional information regarding copyright ownership.
>  The ASF licenses this file to You under the Apache License, Version 2.0
>  (the "License"); you may not use this file except in compliance with
>  the License.  You may obtain a copy of the License at
> 
>      http://www.apache.org/licenses/LICENSE-2.0
> 
>  Unless required by applicable law or agreed to in writing, software
>  distributed under the License is distributed on an "AS IS" BASIS,
>  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>  See the License for the specific language governing permissions and
>  limitations under the License.
> -->
> <!-- Note:  A "Server" is not itself a "Container", so you may not
>     define subcomponents such as "Valves" at this level.
>     Documentation at /docs/config/server.html
> -->
> <Server port="8005" shutdown="SHUTDOWN">
> 
>  <!--APR library loader. Documentation at /docs/apr.html -->
>  <Listener className="org.apache.catalina.core.AprLifecycleListener"
> SSLEngine="on" />
>  <!--Initialize Jasper prior to webapps are loaded. Documentation at
> /docs/jasper-howto.html -->
>  <Listener className="org.apache.catalina.core.JasperListener" />
>  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
>  <Listener
> className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
>  <!-- JMX Support for the Tomcat server. Documentation at
> /docs/non-existent.html -->
>  <Listener
> className="org.apache.catalina.mbeans.ServerLifecycleListener" />
>  <Listener
> className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
> 
>  <!-- Global JNDI resources
>       Documentation at /docs/jndi-resources-howto.html
>  -->
>  <GlobalNamingResources>
>    <!-- Editable user database that can also be used by
>         UserDatabaseRealm to authenticate users
>    -->
>      <Resource
>        name="jdbc/auth"
>        description="The Jar Bar user authentication"
>        type="javax.sql.DataSource"
>        auth="Container"
>        driverClassName="com.mysql.jdbc.Driver"
>        maxActive="30" maxIdle="10"
>        maxWait="10000"
>        password="pookie123"
>        url="jdbc:mysql://localhost:3306/yucca123_thejarbar"
>        validationQuery="/* ping */ SELECT 1"
>        username="yucca123_tom"/>
> 
>  </GlobalNamingResources>
> 
>  <!-- A "Service" is a collection of one or more "Connectors" that share
>       a single "Container" Note:  A "Service" is not itself a "Container",
>       so you may not define subcomponents such as "Valves" at this level.
>       Documentation at /docs/config/service.html
>   -->
>  <Service name="Catalina">
> 
>    <!--The connectors can use a shared executor, you can define one or
> more named thread pools-->
>    <!--
>    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
>        maxThreads="150" minSpareThreads="4"/>
>    -->
> 
> 
>    <!-- A "Connector" represents an endpoint by which requests are received
>         and responses are returned. Documentation at :
>         Java HTTP Connector: /docs/config/http.html (blocking &
> non-blocking)
>         Java AJP  Connector: /docs/config/ajp.html
>         APR (HTTP/AJP) Connector: /docs/apr.html
>         Define a non-SSL HTTP/1.1 Connector on port 8080
>    -->
>    <Connector port="8080" protocol="HTTP/1.1"
>               connectionTimeout="20000"
>               redirectPort="8443" />
>    <!-- A "Connector" using the shared thread pool-->
>    <!--
>    <Connector executor="tomcatThreadPool"
>               port="8080" protocol="HTTP/1.1"
>               connectionTimeout="20000"
>               redirectPort="8443" />
>    -->
>    <!-- Define a SSL HTTP/1.1 Connector on port 8443
>         This connector uses the JSSE configuration, when using APR, the
>         connector should be using the OpenSSL style configuration
>         described in the APR documentation -->
>    <!--
>    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
>               maxThreads="150" scheme="https" secure="true"
>               clientAuth="false" sslProtocol="TLS" />
>    -->
> 
>    <!-- Define an AJP 1.3 Connector on port 8009 -->
>    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
> 
> 
>    <!-- An Engine represents the entry point (within Catalina) that
> processes
>         every request.  The Engine implementation for Tomcat stand alone
>         analyzes the HTTP headers included with the request, and passes
> them
>         on to the appropriate Host (virtual host).
>         Documentation at /docs/config/engine.html -->
> 
>    <!-- You should set jvmRoute to support load-balancing via AJP ie :
>    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
>    -->
>    <Engine name="Catalina" defaultHost="localhost">
> 
>      <!--For clustering, please take a look at documentation at:
>          /docs/cluster-howto.html  (simple how to)
>          /docs/config/cluster.html (reference documentation) -->
>      <!--
>      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
>      -->
> 
>      <!-- The request dumper valve dumps useful debugging information about
>           the request and response data received and sent by Tomcat.
>           Documentation at: /docs/config/valve.html -->
>      <!--
>      <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
>      -->
> 
>      <!-- This Realm uses the UserDatabase configured in the global JNDI
>           resources under the key "UserDatabase".  Any edits
>           that are performed against this UserDatabase are immediately
>           available for use by the Realm.  -->
>      <Realm className="org.apache.catalina.realm.DataSourceRealm"
>       userTable="users"
>       userNameCol="user_name"
>       userCredCol="user_pass"
>       userRoleTable="user_roles"
>       roleNameCol="role_name"
>       dataSourceName="jdbc/auth"/>
> 
>      <!-- Define the default virtual host
>           Note: XML Schema validation will not work with Xerces 2.2.
>       -->
>      <Host name="localhost"  appBase="webapps"
>            unpackWARs="true" autoDeploy="true"
>            xmlValidation="false" xmlNamespaceAware="false">
> 
>        <!-- SingleSignOn valve, share authentication between web
> applications
>             Documentation at: /docs/config/valve.html -->
>        <!--
>        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
>        -->
> 
>        <!-- Access log processes all example.
>             Documentation at: /docs/config/valve.html -->
>        <!--
>        <Valve className="org.apache.catalina.valves.AccessLogValve"
> directory="logs"
>               prefix="localhost_access_log." suffix=".txt"
> pattern="common" resolveHosts="false"/>
>        -->
> 
>      </Host>
>    </Engine>
>  </Service>
> </Server>
> 
> 
> CONTEXT.xml:
> 
> <?xml version="1.0" encoding="UTF-8"?> <Context antiJARLocking="true"
>        reloadable="true">
> 
>      <ResourceLink name="jdbc/auth"
>                global="jdbc/auth"
>                type="javax.sql.DataSource"/>
>    </Context>
> 
> 
> WEB.xml:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://java.sun.com/xml/ns/javaee";
>           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>          http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
>           version="2.5">
>    <error-page>
>        <exception-type>java.lang.Throwable</exception-type>
>        <location>/oops.jsp</location>
> 
>    </error-page>
> 
>    <servlet>
>        <servlet-name>Faces Servlet</servlet-name>
>        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>        <load-on-startup>1</load-on-startup>
>    </servlet>
>    <resource-ref>
>  <description>This is a MySQL database connection</description>
>  <res-ref-name>jdbc/auth</res-ref-name>
>  <res-type>javax.sql.DataSource</res-type>
>  <res-auth>Container</res-auth>
> </resource-ref>
> 
>    <servlet-mapping>
>        <servlet-name>Faces Servlet</servlet-name>
>        <url-pattern>*.jsf</url-pattern>
>    </servlet-mapping>
>    <welcome-file-list>
>        <welcome-file>index.jsp</welcome-file>
>    </welcome-file-list>
> 
>    <security-role><role-name>RegisteredUser</role-name></security-role>
>    <security-role>
>        <role-name>Admin</role-name>
>    </security-role>
> 
>    <security-constraint>
>        <web-resource-collection>
>            <web-resource-name>loggedInUser</web-resource-name>
>            <url-pattern>/pages/user/secure/*</url-pattern>
>            <http-method>GET</http-method>
>            <http-method>POST</http-method>
>        </web-resource-collection>
>        <auth-constraint>
>            <role-name>RegisteredUser</role-name>
> 
>        </auth-constraint>
> 
>    </security-constraint>
>    <security-constraint>
>        <web-resource-collection>
>            <web-resource-name>AdminArea</web-resource-name>
>            <url-pattern>/pages/admin/*</url-pattern>
>            <http-method>GET</http-method>
>            <http-method>POST</http-method>
>        </web-resource-collection>
>        <auth-constraint>
>            <role-name>Admin</role-name>
>        </auth-constraint>
> 
> 
>    </security-constraint>
>    <login-config>
>        <auth-method>FORM</auth-method>
>        <form-login-config>
>            <form-login-page>/login.jsf</form-login-page>
>            <form-error-page>/loginerror.jsf</form-error-page>
>        </form-login-config>
>    </login-config>
> 
>     <context-param>
>         <param-name>email</param-name>
>         <param-value>thejarten...@thejarbar.org</param-value>
>     </context-param>
> </web-app>
> 
> I am probably missing a tag I guess from one of the configurations and
> can not tell where.
> --------------------------------------------------
> From: <yucca...@live.co.za>
> Sent: Tuesday, June 15, 2010 10:11 PM
> To: "Tomcat Users List" <users@tomcat.apache.org>
> Subject: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
> JDBC driver of class '' for connect URL 'null'
> 
>> I have tried to check why this exception is thrown in production but
>> not development....
>>
>> The difference between production snd development server is:
>>
>> development) put mysql jar into CATALINA/lib (tomcat 6.0.26)
>>
>> production) choice of common/lib or share/lib
>>
>> exception is thrown by hibernate which is wrapping the exception from
>> realm 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to