my dog learned polymorphism*
The moose likes JSP and the fly likes Web app exception: Name jdbc is not bound in this Context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Web app exception: Name jdbc is not bound in this Context" Watch "Web app exception: Name jdbc is not bound in this Context" New topic
Author

Web app exception: Name jdbc is not bound in this Context

Antigoni Tsouri
Greenhorn

Joined: Dec 18, 2012
Posts: 8
Hello there,
I am trying to build a maven web application with tomcat, I am very new here, and I keep getting an exception:

javax.naming.NameNotFoundException: Name jdbc is not bound in this Context.

The exception keeps appearing in the tomcat server when trying to validate a login.

This is our index.jsp:

This is our redirectPage.jsp:
<jsp:forward page="/WEB-INF/jsp/shMainView.jsp"></jsp:forward>

There is the shMainView:


Here is the validation file (the validation is supposed to go through the j_security_check):


And finally here is the respective part of the web.xml:


We 've also double checked the server.xml, context.xml and the credentials for the database connection, but nothing works!
I would appreciate any help here, because we' ve searched for feedback in the Internet, tried lots of staff and nothing works!

Thanks in advance!

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Welcome to JavaRanch Antigoni Tsouri :)

what's your full stack trace error message?
perhaps,exception-jdbc-bound-context this helps?
Antigoni Tsouri
Greenhorn

Joined: Dec 18, 2012
Posts: 8
Hello again, my full stack trace error message is:

18-Dec-2012 14:29:49 org.apache.catalina.realm.DataSourceRealm open
SEVERE: Exception performing authentication
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:415)
at org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:296)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:260)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:454)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)


As far as the other link you posted in your reply, we tried searching for a an exploded or simple .war file to delete, but we didn't found such file.
My actual question is when you do validation through the doFilter() function, do you also have to explicitly connect to your Database through your program (e.g. use connection object and relevant database classes) or is it connected to the database automatically?

Thanks a lot again!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web app exception: Name jdbc is not bound in this Context