Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 41645 invoked from network); 1 Dec 2009 05:14:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Dec 2009 05:14:32 -0000 Received: (qmail 81568 invoked by uid 500); 1 Dec 2009 05:14:28 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 81481 invoked by uid 500); 1 Dec 2009 05:14:25 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 81470 invoked by uid 99); 1 Dec 2009 05:14:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Dec 2009 05:14:25 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Dec 2009 05:14:15 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1NFL3i-0001SW-Kh for users@tomcat.apache.org; Mon, 30 Nov 2009 21:13:54 -0800 Message-ID: <26586790.post@talk.nabble.com> Date: Mon, 30 Nov 2009 21:13:54 -0800 (PST) From: vramanaj To: users@tomcat.apache.org Subject: Re: How to access JNDI resources on Tomcat level In-Reply-To: <4B13F1C6.6020200@pidster.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: vramanaj@gmail.com References: <48DBB24A.8050405@ceti.pl> <48DCF5B5.4010806@ceti.pl> <48DD15BD.6020202@christopherschultz.net> <48DD5D66.2040304@ceti.pl> <26574958.post@talk.nabble.com> <4B13F1C6.6020200@pidster.com> X-Virus-Checked: Checked by ClamAV on apache.org Still getting the same error after changing Data Source name to 'jdbc/DefaultDS'. Added resource link in webapp.xml. Error : Error During Lookup Name jdbc is not bound in this Context Are there any extra customizations required for Josso+Tomcat6? ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Pid Ster wrote: > > On 30/11/2009 13:46, vramanaj wrote: >> >> Hi, >> >> I am facing problem with configuring JNDI DataSources for Josso project >> in >> Tomcat 6. Getting the following errors in tomcat log when i am trying to >> access the application. Defined resource in >> conf/Catalina/localhost/webapp.xml. And res-reference in the >> application's >> web.xml. >> >> Nov 30, 2009 7:48:52 AM >> org.josso.gateway.identity.service.store.db.DataSourceIdentityStore >> getDataSource >> SEVERE: Error during DB connection lookup >> javax.naming.NameNotFoundException: Name DefaultDS is not bound in this >> Context >> at org.apache.naming.NamingContext.lookup(NamingContext.java:770) >> at org.apache.naming.NamingContext.lookup(NamingContext.java:153) >> >> Steps Followed: >> 1. Defined DataSource within GlobalNamingResources >> > Try using "jdbc/DefaultDS". I don't believe you're allowed to start the > name with a / character. > >> auth="Container" >> type="javax.sql.DataSource" >> description="SSO DataSource" >> username="josso" >> password="josso" >> driverClassName="oracle.jdbc.OracleDriver" >> url="jdbc:oracle:thin:@md1npddev10:1521:jdaj" >> factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" >> maxActive="8" >> maxIdle="4"/> >> >> 2. Added res-reference in web.xml >> 3. Defined resource in conf/Catalina/localhost/webapp.xml > > If you've defined it in the global resources, you don't need to redefine > it here, just use: > > global="jdbc/DefaultDS" > name="jdbc/DefaultDS" > type="javax.sql.DataSource"/> > > > p > >> > auth="Container" >> type="javax.sql.DataSource" >> description="SSO DataSource" >> username="josso" >> password="josso" >> driverClassName="oracle.jdbc.OracleDriver" >> url="jdbc:oracle:thin:@md1npddev10:1521:jdaj" >> factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" >> maxActive="8" >> maxIdle="4"/> >> >> 4. In josso-gateway-db-stores.xml >> > dsJndiName="java:comp/env/DefaultDS" >> userQueryString="SELECT NAME FROM JOSSO_USER WHERE >> LOGIN = ?" >> rolesQueryString="SELECT ROLE FROM JOSSO_USER_ROLE >> WHERE LOGIN = ?;" >> credentialsQueryString="SELECT LOGIN AS USERNAME, >> PASSWORD FROM JOSSO_USER WHERE LOGIN = ?" >> userPropertiesQueryString="SELECT NAME, VALUE FROM >> JOSSO_USER_PROPERTY WHERE LOGIN = ?" >> resetCredentialDml="UPDATE JOSSO_USER SET PASSWORD >> = ? >> WHERE LOGIN = ?" >> relayCredentialQueryString="SELECT LOGIN FROM >> JOSSO_USER WHERE #?# = ?" /> >> >> 5. When i try to access the example partner application (/partner), >> getting >> the following error: >> Error : Error During Lookup Name DefaultDS is not bound in >> this >> Context >> >> I am using Josso 1.8.0 with tomcat 6.0.18. >> >> Please help me out to proceed further. Quick response is highly >> appreciable. >> >> Thanks in Advance. >> >> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ >> >> >> Mikolaj Rydzewski-2 wrote: >>> >>> Mikolaj Rydzewski wrote: >>>> Now, I want to setup Josso single sign on system (www.josso.org) and >>>> force it to use JNDI DataSources as well. With no luck. >>> Here's the solution for anyone interested (addition to typical josso >>> setup): >>> >>> * define DataSource within GlobalNamingResources (e.g. jdbc/users) >>> * add JNDI support to josso webapp (e.g. and ResourceLink to >>> META-INF/context.xml and resource-ref to WEB-INF/web.xml) >>> * reference DataSource from josso-gateway-config.xml using >>> java:comp/env/jdbc/users as its JNDI name >>> >>> Enjoy ;-) >>> >>> -- >>> Mikolaj Rydzewski >>> >>> >>> --------------------------------------------------------------------- >>> To start a new topic, e-mail: users@tomcat.apache.org >>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>> For additional commands, e-mail: users-help@tomcat.apache.org >>> >>> >>> >> Quoted from: >> http://old.nabble.com/How-to-access-JNDI-resources-on-Tomcat-level-tp19672443p19689928.html >> >> Mikolaj Rydzewski-2 wrote: >>> >>> Christopher Schultz wrote: >>>>> * add JNDI support to josso webapp (e.g. and ResourceLink to >>>>> META-INF/context.xml and resource-ref to WEB-INF/web.xml) >>>>> >>>> >>>> Note that this is not required for Realms. See >>>> http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html#Context+versus+GlobalNamingResources >>>> >>> I'm exposing DataSource to josso webapp, not the Realm. So I need this. >>> Lack of such configuration was causing my initial problems. >>> >>> -- >>> Mikolaj Rydzewski >>> >>> >>> --------------------------------------------------------------------- >>> To start a new topic, e-mail: users@tomcat.apache.org >>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>> For additional commands, e-mail: users-help@tomcat.apache.org >>> >>> >>> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > > -- View this message in context: http://old.nabble.com/How-to-access-JNDI-resources-on-Tomcat-level-tp19672443p26586790.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org