在调用我正在实现的网络服务时遇到此异常:
10:37:52,908 SEVERE [javax.enterprise.resource.webservices.jaxws.servlet.http] (http-/10.32.160.201:8081-1) caught throwable: java.lang.IllegalAccessError: com/sun/xml/bind/v2/runtime/reflect/opt/Const
at my.package.service.jaxws.MyWsType$JaxbAccessorF_mywstypefield.set(FieldAccessor_Integer.java:59)
at ...
我用 SoapUI 调用它。
最佳答案
我使用的请求发送了一个“?”作为该字段的值:
<MyWsType>
<mywstypefield>?<mywstypefield>
...
而不是提供信息丰富的“?”不是有效值'或至少是 NumberFormatException,我收到了 IllegalAccessError。 所以我在这里注册这个问题和答案,希望对某人有帮助。
关于java - 非法访问错误: com/sun/xml/bind/v2/runtime/reflect/opt/Const,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47435197/