File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes TOMCAT 5.5.4 + Datasource in ROOT not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "TOMCAT 5.5.4 + Datasource in ROOT not working" Watch "TOMCAT 5.5.4 + Datasource in ROOT not working" New topic
Author

TOMCAT 5.5.4 + Datasource in ROOT not working

Ticho Soft
Greenhorn

Joined: Jan 10, 2005
Posts: 1
Hi,
I have been trying to configure a datasource to Interbase and Informix Databases
unseccesfully...all apps are all in ROOT directory,

this is my config:
1.- JDK5.0
2.- jakarta-tomcat-5.5.4
3.- Windows 2000 Profesional
4.- $CATALINA_HOME = D:\Tomcat55\
5.- The JDBC driver for informix an Interbase in $CATALINA_HOME\Common\lib
(the JDBC driver works fine because I already have application on te same
server working good but without a connection pool).

the error:
" org.apache.catalina.startup.HostConfig deployDescriptor
SEVERE: Error deploying configuration descriptor ROOT.xml "

my files:

I create a file $CATALINA_HOME\Catalina\localhost\ROOT.xml :
//*****************************

<?xml version="1.0" encoding="ISO-8859-1"?>
<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">

<Context path="/ROOT" docBase="D:/Tomcat55/conf/Catalina/localhost/ROOT" debug="5" reloadable="true" crossContext="true">

<Resource name="jdbc/tress" auth="auth" type="javax.sql.DataSource"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
driverClassName="interbase.interclient.Driver"
url="jdbc:interbase://10.2.2.8:3060/e:/Program Files/Grupo Tress/Datos/Datos.gdb"
user="SYSDBA"
password="masterkey"
maxActive="20" maxIdle="0" maxWait="60000" removeAbandoned="true"
logAbandoned="true" removeAbandonedTimeout="300" />

<Resource name="jdbc/benito" auth="auth" type="javax.sql.DataSource"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
driverClassName="com.informix.jdbc.IfxDriver"
url="jdbc:informix-sqli://10.2.2.5:5010/inventario_db:INFORMIXSERVER=benito_ids"
user="baanrpt"
password="baan"
maxActive="20" maxIdle="0" maxWait="60000" removeAbandoned="true"
logAbandoned="true" removeAbandonedTimeout="300" />

</Context>

</web-app>

//*****************************

I add to the file $CATALINA_HOME\webapps\ROOT\WEB-INF\web.xml the tags <res-ref> :
//*****************************
<?xml version="1.0" encoding="ISO-8859-1"?>

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

<display-name>Welcome to Tomcat</display-name>
<description>
Welcome to Tomcat
</description>

<!-- JSPC servlet mappings start -->
<servlet>
<servlet-name>org.apache.jsp.index_jsp</servlet-name>
<servlet-class>org.apache.jsp.index_jsp</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>org.apache.jsp.index_jsp</servlet-name>
<url-pattern>/index.jsp</url-pattern>
</servlet-mapping>

<!-- JSPC servlet mappings end -->


<res-ref>
<description> Tress Apps</description>
<res-ref-name> jdbc/tress</res-ref-name>
<res-ref-type> javax.sql.DataSource </res-ref-type>
<res-ref-auth> Container</res-ref-auth>
</res-ref>

<res-ref>
<description> Benito Apps</description>
<res-ref-name> jdbc/benito</res-ref-name>
<res-ref-type> javax.sql.DataSource </res-ref-type>
<res-ref-auth> Container</res-ref-auth>
</res-ref>


</web-app>
//*****************************


Do anybody know what he problem is? I have been working on this about 3 weeks.
Any help will be apreciated.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

What happens if you remove:and from ROOT.xml ?
 
wood burning stoves
 
subject: TOMCAT 5.5.4 + Datasource in ROOT not working