This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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 Java 8 in Action this week in the Java 8 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: 18152
    
    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
 
Similar Threads
getting nullpointer exception
Regarding my project
Not authenticating the user
Change password for user
Validating username password giving blank page