做好的项目,是把spring和hibernate整合一块。
该项目在服务器上运行好使,但在我电脑运行就报下面的错误,就在我电脑不好使,各位有什么建议,帮忙解决一下
信息: Initializing Spring root WebApplicationContext
2012-6-15 10:45:13 org.apache.catalina.core.StandardContext listenerStart
严重: 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 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class model.KZ_CZY)
目前我电脑的tomtat和Myeclipse的安装路径下的lib下的jar包与服务器相同,项目一模一样

如果项目放错地方,楼主帮忙换一下,谢谢

解决方案 »

  1.   

    应该是导入的包,class编译用的JDK版本,和你本地JDK,JRE版本不一致。
    比如编译用的是1.6,你本地是1.5。
    要不把JDK版本换成一致的,要不在你本地重新编译并打包。
      

  2.   

    可能是编译环境问题,高版本上编译的工程在低版本环境运行会出这个问题,你将Myeclipse JDK编译环境跟服务器调成一样的就可以了
      

  3.   

    环境没搭好,相关jar包检查下