Hi,

      You can try with "java:comp/env/jdbc/waps" instead of "jdbc/waps"



                                                                                
                                                              
                      "Meenakshi Singh"                                         
                                                              
                      <[EMAIL PROTECTED]        To:       "Struts Users Mailing 
List \(E-mail\)" <user@struts.apache.org>               
                      fotech.com>                     cc:                       
                                                              
                                                      bcc:                      
                                                              
                      28/12/2005 11:00                Subject:  Plz help if 
anyone has any idea about this:  Portlet Connecting to JNDI       
                      Please respond to                source                   
                                                              
                      "Struts Users Mailing                                     
                                                              
                      List"                                                     
                                                              
                                                                                
                                                              
                                                                                
                                                              
                                                                                
                                                              
                                                                                
                                                              
                                                                                
                                                              






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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to