[xwiki-users] Strange HTTP://500 error?? hibernate.cfg.xml wrong?
Hi, as some of you guys who've already helped me know by now that I have a working instance of Xwiki Recently I tried to simulate this and go over the steps I'd already done in order to document the install! I installed FreeBSD 8.0 Release x64 and recreated my FreeBSD jail that I currently run Xwiki in. Everything went to plan with all steps involved being documented all the way and versions of software checked against each other; however, when it came to actually browsing to Xwiki I got an error 500 message?? All details of my install can be found here: http://wiki.optiplex-networks.com/xwiki/bin/view/FreeBSD/XWiki however it is quite long so I am only going to explain about the error and areas that the error highlights: I'm using Postgresql as the DB backend as I had issues with MySQL so that needs further testing later, and Tomcat6. My hibernate.cfg.xml file looks like so: !-- PostgreSQL configuration. Uncomment if you want to use PostgreSQL and comment out other database configurations. -- property name=connection.urljdbc:postgresql://localhost:5432/xwiki/property property name=connection.usernamexwiki/property property name=connection.passwordxwiki/property property name=connection.driver_classorg.postgresql.Driver/property property name=dialectorg.hibernate.dialect.PostgreSQLDialect/property property name=connection.provider_classcom.xpn.xwiki.store.DBCPConnectionProvider/property property name=connection.pool_size2/property property name=statement_cache.size2/property mapping resource=xwiki.hbm.xml/ mapping resource=feeds.hbm.xml/ mapping resource=activitystream.hbm.xml/ With the rest all commented out apart from the default non-database stuff right at the top of the stock file; the default DB lines have been commented out! Although no need I uncommented this line: xwiki.store.hibernate.path=/WEB-INF/hibernate.cfg.xml in the xwiki.cfg file. This is the exact error: 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(RequestProcessor.java:535) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.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.ActionFilter.doFilter(ActionFilter.java:129) com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152) com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:304) 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:402) com.xpn.xwiki.XWiki.getXWiki(XWiki.java:471) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:136) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.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.ActionFilter.doFilter(ActionFilter.java:129) com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152) com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:304) The only thing I did differently is initially build the JDK
[xwiki-users] Strange HTTP://500 error?? hibernate.cfg.xml wrong?
Ok I figured this one out!! The pg_hba.conf file of Postgresql needed to have this line added: # TYPE DATABASEUSERCIDR-ADDRESS METHOD # local is for Unix domain socket connections only local all all trust # IPv4 local connections: hostall all 127.0.0.1/32 trust # IPv6 local connections: hostall all ::1/128 trust *hostall all 192.168.0.151/32 trust* Now all is fine!! :-) Few! Regards, Kaya Original Message Subject:Strange HTTP://500 error?? hibernate.cfg.xml wrong? Date: Mon, 13 Sep 2010 16:23:37 +0300 From: Kaya Saman kayasa...@gmail.com To: XWiki Users users@xwiki.org Hi, as some of you guys who've already helped me know by now that I have a working instance of Xwiki Recently I tried to simulate this and go over the steps I'd already done in order to document the install! I installed FreeBSD 8.0 Release x64 and recreated my FreeBSD jail that I currently run Xwiki in. Everything went to plan with all steps involved being documented all the way and versions of software checked against each other; however, when it came to actually browsing to Xwiki I got an error 500 message?? All details of my install can be found here: http://wiki.optiplex-networks.com/xwiki/bin/view/FreeBSD/XWiki however it is quite long so I am only going to explain about the error and areas that the error highlights: I'm using Postgresql as the DB backend as I had issues with MySQL so that needs further testing later, and Tomcat6. My hibernate.cfg.xml file looks like so: !-- PostgreSQL configuration. Uncomment if you want to use PostgreSQL and comment out other database configurations. -- property name=connection.urljdbc:postgresql://localhost:5432/xwiki/property property name=connection.usernamexwiki/property property name=connection.passwordxwiki/property property name=connection.driver_classorg.postgresql.Driver/property property name=dialectorg.hibernate.dialect.PostgreSQLDialect/property property name=connection.provider_classcom.xpn.xwiki.store.DBCPConnectionProvider/property property name=connection.pool_size2/property property name=statement_cache.size2/property mapping resource=xwiki.hbm.xml/ mapping resource=feeds.hbm.xml/ mapping resource=activitystream.hbm.xml/ With the rest all commented out apart from the default non-database stuff right at the top of the stock file; the default DB lines have been commented out! Although no need I uncommented this line: xwiki.store.hibernate.path=/WEB-INF/hibernate.cfg.xml in the xwiki.cfg file. This is the exact error: 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(RequestProcessor.java:535) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.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.ActionFilter.doFilter(ActionFilter.java:129) com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152) com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:304) 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:402) com.xpn.xwiki.XWiki.getXWiki(XWiki.java:471) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:136) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)