tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shilpa Nalgonda" <snalgo...@mypublisher.com>
Subject RE: getting Naming exception with struts...please help...
Date Wed, 28 Jul 2004 15:28:46 GMT
Can someone please help on this error...

-----Original Message-----
From: Shilpa Nalgonda [mailto:snalgonda@mypublisher.com]
Sent: Wednesday, July 28, 2004 11:03 AM
To: Tomcat Users List
Subject: getting Naming exception with struts...please help...


I am using struts in my web application, My application is trying to create
a new user in the database when the user clicks on the submit button giving
teh user information.

And i am getting connection not found error.  below is the error stack
trace...

WARNING: Unhandled Exception thrown: class java.lang.NullPointerException
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
        at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
        at com.ecommerce.DAO.DAOFactory.getConnection(Unknown Source)
        at com.ecommerce.DAO.UserDAO.<init>(Unknown Source)
        at com.ecommerce.action.BillingInfoAction.execute(Unknown Source)
        at
org.apache.struts.action.RequestProcessor.processActionPerform(Reques
tProcessor.java:484)
        at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
============================================================================
=========
First i tried to connect to mysql db without using struts and it works.  I
am using Tomcat 4.1.03 server.  Edited server.xml and web.xml for the
datasource entry to retrieve connection object.  But now i am using struts
and BillingInfoAction classe's execute method calls my DAOFactory class to
retrieve connection  .

Why is it different if i use Struts, why can't the context be bound to my
database? please help...


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


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


Mime
View raw message