Use a shell script to run a program that 1) generates the jar you want to launch HBase with, containing the versions of hbase-site, hdfs-site, and core-site that you want to use, 2) shutsdown the JVM, and 3) restarts the JVM using the jar just created. Your question is more of a Java class loading question than an XML question.
If you alter a Jar that is on the classpath while the JVM is running, the next time the JVM tries to load a resource from the jar , the JVM might crash or cause your app to go into an infinite loop. Furthermore, Windows will lock the jars your app is using at the OS level, so keep that in mind if you are trying to do this on Windows. It is possible to get around this by writing a custom class loader -- as is done in application servers such as Tomcat that allows for jar reloading -- but I'm guessing that is more than you want to do for this project. Also, there are security concerns to your approach that you need to consider relating to the possibility the server delivering your config files has been spoofed.
... View more
I think the error is a bash error rather than an XML error. Check the command line you are using to load the file for syntax errors, particularly misplaced <, >, or | characters. If you still think it is an XML problem and you are sure the first five characters in the file are '<?xml', then you can consider these XML oddities:
You have standalone="yes", which is incorrect, but should be ignored by the parser. The standalone document declaration is only considered if you have a <!DOCTYPE... defined (which you don't) and it should only be standalone="yes" if the DTD has information that could change your document such as entity declarations or required attributes. You have an empty value (<value/>) for the property with a name of "hive.metastore.uris"
... View more