[xwiki-users] XE Installation with PostgreSQL or HSQLDB Succeeds. With MySQL Fails.
Currently writing special pages to extend functionality of MediaWiki, but considering using XWiki instead. Experimenting with XWiki Enterprise by attempting install of xwiki- enterprise-web-1.9.3.war: In Apache Tomcat 5.5.23 Using PostgreSQL 8.4.0 -- Succeeds Or HSQLDB 1.8.0.7 -- Succeeds But MySQL 5.0.45 -- Fails. MySQL is required for XWiki Enterprise Manger, so I need to use MySQL. I get this error in the browser: javax.servlet.ServletException: 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. I get this additionally in catalina.out: ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection refused STACKTRACE: java.net.ConnectException: Connection refused I have installed mysql-connector-java-5.0.8-bin.jar in /var/lib/ tomcat5/webapps/xwiki/WEB-INF/lib. I have modified /var/lib/tomcat5/webapps/xwiki/WEB- INF.hibernate.cfg.xml as follows: <!-- 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://localhost/xwiki? useServerPrepStmts=false&useUnicode=true&\ characterEncoding=UTF-8&sessionVariables=sql_mode=''</property> <property name="connection.username">xwiki</property> <property name="connection.password">PASSWORD</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 resource="xwiki.hbm.xml"/> <mapping resource="feeds.hbm.xml"/> I created an xwiki database and granted privileges in MySQL as follows: $ mysql -u root -p mysql> create database xwiki; mysql> grant all privileges on xwiki.* to [email protected] identified by 'xwiki'; mysql> grant all privileges on xwiki.* to xwiki@localhost identified by 'xwiki'; OR mysql> create database xwiki; mysql> grant all privileges on xwiki.* to [email protected] identified by 'SAMEASROOT'; mysql> grant all privileges on xwiki.* to xwiki@localhost identified by 'SAMEASROOT'; Note that PASSWORD in the hibernate.cfg.xml file was set to either 'xwiki', or to the same password as for the root MySQL user, with the thought that perhaps the Hibernate configuration assumed an empty root MySQL user password, and that, somehow, this might help. I then modified /var/lib/tomcat5/webapps/xwiki/WEB- INF.hibernate.cfg.xml as follows, since this is what the installation instructions actually show, that is, omitting some MySQL parameters: <!-- 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://localhost/xwiki</ property> <property name="connection.username">xwiki</property> <property name="connection.password">PASSWORD</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 resource="xwiki.hbm.xml"/> <mapping resource="feeds.hbm.xml"/> I have tried many permutations and scoured installation instructions, FAQ, and archives. I definitely need some help here.
Hi Raymond, see below Raymond LeClair wrote:
Currently writing special pages to extend functionality of MediaWiki, but considering using XWiki instead.
Experimenting with XWiki Enterprise by attempting install of xwiki- enterprise-web-1.9.3.war:
In Apache Tomcat 5.5.23 Using PostgreSQL 8.4.0 -- Succeeds Or HSQLDB 1.8.0.7 -- Succeeds But MySQL 5.0.45 -- Fails.
MySQL is required for XWiki Enterprise Manger, so I need to use MySQL.
I get this error in the browser:
javax.servlet.ServletException: 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.
I get this additionally in catalina.out:
** BEGIN NESTED EXCEPTION **
java.net.ConnectException MESSAGE: Connection refused
STACKTRACE:
java.net.ConnectException: Connection refused
That's all the stacktrace you get in the log files?
I have installed mysql-connector-java-5.0.8-bin.jar in /var/lib/ tomcat5/webapps/xwiki/WEB-INF/lib.
I have modified /var/lib/tomcat5/webapps/xwiki/WEB- INF.hibernate.cfg.xml as follows:
<!-- 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://localhost/xwiki? useServerPrepStmts=false&useUnicode=true&\ characterEncoding=UTF-8&sessionVariables=sql_mode=''</property> <property name="connection.username">xwiki</property> <property name="connection.password">PASSWORD</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 resource="xwiki.hbm.xml"/> <mapping resource="feeds.hbm.xml"/>
I created an xwiki database and granted privileges in MySQL as follows:
$ mysql -u root -p
mysql> create database xwiki; mysql> grant all privileges on xwiki.* to [email protected] identified by 'xwiki'; mysql> grant all privileges on xwiki.* to xwiki@localhost identified by 'xwiki';
OR
mysql> create database xwiki; mysql> grant all privileges on xwiki.* to [email protected] identified by 'SAMEASROOT'; mysql> grant all privileges on xwiki.* to xwiki@localhost identified by 'SAMEASROOT';
I assume you did try to connect to mysql with the xwiki user from the mysql client and it worked, to make sure the user and its password are all fine. Also, doublecheck the port of your mysql and the port hibernate is trying to connect to (by default it's trying to connect to 3306, make sure mysql is accepting connections at this port). Not of very much help, but anything I can think of right now. No further than last thursday we did an installation of xwiki enterprise 1.9.3 on tomcat (5.5.25) + mysql (5.0.51) and it worked pretty smooth. Happy hacking, Anca
Note that PASSWORD in the hibernate.cfg.xml file was set to either 'xwiki', or to the same password as for the root MySQL user, with the thought that perhaps the Hibernate configuration assumed an empty root MySQL user password, and that, somehow, this might help.
I then modified /var/lib/tomcat5/webapps/xwiki/WEB- INF.hibernate.cfg.xml as follows, since this is what the installation instructions actually show, that is, omitting some MySQL parameters:
<!-- 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://localhost/xwiki</ property> <property name="connection.username">xwiki</property> <property name="connection.password">PASSWORD</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 resource="xwiki.hbm.xml"/> <mapping resource="feeds.hbm.xml"/>
I have tried many permutations and scoured installation instructions, FAQ, and archives. I definitely need some help here.
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi, Could it be related to: "also, make sure that mysqld doesn't have the "skip-networking" option enabled, otherwise xwiki won't be able to access it.." A comment found there: http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL JV. On Fri, Aug 14, 2009 at 4:27 PM, Raymond LeClair<[email protected]> wrote:
Currently writing special pages to extend functionality of MediaWiki, but considering using XWiki instead.
Experimenting with XWiki Enterprise by attempting install of xwiki- enterprise-web-1.9.3.war:
In Apache Tomcat 5.5.23 Using PostgreSQL 8.4.0 -- Succeeds Or HSQLDB 1.8.0.7 -- Succeeds But MySQL 5.0.45 -- Fails.
MySQL is required for XWiki Enterprise Manger, so I need to use MySQL.
I get this error in the browser:
javax.servlet.ServletException: 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.
I get this additionally in catalina.out:
** BEGIN NESTED EXCEPTION **
java.net.ConnectException MESSAGE: Connection refused
STACKTRACE:
java.net.ConnectException: Connection refused
I have installed mysql-connector-java-5.0.8-bin.jar in /var/lib/ tomcat5/webapps/xwiki/WEB-INF/lib.
I have modified /var/lib/tomcat5/webapps/xwiki/WEB- INF.hibernate.cfg.xml as follows:
<!-- 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://localhost/xwiki? useServerPrepStmts=false&useUnicode=true&\ characterEncoding=UTF-8&sessionVariables=sql_mode=''</property> <property name="connection.username">xwiki</property> <property name="connection.password">PASSWORD</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 resource="xwiki.hbm.xml"/> <mapping resource="feeds.hbm.xml"/>
I created an xwiki database and granted privileges in MySQL as follows:
$ mysql -u root -p
mysql> create database xwiki; mysql> grant all privileges on xwiki.* to [email protected] identified by 'xwiki'; mysql> grant all privileges on xwiki.* to xwiki@localhost identified by 'xwiki';
OR
mysql> create database xwiki; mysql> grant all privileges on xwiki.* to [email protected] identified by 'SAMEASROOT'; mysql> grant all privileges on xwiki.* to xwiki@localhost identified by 'SAMEASROOT';
Note that PASSWORD in the hibernate.cfg.xml file was set to either 'xwiki', or to the same password as for the root MySQL user, with the thought that perhaps the Hibernate configuration assumed an empty root MySQL user password, and that, somehow, this might help.
I then modified /var/lib/tomcat5/webapps/xwiki/WEB- INF.hibernate.cfg.xml as follows, since this is what the installation instructions actually show, that is, omitting some MySQL parameters:
<!-- 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://localhost/xwiki</ property> <property name="connection.username">xwiki</property> <property name="connection.password">PASSWORD</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 resource="xwiki.hbm.xml"/> <mapping resource="feeds.hbm.xml"/>
I have tried many permutations and scoured installation instructions, FAQ, and archives. I definitely need some help here.
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Anca, Thanks so much for your reply! I discovered that I needed to use a later version of the MySQL connector, from the Maven repository, rather than the version of the connector from the MySQL site, even though that version matched my version of MySQL. Also, I needed to use '127.0.0.1' rather than 'localhost' in the hibernate configuration file, even though I had configured MySQL to accept connections from the 'xwiki' user on either host. I confirmed separately that each of these changes was required in order for the installation to work, and added a comment on the installation page. Raymond. On Aug 17, 2009, at 4:17 AM, Anca Paula Luca wrote:
Hi Raymond,
see below
Raymond LeClair wrote:
Currently writing special pages to extend functionality of MediaWiki, but considering using XWiki instead.
Experimenting with XWiki Enterprise by attempting install of xwiki- enterprise-web-1.9.3.war:
In Apache Tomcat 5.5.23 Using PostgreSQL 8.4.0 -- Succeeds Or HSQLDB 1.8.0.7 -- Succeeds But MySQL 5.0.45 -- Fails.
MySQL is required for XWiki Enterprise Manger, so I need to use MySQL.
I get this error in the browser:
javax.servlet.ServletException: 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.
I get this additionally in catalina.out:
** BEGIN NESTED EXCEPTION **
java.net.ConnectException MESSAGE: Connection refused
STACKTRACE:
java.net.ConnectException: Connection refused
That's all the stacktrace you get in the log files?
I have installed mysql-connector-java-5.0.8-bin.jar in /var/lib/ tomcat5/webapps/xwiki/WEB-INF/lib.
I have modified /var/lib/tomcat5/webapps/xwiki/WEB- INF.hibernate.cfg.xml as follows:
<!-- 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://localhost/xwiki? useServerPrepStmts=false&useUnicode=true&\ characterEncoding=UTF-8&sessionVariables=sql_mode=''</property> <property name="connection.username">xwiki</property> <property name="connection.password">PASSWORD</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 resource="xwiki.hbm.xml"/> <mapping resource="feeds.hbm.xml"/>
I created an xwiki database and granted privileges in MySQL as follows:
$ mysql -u root -p
mysql> create database xwiki; mysql> grant all privileges on xwiki.* to [email protected] identified by 'xwiki'; mysql> grant all privileges on xwiki.* to xwiki@localhost identified by 'xwiki';
OR
mysql> create database xwiki; mysql> grant all privileges on xwiki.* to [email protected] identified by 'SAMEASROOT'; mysql> grant all privileges on xwiki.* to xwiki@localhost identified by 'SAMEASROOT';
I assume you did try to connect to mysql with the xwiki user from the mysql client and it worked, to make sure the user and its password are all fine.
Also, doublecheck the port of your mysql and the port hibernate is trying to connect to (by default it's trying to connect to 3306, make sure mysql is accepting connections at this port).
Not of very much help, but anything I can think of right now. No further than last thursday we did an installation of xwiki enterprise 1.9.3 on tomcat (5.5.25) + mysql (5.0.51) and it worked pretty smooth.
Happy hacking, Anca
Note that PASSWORD in the hibernate.cfg.xml file was set to either 'xwiki', or to the same password as for the root MySQL user, with the thought that perhaps the Hibernate configuration assumed an empty root MySQL user password, and that, somehow, this might help.
I then modified /var/lib/tomcat5/webapps/xwiki/WEB- INF.hibernate.cfg.xml as follows, since this is what the installation instructions actually show, that is, omitting some MySQL parameters:
<!-- 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://localhost/xwiki</ property> <property name="connection.username">xwiki</property> <property name="connection.password">PASSWORD</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 resource="xwiki.hbm.xml"/> <mapping resource="feeds.hbm.xml"/>
I have tried many permutations and scoured installation instructions, FAQ, and archives. I definitely need some help here.
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
I discovered that I needed to use a later version of the MySQL connector, from the Maven repository, rather than the version of the connector from the MySQL site, even though that version matched my version of MySQL.
I have XEM 1.7.3 working with: Tomcat 5.5.25 (-5ubuntu1.2) MySQL 5.0.51a (-3ubuntu5.4) Java 1.6.0_14 and mysql-connector-java-5.1.8-bin.jar from http://www.mysql.com/products/connector/ . For a while I was getting the same error and stack trace, but I had the database name referenced incorrectly in hibernate.cfg.xml . Trevor
participants (4)
-
Anca Paula Luca -
Jean-Vincent Drean -
Raymond LeClair -
Trevor