Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-2357

Could not create a DBCP pool

    XMLWordPrintable

Details

    Description

      Due to a typo at http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMSSQL, where there is a space in the property name <property name="connection.driver_class ">, the following error ocurrs when installing XWiki on MS SQL 2000 using JDTS 1.2.1 JDBC driver:

      2008-05-01 09:55:07,870 http://localhost:8080/xwiki-enterprise-web-1.3.2/bin/view/Main/WebHome [http-8080-1] FATAL store.DBCPConnectionProvider - Could not create a DBCP pool
      java.lang.NullPointerException
      at java.util.Hashtable.put(Hashtable.java:394)
      at com.xpn.xwiki.store.DBCPConnectionProvider.configure(DBCPConnectionProvider.java:100)
      at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
      at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
      at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:414)
      at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
      at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
      at com.xpn.xwiki.store.XWikiHibernateBaseStore.initHibernate(XWikiHibernateBaseStore.java:171)
      at com.xpn.xwiki.store.XWikiHibernateBaseStore.checkHibernate(XWikiHibernateBaseStore.java:519)
      at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:1032)
      at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeRead(XWikiHibernateBaseStore.java:1071)
      at com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager.getDBVersion(XWikiHibernateMigrationManager.java:62)
      at com.xpn.xwiki.store.migration.AbstractXWikiMigrationManager.<init>(AbstractXWikiMigrationManager.java:68)
      at com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager.<init>(XWikiHibernateMigrationManager.java:49)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at com.xpn.xwiki.XWiki.createClassFromConfig(XWiki.java:832)
      at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:771)
      at com.xpn.xwiki.XWiki.<init>(XWiki.java:722)
      at com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:293)
      at com.xpn.xwiki.XWiki.getXWiki(XWiki.java:491)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:123)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:856)
      at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
      at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
      at java.lang.Thread.run(Thread.java:619)

      Suggestion:

      1) Add check in DBCPConnectionProvider class:

      String jdbcDriverClass = props.getProperty(Environment.DRIVER);
      if (jdbcDriverClass == null) throw new SomeDescriptiveException(...);

      2) Fix the typo at http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMSSQL

      Attachments

        Activity

          People

            sdumitriu Sergiu Dumitriu
            endif Petr Toman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: