[opencms-dev] problem with connecting to DB in setup
Andras Balogh
andras at reea.net
Wed Oct 4 17:20:11 CEST 2006
Hello,
You will need a jdbc driver for MS SQL, see here the details to get
the jtds driver:
http://jtds.sourceforge.net/
After downloading make sure to put the jar in the WEB-INF/opencms/lib
folder and restart
your Tomcat.
The correct connection URL to use is:
*jdbc:jtds:sqlserver://localhost:1433
Best regards,
Andras
*
steven.4.hall at bt.com wrote:
> Hi,
>
> Im new to this and am trying to set up OpenCms on my system.
> I have installed the latest copy of the SDK and Tomcat.
> I have already installed on my pc Microsoft SQL Server.
>
> But when i go through the OpenCms setup pages i enter
> *step_4_database_setup.jsp* and enter the database details in here for
> a MS SQL Server.
> Enter the usernames and passwords and then the i have tried the
> JDBC connection string as :
> *jdbc:microsoft:sqlserver://localhost:1433 and*
> * jdbc:jtds:sqlserver://localhost:1433*
>
> but i still get the SAME error message for both drivers:
>
> It was not possible to create a database connection with the given
> parameters.
> Please check the Exception below. There can be two reasons for
> this error:
>
> * *Your database is down*, or
> * *Your database is not accessible with the given connection
> parameters.*
>
> Be also aware that Alkacon recommends to use the following JDBC
> drivers for MS SQL Server:
> |[]|
>
> Check that the Jdbc drivers are included in your class path.
>
> Error loading JDBC driver: "net.sourceforge.jtds.jdbc.Driver".
> -------------------------------------------
> java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source) at
> java.lang.Class.forName0(Native Method) at
> java.lang.Class.forName(Unknown Source) at
> org.opencms.setup.CmsSetupDb.setConnection(CmsSetupDb.java:266) at
> org.apache.jsp.setup.step_005f4a_005fdatabase_005fvalidation_jsp._jspService(step_005f4a_005fdatabase_005fvalidation_jsp.java:70)
> 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(JspServletWrapper.java:334)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
> at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunn
>
>
>
> CLASSPATH=C:\Program Files\Microsoft SQL Server 2000 Driver for
> JDBC\lib\msbase.jar;C:\Program Files\Microsoft SQL Server 2000 Driver
> for JDBC\lib\mssqlserver.jar;C:\Program Files\Microsoft SQL Server
> 2000 Driver for JDBC\lib\msutil.jar;C:\Drivers\jtds-1.2-dist\jtds-1.2.jar
>
> PATH=.........;C:\Progra~1\Java\jdk1.5.0_08\bin;C:\Program
> Files\Java\jre1.5.0_08\bin\;C:\Program Files\Microsoft SQL
> Server\80\Tools\BINN;C:\Program Files\Microsoft SQL Server 2000 Driver
> for JDBC\lib;C:\Drivers\jtds-1.2-dist
>
> I know this is up and working - i have written a little java program
> which i execute in Eclipse and this connects to the DB and returns values.
> (results from Java program :
>
> *Connection Successful!
> **Driver Information
> *Driver Name: SQLServer
> Driver Version: 2.2.0029
> *Database Information
> *Database Name: Microsoft SQL Server
> Database Version: Microsoft SQL Server 2000 - 8.00.194 (Intel X86)
> Aug 6 2000 00:57:48
> Copyright (c) 1988-2000 Microsoft Corporation
>
> *Connection Successful!
> Driver Information*
> Driver Name: jTDS Type 4 JDBC Driver for MS SQL Server and Sybase
> Driver Version: 1.2
> *Database Information
> *Database Name: Microsoft SQL Server
> Database Version: 08.00.0194
> )
>
> Any ideas please on why this is happening and what i can do to solve this?
>
> cheers
> steve
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list