https://issues.apache.org/bugzilla/show_bug.cgi?id=51849

             Bug #: 51849
           Summary: LogManager and ipv6 address
           Product: Log4j
           Version: 1.2
          Platform: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: Configurator
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


I am hitting an exception while trying to load the log4j configuration from a
URL whose base is an ipv6 address. 

I debugged this issue for a while but could not find a workaround.
I am confused now (where to file a bug - java or apache) because even though
the code flow is started from LogManager the real issue could be in
com.sun.org.apache.xerces.internal.impl.XMLEntityManager::private static String
expandSystemIdStrictOff(String systemId, String baseSystemId).


import org.apache.log4j.LogManager;
import org.apache.log4j.spi.DefaultRepositorySelector;

public class TestLog4j
{
    public static void main(String[] aInCommandLineParameters)
    {
        LogManager.setRepositorySelector(new
DefaultRepositorySelector(LogManager.getLoggerRepository()), "test");
        LogManager.resetConfiguration();
    }
}

/**
    javac -classpath
C:\Projects\trunk\perfocarta\centrale\libs\log4j\log4j-1.2.15.jar
C:\Users\varbalak\Desktop\TestLog4j.java
    java  -classpath
C:\Projects\trunk\perfocarta\centrale\libs\log4j\log4j-1.2.15.jar;C:\Users\varbalak\Desktop
-Dlog4j.configuration="https://[fe80::92]:443/ucsm/log4j.xml";
C:\Users\varbalak\Desktop\TestLog4j


    log4j:ERROR Could not parse url [https://[fe80::92]:443/ucsm/log4j.xml].
    java.net.MalformedURLException: For input string: ":92%5D:443"
            at java.net.URL.<init>(URL.java:601)
            at java.net.URL.<init>(URL.java:464)
            at java.net.URL.<init>(URL.java:413)
            at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)
            at
com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
            at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
            at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
            at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
            at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:235)
            at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
            at
javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:180)
            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 TestLog4j.main(TestLog4j.java:8)
    Press any key to continue . . .

*/

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to