JSONProvider has hard dependency on Jettison in Websphere
---------------------------------------------------------
Key: CXF-3159
URL: https://issues.apache.org/jira/browse/CXF-3159
Project: CXF
Issue Type: Bug
Affects Versions: 2.2.11
Reporter: Josh Cummings
On Websphere 7.0.0.13 in Development Mode, when excluding jettison as a
dependency, endpoint startup fails with the following exception:
Caused by: java.lang.NoClassDefFoundError:
org.codehaus.jettison.mapped.TypeConverter
at java.lang.Class.getDeclaredFieldsImpl(Native Method)
at java.lang.Class.getDeclaredFields(Class.java:546)
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.findContextFields(AbstractResourceInfo.java:77)
at
org.apache.cxf.jaxrs.model.AbstractResourceInfo.<init>(AbstractResourceInfo.java:60)
at org.apache.cxf.jaxrs.model.ProviderInfo.<init>(ProviderInfo.java:27)
at
org.apache.cxf.jaxrs.provider.ProviderFactory.setProviders(ProviderFactory.java:341)
at
org.apache.cxf.jaxrs.provider.ProviderFactory.<clinit>(ProviderFactory.java:62)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
at
org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.setupFactory(AbstractJAXRSFactoryBean.java:267)
at
org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.initClient(JAXRSClientFactoryBean.java:222)
at
org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.createWithValues(JAXRSClientFactoryBean.java:165)
at
org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.create(JAXRSClientFactoryBean.java:146)
at
org.lds.stack.rs.spring.ConsumeJaxRSFactoryBean.getObject(ConsumeJaxRSFactoryBean.java:27)
at
org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
... 145 more
It appears that the createProvider method is trying to defend against this with
a try-catch around the loading of the JSONProvider class; however, when in
Development Mode in Websphere, classloading is a little lazier than that and
the NoClassDef isn't thrown until later.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.