1
我想在ServiceMix中基於Spring和CXF與Aegis數據綁定創建Web服務。這個服務在Tomcat中運行時沒有問題,但是當我在ServiceMix中部署它時,我得到一個NullPointerException。ServiceMix + Spring + CXF + Aegis =空指針異常
Caused by: java.lang.NullPointerException
at org.apache.cxf.aegis.type.basic.BeanTypeInfo$1.compare(BeanTypeInfo.java:309)
at org.apache.cxf.aegis.type.basic.BeanTypeInfo$1.compare(BeanTypeInfo.java:308)
at java.util.Arrays.mergeSort(Arrays.java:1270)
at java.util.Arrays.mergeSort(Arrays.java:1282)
at java.util.Arrays.mergeSort(Arrays.java:1281)
at java.util.Arrays.mergeSort(Arrays.java:1281)
at java.util.Arrays.sort(Arrays.java:1210)
at org.apache.cxf.aegis.type.basic.BeanTypeInfo.initializeProperties(BeanTypeInfo.java:307)
at org.apache.cxf.aegis.type.basic.BeanTypeInfo.<init>(BeanTypeInfo.java:75)
我的Spring Bean:
<bean id="clientFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
<property name="serviceClass" value="com.company.ServiceSEI" />
<property name="address" value="${ws.url}" />
<property name="dataBinding" ref="aegisBean" />
</bean>
<bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding"
scope="prototype" />
而且我宣佈在MANIFEST.MF:
<Import-Package>
META-INF.cxf,
META-INF.cxf.osgi,
org.apache.cxf,
org.apache.cxf.binding,
org.apache.cxf.ws.security,
org.apache.cxf.jaxws,
org.apache.cxf.aegis,
org.apache.cxf.aegis.databinding,
org.apache.cxf.aegis.type,
org.springframework.beans.factory.config,
</Import-Package>
我不能找到一個解決這個問題,如果使用JAXB沒有問題,但我需要使用Aegis。
感謝