讨论区 » AAS-V10企业版 »
hazelcast包冲突冲突问题导致部署失败
由 何 善才 在 超过 3 年 之前添加
异常信息:
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hazelcast': Instantiation of bean failed;
nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public static com.hazelcast.core.HazelcastInstance com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(com.hazelcast.config.Config)] threw exception;
nested exception is com.hazelcast.core.HazelcastException: java.lang.ClassCastException: Cannot cast com.hazelcast.internal.locksupport.LockDataSerializerHook to com.hazelcast.nio.serialization.DataSerializerHook
解决:
1、添加apusic-web.xml文件到应用web-inf下:
apusic-web.xml 内容详情为:
<?xml version="1.0" encoding="UTF-8"?>
<aas-web-app error-url="">
<class-loader delegate="false">
<property name="ignoreParentsFiles" value="true"></property>
<property name="ignoreClassPrefix" value="com.hazelcast"></property>
<property name="ignoreResources" value="META-INF/services/com.hazelcast.DataSerializerHook;META-INF/services/com.hazelcast.spi.discovery.DiscoveryStrategyFactory"></property>
</class-loader>
</aas-web-app>
2、添加jvm参数: -Dcom.apusic.enterprise.overrideablejavaxpackages (可以通过管控页面进行添加和配置文件进添加)