Servicemix: Could not parse settings maven_path/settings.xml under Windows XP

Today I encountered problem with servicemix

Could not parse settings [file:/C:/Documents and Settings/Bartek/.m2/settings.xml]

A quick look at karaf.log revealed the problem

Caused by: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 4-byte UTF-8 sequence.

So the problem is with BOM (byte order mark) in settings.xml file. Many Windows editors add it at start of an utf encoded files. You should save settings.xml as ordinary utf8 file without BOM.

Problem solved.

You May Also Like