my dog learned polymorphism
The moose likes JDBC and Relational Databases and the fly likes after entering username and password i am getting this exception..please tell me the solution Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "after entering username and password i am getting this exception..please tell me the solution" Watch "after entering username and password i am getting this exception..please tell me the solution" New topic
Author

after entering username and password i am getting this exception..please tell me the solution

syed mahboob
Greenhorn

Joined: Dec 06, 2012
Posts: 15




this is my login.jsp page below






java.sql.SQLException: Invalid column name
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:3296)
at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:1914)
at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1515)
at com.lara.login.LoginDAO.authenticateUser(LoginDAO.java:34)
at com.lara.login.LoginAction.process(LoginAction.java:23)
at com.lara.servlets.controller.ControllerServlet.doPerform(ControllerServlet.java:112)
at com.lara.servlets.controller.ControllerServlet.doPost(ControllerServlet.java:86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

quoted from your error stack trace.

at com.lara.login.LoginDAO.authenticateUser(LoginDAO.java:34)

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Please, CarefullyChooseOneForum :)

Moving to an appropriate forum now.
Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19739
    
  10

There's something wrong with your SQL statement (the error message says exactly what is wrong if you care to read it). However neither we nor you can see the SQL which is being executed.

But anyway, constructing SQL statements via string concatenation like that is a bad practice. You should use a PreparedStatement instead. Check the tutorials to find out how.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: after entering username and password i am getting this exception..please tell me the solution
 
jQuery in Action, 3rd edition