• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

File domain.xml suddenly got empty: Glassfish v2 stop start

 
Ranch Hand
Posts: 701
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was deploying a war file when a "PermGen outofmemory" occured in Glassfish admin web console.
Then, I tried to stop it by command line, but it didn't let me (an error message appeared). I had to make a "kill -9 PID".
When I tried to start over, it raised an error saying that "domain.xml" was not in the right format. Checking this file, I got very surprised it was totally empty!

So, I'd like to know if only restoring a backup file of "domain.xml" and replacing the empty one is the right thing to do, or not?

Why did this happen? The only different thing I remember I've done was that I let the web admin console open since the day before, and no session expired message occured when I used the page again, in the morning I've made the deployings...
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The risk you take with kill -9 is that you'll abort the target process without letting it finish. It seems plausible, however unlikely, that the doman.xml file might get updated while making changes through the admin console, and that by aborting the process, something went wrong.

It's completely OK to replace this file and restart the server. An empty file does nothing for you, and there's no documented state in which GlassFish wants domain.xml to be empty.

Prefer kill -15 to kill -9, or at least try it first. This signal gives your process the prerogative to flush files and finish threads gracefully before terminating.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic