>What is a good way to deal with CVS and these configuration files? Should I edit them each time I grab some new source code version?
> [java] Caused by: java.sql.BatchUpdateException: Can't create table '.\lams\#sql-28c_51.frm' (errno: 121)
> [java] at com.mysql.jdbc.Statement.executeBatch(Statement.java:709)
> [java] at org.lamsfoundation.lams.tool.deploy.ScriptRunner.executeStatements(ScriptRunner.java:107)
> [java] ... 4 more
> BUILD SUCCESSFUL
> Total time: 12 seconds
> Kind of confusing to say "BUILD SUCCESSFUL" when "TOOL DEPLOY FAILED" --
>particularly since as suggested I added my tool to the build/build.xml script.
Yeah that is a bit misleading but I've never managed to get all the ant flags just right so that it detects all the errors and gives the right message. Works right sometimes, not other times.
An unfortunately the error message "Can't create table '.\lams\#sql-28c_51.frm' (errno: 121)" isn't very helpful. I suspect there is something wrong relating to foreign keys in one of the db scripts.
Can you email me (fmalikoff@lamsinternational.com) the build.xml and the sql scripts and I'll try them out for myself. You can send me the entire project if you want, just clear out the build directory (build/classes, build/deploy, build/lib, etc) first - it will make it a bit smaller. :->
I'll try to log on again about 9:30pm tonight Brisbane time which I think is about 11:30 am in the UK (give or take daylight saving)? If you can get me the scripts then I'll try to look at them tonight and get back to you straight away.
>So then I dropped the whole lams schema using the MySQL Adminstrator tool, created a new "lams" schema and rebuilt evertyhing from the beginning.
>(I'm unclear when I need to rebuild like this?). But I still get the above error when I run deploy-tool. Everything else seems to be working.
You don't need to drop the database very often - normally just running rebuild-db will do the trick as it actually drops and recreates the database. (So you ask, why do I need to configure the database the first place? So that ANT doesn't throw a hissy fit. One of these days I'll find a way to work around it.)
But when I feel like I'm in the twilight zone and MySQL just doesn't want to work, then I delete and recreate the LAMS database. I usually find out afterwards that it was something I was doing wrong but I feel so much better for doing it.
And now you have the rest of the system and deployed okay, just keep running "deploy-tool" in your own project (rather than running the full build) until we get it deployed. You won't need to do another full build until either
(1) you check out the code again or
(2) you have run your tool and put data in the tool's database tables and then you get to the point where you want to clean out the tables and rebuild your tool.
We'll get your tool running first and I'll explain (2) in more detail then.
Regards,
Fiona
Posted by Fiona Malikoff