javaweb-servicesmavencxfandromda

log4j:ERROR Could not parse url [file://.../mda/log4j.xml]


I am working on a project that uses maven, andromda 3.4, with CXF web services and Uml 1.4.

Everything works fine until I start working on web services. I have properly tagged the classed with Webservice stereotype and the packages with XmlSchema.

However when I run mvn install, I'm getting the following exception:

'wsgenjava:
     [echo] running wsdlvalidator for AndroMDA generated wsdl for service OrganisationService
     [java] log4j:ERROR Could not parse url [file://home/junior/Documents/business/jrsystems/devel/tsaditiro/main-app/mda/../mda/log4j.xml].
     [java] java.net.UnknownHostException: home
     [java]     at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
     [java]     at java.net.Socket.connect(Socket.java:579)
     [java]     at java.net.Socket.connect(Socket.java:528)
     [java]     at sun.net.ftp.impl.FtpClient.doConnect(FtpClient.java:958)
     [java]     at sun.net.ftp.impl.FtpClient.tryConnect(FtpClient.java:918)
     [java]     at sun.net.ftp.impl.FtpClient.connect(FtpClient.java:1013)
     [java]     at sun.net.ftp.impl.FtpClient.connect(FtpClient.java:999)
     [java]     at sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:294)
     [java]     at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:393)
     [java]     at org.apache.log4j.xml.DOMConfigurator$2.parse(DOMConfigurator.java:765)
     [java]     at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:871)
     [java]     at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:778)
     [java]     at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
     [java]     at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
     [java]     at org.apache.cxf.common.logging.Log4jLogger.<init>(Log4jLogger.java:76)
     [java]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     [java]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
     [java]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
     [java]     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
     [java]     at org.apache.cxf.common.logging.LogUtils.createLogger(LogUtils.java:273)
     [java]     at org.apache.cxf.common.logging.LogUtils.getLogger(LogUtils.java:166)
     [java]     at org.apache.cxf.common.logging.LogUtils.<clinit>(LogUtils.java:140)
     [java]     at org.apache.cxf.tools.common.toolspec.AbstractToolContainer.<clinit>(AbstractToolContainer.java:44)
     [java] log4j:WARN No appenders could be found for logger (org.apache.cxf.common.logging.LogUtils).
     [java] log4j:WARN Please initialize the log4j system properly.
     [java] log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.'

Does anybody understand what this problem is all about?


Solution

  • If the URL you have defined for the file is an absolute path in a Linux/Unix system then you will need to add an additional forward slash after the protocol.

    e.g.

    file://home/junior/Documents/business/jrsystems/devel/tsaditiro/main-app/mda/../mda/log4j.xml
    

    should be:

    file:///home/junior/Documents/business/jrsystems/devel/tsaditiro/main-app/mda/../mda/log4j.xml