cerberustesting / cerberus-core

The Open Source Test Automation Platform.
https://cerberus-testing.com
GNU General Public License v3.0
329 stars 101 forks source link

java.lang.IllegalStateException: This web container has not yet been started #1891

Closed huong-vuong closed 5 years ago

huong-vuong commented 6 years ago

Hello, Have you seen database error after update cerberus ? I have updated Cerberus in version 3.8 and I can't connect to the DB:

This is the logs of server :

`[2018-11-06T15:33:02.960+0100] [glassfish 4.1] [WARNING] [poolmgr.destroy_resource_failed] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool] [tid: _ThreadID=87 _ThreadName=connector-timer-proxy] [timeMillis: 1541514782960] [levelValue: 900] [[ RAR5035:Unexpected exception while destroying resource from pool cerberus. Exception message: This web container has not yet been started]]

[2018-11-06T15:36:47.569+0100] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=253 _ThreadName=Thread-8] [timeMillis: 1541515007569] [levelValue: 800] [[ 2018-11-06 15:36:47 ERROR jsp:591 - Database Maintenance Page exception : java.lang.IllegalStateException: This web container has not yet been started java.lang.IllegalStateException: This web container has not yet been started at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1674) ~[war-util.jar:?] at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1633) ~[war-util.jar:?] at com.mysql.jdbc.ConnectionImpl.clientPrepareStatement(ConnectionImpl.java:1541) ~[mysql-connector-java-5.1.20.jar:?] at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4283) ~[mysql-connector-java-5.1.20.jar:?] at com.mysql.jdbc.jdbc2.optional.ConnectionWrapper.prepareStatement(ConnectionWrapper.java:685) ~[mysql-connector-java-5.1.20.jar:?] at com.sun.gjc.spi.base.ConnectionHolder.prepareStatement(ConnectionHolder.java:586) ~[ds_jdbc_ra.jar:?] at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareCachedStatement(ConnectionWrapper40.java:255) ~[ds_jdbc_ra.jar:?] at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareCachedStatement(ConnectionWrapper40.java:52) ~[ds_jdbc_ra.jar:?] at com.sun.gjc.spi.ManagedConnectionImpl.prepareCachedStatement(ManagedConnectionImpl.java:992) ~[ds_jdbc_ra.jar:?] at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareStatement(ConnectionWrapper40.java:173) ~[__ds_jdbc_ra.jar:?] at org.cerberus.crud.dao.impl.MyVersionDAO.findMyVersionByKey(MyVersionDAO.java:65) ~[MyVersionDAO.class:?] at org.cerberus.crud.service.impl.MyVersionService.findMyVersionByKey(MyVersionService.java:45) ~[MyVersionService.class:?] at org.apache.jsp.DatabaseMaintenance_jsp._jspService(DatabaseMaintenance_jsp.java:416) [?:?] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) [javax.servlet.jsp.jar:2.3.3-b02] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api.jar:3.1.0] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411) [javax.servlet.jsp.jar:2.3.3-b02] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473) [javax.servlet.jsp.jar:2.3.3-b02] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377) [javax.servlet.jsp.jar:2.3.3-b02] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api.jar:3.1.0] at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) [web-core.jar:?] at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875) [web-core.jar:?] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:739) [web-core.jar:?] at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:575) [web-core.jar:?] at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:546) [web-core.jar:?] at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:428) [web-core.jar:?] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:378) [web-core.jar:?] at org.apache.jsp.Login_jsp._jspService(Login_jsp.java:323) [?:?] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) [javax.servlet.jsp.jar:2.3.3-b02] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api.jar:3.1.0] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411) [javax.servlet.jsp.jar:2.3.3-b02] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473) [javax.servlet.jsp.jar:2.3.3-b02] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377) [javax.servlet.jsp.jar:2.3.3-b02] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api.jar:3.1.0] at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) [web-core.jar:?] at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875) [web-core.jar:?] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:739) [web-core.jar:?] at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:575) [web-core.jar:?] at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:546) [web-core.jar:?] at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:428) [web-core.jar:?] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:378) [web-core.jar:?] at org.apache.catalina.authenticator.FormAuthenticator.forwardToLoginPage(FormAuthenticator.java:516) [web-core.jar:?] at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:264) [web-core.jar:?] at com.sun.web.security.RealmAdapter.invokeAuthenticateDelegate(RealmAdapter.java:1524) [websecurity.jar:?] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:606) [web-core.jar:?] at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:702) [web-core.jar:?] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673) [web-core.jar:?] at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) [web-glue.jar:?] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) [web-core.jar:?] at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416) [web-core.jar:?] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283) [web-core.jar:?] at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) [kernel.jar:?] at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) [kernel.jar:?] at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206) [nucleus-grizzly-all.jar:?] at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180) [nucleus-grizzly-all.jar:?] at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) [nucleus-grizzly-all.jar:?] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) [nucleus-grizzly-all.jar:?] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283) [nucleus-grizzly-all.jar:?] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) [nucleus-grizzly-all.jar:?] at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132) [nucleus-grizzly-all.jar:?] at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111) [nucleus-grizzly-all.jar:?] at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) [nucleus-grizzly-all.jar:?] at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536) [nucleus-grizzly-all.jar:?] at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) [nucleus-grizzly-all.jar:?] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) [nucleus-grizzly-all.jar:?] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) [nucleus-grizzly-all.jar:?] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) [nucleus-grizzly-all.jar:?] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) [nucleus-grizzly-all.jar:?] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) [nucleus-grizzly-all.jar:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]]] `

vertigo17 commented 6 years ago

hello Huong, We are not able to reproduce. Have you tried to restart the container ? Is the error systematic ? I beleive this is when using container from windows host ?

huong-vuong commented 6 years ago

Hello, Yes, I tried to restart the container. I confirme that the error I mentionned is produced only in using host windows. Maybe this error is produced only in windows.

vertigo17 commented 6 years ago

Can you provide the snapshot of what the browser display when accessing Cerberus ? Do you manage to connect to the database (in order to check that it is started) ?

Can you also try to comment the line in the yml config file: `

I noticed recently that exposing that folder on Windows sometime cause an error message on port 4848 already in use. This is worth trying to remove it ;-).

vertigo17 commented 5 years ago

I guess this is no longuer relevant. Please try with tomcat docker as this is now the official version. Open a new issue is not working with tomcat docker.