Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with multiple grails app on glassfish.

 
Dave Brown
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...

 
Dave Brown
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post your grails-app/conf/DataSource.groovy file?

How are you deploying the application?
 
Dave Brown
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic