Search code examples
javaspringlogginglog4jwildfly-8

log4j Could not parse url invalid character Ł


BACKGROUND: I've spent several hours tried to setup log4j together with Spring MVC on WildFly. The problem was that WildFly has its own logger and it conflicted with my own. Nevertheless I've got it almost working. I had to add jboss-deployment-structure.xml to my WEB-INF folder with this part inside deployment tags:

<exclude-subsystems>
    <subsystem name="logging" />
</exclude-subsystems>

now my logs (and more importantly System.out's) appears on the console. However during wildfly startup now I receive an error. It looks like it doesn't break anything in app but I want to get rid of it.

18:53:43,199 ERROR [stderr] (MSC service thread 1-1) log4j:ERROR Could not parse url [vfs:/C:/Users/Łukasz/wildfly-8.2.0.Final/standalone/deployments/edited.war/WEB-INF/classes/log4j.xml].
18:53:43,199 ERROR [stderr] (MSC service thread 1-1) com.sun.org.apache.xerces.internal.util.URI$MalformedURIException: Path contains invalid character: Ł
18:53:43,200 ERROR [stderr] (MSC service thread 1-1)    at com.sun.org.apache.xerces.internal.util.URI.initializePath(URI.java:1109)
18:53:43,201 ERROR [stderr] (MSC service thread 1-1)    at com.sun.org.apache.xerces.internal.util.URI.initialize(URI.java:582)
18:53:43,201 ERROR [stderr] (MSC service thread 1-1)    at com.sun.org.apache.xerces.internal.util.URI.<init>(URI.java:335)
18:53:43,201 ERROR [stderr] (MSC service thread 1-1)    at com.sun.org.apache.xerces.internal.util.URI.<init>(URI.java:298)
18:53:43,203 ERROR [stderr] (MSC service thread 1-1)    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.expandSystemIdStrictOff1(XMLEntityManager.java:2223)
18:53:43,204 ERROR [stderr] (MSC service thread 1-1)    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.expandSystemId(XMLEntityManager.java:2055)
18:53:43,205 ERROR [stderr] (MSC service thread 1-1)    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntityAsPerStax(XMLEntityManager.java:965)
18:53:43,207 ERROR [stderr] (MSC service thread 1-1)    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1154)
18:53:43,207 ERROR [stderr] (MSC service thread 1-1)    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1050)
18:53:43,208 ERROR [stderr] (MSC service thread 1-1)    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:964)
18:53:43,208 ERROR [stderr] (MSC service thread 1-1)    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
18:53:43,209 ERROR [stderr] (MSC service thread 1-1)    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
18:53:43,209 ERROR [stderr] (MSC service thread 1-1)    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
18:53:43,210 ERROR [stderr] (MSC service thread 1-1)    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
18:53:43,210 ERROR [stderr] (MSC service thread 1-1)    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
18:53:43,211 ERROR [stderr] (MSC service thread 1-1)    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
18:53:43,212 ERROR [stderr] (MSC service thread 1-1)    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:348)
18:53:43,214 ERROR [stderr] (MSC service thread 1-1)    at org.apache.log4j.xml.DOMConfigurator$2.parse(DOMConfigurator.java:769)
18:53:43,214 ERROR [stderr] (MSC service thread 1-1)    at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:871)
18:53:43,214 ERROR [stderr] (MSC service thread 1-1)    at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:778)
18:53:43,215 ERROR [stderr] (MSC service thread 1-1)    at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
18:53:43,215 ERROR [stderr] (MSC service thread 1-1)    at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
18:53:43,215 ERROR [stderr] (MSC service thread 1-1)    at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:64)
18:53:43,215 ERROR [stderr] (MSC service thread 1-1)    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:270)
18:53:43,215 ERROR [stderr] (MSC service thread 1-1)    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
18:53:43,216 ERROR [stderr] (MSC service thread 1-1)    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
18:53:43,216 ERROR [stderr] (MSC service thread 1-1)    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:272)
18:53:43,218 ERROR [stderr] (MSC service thread 1-1)    at org.springframework.web.filter.GenericFilterBean.<init>(GenericFilterBean.java:82)
18:53:43,224 ERROR [stderr] (MSC service thread 1-1)    at org.springframework.web.filter.DelegatingFilterProxy.<init>(DelegatingFilterProxy.java:159)
18:53:43,225 ERROR [stderr] (MSC service thread 1-1)    at org.springframework.web.filter.DelegatingFilterProxy.<init>(DelegatingFilterProxy.java:136)
18:53:43,225 ERROR [stderr] (MSC service thread 1-1)    at org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer.insertSpringSecurityFilterChain(AbstractSecurityWebApplicationInitializer.java:144)
18:53:43,226 ERROR [stderr] (MSC service thread 1-1)    at org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer.onStartup(AbstractSecurityWebApplicationInitializer.java:123)
18:53:43,227 ERROR [stderr] (MSC service thread 1-1)    at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175)
18:53:43,227 ERROR [stderr] (MSC service thread 1-1)    at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:182)
18:53:43,228 ERROR [stderr] (MSC service thread 1-1)    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)
18:53:43,228 ERROR [stderr] (MSC service thread 1-1)    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)
18:53:43,228 ERROR [stderr] (MSC service thread 1-1)    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
18:53:43,229 ERROR [stderr] (MSC service thread 1-1)    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
18:53:43,229 ERROR [stderr] (MSC service thread 1-1)    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
18:53:43,229 ERROR [stderr] (MSC service thread 1-1)    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
18:53:43,229 ERROR [stderr] (MSC service thread 1-1)    at java.lang.Thread.run(Thread.java:745)

The invalid character Ł is nothing special in polish locale. I use Windows 8.1 and the path is accessible by any program. How can I fix this?


Solution

  • I had to move Wildfly installation folder to another destination which doesn't contain polish characters.

    It's a bug in JDK, already reported. For more information look here.

    edit: removed the link because the website does no longer exist.