You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Modha Kumar <mo...@hotmail.com> on 2005/03/27 14:40:07 UTC
Adding multiple references in web.xml
Hi All
Tomcat 5.0.28
I have configured and accesed databse connection though DBCP when I
connected to a single instance. Now I have to connect to 2 instances in my
oracle Database and so I added 2 entries in server.xml (with user/pass/url
etc) and 2 entries in web.xml
I am getting this error when I start tomcat can someone please tell what the
problem is (or point me to a document
SEVERE: Parse error in application web.xml
org.xml.sax.SAXParseException: XML document structures must start and end
within
the same entity.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
Here is my web.xml. (Please note: I could access jndi resource fine when I
had just 1 resource-ref element. Now I want to access two database instance
so I added an entry in server.xml and an entry in web.xml I am getting this
error)
<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">
<web-app>
<resource-ref>
<description>RS Datasource</description>
<res-ref-name>jdbc/rsDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<description>RS Datasource</description>
<res-ref-name>jdbc/orclDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
Thanks
_________________________________________________________________
Make money with Zero Investment.
http://adfarm.mediaplex.com/ad/ck/4686-26272-10936-31?ck=RegSell Start your
business.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
RE: Adding multiple references in web.xml
Posted by Alfredo Ledezma Melendez <al...@mail.telcel.com>.
Well, the problem is that you had write twice the <web-app> tag into your
xml. The correct version should be as follows:
<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">
<!-- Notice the web-app tag removal -->
<resource-ref>
<description>RS Datasource</description>
<res-ref-name>jdbc/rsDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<description>RS Datasource</description>
<res-ref-name>jdbc/orclDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
Regards,
____________________________________________
Alfredo Ledezma Meléndez.
Costumer Record Management
Consultor Externo de Sistemas de Atención a Clientes
RadioMovil DIPSA, S. A. de C. V.
Ejército Nacional No. 488, Col. Anahuac, C.P. 11570
México D.F.
-----Original Message-----
From: Modha Kumar [mailto:modha@hotmail.com]
Sent: Sunday, March 27, 2005 6:40 AM
To: commons-user@jakarta.apache.org
Subject: Adding multiple references in web.xml
Hi All
Tomcat 5.0.28
I have configured and accesed databse connection though DBCP when I
connected to a single instance. Now I have to connect to 2 instances in my
oracle Database and so I added 2 entries in server.xml (with user/pass/url
etc) and 2 entries in web.xml
I am getting this error when I start tomcat can someone please tell what the
problem is (or point me to a document
SEVERE: Parse error in application web.xml
org.xml.sax.SAXParseException: XML document structures must start and end
within
the same entity.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
Here is my web.xml. (Please note: I could access jndi resource fine when I
had just 1 resource-ref element. Now I want to access two database instance
so I added an entry in server.xml and an entry in web.xml I am getting this
error)
<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">
<web-app>
<resource-ref>
<description>RS Datasource</description>
<res-ref-name>jdbc/rsDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<description>RS Datasource</description>
<res-ref-name>jdbc/orclDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
Thanks
_________________________________________________________________
Make money with Zero Investment.
http://adfarm.mediaplex.com/ad/ck/4686-26272-10936-31?ck=RegSell Start your
business.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org