Injector job crashes with MySQL with table collation set to utf8_general_ci
---------------------------------------------------------------------------
Key: NUTCH-970
URL: https://issues.apache.org/jira/browse/NUTCH-970
Project: Nutch
Issue Type: Bug
Components: injector
Affects Versions: 2.0
Reporter: Markus Jelsma
Fix For: 2.0
Running the injector of trunk with an already existing database where the
default collation is utf8_* or ucs2_* the following GoraException is thrown:
InjectorJob: starting
InjectorJob: urlDir: urls
InjectorJob: org.apache.gora.util.GoraException: java.io.IOException:
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Column length too big for
column 'text' (max = 21845); use BLOB or TEXT instead
at
org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:110)
at
org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:93)
at
org.apache.nutch.storage.StorageUtils.createWebStore(StorageUtils.java:43)
at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:227)
at org.apache.nutch.crawl.InjectorJob.inject(InjectorJob.java:252)
at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:266)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.nutch.crawl.InjectorJob.main(InjectorJob.java:276)
Caused by: java.io.IOException:
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Column length too big for
column 'text' (max = 21845); use BLOB or TEXT instead
at org.apache.gora.sql.store.SqlStore.createSchema(SqlStore.java:226)
at org.apache.gora.sql.store.SqlStore.initialize(SqlStore.java:172)
at
org.apache.gora.store.DataStoreFactory.initializeDataStore(DataStoreFactory.java:81)
at
org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:104)
... 7 more
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Column length
too big for column 'text' (max = 21845); use BLOB or TEXT instead
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1604)
at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1519)
at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1504)
at org.apache.gora.sql.store.SqlStore.createSchema(SqlStore.java:224)
... 10 more
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira