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
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
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 Propes, Barry L

 Back
why don't you use this jar? ojdbc14_g.jar

That's what I ended up upgrading to.

Let me know if you need it, Ian, and I'll send it to you offline.

Barry

And,  you should put it in the common/lib folder.

-- --Original Message-- --
From: ian.blenk@(protected) [mailto:ian.blenk@(protected)]
Sent: Thursday, August 16, 2007 10:27 AM
To: Tomcat Users List
Subject: Re: JDBC driver of class '' for connect URL 'null' in Tomcat
5.5.12


Thanks for your advice so far

I've upgraded to the latest Oracle ojdbc14.jar and placed it the myapp\WEB-INF
\lib folder, I also tried it the
Tomcat\common\lib for for good measure but still got the same results. I'll
continue to use ojdbc14.jar from now
though.

I've change the ResourceParams name to just Resource name but this causes
Tomcat not to startup, the logs show the
following trace...

*** Excerpt Tomcat 5.5.12 logs ***
16-Aug-2007 (See http://Aug-2007.ora-code.com) 16:08:32 org.apache.tomcat.util.digester.Digester endElement
SEVERE: End event threw exception
java.lang.reflect.InvocationTargetException
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
:39)
*** end ***

Does this mean it's now reading the <context> <Resource> element. ?

Thanks

Ian


Quoting ashish shrivastava <ashish.indore@(protected)>:

> check this
>
> http://evolutionnext.com/blog/2005/10/13/1129259088959.html
>
>
>
> On 8/16/07, Matthew Kerle <matthew.kerle@(protected)> wrote:
> >
> > hmm, you have an interesting problem!
> >
> > first thing I'd say is use this opportunity to upgrade to the
> > ojdbc14.jar, which is the latest oracle jdbc driver and allows lots of
> > nice enhancements.
> >
> > second, I'm assuming that since the error is a servlet exception, that
> > there's some servlet code manually handling a database connection (no
> > comment *cough* *cough*) that it gets from a JNDI lookup?
> >
> > third, try changing the <ResourceParams> tag to a plain <Resource> tag,
> > this is the Resource tag that I use in my app (and it works). caveat: I
> > declare this in /META-INF/context.xml inside the <context> tag.
> >
> >    <Resource name="jdbc/my_USERDS" auth="Container"
> >              type="javax.sql.DataSource"
> >              maxActive="0"
> >              maxIdle="10"
> >              maxWait="500"
> >              username="db_user"
> >              password="db_pass"
> >              driverClassName="oracle.jdbc.OracleDriver"
> >              url="jdbc:oracle:thin:@(protected):1521:ORA_SID"/>
> >
> > can you try this and let us know how it goes?
> >
> > cheers!
> >
> > ian.blenk@(protected) wrote:
> > > 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.xmlfile
> 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.jarcatalina_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
> > >
> > >
> >
> > --
> > Matthew Kerle
> > IT Consultant
> > Canberra, Australia
> >
> > Mobile: +61404 096 863
> > Email : mattkerle@(protected)
> > Web : http://threebrightlights.blogspot.com/
> >
> >
> > -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
> > To start a new topic, e-mail: users@(protected)
> > To unsubscribe, e-mail: users-unsubscribe@(protected)
> > For additional commands, e-mail: users-help@(protected)
> >
> >
>


--

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


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
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.