java.net.MalformedURLException: unknown protocol: c

MuleSoft JIRA | Esteban Wasinger | 1 year ago
  1. 0

    *TestsLogConfigurationHelper does not configure correctly the Log4j config file in Windows* *Stack trace:* {code}ERROR Invalid URL C:/workspace/modus/mule-connector-xxx/target/test-classes/log4j2.xml java.net.MalformedURLException: unknown protocol: c at java.net.URL.<init>(URL.java:592) at java.net.URL.<init>(URL.java:482) at java.net.URL.<init>(URL.java:431) at java.net.URI.toURL(URI.java:1096) at org.apache.logging.log4j.core.config.ConfigurationFactory.getInputFromUri(ConfigurationFactory.java:296) at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:395) at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:254) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:419) at org.mule.util.TestsLogConfigurationHelper.forceConfigFile(TestsLogConfigurationHelper.java:107) at org.mule.util.TestsLogConfigurationHelper.configureLoggingForTest(TestsLogConfigurationHelper.java:54) at org.mule.tck.junit4.AbstractMuleContextTestCase.setUpMuleContext(AbstractMuleContextTestCase.java:138){code} *Cause:* {code}String logConfigPath = logConfigFile != null && logConfigFile.isFile() ? logConfigFile.getAbsolutePath() : NULL_CONFIG_FILE;{code} Getting the absolute path, will this work in Linux and Mac, but in Windows the Absolute Path will look like {code}C:\Users\estebanwasinger\Documents\slack-connector\target\classes\log4j2.xml{code} instead of {code}file:/C:/Users/estebanwasinger/Documents/slack-connector/target/classes/log4j2.xml{code} breaking the loading of the log4j config file.

    MuleSoft JIRA | 1 year ago | Damian Sima
    java.net.MalformedURLException: unknown protocol: c
  2. 0

    *TestsLogConfigurationHelper does not configure correctly the Log4j config file in Windows* *Stack trace:* {code}ERROR Invalid URL C:/workspace/modus/mule-connector-xxx/target/test-classes/log4j2.xml java.net.MalformedURLException: unknown protocol: c at java.net.URL.<init>(URL.java:592) at java.net.URL.<init>(URL.java:482) at java.net.URL.<init>(URL.java:431) at java.net.URI.toURL(URI.java:1096) at org.apache.logging.log4j.core.config.ConfigurationFactory.getInputFromUri(ConfigurationFactory.java:296) at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:395) at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:254) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:419) at org.mule.util.TestsLogConfigurationHelper.forceConfigFile(TestsLogConfigurationHelper.java:107) at org.mule.util.TestsLogConfigurationHelper.configureLoggingForTest(TestsLogConfigurationHelper.java:54) at org.mule.tck.junit4.AbstractMuleContextTestCase.setUpMuleContext(AbstractMuleContextTestCase.java:138){code} *Cause:* {code}String logConfigPath = logConfigFile != null && logConfigFile.isFile() ? logConfigFile.getAbsolutePath() : NULL_CONFIG_FILE;{code} Getting the absolute path, will this work in Linux and Mac, but in Windows the Absolute Path will look like {code}C:\Users\estebanwasinger\Documents\slack-connector\target\classes\log4j2.xml{code} instead of {code}file:/C:/Users/estebanwasinger/Documents/slack-connector/target/classes/log4j2.xml{code} breaking the loading of the log4j config file.

    MuleSoft JIRA | 1 year ago | Esteban Wasinger
    java.net.MalformedURLException: unknown protocol: c
  3. 0

    *TestsLogConfigurationHelper does not configure correctly the Log4j config file in Windows* *Stack trace:* {code}ERROR Invalid URL C:/workspace/modus/mule-connector-xxx/target/test-classes/log4j2.xml java.net.MalformedURLException: unknown protocol: c at java.net.URL.<init>(URL.java:592) at java.net.URL.<init>(URL.java:482) at java.net.URL.<init>(URL.java:431) at java.net.URI.toURL(URI.java:1096) at org.apache.logging.log4j.core.config.ConfigurationFactory.getInputFromUri(ConfigurationFactory.java:296) at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:395) at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:254) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:419) at org.mule.util.TestsLogConfigurationHelper.forceConfigFile(TestsLogConfigurationHelper.java:107) at org.mule.util.TestsLogConfigurationHelper.configureLoggingForTest(TestsLogConfigurationHelper.java:54) at org.mule.tck.junit4.AbstractMuleContextTestCase.setUpMuleContext(AbstractMuleContextTestCase.java:138){code} *Cause:* {code}String logConfigPath = logConfigFile != null && logConfigFile.isFile() ? logConfigFile.getAbsolutePath() : NULL_CONFIG_FILE;{code} Getting the absolute path, will this work in Linux and Mac, but in Windows the Absolute Path will look like {code}C:\Users\estebanwasinger\Documents\slack-connector\target\classes\log4j2.xml{code} instead of {code}file:/C:/Users/estebanwasinger/Documents/slack-connector/target/classes/log4j2.xml{code} breaking the loading of the log4j config file.

    MuleSoft JIRA | 1 year ago | Esteban Wasinger
    java.net.MalformedURLException: unknown protocol: c
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Issue in Munit test case. - MuleSoft

    mulesoft.com | 8 months ago
    java.net.MalformedURLException: unknown protocol: c
  6. 0

    Issue in Munit test case. - MuleSoft

    mulesoft.com | 7 months ago
    java.net.MalformedURLException: unknown protocol: c

    2 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.net.MalformedURLException

      unknown protocol: c

      at java.net.URL.<init>()
    2. Java RT
      URI.toURL
      1. java.net.URL.<init>(URL.java:592)
      2. java.net.URL.<init>(URL.java:482)
      3. java.net.URL.<init>(URL.java:431)
      4. java.net.URI.toURL(URI.java:1096)
      4 frames
    3. Apache Log4j Core
      LoggerContext.reconfigure
      1. org.apache.logging.log4j.core.config.ConfigurationFactory.getInputFromUri(ConfigurationFactory.java:296)
      2. org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:395)
      3. org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:254)
      4. org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:419)
      4 frames
    4. Mule Core
      TestsLogConfigurationHelper.configureLoggingForTest
      1. org.mule.util.TestsLogConfigurationHelper.forceConfigFile(TestsLogConfigurationHelper.java:107)
      2. org.mule.util.TestsLogConfigurationHelper.configureLoggingForTest(TestsLogConfigurationHelper.java:54)
      2 frames