xplanner 在jdk1.6上部署问题
很早的时候就想尝试使用XPlanner,但是一直都没有成功,感觉很简单
但是运行时总是报spring的一个配置文件出错
今天终于在网上找到解决方案了
原来是因为XPlanner部署在JDK1.6上的问题
http://jira.codehaus.org/browse/XPR-391
错误如下:
ERROR - alina].. - Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘metaRepository’ defined in class path resource : Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptionsException: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: to required type for property ‘repositories’] PropertyAccessExceptionsException (1 errors) org.springframework.beans.TypeMismatchException: Failed to convert property value of type to required type for property ‘repositories’ at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:839) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:584) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:469)
原来是spring-beans.xml文件中的问题
就是这个部分
com.technoetic.xplanner.domain.repository.MetaRepositoryImpl的repositories需要一个map,
spring中使用使用的实现是org.apache.commons.collections.map.LinkedMap
但是org.apache.commons.collections.map.LinkedMap实现了java.util.Map接口啊!
理论上应该的可以的啊!但是却出现了转化错误,没有找到原因,但是找到了解决方案啊!
把……
修改为
就可以了啊!