gpt4 book ai didi

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

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:44:12 24 4
gpt4 key购买 nike

我正在开发一个使用 Maven、andromda 3.4、CXF Web 服务和 Uml 1.4 的项目。

在我开始处理 Web 服务之前一切正常。我已经用 Webservice 构造型正确标记了类,用 XmlSchema 标记了包。

但是,当我运行 mvn install 时,出现以下异常:

'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.'

有人知道这个问题是怎么回事吗?

最佳答案

如果您为文件定义的 URL 是 Linux/Unix 系统中的绝对路径,那么您需要在协议(protocol)后添加一个额外的正斜杠。

例如

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

应该是:

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

关于java - log4j :ERROR Could not parse url [file://. ../mda/log4j.xml],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29646205/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com