[xwiki-users] Installations-problems on Debian, MySQL & Tomcat (Deployment as single war)
Hi guys, first off, thanks to VBincent, Anca & Sdumitriu for pointing me to this list via Twitter My current environment: Using CATALINA_BASE: /home/tomcat/www Using CATALINA_HOME: /home/tomcat/www Using CATALINA_TMPDIR: /home/tomcat/www/temp Using JRE_HOME: /usr/lib/jvm/java-1.6.0-sun Server version: Apache Tomcat/5.5.20 Server built: Sep 12 2006 10:09:20 Server number: 5.5.20.0 OS Name: Linux OS Version: 2.6.18-4-686 Architecture: i386 JVM Version: 1.6.0_10-b33 JVM Vendor: Sun Microsystems Inc. I'm running on Debia, but I'm not using a packaged version but a vanilla Tomcat installation MySQL: mysql Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (i486) using readline 5.2 Connection id: 57 Current database: Current user: root@localhost SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server version: 5.0.32-Debian_7etch11-log Debian etch distribution Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: latin1 Db characterset: latin1 Client characterset: latin1 Conn. characterset: latin1 UNIX socket: /var/run/mysqld/mysqld.sock Uptime: 14 days 21 hours 38 min 38 sec Now I know what you guys are saying - "you have to set up a UTF-8-databse", but well, should be enough if the database is set to use UTF-8 and not the whole MySQL-instance,right? Therefore: mysql> show create database xwiki; +----------+----------------------------------------------------------------+ | Database | Create Database | +----------+----------------------------------------------------------------+ | xwiki | CREATE DATABASE `xwiki` /*!40100 DEFAULT CHARACTER SET utf8 */ | +----------+----------------------------------------------------------------+ 1 row in set (0.00 sec) Now what I did so far: - I downloaded the latest stand-alone war from the xwiki-website - I created a new Virtual Host within Tomcat and deployed the war - I commented out the default HSQL-DB-settings and adapted the MySQL-settings in hibernate.cfg.xml: <property name="connection.url">jdbc:mysql://localhost/xwiki?useServerPrepStmts=false&useUnicode=true&characterEncoding=UTF-8&sessionVariables=sql_mode=''</property> <property name="connection.username">someUser</property> <property name="connection.password">somePassword</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"/> <mapping resource="activitystream.hbm.xml"/> - in xwiki.cfg, I left everything at their default values except xwiki.store.migration=0 - I restartet Tomcat, and then went to http://myServer/xwiki/bin/import/XWiki/XWikiPreferences to import the default pages as suggested in the docs. However, I'm getting a HTTP 500 with the following exception: Caused by: java.sql.BatchUpdateException: Data truncation: Out of range value adjusted for column 'XWD_HIDDEN' at row 1 at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:894) at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246) /There are a lot more exeption, but the above one should be the root-cause. My understanding is, that some mapping within Hibernate is wrong, but I got no idea on how to fix that. Any suggestions would be very much appreciated. TIA Gregor PS.: I'm running Tomcat as a demon via jsvc, but I don't think that this has anything to do with the above error -- -- just because you're paranoid, don't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 @ http://pgp.mit.edu:11371/ skype:rc46fi
Hi Gregor, On 03/05/2010 01:17 PM, 2smart4u wrote:
Hi guys,
first off, thanks to VBincent, Anca& Sdumitriu for pointing me to this list via Twitter
My current environment:
Using CATALINA_BASE: /home/tomcat/www Using CATALINA_HOME: /home/tomcat/www Using CATALINA_TMPDIR: /home/tomcat/www/temp Using JRE_HOME: /usr/lib/jvm/java-1.6.0-sun Server version: Apache Tomcat/5.5.20 Server built: Sep 12 2006 10:09:20 Server number: 5.5.20.0 OS Name: Linux OS Version: 2.6.18-4-686 Architecture: i386 JVM Version: 1.6.0_10-b33 JVM Vendor: Sun Microsystems Inc.
I'm running on Debia, but I'm not using a packaged version but a vanilla Tomcat installation
MySQL:
mysql Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (i486) using readline 5.2
Connection id: 57 Current database: Current user: root@localhost SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server version: 5.0.32-Debian_7etch11-log Debian etch distribution Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: latin1 Db characterset: latin1 Client characterset: latin1 Conn. characterset: latin1 UNIX socket: /var/run/mysqld/mysqld.sock Uptime: 14 days 21 hours 38 min 38 sec
Now I know what you guys are saying - "you have to set up a UTF-8-databse", but well, should be enough if the database is set to use UTF-8 and not the whole MySQL-instance,right?
Therefore:
mysql> show create database xwiki; +----------+----------------------------------------------------------------+ | Database | Create Database | +----------+----------------------------------------------------------------+ | xwiki | CREATE DATABASE `xwiki` /*!40100 DEFAULT CHARACTER SET utf8 */ | +----------+----------------------------------------------------------------+ 1 row in set (0.00 sec)
Now what I did so far:
- I downloaded the latest stand-alone war from the xwiki-website
- I created a new Virtual Host within Tomcat and deployed the war
- I commented out the default HSQL-DB-settings and adapted the MySQL-settings in hibernate.cfg.xml:
<property name="connection.url">jdbc:mysql://localhost/xwiki?useServerPrepStmts=false&useUnicode=true&characterEncoding=UTF-8&sessionVariables=sql_mode=''</property> <property name="connection.username">someUser</property> <property name="connection.password">somePassword</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"/> <mapping resource="activitystream.hbm.xml"/>
- in xwiki.cfg, I left everything at their default values except
xwiki.store.migration=0
Is this bothering you? could you try to leave it to the default and checkout how it goes? Since some fields don't seem to be in their right place, let it do its default stuff and then see about adjusted things. Happy hacking, Anca
- I restartet Tomcat, and then went to
http://myServer/xwiki/bin/import/XWiki/XWikiPreferences
to import the default pages as suggested in the docs.
However, I'm getting a HTTP 500 with the following exception:
Caused by: java.sql.BatchUpdateException: Data truncation: Out of range value adjusted for column 'XWD_HIDDEN' at row 1 at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:894) at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
/There are a lot more exeption, but the above one should be the root-cause.
My understanding is, that some mapping within Hibernate is wrong, but I got no idea on how to fix that.
Any suggestions would be very much appreciated.
TIA
Gregor
PS.: I'm running Tomcat as a demon via jsvc, but I don't think that this has anything to do with the above error --
On 03/05/2010 12:17 PM, 2smart4u wrote:
Hi guys,
first off, thanks to VBincent, Anca& Sdumitriu for pointing me to this list via Twitter
My current environment:
Using CATALINA_BASE: /home/tomcat/www Using CATALINA_HOME: /home/tomcat/www Using CATALINA_TMPDIR: /home/tomcat/www/temp Using JRE_HOME: /usr/lib/jvm/java-1.6.0-sun Server version: Apache Tomcat/5.5.20 Server built: Sep 12 2006 10:09:20 Server number: 5.5.20.0 OS Name: Linux OS Version: 2.6.18-4-686 Architecture: i386 JVM Version: 1.6.0_10-b33 JVM Vendor: Sun Microsystems Inc.
I'm running on Debia, but I'm not using a packaged version but a vanilla Tomcat installation
MySQL:
mysql Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (i486) using readline 5.2
Connection id: 57 Current database: Current user: root@localhost SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server version: 5.0.32-Debian_7etch11-log Debian etch distribution Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: latin1 Db characterset: latin1 Client characterset: latin1 Conn. characterset: latin1 UNIX socket: /var/run/mysqld/mysqld.sock Uptime: 14 days 21 hours 38 min 38 sec
Now I know what you guys are saying - "you have to set up a UTF-8-databse", but well, should be enough if the database is set to use UTF-8 and not the whole MySQL-instance,right?
Therefore:
mysql> show create database xwiki; +----------+----------------------------------------------------------------+ | Database | Create Database | +----------+----------------------------------------------------------------+ | xwiki | CREATE DATABASE `xwiki` /*!40100 DEFAULT CHARACTER SET utf8 */ | +----------+----------------------------------------------------------------+ 1 row in set (0.00 sec)
In mysql each table and each column can have its own charset. Make sure that it's not just the global database that was created using utf8, but also the columns. A quick test: select distinct charset(xwd_content) from xwikidoc;
Now what I did so far:
- I downloaded the latest stand-alone war from the xwiki-website
- I created a new Virtual Host within Tomcat and deployed the war
- I commented out the default HSQL-DB-settings and adapted the MySQL-settings in hibernate.cfg.xml:
<property name="connection.url">jdbc:mysql://localhost/xwiki?useServerPrepStmts=false&useUnicode=true&characterEncoding=UTF-8&sessionVariables=sql_mode=''</property> <property name="connection.username">someUser</property> <property name="connection.password">somePassword</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"/> <mapping resource="activitystream.hbm.xml"/>
- in xwiki.cfg, I left everything at their default values except
xwiki.store.migration=0
Did you also download the mysql connector as indicated on http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL ? http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.12/mysql-connec...
- I restartet Tomcat, and then went to
http://myServer/xwiki/bin/import/XWiki/XWikiPreferences
to import the default pages as suggested in the docs.
However, I'm getting a HTTP 500 with the following exception:
Caused by: java.sql.BatchUpdateException: Data truncation: Out of range value adjusted for column 'XWD_HIDDEN' at row 1
This usually happens when version 3.x of the mysql connector is used. Installing the 5.x version should solve it, but this is not a very serious error (it would just mean that all documents will be hidden).
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:894) at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
/There are a lot more exeption, but the above one should be the root-cause.
My understanding is, that some mapping within Hibernate is wrong, but I got no idea on how to fix that.
Any suggestions would be very much appreciated.
TIA
Gregor
PS.: I'm running Tomcat as a demon via jsvc, but I don't think that this has anything to do with the above error
-- Sergiu Dumitriu http://purl.org/net/sergiu/
@Sergiu, thanks for your comments!
select distinct charset(xwd_content) from xwikidoc;
gives +----------------------+ | charset(xwd_content) | +----------------------+ | utf8 | +----------------------+ Besides, I just can't setup the complete MySQL instance as UTF-8 since there are other databases online which I don't want to fiddle with.
http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.12/mysql-connec...
nope, haven't done that, but will do within the next few minutes and keep you posted @Anca
xwiki.store.migration=0
Is this bothering you? could you try to leave it to the default and checkout how it goes?
Will do that, you should see the result of your suggestions within 30 minutes on this list ;) Cheers & thanks again Gregor -- just because you're paranoid, don't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 @ http://pgp.mit.edu:11371/ skype:rc46fi
guys, i don't know which hint it was, but i guess it was the change of the mysql-driver - it seems to be working now, thanks a lot for that! but i'm pretty sure i'll have some more questions in the future, still. maybe just one qwuick one (haven't read the entire docs yet): when i want to create users with specific rights - is it really necessary to have an ldap-server? or can i instead use container-based security? tia gregor
Hi, On Fri, Mar 5, 2010 at 3:34 PM, 2smart4u <[email protected]> wrote:
guys,
i don't know which hint it was, but i guess it was the change of the mysql-driver - it seems to be working now, thanks a lot for that!
but i'm pretty sure i'll have some more questions in the future, still.
maybe just one qwuick one (haven't read the entire docs yet):
when i want to create users with specific rights - is it really necessary to have an ldap-server? or can i instead use container-based security?
You can create users and configure rights in XWiki itself. No need for LDAP. Guillaume
tia
gregor _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Guillaume Lerouge Product Manager - XWiki SAS Skype: wikibc Twitter: glerouge http://guillaumelerouge.com/
Hi Gregor, Cool, glad that it worked. Could you tell me what version didn't work and what version worked for you so that we can update http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL (you could update it too btw, it's a wiki ;)). Thanks -Vincent On Fri, Mar 5, 2010 at 3:34 PM, 2smart4u <[email protected]> wrote:
guys,
i don't know which hint it was, but i guess it was the change of the mysql-driver - it seems to be working now, thanks a lot for that!
but i'm pretty sure i'll have some more questions in the future, still.
maybe just one qwuick one (haven't read the entire docs yet):
when i want to create users with specific rights - is it really necessary to have an ldap-server? or can i instead use container-based security?
tia
gregor
Hi Vincent, On Fri, Mar 5, 2010 at 5:07 PM, Vincent Massol <[email protected]> wrote:
(you could update it too btw, it's a wiki ;)).
Done that, also corrected another small bug (127.0.0.1 / localhost). Cheers! Gregor -- just because you're paranoid, don't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 @ http://pgp.mit.edu:11371/ skype:rc46fi
On Mar 5, 2010, at 5:51 PM, 2smart4u wrote:
Hi Vincent,
On Fri, Mar 5, 2010 at 5:07 PM, Vincent Massol <[email protected]> wrote:
(you could update it too btw, it's a wiki ;)).
Done that, also corrected another small bug (127.0.0.1 / localhost).
Cheers!
Thanks! -Vincent
participants (5)
-
2smart4u -
Anca Luca -
Guillaume Lerouge -
Sergiu Dumitriu -
Vincent Massol