Drop the ResourceLink element -- it's confusing tomcat and not needed
here unless you created a global resource.
--David
Will Hartung wrote:
I'm trying to get a DataSourceRealm working for my project.
When I try to log in, I get:
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
at
org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:401)
Here's my Context.xml (it's short):
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/WebApplication5">
<Resource auth="Container" driverClassName="org.postgresql.Driver"
maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/securedb"
password="password" type="javax.sql.DataSource"
url="jdbc:postgresql://dbhost:5432/securedb" username="secureuser"/>
<ResourceLink global="jdbc/securedb" name="jdbc/securedb"
type="javax.sql.DataSource"/>
<Realm className="org.apache.catalina.realm.DataSourceRealm"
dataSourceName="jdbc/securedb" debug="99" roleNameCol="role"
userCredCol="password" userNameCol="loginid" userRoleTable="userroleview"
userTable="user"/>
</Context>
I also have the proper (I think) references and such in the web.xml:
<resource-ref>
<description>Postgres Datasource</description>
<res-ref-name>jdbc/securedb</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
So, I must be missing something fundamental, but I thought I had all of the
tracks covered.
Any hints appreciated.
Regards,
Will Hartung
([EMAIL PROTECTED])
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]