• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Type Mapping in MySQL

meka toka
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using JBoss 3.0.6, MySQL 3.23.55, EJB 2.0 , EMP 2.0
I am having trouble doing the type-mapping for the data type java.lang.Object in standardjbosscmp-jdbc.xml.
The file by default has above mapping, but when i use that i am getting the error
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")
The table which it is trying to create has a primary-key class, and the primary-key class is made of 3 columns start_ip, end_ip, subnet_mask. All 3 are of type java.net.InetAddress. The type mapping in xml doesnt have a mapping for InetAddress so, JBoss will map it to java.lang.Object.
I am supposed to specify a key legnth, as per
something like
CREATE INDEX part_of_name ON customer (name(10))
But how can i specify key legnth in EJB using CMP ?
Meka Toka
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic