Instructions for running in java 11+?
Bhlowe opened this issue · 2 comments
Bhlowe commented
Anyone have a solution for running this on java 11+ that has depreciated a lot of the soap and ee calls?
Sure wish onvif was a json based protocol! I hate having things break due to a compile time class not found.
Currently getting:
javax.xml.ws.WebServiceException: org.apache.cxf.binding.soap.SoapFault: Problem writing SAAJ model to stream: Unable to create message factory for SOAP: Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found
at org.apache.cxf.jaxws.JaxWsClientProxy.mapException(JaxWsClientProxy.java:193)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145)
at com.sun.proxy.$Proxy80.getCapabilities(Unknown Source)
at de.onvif.soap.OnvifDevice.init(OnvifDevice.java:139)
at de.onvif.soap.OnvifDevice.<init>(OnvifDevice.java:88)
at de.onvif.soap.OnvifDevice.<init>(OnvifDevice.java:103)
at com.nuspectra.siteproxy.cam.onvif.OnvifCommander.<init>(OnvifCommander.java:371)
ianrenton commented
Hi, I don't suppose you ever found a solution to this, did you? I am currently porting some software that uses this library from Java 8 to Java 17 and things are not working, wondering if I have the same issue as you.
ianrenton commented
In case anyone else discovers this issue for similar reasons, I added the following Maven dependencies based on this semi-related StackOverflow thread. That got it to work for me in Java 17, YMMV in other versions.
<dependency>
<groupId>com.sun.xml.messaging.saaj</groupId>
<artifactId>saaj-impl</artifactId>
<version>1.5.3</version>
</dependency>
<dependency>
<groupId>javax.xml.soap</groupId>
<artifactId>saaj-api</artifactId>
<version>1.3.5</version>
</dependency>