While migrating both JAX-RS and JAX-WS web services from WebLogic 12.1 to 12.2 I've come across an issue during deployment. The error "java.util.ServiceConfigurationError: javax.xml.stream.XMLInputFactory: Provider com.ctc.wstx.stax.WstxInputFactory not a subtype"
kept on coming up. The particular service in question wasn't using StAX but we've played around with changing various providers during this upgrade so I thought that was the root cause. It wasn't.
Here's a redacted version of the error message seen during deployment...
Turned out the issue was to do with class loading
and specifically what weblogic.xml
contained. Because these services were using Oracle Coherence from WebLogic 12.1
they were providing a tangosol-coherence-override.xml
file as part of the WAR package. This required the prefer-web-inf-classes
element in weblogic.xml
to be set to true
. This caused the StAX exception to be thrown.
resolved the issue...
So either something in the WLS class loader structure changed between 12.1 and 12.2 or some other dependencies changed, I've not tried to track it down too hard. What about Coherence and the override file? Well it looks like due to these changes in WLS 12.2 that certain services are not able to make use of this feature any more. I'll have a separate article on that and a couple of workarounds to deal with it too.
A quick disclaimer...
Although I put in a great effort into researching all the topics I cover, mistakes can happen.
Use of any information from my blog posts should be at own risk and I do not hold any liability towards any information misuse or damages caused by following any of my posts.
All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle).
Use of any information contained in this blog post/article is subject to this disclaimer