Forum LAMS for Tech-Heads - General Forum: Ant-eating or Ant-ipasti before some real e-learning creation


 
You may request notification for Ant-eating or Ant-ipasti before some real e-learning creation.
Search: 

1: Ant-eating or Ant-ipasti before some real e-learning creation
08/20/06 05:40 PM
[ Reply | Forward ]
I have attempted to build LAMS but JBoss not start.

Before I dive into the log files to see what the start up problem might be, I need to ask if the Ant stage can be re-run from scratch and if not LAMS can be 'cleaned' for a new build, other than what I have 'outlined' below.

I followed the build web page and I think everthing was fine up until I used Ant within Eclipse 3.2.

The instructions are great except for the Eclipse-ant bit which is written in descriptive rather than prescriptive terms, i.e. Run "rebuild-db" and not Start Eclipse, Blah, Blah, ... within the ANT view, Blah, Blah.

So, with limited knowledge of Eclipse and Ant, I tried to drag the LAMS root folder with the .project file into the Eclipse workspace but could not get Eclipse to "un-gray" the Open project Menu Option.

Then, I tried to load LAMS as a project by creating "a Java Project with existing build" it complained that build.xml had no javac task.

Finally, I created a new project called LAMS, pointed it to d:\lams and then opened an Ant view and ran the Build.

I think I may have run assembly-ear before rebuild-db but not sure. Anyway, JBoss seemed to complain about some temp file not being processed properly and also I realised I had not initialised wildfire through its admin client. At the end of the build JBoss would not start.

So, I did the wildfire config, deleted lams ear from JBoss, dropped and reinitialised the MySQL lams database, reassigned proveleges to lamsuser and re-ran the build. My worry is that this time, at every build stage, Eclipse kept asking me what build config to use something it only asked for the last three build stages, first time around.

Should I go straight to the logs or am I running the build in an abusive fashion!

BTW, apart from the CVS licensing I found the instructions clear and very helpful. Also, if it is possible to have an rough-edged zip file that can be exploded into the JBoss deploy folder I would shout "Friends, Romans, LAMS team, lend me your ears!"

Regards

Paul

Posted by Paul Carden

2: Re: Ant-eating or Ant-ipasti before some real e-learning creation
In response to 1 08/21/06 06:45 AM
[ Reply | Forward ]
Paul,

First up, thanks for the feedback. Setting up the code in LAMS is now something I've done so many times that instructions actually become hard to write. I'll try to make the instructions a little more prescriptive. I've tried to be a bit vague as I know of two different ways to do it Eclipse and people tend to like doing it "their" way. But it isn't helpful to people who aren't used to Eclipse so I've just added "my" way of doing it on the wiki page.

How did you get the code - are you using the zip file on the wiki page or have you checked out of CVS? If you checked it out of CVS using Eclipse it should be set up right but if you are using the zip file you might want to check how you have imported the code into Eclipse. I've added this to the wiki page:

"Copy all the project folders that you got out of CVS / from the zip file to your Eclipse workspace directory. Then go into Eclipse and for each project folder, do File, New Project, select Java Project, click Next and enter the name of the project folder. Leave the options as given in this screenshot. Then click Finished. This should create the new project in Eclipse."

I've also added a couple of screenshots so you know what to expect Eclipse to look like.

Then I usually go into the lams_build project, select the build.xml file, right mouse click to get the popup menu and select "Run As", "Ant Build...". Its about 3/4 the way down the menu. Make sure you pick "Ant Build...", not "Ant Build".

A dialog box will appear. Uncheck the usage entry (this is the default) and turn on
* "rebuild-db"
* "assemble-ear"
* "deploy-ear"
* "deploy-tools"
* and "copyfiles".

Then click Run.

We used to have a refresh half way through but Eclipse 3.2 seems to cope better and not need the refresh.

It should go off and run all the build scripts without asking you for anything.

You can redo the build (starting from rebuild-db) as many times as you like. As long as the LAMS database is there, you don't need to keep clearing it out - rebuild-db will do it for you. But rebuild-db needs the database to exist to start with. Sometimes if rebuild-db fails it deletes the database and then you do need to go back and redo the db configuration step.

I'm not sure why you would be getting Eclipse asking you build config. If these instructions are different to what you have tried, then try this. If it still asks you about the config, can you get the exact text and post it? If I see the message it may ring a bell. We did switch over from Eclipse 3.1 to 3.2 lately so maybe there is a configuration file we have missed checking in.

If this build fails, then copy as much of the console as you can and attach it to a posting. If it builds but JBOSS still won't start then post the logs - I'll want server.log, lams.log and hibernatelams.log.

As for the rough zipped ear - if only. The problem is the number of jboss configuration files. We'd have to write another how to on what to customise, where to put them, etc. I used to do it that way onto a Linux box and it was sooo easy to forget something.

I'm expecting the proper installer for 2.0 should be written sometime in September - at that point it should all be a lot easier.

Fiona

Posted by Fiona Malikoff

Reply to first post on this page
Back to LAMS for Tech-Heads - General Forum