Hi! Today I had a problem with starting my project in JavaEE on Glassfish 3.1. It was long fight to made it work. But I lost the fight ( but not the war ) and made new instance of Glassfish server. The error i always get when starting serwer was:
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
Problem was with file: glassfish3/glassfish/domains/domain1/config/domain.xml I think my IDE change encondig of this file from UTF-8 to ASCII (I use IntelliJ and Netbeans). After some time I decide to install a fresh instance of Glassfish server. After that my application deploy successful. So i ask one question:
What to do, to don’t get same problem again ?
In Glassfish server there is couple of useful command, that can help you backup you server domain:
I don’t like to write again same stuff, so You can read more about this commands how to use here:
GlassFish 3.1: Backup and recovery commands have been restored
In production environment good habits is to made that backups more offen. GlassFish command can help Us with that. More about this we can read in : GlassFish 3.1: Automatic Domain Backup
I hope this post was helpful for You. Maybe next posts will be more about JavaEE.