[opencms-dev] Problems running the setup wizard

Frans Postma fpostma at xs4all.nl
Thu Apr 14 22:47:59 CEST 2005


Trouble is the opencms (jdbc really) connects using a network, even to the local system. It seems your mysql database is either
a) not configured for port 3306
b) is configured to only accept local sockets
c) localhost is not properly listed in /etc/hosts

Note that the error doesn't appear to be an opencms specific error but rather a problem between the java database connector and
your database. Which version of opencms do you use, which mysql version, on what platform, which webserver, which version of that
??

I'll agree that end-user documentation is somewhat lacking in the how-do-I-do something (the details in the source are done fine).
This however is mainly mysql vs. jdbc, you could try looking around at www.mysql.com , specifically look at
http://dev.mysql.com/doc/connector/j/en/cj-faq.html


Frans

Database could not be created!
Error connecting to database using: jdbc:mysql://localhost:3306/ 

> -----Original Message-----
> From: opencms-dev-bounces at opencms.org 
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Patrick Donker
> Sent: donderdag 14 april 2005 21:58
> To: The OpenCms mailing list
> Subject: [opencms-dev] Problems running the setup wizard
> 
> People, I am desperate (mainly because of the lack of useful docs)!
> While running the setup wizard I get the following errors. I 
> am sure I 
> have entered the correct usernames and passwords because I 
> can connect 
> to mysql from the commandline. Maybe somebody can hint me on how to 
> debug this and/or where to look for so I can continue to 
> learn how this 
> stuff works?
> Thanks
> 
> -Patrick
> 
> This one is returned in the Creating Database field:
> 
> 
> Database could not be created!
> Error connecting to database using: jdbc:mysql://localhost:3306/
> -------------------------------------------
> java.sql.SQLException: Unable to connect to any hosts due to 
> exception: 
> java.net.ConnectException: Connection refused ** BEGIN NESTED 
> EXCEPTION 
> ** java.net.ConnectException MESSAGE: Connection refused STACKTRACE: 
> java.net.ConnectException: Connection refused at 
> java.net.PlainSocketImpl.socketConnect(Native Method) at 
> java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at 
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java
> :195) at 
> java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at 
> java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364) at 
> java.net.Socket.connect(Socket.java:507) at 
> java.net.Socket.connect(Socket.java:457) at 
> java.net.Socket.(Socket.java:365) at 
> java.net.Socket.(Socket.java:178) 
> at 
> com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFac
> tory.java:124) 
> at com.mysql.jdbc.MysqlIO.(MysqlIO.java:225) at 
> com.mysql.jdbc.Connection.createNewIO(Connection.java:1779) at 
> com.mysql.jdbc.Connection.(Connection.java:450) at 
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriv
> er.java:411) 
> at java.sql.DriverManager.getConnection(DriverManager.java:525) at 
> java.sql.DriverManager.getConnection(DriverManager.java:171) at 
> org.opencms.setup.CmsSetupDb.setConnection(CmsSetupDb.java:99) at 
> org.apache.jsp.setup.step_005f5_005fdatabase_005fcreation_jsp.
> _jspService(org.apache.jsp.setup.step_005f5_005fdatabase_005fc
> reation_jsp:106) 
> at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
> Wrapper.java:322) 
> at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
> .java:291) 
> at 
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(ApplicationFilterChain.java:252) 
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterChain.java:173) 
> at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.java:213) 
> at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.java:178) 
> at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:126) 
> at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:105) 
> at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java:107) 
> at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap
> ter.java:148) 
> at 
> org.apache.coyote.http11.Http11Processor.process(Http11Process
> or.java:856) 
> at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
r.processConnection(Http11Protocol.java:744) 
> at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolT
> cpEndpoint.java:527) 
> at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Le
> aderFollowerWorkerThread.java:80) 
> at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:684) 
> at java.lang.Thread.run(Thread.java:595) ** END NESTED 
> EXCEPTION ** at 
> com.mysql.jdbc.Connection.createNewIO(Connection.java:1847) at 
> com.mysql.jdbc.Connection.(Connection.java:450) at 
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriv
> er.java:411) 
> at java.sql.DriverManager.getConnection(DriverManager.java:525) at 
> java.sql.DriverManager.getConnection(DriverManager.java:171) at 
> org.opencms.setup.CmsSetupDb.setConnection(CmsSetupDb.java:99) at 
> org.apache.jsp.setup.step_005f5_005fdatabase_005fcreation_jsp.
> _jspService(org.apache.jsp.setup.step_005f5_005fdatabase_005fc
> reation_jsp:106) 
> at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
> Wrapper.java:322) 
> at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
> .java:291) 
> at 
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(ApplicationFilterChain.java:252) 
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterChain.java:173) 
> at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.java:213) 
> at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.java:178) 
> at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:126) 
> at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:105) 
> at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java:107) 
> at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap
> ter.java:148) 
> at 
> org.apache.coyote.http11.Http11Processor.process(Http11Process
> or.java:856) 
> at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
r.processConnection(Http11Protocol.java:744) 
> at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolT
> cpEndpoint.java:527) 
> at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Le
> aderFollowerWorkerThread.java:80) 
> at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:684) 
> at java.lang.Thread.run(Thread.java:595)
> -------------------------------------------
> Error parsing database setup SQL script in line: CREATE DATABASE 
> ${database};
> -------------------------------------------
> java.lang.NullPointerException at 
> org.opencms.setup.CmsSetupDb.executeStatement(CmsSetupDb.java:407) at 
> org.opencms.setup.CmsSetupDb.executeSql(CmsSetupDb.java:331) at 
> org.opencms.setup.CmsSetupDb.executeSql(CmsSetupDb.java:266) at 
> org.opencms.setup.CmsSetupDb.createDatabase(CmsSetupDb.java:160) at 
> org.apache.jsp.setup.step_005f5_005fdatabase_005fcreation_jsp.
> _jspService(org.apache.jsp.setup.step_005f5_005fdatabase_005fc
> reation_jsp:276) 
> at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
> Wrapper.java:322) 
> at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
> .java:291) 
> at 
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(ApplicationFilterChain.java:252) 
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterChain.java:173) 
> at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.java:213) 
> at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.java:178) 
> at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:126) 
> at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:105) 
> at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java:107) 
> at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap
> ter.java:148) 
> at 
> org.apache.coyote.http11.Http11Processor.process(Http11Process
> or.java:856) 
> at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
r.processConnection(Http11Protocol.java:744) 
> at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolT
> cpEndpoint.java:527) 
> at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Le
> aderFollowerWorkerThread.java:80) 
> at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:684) 
> at java.lang.Thread.run(Thread.java:595)
> -------------------------------------------
> 
> This one is returned after a try to create tables; Creating Tables:
> 
> Tables could not be created!
> Error connecting to database using: 
> jdbc:mysql://localhost:3306/opencms
> -------------------------------------------
> java.sql.SQLException: Unable to connect to any hosts due to 
> exception: 
> java.net.ConnectException: Connection refused ** BEGIN NESTED 
> EXCEPTION 
> ** java.net.ConnectException MESSAGE: Connection refused STACKTRACE: 
> java.net.ConnectException: Connection refused at 
> java.net.PlainSocketImpl.socketConnect(Native Method) at 
> java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at 
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java
> :195) at 
> java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at 
> java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364) at 
> java.net.Socket.connect(Socket.java:507) at 
> java.net.Socket.connect(Socket.java:457) at 
> java.net.Socket.(Socket.java:365) at 
> java.net.Socket.(Socket.java:178) 
> at 
> com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFac
> tory.java:124) 
> at com.mysql.jdbc.MysqlIO.(MysqlIO.java:225) at 
> com.mysql.jdbc.Connection.createNewIO(Connection.java:1779) at 
> com.mysql.jdbc.Connection.(Connection.java:450) at 
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriv
> er.java:411) 
> at java.sql.DriverManager.getConnection(DriverManager.java:525) at 
> java.sql.DriverManager.getConnection(DriverManager.java:171) at 
> org.opencms.setup.CmsSetupDb.setConnection(CmsSetupDb.java:99) at 
> org.apache.jsp.setup.step_005f5_005fdatabase_005fcreation_jsp.
> _jspService(org.apache.jsp.setup.step_005f5_005fdatabase_005fc
> reation_jsp:340) 
> at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
> Wrapper.java:322) 
> at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
> .java:291) 
> at 
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(ApplicationFilterChain.java:252) 
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterChain.java:173) 
> at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.java:213) 
> at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.java:178) 
> at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:126) 
> at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:105) 
> at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java:107) 
> at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap
> ter.java:148) 
> at 
> org.apache.coyote.http11.Http11Processor.process(Http11Process
> or.java:856) 
> at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
r.processConnection(Http11Protocol.java:744) 
> at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolT
> cpEndpoint.java:527) 
> at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Le
> aderFollowerWorkerThread.java:80) 
> at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:684) 
> at java.lang.Thread.run(Thread.java:595) ** END NESTED 
> EXCEPTION ** at 
> com.mysql.jdbc.Connection.createNewIO(Connection.java:1847) at 
> com.mysql.jdbc.Connection.(Connection.java:450) at 
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriv
> er.java:411) 
> at java.sql.DriverManager.getConnection(DriverManager.java:525) at 
> java.sql.DriverManager.getConnection(DriverManager.java:171) at 
> org.opencms.setup.CmsSetupDb.setConnection(CmsSetupDb.java:99) at 
> org.apache.jsp.setup.step_005f5_005fdatabase_005fcreation_jsp.
> _jspService(org.apache.jsp.setup.step_005f5_005fdatabase_005fc
> reation_jsp:340) 
> at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
> Wrapper.java:322) 
> at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
> .java:291) 
> at 
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(ApplicationFilterChain.java:252) 
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterChain.java:173) 
> at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.java:213) 
> at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.java:178) 
> at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:126) 
> at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:105) 
> at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java:107) 
> at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap
> ter.java:148) 
> at 
> org.apache.coyote.http11.Http11Processor.process(Http11Process
> or.java:856) 
> at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
r.processConnection(Http11Protocol.java:744) 
> at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolT
> cpEndpoint.java:527) 
> at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Le
> aderFollowerWorkerThread.java:80) 
> at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:684) 
> at java.lang.Thread.run(Thread.java:595)
> -------------------------------------------
> Error parsing database setup SQL script in line: );
> -------------------------------------------
> java.lang.NullPointerException at 
> org.opencms.setup.CmsSetupDb.executeStatement(CmsSetupDb.java:407) at 
> org.opencms.setup.CmsSetupDb.executeSql(CmsSetupDb.java:331) at 
> org.opencms.setup.CmsSetupDb.executeSql(CmsSetupDb.java:266) at 
> org.opencms.setup.CmsSetupDb.createTables(CmsSetupDb.java:183) at 
> org.apache.jsp.setup.step_005f5_005fdatabase_005fcreation_jsp.
> _jspService(org.apache.jsp.setup.step_005f5_005fdatabase_005fc
> reation_jsp:350) 
> at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
> Wrapper.java:322) 
> at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
> .java:291) 
> at 
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(ApplicationFilterChain.java:252) 
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterChain.java:173) 
> at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.java:213) 
> at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.java:178) 
> at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:126) 
> at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:105) 
> at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java:107) 
> at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap
> ter.java:148) 
> at 
> org.apache.coyote.http11.Http11Processor.process(Http11Process
> or.java:856) 
> at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
r.processConnection(Http11Protocol.java:744) 
> at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolT
> cpEndpoint.java:527) 
> at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Le
> aderFollowerWorkerThread.java:80) 
> at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:684) 
> at java.lang.Thread.run(Thread.java:595)
> -------------------------------------------
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, 
> please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
> 




More information about the opencms-dev mailing list