You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Meenakshi Singh <me...@mind-infotech.com> on 2005/12/28 11:00:55 UTC

Plz help if anyone has any idea about this: Portlet Connecting to JNDI source


Hello Everyone,

I am new to portlet development & facing a problem for quite some time now.
I am using Websphere portal server 5.0.2.3. I have developed a portlet which
uses a JNDI data source. I have made the JNDI source in Websphere
application server & have also tested the connection. It returns successful.
I have the following code in my portlet to connect to the database(which is
a SQLServer Database).

ctx	= new InitialContext();
dataSource	= (DataSource)ctx.lookup("jdbc/waps");
conn=ds.getConnection();

However, when I deploy the portlet on portal server & try to run it, it
gives a null pointer exception as it is not able to get the data source.
It's not able to lookup the jndi source.
Is there any configuration that needs to be done on the portal server.
If yes, then would anybody please help & list out the steps to me.

Please help, it's urgent,
Thanks & Regards,
Meenakshi.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org