You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Lorenzo Jiménez <lj...@nacion.co.cr> on 2005/04/19 22:16:35 UTC

RE: [SPAM2] - RE: Problems with DataSourceRealm Tomcat 5.5 - Found word(s) list error in the Text body

This is my context.xml

<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="C:\Apps\NB41\Registro" path="/registry">
  <Logger className="org.apache.catalina.logger.FileLogger" prefix="registry." suffix=".log" timestamp="true"/>
  
  <Resource name="jdbc/egistry" scope="Shareable" type="javax.sql.DataSource"/>
  <ResourceParams name="jdbc/registry">
    <parameter>
      <name>factory</name>
      <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <!-- DBCP database connection settings -->
    <parameter>
      <name>url</name>
      <value>jdbc:sybase:Tds:172.16.19.11:5000/WEB</value>
    </parameter>
    <parameter>
      <name>driverClassName</name>
      <value>com.sybase.jdbc2.jdbc.SybDriver</value>
    </parameter>
    <parameter>
      <name>username</name>
      <value>WEB123</value>
    </parameter>
    <parameter>
      <name>password</name>
      <value>456PASSW</value>
    </parameter>
    <!-- DBCP connection pooling options -->
    <parameter>
      <name>initialSize</name>
      <value>1</value>
    </parameter>
    <parameter>
      <name>minIdle</name>
      <value>1</value>
    </parameter>
    <parameter>
      <name>maxActive</name>
      <value>2</value>
    </parameter>
    <parameter>
      <name>maxIdle</name>
      <value>2</value>
    </parameter>
    <parameter>
      <name>maxWait</name>
      <value>30000</value>
    </parameter>
  </ResourceParams>
  
    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>META-INF/context.xml</WatchedResource>

</Context>

-----Original Message-----
From: Kanda Upendra [mailto:UKanda@agris.com] 
Sent: Martes, 19 de Abril de 2005 11:57 a.m.
To: Tomcat Users List
Subject: [SPAM2] - RE: Problems with DataSourceRealm Tomcat 5.5 - Found word(s) list error in the Text body


Hi,

  Thanks for the quick response. I have the <resource-ref> defined in my web.xml and it still doesn't work.

Throws me the same error.

"Name jdbc not bound in this context"

Thanks

Upendra


-----Original Message-----
From: Lorenzo Jiménez [mailto:ljimenez@nacion.co.cr] 
Sent: Tuesday, April 19, 2005 1:20 PM
To: Tomcat Users List
Subject: RE: Problems with DataSourceRealm Tomcat 5.5
Importance: High

On the web.xml you have also to write down after ther welcome files:

<resource-ref>
	<res-ref-name>jdbc/myDB</res-ref-name>
	<res-type>javax.sql.DataSource</res-type>
	<res-auth>Container</res-auth>

	<-- optional.if you like -->
	<res-sharing-scope>Shareable</res-sharing-scope>  
</resource-ref>

Lorenzo

-----Original Message-----
From: Kanda Upendra [mailto:UKanda@agris.com] 
Sent: Martes, 19 de Abril de 2005 11:06 a.m.
To: Tomcat Users List
Subject: Problems with DataSourceRealm Tomcat 5.5


Hi,

  I am using Tomcat 5.5 and having problems with the DataSourceRealm
finding the data source in the JNDI. 

Here is the configuration of my context.xml,

<Realm className="org.apache.catalina.realm.DataSourceRealm" debug="99"
             dataSourceName="jdbc/myDB"
           userTable="users" userNameCol="login" userCredCol="password"
           userRoleTable="user_roles" roleNameCol="role_name" />


<Resource name="jdbc/myDB" 	auth="Container"
type="javax.sql.DataSource"
      maxActive="10" maxIdle="5" maxWait="100"  username="myDB"
password="myDB" driverClassName="com.mysql.jdbc.Driver"
	url="jdbc:mysql://localhost/myDB?autoReconnect=true"/>



I get this error "Name jdbc not bound in this context". I tried moving
the Resource configuration under <GlobalNamingResources> in server.xml,
but I get the same error. JDBCRealm works, but I want it use a
connection pool and hence I am trying to change it to a DataSourceRealm.

Also, interestingly, when I try to access the data source from a jsp in
my webapplication it works. The problem seems to be with the
DataSourceRealm looking up for the resource using JNDI.

Any help will be appreciated.

Thanks,

Upendra





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


-------------------------------------------------------------

Si usted no es el destinatario indicado en este mensaje o responsable como persona 
de la entrega del mensaje, no debe copiar o reenviar este mensaje, por favor notifique 
al correo infosegura@nacion.com. Para más referencia sobre términos importantes 
relacionados a este correo visite http://www.nacion.com/disclaimer/index_es2.htm

If you are not the addressee indicated in this message (or responsible for delivery of the 
message to such person), you may not copy or send this message to anyone, please notify
to infosegura@nacion.com. Click here for important additional terms relating to this e-mail. 
<http://www.nacion.com/disclaimer/index_en2.htm>

-------------------------------------------------------------



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





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


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


Re: [SPAM2] - RE: Problems with DataSourceRealm Tomcat 5.5 - Found word(s) list error in the Text body

Posted by Hassan Schroeder <ha...@webtuitive.com>.
Lorenzo Jiménez wrote:
> This is my context.xml

>   <Resource name="jdbc/egistry" scope="Shareable" type="javax.sql.DataSource"/>

If this is a direct copy/paste, you have a mismatch between the
names above and below, but that doesn't matter because

>   <ResourceParams name="jdbc/registry">

:: this *isn't* the way to specify params in 5.5 -- read this:

<http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html>

>     <parameter>
>       <name>factory</name>
>       <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>     </parameter>
...

HTH!
-- 
Hassan Schroeder ----------------------------- hassan@webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.



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


Re: Tomcat/Integration Problems

Posted by Gurumoorthy <g....@btinternet.com>.
try changing the name="localhost" to "192.168.1.200" in your server.xml and
restart both ..

Guru
----- Original Message -----
From: "edwin roberts" <hi...@yahoo.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, April 20, 2005 4:49 PM
Subject: Tomcat/Integration Problems


>
> What's wrong here:
>
>
>
> The intergration of Tomcat and Apache is working fine locally (Localhost).
However, when I try to attach to the server by putting in the IP address
(192.168.1.200) i cant see the tomcat java/servelet items.
>
> What shall i do?
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com


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


Tomcat/Integration Problems

Posted by edwin roberts <hi...@yahoo.com>.
What's wrong here:

 

The intergration of Tomcat and Apache is working fine locally (Localhost). However, when I try to attach to the server by putting in the IP address (192.168.1.200) i cant see the tomcat java/servelet items.

What shall i do?

 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com