users@glassfish.java.net

Spring,Glassfish , JNDI and Datasources

From: <glassfish_at_javadesktop.org>
Date: Tue, 18 Mar 2008 04:28:06 PST

We're currently trying to migrate an Spring based web application (uPortal) to glassfish from Tomcat 5.5

In tomcat, everything works perfectly well, but in Glassfish we have problems with JNDI lookups for Datasources. The logs contain the following error:

javax.naming.NotContextException: comp is not a subcontext

We know that the connection pool and datasource are configured properly in Glassfish because we have deployed another simple web app which succesfully performs a lookup. For some reason uPortal, which uses Spring quite heavily, is failing to find the JNDI resource.

We have googled extensively and looked through these forums and are stumped as to what to look at next - can anyone provide hints or point us in the right direction?
[Message sent by forum member 'phunni' (phunni)]

http://forums.java.net/jive/thread.jspa?messageID=264567