tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shilpa Nalgonda" <snalgo...@mypublisher.com>
Subject getting Naming exception with struts...please help...
Date Wed, 28 Jul 2004 15:03:20 GMT
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


Mime
View raw message