While changing the JMS setting in Glassfish V2 from embedded to local, the whole box (XP PRO) crashed with a nice screen showing the color of the sky. After restarting Windows, Glassfish complains..
Starting Domain domain1, please wait.
Log redirected to E:\Program Files\glassfish-v2ur2\domains\domain1\logs\server.log.
Error refreshing ConfigContext:E:\Program Files\glassfish-v2ur2\domains\domain1\config\domain.xml
cause: Failed to create the XML-DOM Document. Check your XML to make sure it is correct.
Content is not allowed in prolog.
Error refreshing ConfigContext:E:\Program Files\glassfish-v2ur2\domains\domain1\config\domain.xml
cause: Failed to create the XML-DOM Document. Check your XML to make sure it is correct.
Content is not allowed in prolog.
It seems the crash (which I not suspect to be caused by Glassfish) corrupted the domain.xml settings file which normally show something like
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE domain PUBLIC “-//Sun Microsystems Inc.//DTD Application Server 9.1 Domain//EN” “http://www.sun.com/software/appserver/dtds/sun-domain_1_3.dtd”>
<!– Generated from default-domain.xml.template –>
<!– Avoid manual edits of this file. Run “asadmin verify-domain-xml” otherwise.–>
<domain application-root=”${com.sun.aas.instanceRoot}/applications” log-root=”${com.sun.aas.instanceRoot}/logs”>
<applications>
<j2ee-application availability-enabled=”false” directory-deplo…
turned into some 30kb rubbish.
Trying to asadamin verify-domain-xml obviously shows the same result.
A asadmin restore-domain I cant do because I never asadmin backup-domain before.
Either you re-install glassfish or just copy a domain.xml from a similar (!) installation. It worked for me since only very few applications were running on the other box which I took the file from. Replacing the binary rubbish and Glassfish started again.
Conclusion: Make backups of your application server, even dev box. It cost me 1 hour to get it running again without backup.
Correction 03.01.2009: Copying the domain.xml does not work. I try to make changes in the settings with the admin console and get strange error messages. I still ended up re-installing Glassfish.
Note: Glassfish, if installed together with Netbeans, has a separate de-installer, so you dont need to de-install everything !