• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Data truncation: Data too long for column 'session_id' at row 1

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
During search I get Data truncation exception. I tried increasing the width of the session_id column in the jforum_search_results to 200. But it continues to give the same error even though the session id string was 78 chars. Any ideas ???

Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long fo
r column 'session_id' at row 1
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2926)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2994)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja
va:936)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
:1166)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
:1082)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
:1067)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewP
roxyPreparedStatement.java:105)
at net.jforum.dao.generic.GenericSearchDAO.selectTopicData(GenericSearch
DAO.java:235)
at net.jforum.dao.generic.GenericSearchDAO.topicsByKeyword(GenericSearch
DAO.java:225)
at net.jforum.dao.generic.GenericSearchDAO.search(GenericSearchDAO.java:
82)
at net.jforum.view.forum.SearchAction.search(SearchAction.java:187)
[originally posted on jforum.net by ppk]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The following tables contain the "session_id" field:

jforum_sessions
jforum_search_results
jforum_search_topics

You will have to change in all of them.

We'll fix the database scripts of JForum as well. Thanks for reporting this bug.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. Changing the widths on those 3 tables made the search work.
[originally posted on jforum.net by ppk]
 
Trust God, but always tether your camel... to this tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic