我正在尝试使用集中使用XML数据的库等。我已经尝试使用Maven Assembly将我的项目编译成一个uber-JAR,但是在运行并执行了一些操作之后我发现了以下错误。
org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: NamespaceURI cannot be null
org.codehaus.xfire.fault.XFireFault: NamespaceURI cannot be null
at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
at org.codehaus.xfire.util.dom.DOMSerializer.writeMessage(DOMSerializer.java:47)
at org.codehaus.xfire.transport.http.HttpChannel.writeWithoutAttachments(HttpChannel.java:56)
at org.codehaus.xfire.transport.http.CommonsHttpMessageSender.getByteArrayRequestEntity(CommonsHttpMessageSender.java:422)
at org.codehaus.xfire.transport.http.CommonsHttpMessageSender.send(CommonsHttpMessageSender.java:360)
at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:123)
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
at org.codehaus.xfire.client.Client.invoke(Client.java:336)
at eu.unicore.security.xfireutil.client.ReliableProxy.handleRequest(ReliableProxy.java:122)
at eu.unicore.security.xfireutil.client.ReliableProxy.doInvoke(ReliableProxy.java:102)
at eu.unicore.security.xfireutil.client.ReliableProxy.invoke(ReliableProxy.java:69)
at com.sun.proxy.$Proxy71.CreateTSR(Unknown Source)
at de.fzj.unicore.uas.client.TSFClient.createTSS(TSFClient.java:44)
at de.fzj.unicore.uas.client.TSFClient.createTSS(TSFClient.java:67)
at com.mjolnirr.caeserver.client.ClientImpl.createTSSClient(ClientImpl.java:240)
at com.mjolnirr.caeserver.client.ClientImpl.createJob(ClientImpl.java:245)
at com.mjolnirr.caeserver.client.ClientImpl.run(ClientImpl.java:95)
at com.mjolnirr.caeserver.task.description.nodes.ActiveNode.exec(ActiveNode.java:62)
at com.mjolnirr.caeserver.executor.WorkflowBranchImpl$1.run(WorkflowBranchImpl.java:51)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: javax.xml.stream.XMLStreamException: NamespaceURI cannot be null
at com.sun.xml.stream.writers.XMLStreamWriterImpl.writeAttribute(XMLStreamWriterImpl.java:620)
at org.codehaus.xfire.util.STAXUtils.writeElement(STAXUtils.java:366)
at org.codehaus.xfire.util.STAXUtils.writeNode(STAXUtils.java:391)
at org.codehaus.xfire.util.STAXUtils.writeElement(STAXUtils.java:380)
at org.codehaus.xfire.util.STAXUtils.writeNode(STAXUtils.java:391)
at org.codehaus.xfire.util.STAXUtils.writeElement(STAXUtils.java:380)
at org.codehaus.xfire.util.STAXUtils.writeNode(STAXUtils.java:391)
at org.codehaus.xfire.util.STAXUtils.writeElement(STAXUtils.java:380)
at org.codehaus.xfire.util.STAXUtils.writeDocument(STAXUtils.java:285)
at org.codehaus.xfire.util.dom.DOMSerializer.writeMessage(DOMSerializer.java:40)
... 28 more
我已经尝试使用Shade进行汇编,但是错误的清单签名却出现了奇怪的错误。有人面对吗?
答案 0 :(得分:1)
解决了将org.codehaus.woodstox:wstx-api:3.2.9
包含在jar中并运行它:
java -jar -Djavax.xml.stream.XMLEventFactory=com.ctc.wstx.stax.WstxEventFactory -Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory -Djavax.xml.stream.XMLOutputFactory=com.ctc.wstx.stax.WstxOutputFactory caeserver/target/caeserver-0.1-jar-with-dependencies.jar