• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with multiple grails app on glassfish.

 
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...

 
Greenhorn
Posts: 20
Spring Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
That new kid is a freak. Show him this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic