tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 김길종 <kj...@uniboss.com>
Subject jdbc datasource setting problem for tomcat 4.1
Date Wed, 11 Sep 2002 07:57:55 GMT
hi, I test some Web Applications with tomcat 4.1.0 and Oracle Database...
when i set datasource for jdbc in tomcat, i found error message in tomcat console window..
i intalled tomcat 4.1 on my windows 2000 professional OS...
my configuration files are like below.. thanks for any reply and help...

1. context part in server.xml
        <Context path="/Cewolf" docBase="Cewolf" debug="0">
           <Resource name="jdbc/FruitDB" auth="Container"
                        type="javax.sql.DataSource"/> 
            <ResourceParams name="jdbc/FruitDB">
            <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:@127.0.0.1:1521:ora817</value>
            </parameter>
            <parameter>
              <name>username</name>
              <value>scott</value>
            </parameter>
            <parameter>
              <name>password</name>
              <value>tiger</value>
            </parameter>
            <parameter>
              <name>maxActive</name>
              <value>20</value>
            </parameter>
            <parameter>
              <name>maxIdle</name>
              <value>10</value>
            </parameter>
            <parameter>
              <name>maxWait</name>
              <value>-1</value>
            </parameter>
          </ResourceParams>
        </Context>

2. web.xml for my test web app
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
  <display-name>CeWolf</display-name>
  <description>Cewolf demos</description>
    <resource-ref>
      <description>Test DataSource</description>
      <res-ref-name>jdbc/FruitDB</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
    </resource-ref>
  <servlet>
    <servlet-name>CewolfServlet</servlet-name>
    <servlet-class>de.laures.cewolf.CewolfRenderer</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>CewolfServlet</servlet-name>
    <url-pattern>/cewolf/*</url-pattern>
  </servlet-mapping>
  <session-config>
    <session-timeout>30</session-timeout>
  </session-config>
  <welcome-file-list>
   <welcome-file>index.jsp</welcome-file>
   <welcome-file>index.html</welcome-file>
   <welcome-file>index.htm</welcome-file>
  </welcome-file-list>
</web-app>

3. under those environment, i saw error message like below on the tomcat console..
[INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.10
org.xml.sax.SAXParseException: 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*,welco
me-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-const
raint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:232)
        at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:173)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:362)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:296)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:1953)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:878)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLDocumentFragmentScannerImpl.java:1144)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:987)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1445)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
        at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
        at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169)
        at org.apache.commons.digester.Digester.parse(Digester.java:1495)
        at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:282)
        at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:3493)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
        at org.apache.catalina.core.StandardService.start(StandardService.java:497)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:2191)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
        at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
        at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
[ERROR] Digester - -Parse Error at line 39 column 11: The content of element typ
e "web-app" must match "(icon?,display-name?,description?,distributable?,context
-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-conf
ig?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resou
rce-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,e
jb-local-ref*)". <org.xml.sax.SAXParseException: The content of element type "we
b-app" must match "(icon?,display-name?,description?,distributable?,context-para
m*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,m
ime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-r
ef*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-lo
cal-ref*)".>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message