I had the same problem yesterday. After looking into myslq driver sources(mysql-connector-java-3.0.8-stable), it looks out that for automatically incremented fields it returns Long as a java type of pk. ClassCastException is thrown during creation of FileEjb, when this long is narrowed to int(getId()). I changed FileEjb.id to be long and it solved my problem.
I'm new to MySQL, maybe there is other solution.
I know the problem, it appeared recently.
what you have to do is :
modify the local.properties replacing the hsqldb section with the mysql one (that can be found in nukes/build/etc/local.properties-mysql)
then it will work when you build other modules.