-
1. Re: JBoss-4.0.0 and MySQL-4.0.18
chrismalan Dec 14, 2004 7:10 PM (in response to chrismalan)Here is the cause and solution:
I use Eclipse/Lomboz as an IDE. The EJBWizard (in the case of CMP beans) takes VARCHAR as the SQL type, not VARCHAR(xy). It complains for VARCHAR(xy). The XDoclet tag generated then only specifies VARCHAR as the SQL type. In the generated JBossCMPJDBC.xml only VARCHAR appears as the SQL type in the 3.1 version of Eclipse. In 2.1 there was not even a <sql-type> tag, unluess I wanted it to be TEXT.
MySQL demands VARCHAR(xy). I've tried it on the command line with SQL.
After adding the (xy) to every appearance of VARCHAR as the SQL type (not the JDBC type - that is left as it is) the tables were created with no problems.
So, obviously JBoss-3.2.0 filled in (255) where no value was supplied for (xy) and JBoss-4.0.0 does not, which makes MySQL unhappy.
I wonder how many additional problems there are going to be - what about relationships, for starters. Is it worth the bother? Should I not stick with JBoss-3.2.0 and Eclipse/Lomboz 2.1? At least they worked. -
2. Re: JBoss-4.0.0 and MySQL-4.0.18
breaston Jan 12, 2005 2:20 PM (in response to chrismalan)Look at your create statement:
create table principal_tbl(
username VARCHAR, NOT NULL,
password VARCHAR,
You have a comma between VARCHAR and NOT NULL.