tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <christopher.d.schu...@comcast.net>
Subject Re: Missing jdbc context
Date Mon, 27 Oct 2003 13:59:12 GMT
Hans,

>> Set debug="99" for your server, engine, host, so you can see why tomcat
>> is running into errors processing server.xml. 
> 
> Unfortunately, that setting does not provide any more information
> about the problem.

If this happening when you're trying to use a realm or something like 
that? I wrestled with this recently, and I needed to do the following:

1. Place <Resource> and <ResourceParams> sections within my 
<GlobalNamingResources> -- this you have already done.

2. Place a <ResourceLink> section within my context. This gives the 
context access to the named resource:

	    <ResourceLink name="jdbc/globaldb"
			global="jdbc/globaldb"
                         type="javax.sql.DataSource" />

After this, my DataSourceRealm worked. In order to be able to use the 
DataSource from my application directly, I also needed this in my 
web.xml file:

     <!-- Reference the JNDI DataSource from the Container -->
     <resource-ref>
         <description>...</description>
         <res-ref-name>jdbc/globaldb</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
	<res-auth>Container</res-auth>
     </resource-ref>

Now everything works for me.

I hope this helps.

-chris


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