aspose file tools*
The moose likes JForum and the fly likes SQL Problem(Mysql5) when I install Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "SQL Problem(Mysql5) when I install" Watch "SQL Problem(Mysql5) when I install" New topic
Author

SQL Problem(Mysql5) when I install

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
what is this problem?

ERROR [ExceptionWriter ] net.jforum.exceptions.DatabaseException: java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_unicode_ci,IMPLICIT) for operation 'UNION'

Query being executed when exception was thrown:

SELECT r.name, '0' AS role_value FROM jforum_roles r WHERE r.group_id IN (1) UNION SELECT r.name, rv.role_value FROM jforum_roles r, jforum_role_values rv WHERE r.role_id = rv.role_id AND r.group_id IN (1) ORDER BY name
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3124)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1149)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1262)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
at net.jforum.dao.generic.security.GenericGroupSecurityDAO.loadRoles(GenericGroupSecurityDAO.java:209)
at net.jforum.dao.generic.security.GenericGroupSecurityDAO.loadRolesByUserGroups(GenericGroupSecurityDAO.java:287)
at net.jforum.repository.SecurityRepository.load(SecurityRepository.java:151)
at net.jforum.repository.SecurityRepository.load(SecurityRepository.java:94)
at net.jforum.repository.SecurityRepository.load(SecurityRepository.java:112)
at net.jforum.JForum.service(JForum.java:163)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_unicode_ci,IMPLICIT) for operation 'UNION'

Query being executed when exception was thrown:

SELECT r.name, '0' AS role_value FROM jforum_roles r WHERE r.group_id IN (1) UNION SELECT r.name, rv.role_value FROM jforum_roles r, jforum_role_values rv WHERE r.role_id = rv.role_id AND r.group_id IN (1) ORDER BY name
... 32 more

URL is: /forums/list.page?null
[originally posted on jforum.net by paizxin]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
HELLO i also encounter this problem




error message :


13:16:43,765 ERROR [ExceptionWriter ] net.jforum.exceptions.DatabaseException: java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) for operation 'UNION'

Query being executed when exception was thrown:

SELECT r.name, '0' AS role_value FROM jforum_roles r WHERE r.group_id IN (1) UNION SELECT r.name, rv.role_value FROM jforum_roles r, jforum_role_values rv WHERE r.role_id = rv.role_id AND r.group_id IN (1) ORDER BY name
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3124)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1149)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1262)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
at net.jforum.dao.generic.security.GenericGroupSecurityDAO.loadRoles(GenericGroupSecurityDAO.java:209)
at net.jforum.dao.generic.security.GenericGroupSecurityDAO.loadRolesByUserGroups(GenericGroupSecurityDAO.java:287)
at net.jforum.repository.SecurityRepository.load(SecurityRepository.java:151)
at net.jforum.repository.SecurityRepository.load(SecurityRepository.java:94)
at net.jforum.repository.SecurityRepository.load(SecurityRepository.java:112)
at net.jforum.JForum.service(JForum.java:163)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) for operation 'UNION'

Query being executed when exception was thrown:

SELECT r.name, '0' AS role_value FROM jforum_roles r WHERE r.group_id IN (1) UNION SELECT r.name, rv.role_value FROM jforum_roles r, jforum_role_values rv WHERE r.role_id = rv.role_id AND r.group_id IN (1) ORDER BY name
... 30 more

URL is: /JForum/forums/list.page?null

[originally posted on jforum.net by dbasy]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
i forget that i use release 2.1.8
[originally posted on jforum.net by dbasy]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I think maybe I've wrong pasword with MySql?
[originally posted on jforum.net by paizxin]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
NO I DON'T THINK SO?
[originally posted on jforum.net by dbasy]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
it's ok! database is oracle!
[originally posted on jforum.net by dbasy]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
but...My DataBase is MySql5...
[originally posted on jforum.net by paizxin]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
You probably need to create the MySQL catelog/schema you're using for jforum with a default character set of UTF8 to correct this.
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
i did that
[originally posted on jforum.net by paizxin]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
dbasy, monroe, thanks...
update the default char_set in my.ini...
set "default-character-set=latin1" to "default-character-set=utf8"

[originally posted on jforum.net by paizxin]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: SQL Problem(Mysql5) when I install