CXF web service client: “Cannot create a secure XMLInputFactory”

前端 未结 17 1506
礼貌的吻别
礼貌的吻别 2020-12-01 09:31

I am wrote and deployed a CXF web service into a Tomcat server using the instructions here. The web service deploys fine as I can see the WSDL file in a web browser.

<
相关标签:
17条回答
  • 2020-12-01 10:05

    There was not an answer here that describes the root cause of this error message for my issue. We had transitive dependencies on both a new version woodstox-core-asl-4.2.0.jar and and old wstx-asl-3.2.1.jar

    Excluding the old version from our build did the trick.

    If you dig into the bowels of the old version, you'll find that it fails with an exception that ends up getting wrapped in another exception with this generic message that is not very informative.

    0 讨论(0)
  • 2020-12-01 10:06

    I had this problem on weblogic and fixed the problem by adding this to my weblogic-application.xml

    <prefer-application-packages>
           <package-name>com.ctc.wstx.*</package-name>
    </prefer-application-packages>
    
    0 讨论(0)
  • 2020-12-01 10:07

    I had this problem on weblogic, Application get Deployed Successfully but when i fired the soap-request then i got this fault : Cannot create a secure XMLInputFactory.

    fixed the problem by adding this package to weblogic-application.xml

    com.ctc.wstx.*

    0 讨论(0)
  • 2020-12-01 10:10

    Had this problem when upgrading from CXF 2.3.x to 2.7.x

    Added stax2-api and woodstox-core-asl jars from the 2.7.x CXF distribution and the webservice works again.

    0 讨论(0)
  • 2020-12-01 10:10

    Interestingly I had this issue in docker container and not while running it on tomcat server.

    The problem that I faced was that the project had another lower version of wstx-asl-3.2.7 and the class loader probably could have loaded this versions first. I got rid of it and the necessary woodstox was considered and the problem was solved.

    0 讨论(0)
提交回复
热议问题