Spring+Hibernate+Struts 2集成的问题,劳驾高手帮忙解决下呀
ssh集成项目,部署时报如下错误:
可是我很纳闷的是,我的项目放到学校机房里面部署能正常运行,放到同学电脑上面部署也能够正常运行,没报错,唯独在我机子上一部署就报错,Myeclipse版本8.6.官网下载的,Tomcat也是官网下载的。都重新配置了,用Myeclipse自带的Tomcat部署也会报如下异常。还有就是我在项目中导入了Struts Spring Libraries包,可是在项目中始终不显示出来,以前只要添加了就马上会在项目中显示的、要右键项目==》Build Path==》Configrue Build Path...进入到里面才能看到添加进去的Struts Spring Libraries包,正常情况下这个包里面是有5个jar包的。可是我打开里面什么也没有,我找到Myeclipse本地安装目录下的.....////..(很深的一个目录)spring文件夹里面,也能找到属于Struts Spring Libraries的那五个jar包。项目中有些类都是引用了org.springframework.context这下面的一些类库。没这五个jar包就会报错,我就把jar包复制到了lib目录下面,这个问题解决了。但还是挺郁闷的,主要的问题就是下面这个异常,一部署就报错,项目再其他电脑上能正常跑。知道的高手麻烦帮忙指点一二啊。
严重:
Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Initialization of bean failed;
nested exception is java.lang.reflect.MalformedParameterizedTypeException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java