HTTP Status 500 – Internal Server Error when entering userid and password on Lead App in Selenium Database | Selenium Forum
M
Monal Posted on 01/10/2020

Hi Instructor,

                  When following video lecture in Selenium Database for Lead app I was able to deploy tomcat, Mysql database and all the necessary steps to load the lead app but after entering useremail and password I see

HTTP Status 500 – Internal Server Error

I have atteds the screen shot, can you please see and let me know what I need to fix it ?

Thank you,

Monal 

 

Full Error:

Type Exception Report

Message com.javachap.service.impl.ServiceException: org.hibernate.exception.GenericJDBCException: Cannot open connection

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

javax.servlet.ServletException: com.javachap.service.impl.ServiceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
	org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
	org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Root Cause

com.javachap.service.impl.ServiceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
	com.javachap.service.impl.UserServiceImpl.authenticate(UserServiceImpl.java:53)
	com.javachap.web.controller.LoginAction.execute(LoginAction.java:29)
	org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
	org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
	org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
	org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
	org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
	org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
	org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
	org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Root Cause

org.hibernate.exception.GenericJDBCException: Cannot open connection
	org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
	org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
	org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
	org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
	org.hibernate.jdbc.AbstractBatcher.openConnection(AbstractBatcher.java:384)
	org.hibernate.jdbc.JDBCContext.connect(JDBCContext.java:141)
	org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:88)
	org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:85)
	org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1090)
	org.hibernate.loader.Loader.doQuery(Loader.java:362)
	org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:203)
	org.hibernate.loader.Loader.doList(Loader.java:1499)
	org.hibernate.loader.Loader.list(Loader.java:1482)
	org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:365)
	org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:268)
	org.hibernate.impl.SessionImpl.list(SessionImpl.java:782)
	org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
	com.javachap.service.impl.UserServiceImpl.authenticate(UserServiceImpl.java:47)
	com.javachap.web.controller.LoginAction.execute(LoginAction.java:29)
	org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
	org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
	org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
	org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
	org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
	org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
	org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
	org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Root Cause

java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
	com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2851)
	com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:753)
	com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3562)
	com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1154)
	com.mysql.jdbc.Connection.createNewIO(Connection.java:1702)
	com.mysql.jdbc.Connection.<init>(Connection.java:405)
	com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268)
	java.sql.DriverManager.getConnection(DriverManager.java:664)
	java.sql.DriverManager.getConnection(DriverManager.java:208)
	org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
	org.hibernate.jdbc.AbstractBatcher.openConnection(AbstractBatcher.java:381)
	org.hibernate.jdbc.JDBCContext.connect(JDBCContext.java:141)
	org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:88)
	org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:85)
	org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1090)
	org.hibernate.loader.Loader.doQuery(Loader.java:362)
	org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:203)
	org.hibernate.loader.Loader.doList(Loader.java:1499)
	org.hibernate.loader.Loader.list(Loader.java:1482)
	org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:365)
	org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:268)
	org.hibernate.impl.SessionImpl.list(SessionImpl.java:782)
	org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
	com.javachap.service.impl.UserServiceImpl.authenticate(UserServiceImpl.java:47)
	com.javachap.web.controller.LoginAction.execute(LoginAction.java:29)
	org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
	org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
	org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
	org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
	org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
	org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
	org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
	org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Note The full stack trace of the root cause is available in the server logs.


M
Monal Replied on 01/10/2020

Please note 

Currently I am having issue to set my root password in Maria/Mysql DB Could the above error be related ? I dont know so please explain

Also I treid this on DB but I am getting issues:

MariaDB [mysql]> update user set password=PASSWORD("XXXXX") where User='root';
ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
MariaDB [mysql]>


M
Monal Replied on 01/10/2020

Anyway I have re-install Xammp with new DB etc and I was able to change the password successfully, but even after than I am seeing simialr error I can't sign into Lead app.


M
Monal Replied on 01/10/2020

Request: I wish in your future videos you also show how to deploy stuff on MAC OSX because I use mac therefoere it would help

Thanks,

Monal


M
Monal Replied on 01/10/2020

As far as I know I am entering the correct email and psw but the lead app is still throwing error therefore I think there could be some error in lead App java code, if you can you please fix and provide me with new leadapp.

Thank you,

Monal


A
Ashish Replied on 04/10/2020

There are 2 applications in Module 8 and Module 16 which were not working since we had some config changes.
Applications are ready now.
Please dont use your id as login id now. Its no longer supported.
Please follow following instructions:

Module 8 Retail Application (SOAP Based)
Please use login id as 'user' and password as 'whizdom' for normal login.
For admin Login, please use login id as user_soapadmin and password as 'whizdom'


For Module 16 Retail Application(REST Based)
Please use login id as 'admin' and password as 'whizdom' for login.

Rest everything is same.


M
Monal Replied on 05/10/2020

Sir I am not talking about Retail App related to either SOAP or REST realated (Module 8 or Module 16).  I am asking about LEAD Application which you had in your SELENIUM AND DATABASE TESTING lectures in "DATABASE TESTING OF SAMPLE WEB CRM APPLICATION" its "https://www.qtpselenium.com/selenium-training/module/28"

-Monal


A
Ashish Replied on 07/10/2020

I am really sorry

I configured it

Its running perfectly fine

Make sure you use xampp and tomcat from the code and not from net

We have given it in code