Hi, I am using (My)Eclipse, XDoclet and MySQL for developing my EJBs.
I have an entity bean whose corresponding table requires to be created in the database. All my compiles and deployment goes through fine - but MySQL throws an error complaining the max column size for a VARCHAR field is 256. My jbosscmp-jdbc.xml shows correct details : | <entity> | <ejb-name>Composer</ejb-name> | <table-name>Composer</table-name> | | <cmp-field> | <field-name>composerName</field-name> | <column-name>composerName</column-name> | | <jdbc-type>VARCHAR</jdbc-type> | <sql-type>varchar(50)</sql-type> | | </cmp-field> | <cmp-field> | <field-name>genre</field-name> | <column-name>genre</column-name> | | <jdbc-type>VARCHAR</jdbc-type> | <sql-type>varchar(60)</sql-type> | | </cmp-field> | | <!-- jboss 3.2 features --> | <!-- optimistic locking does not express the exclusions needed --> | </entity> | The errror thrown is : | :36:19,596 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=Composer,service=EJB | MBeanException: org.jboss.deployment.DeploymentException: Error while creating table Composer; - nested throwable: (java.sql.SQLException: Syntax error or access violation message from server: "Too big column length for column 'composerName' (max = 255). Use BLOB instead") | | Cause: org.jboss.deployment.DeploymentException: Error while creating table Composer; - nested throwable: (java.sql.SQLException: Syntax error or access violation message from server: "Too big column length for column 'composerName' (max = 255). Use BLOB instead") | >From the JBoss log : | 2004-08-26 15:36:19,507 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.Composer] Executing SQL: CREATE TABLE Composer (composerName VARCHAR(256), definitiveFilm VARCHAR(256), CONSTRAINT pk_Composer PRIMARY KEY ()) | Why is it trying to create a table with column size varchar(256) when it has been specified to be much lower ? I attempted a number of XDoclet tag changes and manipulations but none worked. Any inputs on this ? Thanks View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3846274#3846274 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3846274 ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user