Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

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

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!

 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch Antigoni Tsouri :)

what's your full stack trace error message?
perhaps,exception-jdbc-bound-context this helps?
 
Antigoni Tsouri
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
today's feeble attempt to support the empire
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!