<%@ page import="org.opencms.setup.*,java.util.*" session="true" %><%-- --%><%-- --%><% // next page String nextPage = "step_5_database_creation.jsp"; // previous page String prevPage = "step_3_database_selection.jsp"; CmsSetupDb db = null; boolean enableContinue = false; String chkVars = null; List conErrors = null; if (Bean.isInitialized()) { db = new CmsSetupDb(Bean.getWebAppRfsPath()); // try to connect as the runtime user db.setConnection(Bean.getDbDriver(), Bean.getDbWorkConStr(), Bean.getDbConStrParams(), Bean.getDbWorkUser(),Bean.getDbWorkPwd()); if (!db.noErrors()) { // try to connect as the setup user db.closeConnection(); db.clearErrors(); db.setConnection(Bean.getDbDriver(), Bean.getDbCreateConStr(), Bean.getDbConStrParams(), Bean.getDbCreateUser(), Bean.getDbCreatePwd()); } conErrors = new ArrayList(db.getErrors()); db.clearErrors(); enableContinue = conErrors.isEmpty(); chkVars = db.checkVariables(Bean.getDatabase()); db.closeConnection(); if (enableContinue && db.noErrors() && chkVars == null && Bean.validateJdbc()) { response.sendRedirect(nextPage); return; } } %><%= Bean.getHtmlPart("C_HTML_START") %> Alkacon OpenCms Setup Wizard <%= Bean.getHtmlPart("C_HEAD_START") %> <%= Bean.getHtmlPart("C_STYLES") %> <%= Bean.getHtmlPart("C_STYLES_SETUP") %> <%= Bean.getHtmlPart("C_HEAD_END") %> Alkacon OpenCms Setup Wizard - Validate database connection <%= Bean.getHtmlPart("C_CONTENT_SETUP_START") %> <% if (Bean.isInitialized()) { %>
<% if (!enableContinue) { %> <%= Bean.getHtmlPart("C_BLOCK_START", "Creating Database Connection") %>
   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 <%=Bean.getDatabaseName(Bean.getDatabase())%>:
<%=Bean.getDatabaseLibs(Bean.getDatabase()).toString()%>

Check that the Jdbc drivers are included in your class path.

  
<% for (int i = 0; i < conErrors.size(); i++) { out.println(conErrors.get(i) + "
"); out.println("-------------------------------------------" + "
"); } %>
<%= Bean.getHtmlPart("C_BLOCK_END") %> <% } else { if (!Bean.validateJdbc()) { %> <%= Bean.getHtmlPart("C_BLOCK_START", "Validating Jdbc Drivers") %>
   Be aware that Alkacon recommends to use the following JDBC drivers for <%=Bean.getDatabaseName(Bean.getDatabase())%>:
<%=Bean.getDatabaseLibs(Bean.getDatabase()).toString()%>

But these drivers are not located in folder <%=Bean.getLibFolder()%>

If you are using a different driver or if you added the driver in another way to the classpath, you may continue to try it out. If not, be sure to get the drivers and restart your servlet container before you continue.

<%= Bean.getHtmlPart("C_BLOCK_END") %> <% } if (!db.noErrors() || chkVars != null) { %> <%= Bean.getHtmlPart("C_BLOCK_START", "Validating Database Server Configuration") %> <% boolean isError = !db.noErrors(); enableContinue = enableContinue && !isError; if (chkVars != null) {%> <% } if (!db.noErrors()) {%> <% }%>
   <%=chkVars%>
  

Error while checking the server configuration!

<% out.println("-------------------------------------------" + "
"); List errors = db.getErrors(); Iterator it = errors.iterator(); while (it.hasNext()) { out.println(it.next() + "
"); } db.clearErrors(); %>
<%= Bean.getHtmlPart("C_BLOCK_END") %> <% } } %>
<%= Bean.getHtmlPart("C_CONTENT_END") %> <%= Bean.getHtmlPart("C_BUTTONS_START") %>
<% if (enableContinue) { out.println(""); } %> <%= Bean.getHtmlPart("C_BUTTONS_END") %> <% } else { %> <%= Bean.displayError("")%> <%= Bean.getHtmlPart("C_CONTENT_END") %> <% } %> <%= Bean.getHtmlPart("C_HTML_END") %>