Hello, I'm finally upgrading my Tomcat version from 4.1.31 to 6.0.24; in this instance, running on XP Pro w/ jdk1.6.0_18 and jre6
I'm having some trouble with the configuration of the context.xml and web.xml files. I've left the content out of the server.xml file, as instructed, as opposed to the old TC 4.x. series version where that was allowed. However, the connection pool and connection to the DB in general, is not working. One thing that I'm not exactly sure how to map under the new environment is the lib folder. I'm assuming from what I've read that the lib folder in TC6 takes the place of commons/lib in the TC 4 series. So I copied over my Oracle driver file in the jar file, ojdbc14_g.jar to the TC 6 lib directory. There are jar files in the TC 4 commons/lib titled commons-dbcp-1.1.jar, commons-pool-1.1.jar, and jndi.jar. In TC6, only tomcat-dbcp.jar. At least as far as I can tell a jar file relating to DB connections. Perhaps the servlet-api.jar or jsp-api.jar also have references that take the place of those in the TC 4 libraries. I'll include the snippets of my /WEB-INF/web.xml file and my conf/context.xml files. web.xml ----------------------------------- <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <description>MyOracle Test App</description> <resource-ref> <description>DB Connection</description> <res-ref-name>jdbc/myoracle</res-ref-name> <res-auth>Container</res-auth> <res-type>javax.sql.DataSource</res-type> </resource-ref> </web-app> --------------------------------- context.xml file in conf --------------------------------------- <Context path="/chngctrl" docBase="chngctrl" debug="0" reloadable="true" crossContext="true" useNaming="true"> <!-- Default set of monitored resources --> <!-- omitting - factory="oracle.jdbc.pool.OracleDataSourceFactory" below--> <Resource name="jdbc/myoracle" auth="Container" type="javax.sql.DataSource" maxActive="125" maxIdle="15" maxWait="7000" removeAbandoned="true" removeAbandonedTimeout="30" logAbandoned="true" username="usernm" password="userps" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@179.17.100.100:1526:SID" minEvictableIdleTimeMillis="5000" timeBetweenEvictionRunsMillis = "10000" testWhileIdle="true" /> <WatchedResource>WEB-INF/web.xml</WatchedResource> <!-- Uncomment this to disable session persistence across Tomcat restarts --> <!-- <Manager pathname="" /> --> <!-- Uncomment this to enable Comet connection tacking (provides events on session expiration as well as webapp lifecycle) --> <!-- <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" /> --> </Context> -------------------------------------- ------- One brief error or warning I get upon startup is the following, "Feb 19, 2010 3:23:42 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performanc e in production environments was not found on the java.library.path: C:\Java\jdk 1.6.0_18\jre\bin;.;C:\WINNT\Sun\Java\bin;C:\WINNT\system32;C:\WINNT;C:\oracle\or a92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\ bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\QuickTime \QTSystem\;C:\ORACLE\ORA92\bin\;C:\Progra~1\Oracle\jre\1.3.1\bin;C:\Progra~1\Ora cle\jre\1.1.8\bin;C:\Java\jdk1.6.0_18\bin;C:\Progra~1\JavaSoft\JRE\1.3.1_02\bin Feb 19, 2010 3:23:43 PM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Realm} Setting property 'debu g' to '99' did not find a matching property." ------------- although this may be somewhat inconsequential to Tomcat running effectively. Not sure. But of bigger concern is the following message on the console: "SEVERE: Exception opening database connection java.sql.SQLException: Io exception: The Network Adapter could not establish the connection at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334) at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:418) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja va:521) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:325) at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:714) at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:786) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1037) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443 ) at org.apache.catalina.core.StandardService.start(StandardService.java:5 16) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710 ) at org.apache.catalina.startup.Catalina.start(Catalina.java:593) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Feb 19, 2010 3:24:04 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor host-manager.xml Feb 19, 2010 3:24:04 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor manager.xml Feb 19, 2010 3:24:04 PM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory docs Feb 19, 2010 3:24:04 PM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory examples Feb 19, 2010 3:24:04 PM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory murach Feb 19, 2010 3:24:04 PM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory ROOT Feb 19, 2010 3:24:04 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Feb 19, 2010 3:24:04 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Feb 19, 2010 3:24:04 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/32 config=null Feb 19, 2010 3:24:04 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 21462 ms" ------------------------------------------------------------------------------------ Please let me know if more info is needed from my end. Any help would be appreciated! Thanks! Barry Propes Citimortgage, Inc. Workflow Enhancements 3950 Regent - Irving, TX 75063 (469) 220-5777