wood burning stoves 2.0*
The moose likes JDBC 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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
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
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

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