NullPointerException jaxb.Utils.getFieldXJTA(Utils.java:269)(NullPointerException jaxb.Utils.getFiel

编程入门 行业动态 更新时间:2024-10-24 20:14:07
NullPointerException jaxb.Utils.getFieldXJTA(Utils.java:269)(NullPointerException jaxb.Utils.getFieldXJTA(Utils.java:269))

错误:

INFO [org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean] (http-0.0.0.0-8080-8) Creating Service {http://schemas.microsoft.com/sharepoint/soap/}CopySoapService from class com.microsoft.schemas.sharepoint.soap.CopySoap java.lang.NullPointerException at org.apache.cxf.jaxb.Utils.getFieldXJTA(Utils.java:269) at org.apache.cxf.jaxb.JAXBContextInitializer.walkReferences(JAXBContextInitializer.java:375) at org.apache.cxf.jaxb.JAXBContextInitializer.addClass(JAXBContextInitializer.java:347) at org.apache.cxf.jaxb.JAXBContextInitializer.begin(JAXBContextInitializer.java:184) at org.apache.cxf.service.ServiceModelVisitor.visitOperation(ServiceModelVisitor.java:97) at org.apache.cxf.service.ServiceModelVisitor.walk(ServiceModelVisitor.java:74)

信息:在Windows Server 2008上运行Adobe LiveCycle ES4 SP1的Jboss

谷歌搜索导致没有任何帮助解决这个错误。 该代码在IDE中完美工作。 在部署为使用在Jboss上运行的LiveCycle的自定义组件时发生此错误。

相关的问答让我意识到了这一点:

SharePoint 2010 Web服务上的Java JBoss 401错误

Error:

INFO [org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean] (http-0.0.0.0-8080-8) Creating Service {http://schemas.microsoft.com/sharepoint/soap/}CopySoapService from class com.microsoft.schemas.sharepoint.soap.CopySoap java.lang.NullPointerException at org.apache.cxf.jaxb.Utils.getFieldXJTA(Utils.java:269) at org.apache.cxf.jaxb.JAXBContextInitializer.walkReferences(JAXBContextInitializer.java:375) at org.apache.cxf.jaxb.JAXBContextInitializer.addClass(JAXBContextInitializer.java:347) at org.apache.cxf.jaxb.JAXBContextInitializer.begin(JAXBContextInitializer.java:184) at org.apache.cxf.service.ServiceModelVisitor.visitOperation(ServiceModelVisitor.java:97) at org.apache.cxf.service.ServiceModelVisitor.walk(ServiceModelVisitor.java:74)

Info: Jboss running Adobe LiveCycle ES4 SP1 on Windows Server 2008

Googling resulted in nothing helpful to resolve this error. The code works perfectly within in the IDE. This error occurs when deployed as a Custom Component withing LiveCycle that is running on Jboss.

Related Q/A that got me to this point:

Java JBoss 401 Error on SharePoint 2010 Web Service

最满意答案

我遇到了同样的问题,使用自定义ClassLoader,原因似乎是缺少为类定义的“包”。 我纠正了为加载类定义包的ClassLoader实现,并且都开始为我正常工作。

简而言之,NullPointerException是通过调用f.getDeclaringClass().getPackage().getAnnotation(XmlJavaTypeAdapters.class); 。 在我的情况下, f.getDeclaringClass().getPackage()返回null。

我不知道这是否会帮助其他人,但我在我的特殊情况下工作,我决定分享这个。

我忘了发布源参考:

http://grepcode.com/file/repo1.maven.org/maven2/org.apache.cxf/cxf-rt-databinding-jaxb/3.1.1/org/apache/cxf/jaxb/Utils.java#269

I had the same problem, working with custom ClassLoader and the reason appeared to be the lack of a "Package" defined for classes. I corrected the ClassLoader implementation defining packages for loaded classes and all started to work fine for me.

In a few words, the NullPointerException was generated by the call to f.getDeclaringClass().getPackage().getAnnotation(XmlJavaTypeAdapters.class);. In my case f.getDeclaringClass().getPackage() returned null.

I don't know if this will help someone else, but I got it working in my very special case and I decided to share this.

I forgot to post a source reference:

http://grepcode.com/file/repo1.maven.org/maven2/org.apache.cxf/cxf-rt-databinding-jaxb/3.1.1/org/apache/cxf/jaxb/Utils.java#269

更多推荐

本文发布于:2023-08-05 06:27:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1430190.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Utils   jaxb   NullPointerException   java   getFieldXJTA

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!