Meet error about spring xml namespace when run multiple version/application
Dear All,
I' using Bonita v6.3.3 community. I have a connector to update data to database (used SPRING Data - v3.2.8). When connector execute. I load all beans defined from the configuration then call repository to persist to database. Here is the config file connector-data-config.xml:
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jpa="http://www.springframework.org/schema/data/jpa" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<context:annotation-config/>
<tx:annotation-driven/>
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>file:${PLF_HOME}/conf/config.properties</value>
</list>
</property>
</bean>
<!-- Import database configuration -->
<import resource="datasource-config.xml" />
<!-- data layer -->
<beans profile="spring-data-jpa">
<!-- workflow data -->
<jpa:repositories base-package="com.plf.data.repository"/>
<context:component-scan base-package="com.plf.data.repository"/>
</beans>
I have a process which integrate this connector, I also import all necessary spring library (spring context-v328, spring-oap, spring-core, spring-expression, spring-bean, orm, jdbc....)
- With the first process version, It run normal, load bean and save data ok !!
- But the next process version (run parallel with old version), I met the error about Spring namespace like this:
"Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [conf/spring/connector-data-config.xml]; nested exception is org.springframework.beans.FatalBeanException: Class [org.springframework.context.config.ContextNamespaceHandler] for namespace [http://www.springframework.org/schema/context] does not implement the [org.springframework.beans.factory.xml.NamespaceHandler] interface"
Please help if you met it before.
Thanks DuLe