I cannot find any problems in the hibernate.cfg.xml file despite the error message. Would I receive this error if it cannot connect to the database or because there is something wrong with the configuration file itself?
Here is my hibernate.cfg.xml file, we are using MySQL. I've replaced usernames and passwords. Thank you so much for your help. =============================================== <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <!-- Template for hibernate configuration. processing by maven using profiles. Replace original src/main/webapp/WEB-INF/hibernate.cfg.xml --> <hibernate-configuration> <session-factory> <property name="show_sql">false</property> <property name="use_outer_join">true</property> <property name="dbcp.defaultAutoCommit">false</property> <property name="dbcp.maxActive">50</property> <property name="dbcp.maxIdle">5</property> <property name="dbcp.maxWait">30000</property> <property name="dbcp.whenExhaustedAction">1</property> <property name="dbcp.ps.whenExhaustedAction">1</property> <property name="dbcp.ps.maxActive">20</property> <property name="dbcp.ps.maxWait">120000</property> <property name="dbcp.ps.maxIdle">20</property> <!-- Please refer to the installation guide on http://www.xwiki.org/xwiki/bin/view/AdminGuide/Installation for configuring your database. You'll need to do 2 things: 1) Copy your database driver JAR in WEB-INF/lib or in some shared lib directory 2) Uncomment the properties below for your specific DB --> <!-- MySQL configuration. Uncomment if you want to use MySQL and comment out other database configurations. Note that the database will be created automatically if it doesn't already exist. We need to set the sql_mode to a less strict value, see XWIKI-1945 --> <property name="connection.url">jdbc:mysql://111.111.111.111:11111/xwiki?useServer PrepStmts=false&sessionVariables=sql_mode=''</property> <property name="connection.username">DBUSERNAME</property> <property name="connection.password">DBPASSWORD</property> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvi der</property> <property name="connection.pool_size">2</property> <property name="statement_cache.size">2</property> <mapping resource="xwiki.hbm.xml"/> <mapping resource="feeds.hbm.xml"/> <!-- HSQLDB configuration. Uncomment if you want to use HSQLDB and comment out other database configurations. Note that the database will be created automatically if it doesn't already exist. <property name="connection.url">jdbc:hsqldb:file:/some/path/xwikidb;shutdown=true< /property> <property name="connection.username">sa</property> <property name="connection.password"></property> <property name="connection.driver_class">org.hsqldb.jdbcDriver</property> <property name="dialect">org.hibernate.dialect.HSQLDialect</property> <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvi der</property> <property name="connection.pool_size">2</property> <property name="statement_cache.size">2</property> <mapping resource="xwiki.hbm.xml"/> <mapping resource="feeds.hbm.xml"/> --> <!-- PostgreSQL configuration. Uncomment if you want to use PostgreSQL and comment out other database configurations. Note that the database will be created automatically if it doesn't already exist. <property name="connection.url">jdbc:postgresql:xwiki</property> <property name="connection.username">xwiki</property> <property name="connection.password">xwiki</property> <property name="connection.driver_class">org.postgresql.Driver</property> <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property> <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvi der</property> <property name="connection.pool_size">2</property> <property name="statement_cache.size">2</property> <mapping resource="xwiki.hbm.xml"/> <mapping resource="feeds.hbm.xml"/> --> <!-- Oracle configuration. Uncomment if you want to use Oracle and comment out other database configurations. Note: the 2 properties named "hibernate.connection.SetBigStringTryClob" and "hibernate.jdbc.batch_size". They are required to tell Oracle to allow CLOBs larger than 32K. <property name="connection.url">jdbc:oracle:thin:@localhost:1521:XE</property> <property name="connection.username">xwiki</property> <property name="connection.password">xwiki</property> <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property > <property name="dialect">org.hibernate.dialect.Oracle10gDialect</property> <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvi der</property> <property name="connection.pool_size">2</property> <property name="statement_cache.size">2</property> <property name="hibernate.connection.SetBigStringTryClob">true</property> <property name="hibernate.jdbc.batch_size">0</property> <mapping resource="xwiki.oracle.hbm.xml"/> <mapping resource="feeds.oracle.hbm.xml"/> --> <!-- Derby configuration. Uncomment if you want to use Derby and comment out other database configurations. Note that the database will be created automatically if it doesn't already exist. <property name="connection.url">jdbc:derby:/some/path/xwikidb;create=true</propert y> <property name="connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</pro perty> <property name="dialect">org.hibernate.dialect.DerbyDialect</property> <property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvi der</property> <property name="connection.pool_size">2</property> <property name="statement_cache.size">2</property> <mapping resource="xwiki.derby.hbm.xml"/> <mapping resource="feeds.hbm.xml"/> --> </session-factory> </hibernate-configuration> =============================================== -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vincent Massol Sent: Tuesday, September 23, 2008 12:24 AM To: XWiki Users Subject: Re: [xwiki-users] Initial set-up error Hi Evan, The answer is in your exception. Check the stack trace. It says: " Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it. " So all you have to do is fix the hibernate.cfg.xml file. You should also read http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation Thanks -Vincent On Sep 23, 2008, at 7:04 AM, Evan Pease wrote: > Hi everyone, > > > > This is my first post. We're trying to set-up xwiki on Tomcat with > MySQL. We believe everything is configured properly according to the > documentation but we keep receiving the following error. > > > > Any ideas where we should start troubleshooting? > > > > HTTP Status 500 - > > ________________________________ > > type Exception report > > message > > description The server encountered an internal error () that prevented > it from fulfilling this request. > > exception > > javax.servlet.ServletException: com.xpn.xwiki.XWikiException: Error > number 3 in 0: Could not initialize main XWiki context > > Wrapped Exception: Error number 3001 in 3: Cannot load class > com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager > from param xwiki.store.migration.manager.class > > Wrapped Exception: Error number 0 in 3: Exception while hibernate > execute > > Wrapped Exception: Could not create a DBCP pool. There is an error in > the hibernate configuration file, please review it. > > > org > .apache.struts.action.RequestProcessor.processException(RequestProces > sor.java:535) > > > org > .apache.struts.action.RequestProcessor.processActionPerform(RequestPr > ocessor.java:433) > > > org > .apache.struts.action.RequestProcessor.process(RequestProcessor.java: > 236) > > > org.apache.struts.action.ActionServlet.process(ActionServlet.java: > 1196) > > > org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:617) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > > com > .xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestor > erFilter.java:287) > > > com > .xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodi > ngFilter.java:112) > > root cause > > com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not > initialize > main XWiki context > > Wrapped Exception: Error number 3001 in 3: Cannot load class > com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager > from param xwiki.store.migration.manager.class > > Wrapped Exception: Error number 0 in 3: Exception while hibernate > execute > > Wrapped Exception: Could not create a DBCP pool. There is an error in > the hibernate configuration file, please review it. > > com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:322) > > com.xpn.xwiki.XWiki.getXWiki(XWiki.java:383) > > com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:135) > > com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115) > > > org > .apache.struts.action.RequestProcessor.processActionPerform(RequestPr > ocessor.java:431) > > > org > .apache.struts.action.RequestProcessor.process(RequestProcessor.java: > 236) > > > org.apache.struts.action.ActionServlet.process(ActionServlet.java: > 1196) > > > org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:617) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > > com > .xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestor > erFilter.java:287) > > > com > .xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodi > ngFilter.java:112) > > note The full stack trace of the root cause is available in the Apache > Tomcat/6.0.18 logs. > > ________________________________ > > Apache Tomcat/6.0.18 _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users