Bistro!
Alexis Moussine-Pouchkine's Weblog
public enum Topic { Java, GlassFish, Tools, Sun, InFrenchInZeText, SDPY }

20070831 vendredi août 31, 2007

GlassFish tip: Broken or Corrupted domain.xml

domain.xml (located in GLASSFISH_INSTALL/domain/DOMAIN_NAME/config) is a key configuration file in GlassFish and it should never be edited by hand. So now that I've said this, I'd be lying if I said I never did this myself. And yes I've had times when my config file was corrupted which would prevent GlassFish from starting. If you end up with a corrupted domain.xml file *without* editing it by hand (never happened to me), you have one thing to do: file a bug with steps to reproduce.

If for some reason domain.xml is indeed corrupted (malformed XML or not compliant to the associated DTD), here are a few things you can do before or after the corruption:

• run the following command to verify the correctness of the file :
%asadamin verify-domain-xml

• restore the entire domain :
%asadmin restore-domain
...if you had previously backed it up :
asadmin backup-domain

• if you're happy losing all domain configuration (deployed applications, JDBC resources, JVM options, ...) or desperately want to get back to a working domain, you can create a new one :
%asadmin create-domain

...or recreate default domain1 by first deleting it :
%asadmin delete-domain domain1
and running the setup script again from the root directory :
ant -f setup.xml

• You can also try to fix the content of this config file with a smart XML editor providing code completion, color syntaxing and well-formeness verification based on its DTD. If you're using NetBeans, go to "DTDs and XML Schema Catalogs".

( août 31 2007, 10:16:00 AM CEST ) Permalink Comments [2]


GlassFish Podcast
Get GlassFish V3
Support GlassFish Enterprise

Today's Page Hits: 1691




bea conference glassfish groovy ips java javaee javafx javaone javazone jug mysql netbeans openesb openoffice opensource paris performance pkg podcast presentation sdpy spring sun swing techdays tips updatecenter v3 webservices
Links