Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems with Blob field legnth in MySql

meka toka
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using MySQL 3.23.55, JBOSS 3.0.6, EJB 2.0, CMP 2.0
I have configured the database, the tables are created but it stops at one place.In the type mappings-mappings , i have the following in the standardjbosscmp-jdbc.xml
java-type jdbc-type sql-type
java.lang.Object Blob LongBlob

I get the following error while creating one of the fields at the time of deployment.
org.jboss.deployment.DeploymentException: Error while creating table; - nested throwable: (java.sql.SQLException: General error, message from server: "BLOB column 'start_ip' used in key specification without a key length")
I have searched on the net and came up with the following,
it seems that we need to specify the column legnth in the create table statement. I would have to use the following
CREATE INDEX part_of_name ON customer (name(10))
if i was directly working on the database @ command line.

But i am using CMP, so how do i fix this ?
Any help is appreciated
Meka Toka
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic