This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Groovy and the fly likes Problem with multiple grails app on glassfish. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Problem with multiple grails app on glassfish." Watch "Problem with multiple grails app on glassfish." New topic
Author

Problem with multiple grails app on glassfish.

Dave Brown
Ranch Hand

Joined: Mar 08, 2005
Posts: 301
Hi all,

I'm curious whether anyone writing Grails app's have had issues when deploying multiple applications to a Glassfish V2 server.

I have a rather strange issue after deploying my second application to the server when it actually is rendering the pages from a different application... Strange? Very..

The applications are pretty similar in functionality but have different controllers/domain classes etc and of course a different WAR and application name, so why when I go to Application B, its rendering Application A is beyond me...


Regards, Dave Brown
SCJP 6 - [url]http://www.dbws.net/[/url] - Check out Grails Forum
Dave Brown
Ranch Hand

Joined: Mar 08, 2005
Posts: 301
I have a feeling the problems maybe to do with the compiled grails core classes which are common to each application, eg. datasource, config, bootstrap..

If glassfish is caching datasource.class the all applications using it could be using the same class.... and therefor the same database which is what is happening...




Dave Brown wrote:Hi all,

I'm curious whether anyone writing Grails app's have had issues when deploying multiple applications to a Glassfish V2 server.

I have a rather strange issue after deploying my second application to the server when it actually is rendering the pages from a different application... Strange? Very..

The applications are pretty similar in functionality but have different controllers/domain classes etc and of course a different WAR and application name, so why when I go to Application B, its rendering Application A is beyond me...

Rj Salicco
Greenhorn

Joined: Apr 14, 2009
Posts: 17
Can you post your grails-app/conf/DataSource.groovy file?

How are you deploying the application?


-RJ
http://www.rjsalicco.com
Dave Brown
Ranch Hand

Joined: Mar 08, 2005
Posts: 301
I've just upgraded my glassfish version to v3-prelude and the problem seems no more. So it looks like it was specific to v2.

I was deploying just the standard way of creating a war, (no jars, prod) and using glassfish web console to upload and deploy.

I might make this the excuse I've been looking for to spend some time looking into the cloud hosts that are out there... :-)
Dave Brown
Ranch Hand

Joined: Mar 08, 2005
Posts: 301
I spoke too soon... the problems isn't to do with the version of glassfish, its to do with whether I use the --nojars option when creating the war.

What I'd done was move the required lib's from my apps web-inf/lib folder to the glassfish lib folder... so I don't have to upload 20mb everytime and avoid permgen problems but for whatever the reason this appears to be affect the whole system with my outlined problem..

So what i'll try now is using glassfish 3's update tool and use that to install grails librarys, and see if it makes any difference...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with multiple grails app on glassfish.
 
Similar Threads
Grails: A Quick Start Guide - Question
JAX-WS HTTP Binding
* Welcome David Heffelfinger
Lookup EJB on Different Application servers
Java EE 5 Development with NetBeans 6 - (Netbeans commands)