自定义字段liferay语言支持

时间:2014-03-02 10:31:12

标签: liferay liferay-6 liferay-ide

我有输入文字的自定义字段。我在控制面板中添加了阿拉伯语言支持

但是当我插入阿拉伯语时,它会显示 用户和组织暂时无法使用。

如何解决这个问题?

这是在控制台日志中发生的事情:

10:29:49,421 ERROR [http-bio-8080-exec-17][JDBCExceptionReporter:82] Incorrect string value: '\xD8\xB9\xD8\xB1\xD8\xA8...' for column 'data_' at row 1
10:29:51,254 ERROR [http-bio-8080-exec-17][render_portlet_jsp:132] null
java.sql.SQLException: Incorrect string value: '\xD8\xB9\xD8\xB1\xD8\xA8...' for column 'data_' at row 1
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2458)
    at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006)
    at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1135)
    at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
    at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
    at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114)
    at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)
    at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2412)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2875)
    at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)

1 个答案:

答案 0 :(得分:1)

查看http://www.codeka.com.au/blog/2014/02/unicode-support-in-mysql-is--

https://news.ycombinator.com/item?id=7317519

基本上是因为您的数据库设置了错误的字符编码。