tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 29664] New: - DataSourceRealm fails to lookup Context Datasources with the localDataSource flag.
Date Fri, 18 Jun 2004 09:10:47 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29664>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29664

DataSourceRealm fails to lookup Context Datasources with the localDataSource flag.

           Summary: DataSourceRealm fails to lookup Context Datasources with
                    the localDataSource flag.
           Product: Tomcat 5
           Version: 5.0.0
          Platform: PC
               URL: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/realm-
                    howto.html#DataSourceRealm
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: avelino.xa.benavides@ericsson.com


DataSourceRealm can't lookup the Context Datasources, event with the 
localDataSource="true" flag.
I'm using jwsdp 1.3
I know its a recurring one, but, you may have to take a closer look.
Here's my config:
<Host name="localhost" debug="0" appBase="webapps"
       unpackWARs="false" autoDeploy="true">

       <Valve className="org.apache.catalina.authenticator.SingleSignOn"
                   debug="0"/>
        <Context path="/dms" docBase="dms" debug="0" reloadable="true" 
crossContext="false">
   
 <Logger className="org.apache.catalina.logger.FileLogger"
             prefix="localhost_dms_log." suffix=".txt"
             timestamp="true"/>

  <Resource name="jdbc/dmsdb"
               auth="Container"
               type="javax.sql.DataSource"/>

  <ResourceParams name="jdbc/dmsdb">
    <parameter>
      <name>factory</name>
      <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>

    <parameter>
      <name>maxActive</name>
      <value>100</value>
    </parameter>

    <!-- Maximum number of idle dB connections to retain in pool.
         Set to 0 for no limit.
         -->
    <parameter>
      <name>maxIdle</name>
      <value>30</value>
    </parameter>

    <parameter>
      <name>maxWait</name>
      <value>10000</value>
    </parameter>

    <!-- MySQL dB username and password for dB connections  -->
    <parameter>
     <name>username</name>
     <value>xxxxxxx</value>
    </parameter>
    <parameter>
     <name>password</name>
     <value>xxxxxxx</value>
    </parameter>

    <!-- Class name for mm.mysql JDBC driver -->
    <parameter>
       <name>driverClassName</name>
       <value>org.gjt.mm.mysql.Driver</value>
    </parameter>

    <parameter>
      <name>url</name>
      <value>jdbc:mysql://localhost:3306/dmsdb?autoReconnect=true</value>
    </parameter>
  </ResourceParams>
  
  <Logger className="org.apache.catalina.logger.FileLogger"
             prefix="dms_Realm_log." suffix=".txt"
             timestamp="true"/>

  <!--
Tried with dataSourceName= /jdbc/dmsdb, jdbc, dmsdb, java:comp/env/jdbc/dmsdb
None seem to work.
 -->

  <Realm className="org.apache.catalina.realm.DataSourceRealm" debug="99" 
        dataSourceName="jdbc/dmsdb" localDataSource="true"
      userTable="administrator" userNameCol="username" userCredCol="password"
   userRoleTable="another" roleNameCol="rights"/>

   
</Context>  

      </Host>

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

Heres the exception:
Looks to me as bug in the Context setup rather than in the Realm code.
Especially because the exception only shows half of the name.
But you folks, are the experts.

2004-06-18 10:35:43 DataSourceRealm[/dms]: Exception performing authentication
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
	at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:197)
	at org.apache.catalina.realm.DataSourceRealm.open
(DataSourceRealm.java:467)
	at org.apache.catalina.realm.DataSourceRealm.authenticate
(DataSourceRealm.java:315)
	at org.apache.catalina.authenticator.FormAuthenticator.authenticate
(FormAuthenticator.java:265)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke
(AuthenticatorBase.java:497)
	at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:149)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:196)
	at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:151)
	at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:175)
	at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:149)
	at org.apache.catalina.authenticator.SingleSignOn.invoke
(SingleSignOn.java:383)
	at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:149)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:156)
	at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:151)
	at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:577)
	at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:149)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:564)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:974)
	at org.apache.coyote.tomcat5.CoyoteAdapter.service
(CoyoteAdapter.java:207)
	at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:647)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:499)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:575)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:649)
	at java.lang.Thread.run(Thread.java:534)

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


Mime
View raw message