Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
-none-

-none-

2007-08-16       - By ian.blenk@(protected)

 Back

I'm upgrading from tomcat 4.1.24 to tomcat 5.5.12 on WinXP. I have three
applications that are deployed from this
server, two of which work fine with tomcat 5.5.12, however the third which uses
an oracle 9i database gives me the
following error "javax.servlet.ServletException: Cannot create JDBC driver of
class '' for connect URL 'null' ".
Basically I've included the same details form the Tomcat4 server.xml file into
the tomcat 5.5 server.xml, rediting
where necessary.

Things I have tried..

Placing the context into fragment files located either inside the applications
META-INF folder or under
tomcat\conf\Catalina\localhost. Neither of these seemd to work for me as Tomcat
could not find the apps, so I've
left the context back in server.xml.
Rewriting the Resource params <parameter> as elements i.e.factory="com.ora.jsp
.sql.DataSourceFactory"
Checked changed location of the JDBC jar file. classes12.jar catalina_home
\common\lib\ AND
catalina_home\webapps\[appname]\WEB-INF\lib
Checked changed the server.xml service-name and engine name to match previous
TC4 server.xml version.
Added a Resourcelink element to the context - this is not present on the TC4
version
Checked Tomcat logs.

I think that Tomcat is not able to read the <ResourceParams> element, which is
why the URL and driverClass are
NULL.

Which When I checked the Tomcat log files shows ...

16-Aug-2007 (See http://Aug-2007.ora-code.com) 09:25:46 org.apache.catalina.core.ApplicationContext log
SEVERE: action: Cannot create JDBC driver of class '' for connect URL 'null'

Background info
Using Apache 2.0 with mod_JK to serve pages on port 80
Java version 1.5

**** server.xml ****

<!-- Tomcat 5.5 Example Server Configuration File -->

<Server port="8005" shutdown="SHUTDOWN" debug="0">

 <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
debug="0"/>
 <Listener className="org.apache.catalina.mbeans
.GlobalResourcesLifecycleListener" debug="0"/>

 <!-- Global JNDI resources -->
 <GlobalNamingResources>

   <!-- Test entry for demonstration purposes -->
   <Environment name="simpleValue" type="java.lang.Integer" value="30"/>


   <Resource name="UserDatabase" auth="Container"
             type="org.apache.catalina.UserDatabase"
      description="User database that can be updated and saved"
          factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
         pathname="conf/tomcat-users.xml" ></Resource>

       
 </GlobalNamingResources>


 <Service name="Catalina">
 
   <Connector port="8009"
              enableLookups="true" redirectPort="8443" protocol="AJP/1.3" />

   <Engine name="Catalina" defaultHost="opp-online" debug="0">

     
     <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
            resourceName="UserDatabase"/>
                       
         
     <Host name="opportunities-online" debug="0" appBase="webapps" >
     

       <Context path="/staff" docBase="oponline/staff" cookies="true"
reloadable="true">
         <Valve className="org.apache.catalina.valves.AccessLogValve"
                directory="logs"  prefix="staff_access_log." suffix=".txt"
                pattern="combined" resolveHosts="false"/>
                               
         <Logger className="org.apache.catalina.logger.FileLogger" prefix=
"oponline_log." suffix=".txt"
timestamp="true"/>
         
          <ResourceParams name="jdbc/oponline"
                    factory="com.ora.jsp.sql.DataSourceFactory"
                        user="myuser"
                        password="mypassword"
                        dataSourceClassName="oracle.jdbc.pool
.OracleConnectionCacheImpl"
                        URL="jdbc:oracle:thin:@(protected):1521
:MYTE"
                        maxLimit="5" />
                 
            <!-- global resource for application's context. -->
            <!-- <ResourceLink name="/jdbc/oponline" global="/jdbc/oponline"
                       type="org.apache.catalina.UserDatabase"/> -->
                                   
       </Context>
       
     </Host>

   </Engine>

 </Service>

</Server>

*** end server.xml ***


*** App web.xml except ***

<resource-ref>
   <description>
     JNDI DataSource for [appname] database.
     (From Oreilly "JavaServer Pages", Bergsten, 2nd Ed., page 485)
   </description>
   <res-ref-name>jdbc/oponline</res-ref-name>
   <res-type>javax.sql.DataSource</res-type>
   <res-auth>Container</res-auth>
 </resource-ref>

*** end web.xml ***


Thanks

Ian

--

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.