Showing posts with label roo. Show all posts
Showing posts with label roo. Show all posts

Tuesday, 12 January 2010

Webscripts need refreshing!

Gotcha #1 for today is that when working with webscripts. They need refreshed . For those used to working in php and seeing results immediately, it's a bit of a trial having to remember. However it will save you a lot of pain and woe if you get into your head that after every change to your webscript, refresh it before debugging any further.You can do this either by restarting the server, or going to

http://localhost:8080//console and refreshing from there.

NOTE: If working on Alfresco webscripts within the alfresco system, it should be

http://localhost:8080/alfresco/service/

And refresh from there.

Monday, 11 January 2010

SpringSource Tool Suite

Getting a bit tired of the whole command line thing. Makes it slightly easier, but still a bit hard to follow in places.

Time to move on to the SpringSource Tool Suite and see how the roo/surf plugins/addons in relation to making things easier.

The first, almost immediate difference I notice is that deploying (and more importantly REdeploying) out to the tomcat server is done with a minimum of hassle. Made a quick change to the footer, redeployed, and Bob's your Auntie May, it worked. No errors generated, no confusing messages, it just worked!

The next stage is to see how much more quickly I can go through the tutorials for Chapter 2 before I come across some other problems.

Problems with deployment

Well it would seem that although the initial deployment takes place without any problems, deploying any changes is not as straight forward. Here's what I'm encountering...
  1. Changes made to some of the webscripts. Nothing exiting at the moment, just changing the footer text of the basic template.
  2. Trying to do mvn tomcat:deploy results in a build error saying that it "Cannot invoke Tomcat manager: FAIL - Application already exists at path /community.
  3. Ok, perhaps that's a valid message I said to myself. Standard logic might suggest that it cant deploy something that's already there. So, after a bit of poking around I try mvn tomcat:redeploy
  4. Uh oh, although I now get a build successful message, when trying to view the site I get a 404 message.
  5. Not only that, when I go back in to view the file on which I did the original edit, it has reverted back to its pre-edit state.
Bit stumped at the moment, the investigation continues.

Sunday, 10 January 2010

Installing

Well, it wasn't really as smooth as I had thought. I'm not sure how much of it was me "thinking" I was reading the instructions correctly, and how much of it was little bugs here and there.

In saying that, the docs at http://www.springsurf.org/sites/1.0.0.M2/spring-surf-devtools/spring-surf-roo-addon/reference/html/intro.html are really good and a credit to the developers that a framework that is still in its infancy is coming with such detailed docs. Some points to note are:

  1. The main problem I had was in the deployment to the tomcat server. When typing in mvn tomcat:deploy it produced a whole load of what I thought were errors and attempts to download various pieces of software from repos located around the net. The main issue was with me not having setting up the tomcat config as per the docs. I didn't realise that maven was using that user to deploy the application (although...thinking about it...it does make sense!)
  2. I had some other issues when it came to deployment and maven trying to reference the old roo plugin and not the updated one. Uninstalling the plugin from the roo console using:

    addon uninstall *surf*.zip

    and then reinstalling the plugin with

    addon install --url file:/path/to/file

    Also helpful to do a clean using

    mvn clean

  3. When trying to access the extra surf commands, it's important to realise that you wont actually be able to do this until the application has successfully deployed. Once that has happened it should come up fine.
  4. Other problems encountered were simply me not reading the docs closely enough. Serves me right for trying to do this at a weekend.