[xwiki-users] Error 500: Could not initialize main XWiki context
Hi, I am currently trying to install XWiki on a linux machine (i486, ubuntu 7.10, java 6, mysql 5, tomcat 5.5, firefox) but I am faced to an error at the first run (see exception trace below). I have checked that the database is indeed running, that the login/password are accepted when logging manually, that the mysql java connector library is there (it wasn't there first, but I put it at the right place in /usr/share/tomcat5.5/webapps/xwiki/WEB-INF/lib and the problem remains), that the configuration file says 127.0.0.1 instead of localhost in the connection.url field (as suggested in a previous similar problem found in the archives of this list)... I feel like I have exhausted all the solutions I could find online or figure out by myself today. So if any of you has an idea about what is wrong and where... your help will be very welcome :-) Thanks. Karim-Pierre Maalej. exception javax.servlet.ServletException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3202 in 3: Exception while reading document XWiki.XWikiPreferences Wrapped Exception: Could not create a DBCP pool 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:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117) cause mère com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3202 in 3: Exception while reading document XWiki.XWikiPreferences Wrapped Exception: Could not create a DBCP pool com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:247) com.xpn.xwiki.XWiki.getXWiki(XWiki.java:397) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:94) 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:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
Hi, What is in your /usr/share/tomcat5.5/webapps/xwiki/WEB-INF/hibernate.cfg.xml ? Maybe it is not configured for mysql... 2007/11/13, Karim-Pierre Maalej <[email protected]>:
Hi,
I am currently trying to install XWiki on a linux machine (i486, ubuntu 7.10, java 6, mysql 5, tomcat 5.5, firefox) but I am faced to an error at the first run (see exception trace below).
I have checked that the database is indeed running, that the login/password are accepted when logging manually, that the mysql java connector library is there (it wasn't there first, but I put it at the right place in /usr/share/tomcat5.5/webapps/xwiki/WEB-INF/lib and the problem remains), that the configuration file says 127.0.0.1 instead of localhost in the connection.url field (as suggested in a previous similar problem found in the archives of this list)...
I feel like I have exhausted all the solutions I could find online or figure out by myself today. So if any of you has an idea about what is wrong and where... your help will be very welcome :-)
Thanks.
Karim-Pierre Maalej.
exception
javax.servlet.ServletException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3202 in 3: Exception while reading document XWiki.XWikiPreferences Wrapped Exception: Could not create a DBCP pool 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:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
cause mère
com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3202 in 3: Exception while reading document XWiki.XWikiPreferences Wrapped Exception: Could not create a DBCP pool com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:247) com.xpn.xwiki.XWiki.getXWiki(XWiki.java:397) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:94) 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:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
did you download the mysql connector? Also make sure that you uncommented the mysql database in the hibernate xml file ________________________________ From: [email protected] on behalf of Karim-Pierre Maalej Sent: Tue 11/13/2007 1:52 PM To: [email protected] Subject: [xwiki-users] Error 500: Could not initialize main XWiki context Hi, I am currently trying to install XWiki on a linux machine (i486, ubuntu 7.10, java 6, mysql 5, tomcat 5.5, firefox) but I am faced to an error at the first run (see exception trace below). I have checked that the database is indeed running, that the login/password are accepted when logging manually, that the mysql java connector library is there (it wasn't there first, but I put it at the right place in /usr/share/tomcat5.5/webapps/xwiki/WEB-INF/lib and the problem remains), that the configuration file says 127.0.0.1 instead of localhost in the connection.url field (as suggested in a previous similar problem found in the archives of this list)... I feel like I have exhausted all the solutions I could find online or figure out by myself today. So if any of you has an idea about what is wrong and where... your help will be very welcome :-) Thanks. Karim-Pierre Maalej. exception javax.servlet.ServletException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3202 in 3: Exception while reading document XWiki.XWikiPreferences Wrapped Exception: Could not create a DBCP pool 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:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117) cause mère com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3202 in 3: Exception while reading document XWiki.XWikiPreferences Wrapped Exception: Could not create a DBCP pool com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:247) com.xpn.xwiki.XWiki.getXWiki(XWiki.java:397) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:94) 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:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117) _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
What is in your /usr/share/tomcat5.5/webapps/xwiki/WEB-INF/hibernate.cfg.xml ?
Maybe it is not configured for mysql...
Please find the configuration file hereunder (without the commented out parts). I think it is correct but maybe there's something I missed, like a typo or else. <?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"> <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> <property name="connection.url">jdbc:mysql://127.0.0.1/xwikiDB?useServerPrepStmts=false</property> <property name="connection.username">xwikiUser</property> <property name="connection.password">xwikiPwd</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.DBCPConnectionProvider</property> <property name="connection.pool_size">2</property> <property name="statement_cache.size">2</property> <!-- Mapping files --> <mapping resource="xwiki.hbm.xml"/> <mapping resource="feeds.hbm.xml"/> </session-factory> </hibernate-configuration>
did you download the mysql connector? Also make sure that you uncommented the mysql database in the hibernate xml file
Yes. I didn't in the first place but the problem remained unchanged after I downloaded and put the mysql-connector-java-5.1.5.jar file in /usr/share/tomcat5.5/webapps/xwiki/WEB-INF/lib
i don't know what the problem is. All I can say is to re-install your xwiki folder itself and make sure you only uncomment that one thing. I had this problem and once I did that and had it all together before trying to load it worked. But before you reinstall the war file, try restarting your tomcat and mysql server ________________________________ From: [email protected] on behalf of Karim-Pierre Maalej Sent: Tue 11/13/2007 2:52 PM To: XWiki Users Subject: Re: [xwiki-users] Error 500: Could not initialize main XWiki context
did you download the mysql connector? Also make sure that you uncommented the mysql database in the hibernate xml file
Yes. I didn't in the first place but the problem remained unchanged after I downloaded and put the mysql-connector-java-5.1.5.jar file in /usr/share/tomcat5.5/webapps/xwiki/WEB-INF/lib _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
What is the name of your database ? "xwiki" or "xwikiDB", I ask that because by default it's xwiki and it's xwikiDB in your hibernate config. 2007/11/13, Karim-Pierre Maalej <[email protected]>:
What is in your /usr/share/tomcat5.5/webapps/xwiki/WEB-INF/hibernate.cfg.xml ?
Maybe it is not configured for mysql...
Please find the configuration file hereunder (without the commented out parts). I think it is correct but maybe there's something I missed, like a typo or else.
<?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">
<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>
<property name="connection.url">jdbc:mysql://127.0.0.1/xwikiDB?useServerPrepStmts=false</property> <property name="connection.username">xwikiUser</property> <property name="connection.password">xwikiPwd</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.DBCPConnectionProvider</property> <property name="connection.pool_size">2</property> <property name="statement_cache.size">2</property>
<!-- Mapping files --> <mapping resource="xwiki.hbm.xml"/> <mapping resource="feeds.hbm.xml"/>
</session-factory> </hibernate-configuration>
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
What is the name of your database ? "xwiki" or "xwikiDB", I ask that because by default it's xwiki and it's xwikiDB in your hibernate config.
My database was named 'xwikiDB', which was the same name as the one in my hibernate config file. But maybe the database name is to be specified somewhere else, since I have solved my problem by just changing the name of my database to the standard 'xwiki' (and modifying accordingly the configuration file). If that is the case, then maybe it could be wise to specify that in the installation documentation; either the name of the other place where to change the name of the database, or that the database should always be named 'xwiki'. If this is not the case, then I really don't know what was preventing me from using a database named 'xwikiDB'. Anyway, thank you for your help :-)
Maybe you are in virtual mode: If your wiki is in "virtual" mode (xwiki.virtual=1 in xwiki.cfg) then the name of the main wiki is hardcoded to "xwiki". It's a limitation of the multi wiki support. If you don't need more than one wiki, non virtual mode use what you have in hibernate config file. 2007/11/19, Karim-Pierre Maalej <[email protected]>:
What is the name of your database ? "xwiki" or "xwikiDB", I ask that because by default it's xwiki and it's xwikiDB in your hibernate config.
My database was named 'xwikiDB', which was the same name as the one in my hibernate config file.
But maybe the database name is to be specified somewhere else, since I have solved my problem by just changing the name of my database to the standard 'xwiki' (and modifying accordingly the configuration file). If that is the case, then maybe it could be wise to specify that in the installation documentation; either the name of the other place where to change the name of the database, or that the database should always be named 'xwiki'.
If this is not the case, then I really don't know what was preventing me from using a database named 'xwikiDB'.
Anyway, thank you for your help :-)
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
Maybe you are in virtual mode:
If your wiki is in "virtual" mode (xwiki.virtual=1 in xwiki.cfg) then the name of the main wiki is hardcoded to "xwiki". It's a limitation of the multi wiki support.
Yes! That's it :-)
participants (3)
-
Campbell, Timothy D -
Karim-Pierre Maalej -
Thomas Mortagne