Grails and web service development with Metro - little update

I've seen several comments where people had issues using the Metro plugin for Grails framework. I fixed the problems and updated installation instructions a bit, so if you use the latest plugin release (1.0.1), you shall be fine. I also updated the plugin to comply with Grails 1.0.3. Check it out at:
https://jax-ws-commons.dev.java.net/grails/

Comments:

Martin,
I gave the Metro Grails plugin a try, it worked as suggested on development but when I deployed the Grails app (grails war) to JBoss 4.2.2.GA I got a FileNotFoundException (grails-app/conf/spring/resources.xml). The WAR did not have this resources.xml file... I manually copied into the war but I still had the issue. Any hints on how to resolve this? Thanks

Posted by Juixe on July 16, 2008 at 06:32 PM CEST #

hello juixe,
i've simillar issue in i try in tomcat.
Have you some class conflict ?
Do you make modifications on the web.xml ?

hints to resolve are welcome.
thanks

Posted by djebar on July 29, 2008 at 03:33 AM CEST #

As soon as I have a controller (an empty FooController class in grails-app/controller/FooController.groovy is sufficient), the SOAP server breaks: "Couldn't create SOAP message due to exception: XML reader error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]"

Posted by Parsifal on July 29, 2008 at 07:41 AM CEST #

The solution for my problem is to add a contraint to UrlMappings.groovy:

class UrlMappings {
static mappings = {
"/$controller/$action?/$id?"
{
constraints {
controller(matches:/.\*[\^(services)].\*/)
}
}
"500"(view: '/error')
}
}

Posted by Parsifal on July 29, 2008 at 08:07 AM CEST #

Where can I find the source code for the stuff in grailsservlet-1.0-SNAPSHOT.jar?

Posted by Parsifal on July 29, 2008 at 09:32 AM CEST #

Hi,
thanks for looking at this. The sources are part of the jax-ws commons project:
https://jax-ws-commons.dev.java.net/grails/sources.html
Let me know if you have problems finding it.

Posted by MartinG on July 29, 2008 at 09:37 AM CEST #

Juixe, the FileNotFoundException you get is only the tip of the iceberg. There are more severe problems when trying to use the metro plugin in a real project: it tries to write class files into a (usually non-existing) subdirectory of the current user's home directory. Does the LocalService account of Windows have a home directory?

Posted by Parsifal on July 30, 2008 at 04:19 AM CEST #

Hi guys,
thanks for your comments and for trying this out, but since this is just a "Saturday" project of mine, would you please file the issues you found with it to issuezilla at jax-ws-commons project?

https://jax-ws-commons.dev.java.net/servlets/ProjectIssues

So that it's not lost and I can look at it and fix it when I have time.

Posted by MartinG on July 30, 2008 at 04:26 AM CEST #

Re. the FileNotFoundException (grails-app/conf/spring/resources.xml), we found that if we remove the MetroPlugin.groovy file (or rename it) before generating the WAR and just use a static resources.xml we can deploy it into a proper container (in our case OC4J). We just have this rename as part of our ANT build script for the app.

Other than that we haven't had any issues with it a all - works great.

Posted by Cliftonc on August 09, 2008 at 04:52 AM CEST #

Post a Comment:
Comments are closed for this entry.
About

The views expressed on this [blog; Web site] are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today
Bookmarks