关注JEECG发展历程 关注最新动态和版本, 记录JEECG成长点滴 更新日志 - 技术支持 - 招聘英才

JEECG最新版本下载 JEECG智能开发平台 - 显著提高开发效率 常见问题 - 入门视频 - 参与开源团队

商务QQ: 69893005、3102411850 商务热线(5*8小时): 010-64808099 官方邮箱: jeecgos@163.com

查看: 15081|回复: 3

[代码生成器] 项目部署Tomcat启动报错 求大神解答!

[复制链接]
发表于 2014-5-2 17:03:06 | 显示全部楼层 |阅读模式
本帖最后由 百事PepsiCola丶 于 2014-5-2 17:03 编辑

开发环境: MyEclipse 2014 / MySQL / Tomcat 7.x / JDK 1.8.0 / Maven 3.1.1
代码来源: http://git.oschina.net/jeecg/jeecg.git
错误信息:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'templetContext': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'freemarker' defined in URL [file:/E:/From_Develop/apache-tomcat-7.0.47/webapps/jeecg/WEB-INF/classes/org/jeecgframework/web/cgform/common/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


目前猜测错误起因是因为重复注入.

spring-mvc-cgform.xml
        <!-- FreeMarker -->
        <bean id="freemarker" class="freemarker.template.Configuration">
                <property name="templateLoader" ref="templetLoader" />
                <property name="defaultEncoding" value="UTF-8"></property>
                <property name="numberFormat" value="0"></property>
        </bean>


        <!-- Template Context -->
        <bean id="templetContext" class="org.jeecgframework.web.cgform.engine.TempletContext">
                <property name="tags">
                        <map>
                                <entry key="DictData" value-ref="dictDataTag" />
                        </map>
                </property>
        </bean>
spring-mvc-hibernate.xml
        <context:component-scan base-package="org.jeecgframework.web.*">
                <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
        </context:component-scan>
spring-mvc.xml
        <context:component-scan base-package="org.jeecgframework.web.*">
                <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service" />
        </context:component-scan>

项目目录结构:
QQ图片20140502165702.jpg


求各位大神帮忙,已经卡在这一天了!

 楼主| 发表于 2014-5-2 17:03:49 | 显示全部楼层
先自己顶顶, 免得沉了!
 楼主| 发表于 2014-5-3 23:58:03 | 显示全部楼层
好吧. 自己搞定了.
JDK 1.8 版本过高, 换成JDK 1.6 搞定.
个人猜测应该是JDK 1.8 验证逻辑更加严谨. 遇到同样问题的童鞋们, 可以借鉴一下这个帖子!
发表于 2014-12-4 17:27:29 | 显示全部楼层
可以支持JDK1.8,但是需要更新一下pom.xml 中的spring版本:<spring.version>3.2.9.RELEASE</spring.version>
产生这个问题的根源应该是spring在JDK1.8的问题,官方已经有修复版本,具体可以看spring的更新历史
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表