jason wrote:Seems a strange error to me. Are you sure it is characters like 'ö' and 'ä' which is causing the problem? It would be interesting to see the where in log4j source code the problem is (from the stack trace).
Here's the stack trace:
- Code: Select all
log4j:ERROR Could not parse url [jar:file:/C:/työryhmä/myApp/modules/module.jar!/log4j.xml].
com.sun.org.apache.xerces.internal.util.URI$MalformedURIException: Opaque part contains invalid character: ö
at com.sun.org.apache.xerces.internal.util.URI.initializePath(URI.java:1137)
at com.sun.org.apache.xerces.internal.util.URI.initialize(URI.java:581)
at com.sun.org.apache.xerces.internal.util.URI.<init>(URI.java:334)
at com.sun.org.apache.xerces.internal.util.URI.<init>(URI.java:297)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.expandSystemIdStrictOff1(XMLEntityManager.java:2145)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.expandSystemId(XMLEntityManager.java:1977)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntityAsPerStax(XMLEntityManager.java:948)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1151)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1049)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:962)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:237)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:300)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:177)
at org.apache.log4j.xml.DOMConfigurator$2.parse(DOMConfigurator.java:690)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:789)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:696)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:471)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:125)
at org.apache.log4j.Logger.getLogger(Logger.java:118)
at org.docx4j.jaxb.Context.<clinit>(Context.java:47)
I think you are likely to get more responses if you post this question on StackOverflow using tags such as log4j, character-encoding, docx4j, and perhaps netbeans-7 or netbeans-platform
You can prevent docx4j from configuring log4j automatically, by setting the relevsant property in docx4j.properties file
Do you mean setting the docx4j.Log4j.Configurator.disabled to "true"? Before my first post I tried that too and it didn't work. I must have done something wrong back then because now it works, don't know why.. Oh well, it doesn't matter since I got it working now! Thanks for the help!