Thanks Eivind, the part I was missing is regular MySql does not support InnoDB discovery, so I had to download the max thingie and now I was able to see relations in the gui tool. Correct me if I am wrong but for the moment it is only possible to use CMP20 with the airline tables. I tried with other tables, and I am running into some weird exception at the jboss level regarding unexpected BINARY token. I can reproduce the problem in the airline project by changing the name of the table flights into planes in the mysql.sql and it will produce this in jboss:

java.sql.SQLException: Unexpected token: BINARY in statement [CREATE TABLE PLANES (flight_id INTEGER NOT NULL, name VARCHAR(255) BINARY, departure_utc TIMESTAMP, arrival_utc TIMESTAMP, CONSTRAINT PK
        at org.hsqldb.Trace.getError(Trace.java:180)
        at org.hsqldb.Result.<init>(Result.java:175)
        at org.hsqldb.jdbcConnection.executeHSQL(jdbcConnection.java:907)
        at org.hsqldb.jdbcConnection.execute(jdbcConnection.java:718)
        at org.hsqldb.jdbcStatement.fetchResult(jdbcStatement.java:686)
        at org.hsqldb.jdbcStatement.executeUpdate(jdbcStatement.java:85)
        at org.jboss.resource.adapter.jdbc.local.LocalStatement.executeUpdate(LocalStatement.java:231)
        at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.createTable(JDBCStartCommand.java:169)
        at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:84)
        at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:383)
        at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:198)
        at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376)
        at org.jboss.ejb.Container.invoke(Container.java:793)
        at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
        at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:894)
        at $Proxy6.start(Unknown Source)
        at org.jboss.system.ServiceController.start(ServiceController.java:340)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
        at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
        at $Proxy53.start(Unknown Source)
        at org.jboss.ejb.EjbModule.startService(EjbModule.java:440)
        at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:162)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
        at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:894)
        at $Proxy6.start(Unknown Source)
        at org.jboss.system.ServiceController.start(ServiceController.java:340)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
        at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
        at $Proxy5.start(Unknown Source)
        at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:398)
        at org.jboss.deployment.MainDeployer.start(MainDeployer.java:678)
        at org.jboss.deployment.MainDeployer.start(MainDeployer.java:671)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:513)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
        at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
        at $Proxy4.deploy(Unknown Source)
        at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405)
        at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:586)
        at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:465)
        at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:202)
        at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)

So this is telling me that there is something hardcoded somewhere that only works with a table named flights, or persons. or reservations. I haven't investigate that yet.

But thanks anyway.

Cheers, Mike


 

 Note: forwarded message attached.



Do you Yahoo!?
HotJobs - Search new jobs daily now
--- Begin Message ---

Hi Guys,

In the gui tool, I can see the relations between tables if build.xml point to hsqldb.xml but not if it points to mysql.xml.

Is there something that need to be done different for mysql.xml? If somebody has been able to make it work for mysql, could you please describe what you had to do. modify the my.ini? add <crossref> or <many2many> tags to the build.xml?

Of course I understand that mysql.xml has to be updated with the proper database.url, database.userid, and database.password.

I am using middlegen-2.0-b1 but I also tried the CVS middlegen-2.0-b2-dev with no success. I can succesfully create the tables in mysql and select them.

Thank you for sharing your insights and by the way, middlegen appears to be a terrific tool. I have used xdoclet before and was very happy to find a tool that reuses ant and xdoclet.

Mike

 

 



Do you Yahoo!?
HotJobs - Search new jobs daily now--- End Message ---

Reply via email to