jeecg :严重:Error creating bean with name 'freemarker' defined in file

    xiaoxiao2022-07-02  99

    jeecg项目部署出错,需要使用到jdk1.7的环境,1.8报错

    问题:  严重: 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 ‘freemarker’ defined in file [E:\Project.metadata.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\jtdwx\WEB-INF\classes\spring-mvc-cgform.xml]: Initialization of bean failed; nested exception is org.springframework.beans.FatalBeanException: Failed to obtain BeanInfo for class [freemarker.template.Configuration]; nested exception is java.beans.IntrospectionException: type mismatch between read and write methods  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)  at org.springframework.beans.factory.support.AbstractBeanFactory1.getObject(AbstractBeanFactory.java:294)atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)atorg.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)atorg.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5118)atorg.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634)atorg.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)atorg.apache.catalina.core.ContainerBase1.getObject(AbstractBeanFactory.java:294)atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)atorg.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)atorg.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5118)atorg.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634)atorg.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)atorg.apache.catalina.core.ContainerBaseStartChild.call(ContainerBase.java:1571)  at org.apache.catalina.core.ContainerBaseStartChild.call(ContainerBase.java:1561)atjava.util.concurrent.FutureTask.run(FutureTask.java:266)atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)atjava.util.concurrent.ThreadPoolExecutorStartChild.call(ContainerBase.java:1561)atjava.util.concurrent.FutureTask.run(FutureTask.java:266)atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)atjava.util.concurrent.ThreadPoolExecutorWorker.run(ThreadPoolExecutor.java:617)  at java.lang.Thread.run(Thread.java:745)  Caused by: org.springframework.beans.FatalBeanException: Failed to obtain BeanInfo for class [freemarker.template.Configuration]; nested exception is java.beans.IntrospectionException: type mismatch between read and write methods  at org.springframework.beans.CachedIntrospectionResults.(CachedIntrospectionResults.java:262)  at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:149)  at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:324)  at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptors(BeanWrapperImpl.java:331)  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1242)  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1101)  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)  … 20 more  Caused by: java.beans.IntrospectionException: type mismatch between read and write methods  at java.beans.PropertyDescriptor.findPropertyType(PropertyDescriptor.java:661)  at java.beans.PropertyDescriptor.setReadMethod(PropertyDescriptor.java:257)  at org.springframework.beans.ExtendedBeanInfo.addOrUpdatePropertyDescriptor(ExtendedBeanInfo.java:282)  at org.springframework.beans.ExtendedBeanInfo.addOrUpdatePropertyDescriptor(ExtendedBeanInfo.java:180)  at org.springframework.beans.ExtendedBeanInfo.(ExtendedBeanInfo.java:100)  at org.springframework.beans.CachedIntrospectionResults.(CachedIntrospectionResults.java:224)  … 26 more  解决方式  找到工具栏window——》点击preferences    查看jre选项是否正确 

      最后点击finish

    最新回复(0)