tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Johnson <pe...@wizardslair.net>
Subject Oracle DBCP in Tomcat 4
Date Wed, 02 Mar 2005 00:47:02 GMT
Hi All,

Just wondering if I could borrow ppls eyes to see if someone else can 
spot what I've missed

-------- common/lib/ ----------
activation.jar
commons-collections.jar
commons-pool-1.1.jar
jdbc2_0-stdext.jar
jta.jar           
naming-factory.jar
ant.jar
commons-dbcp-1.1.jar
jasper-compiler.jar
jdom.jar
mail.jar
naming-resources.jar
classes12.jar
commons-logging-api.jar
jasper-runtime.jar
jndi.jar
naming-common.jar
servlet.jar


------- server.xml ----------
  <GlobalNamingResources>
    <Resource name="jdbc/oracle" auth="Container" 
type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/oracle">
        <parameter>
            <name>factory</name>
            <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
        </parameter>
        <parameter>
            <name>driverClassName</name>
            <value>oracle.jdbc.driver.OracleDriver</value>
        </parameter>
        <parameter>
            <name>url</name>
            <value>jdbc:oracle:thin:@db:1521:db</value>
        </parameter>
        <parameter>
            <name>username</name>
            <value>foo</value>
        </parameter>
        <parameter>
            <name>password</name>
            <value>bar</value>
        </parameter>
        <parameter>
            <name>maxActive</name>
            <value>5</value>
        </parameter>
        <parameter>
            <name>maxIdle</name>
            <value>1</value>
        </parameter>
        <parameter>
            <name>maxWait</name>
            <value>-1</value>
        </parameter>
    </ResourceParams>
  </GlobalNamingResources>

------- web.xml ----------

    <resource-ref>
        <description>Oracle Database</description>
        <res-ref-name>jdbc/oracle</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>

------- the error --------

SEVERE: Parse Error at line 80 column 11: The content of element type 
"web-app" must match 
"(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".


Line 80 is </web-app> in the web.xml. Removing the resource-ref allows 
the app to load.
I am sure it is simple, what have I missed / done wrong?

PJ

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


Mime
View raw message