问题描述
2010-12-12 23:02:34 org.apache.catalina.loader.WebappClassLoader validateJarFile信息: validateJarFile(D:Tomcat6Tomcat 6.0webappsoa_01WEB-INFlibservlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class2010-12-12 23:02:34 org.apache.catalina.core.StandardContext addApplicationListener信息: The listener "org.springframework.web.context.ContextLoaderListener" is already configured for this context. The duplicate definition has been ignored.2010-12-12 23:02:34 org.apache.catalina.core.ApplicationContext log信息: Initializing Spring root WebApplicationContext[Spring]2010-12-12 23:02:39,250[main]Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchFieldError: STRINGat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)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:924)at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:887)at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)at org.apache.catalina.core.StandardService.start(StandardService.java:516)at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)at org.apache.catalina.startup.Catalina.start(Catalina.java:578)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)Caused by: java.lang.NoSuchFieldError: STRINGat org.jbpm.identity.hibernate.PermissionUserType.<clinit>(PermissionUserType.java:44)at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)at java.lang.reflect.Constructor.newInstance(Constructor.java:513)at java.lang.Class.newInstance0(Class.java:355)at java.lang.Class.newInstance(Class.java:308)at org.hibernate.type.TypeFactory.customComponent(TypeFactory.java:144)at org.hibernate.type.TypeFactory.customComponent(TypeFactory.java:135)at org.hibernate.type.TypeFactory.byClass(TypeFactory.java:95)at org.hibernate.type.TypeResolver.heuristicType(TypeResolver.java:130)at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:297)at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:290)at org.hibernate.mapping.Collection.validate(Collection.java:313)at org.hibernate.mapping.Set.validate(Set.java:42)at org.hibernate.cfg.Configuration.validate(Configuration.java:1336)at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1835)at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:860)at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:779)at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)... 36 more[Tomcat]2010-12-12 23:02:39,250[main]Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchFieldError: STRINGat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)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:924)at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:887)at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)at org.apache.catalina.core.StandardService.start(StandardService.java:516)at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)at org.apache.catalina.startup.Catalina.start(Catalina.java:578)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)Caused by: java.lang.NoSuchFieldError: STRINGat org.jbpm.identity.hibernate.PermissionUserType.<clinit>(PermissionUserType.java:44)at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)at java.lang.reflect.Constructor.newInstance(Constructor.java:513)at java.lang.Class.newInstance0(Class.java:355)at java.lang.Class.newInstance(Class.java:308)at org.hibernate.type.TypeFactory.customComponent(TypeFactory.java:144)at org.hibernate.type.TypeFactory.customComponent(TypeFactory.java:135)at org.hibernate.type.TypeFactory.byClass(TypeFactory.java:95)at org.hibernate.type.TypeResolver.heuristicType(TypeResolver.java:130)at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:297)at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:290)at org.hibernate.mapping.Collection.validate(Collection.java:313)at org.hibernate.mapping.Set.validate(Set.java:42)at org.hibernate.cfg.Configuration.validate(Configuration.java:1336)at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1835)at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:860)at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:779)at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)... 36 more2010-12-12 23:02:39 org.apache.catalina.core.StandardContext listenerStart严重: 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 ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchFieldError: STRINGat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)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:924)at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:887)at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)at org.apache.catalina.core.StandardService.start(StandardService.java:516)at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)at org.apache.catalina.startup.Catalina.start(Catalina.java:578)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)Caused by: java.lang.NoSuchFieldError: STRINGat org.jbpm.identity.hibernate.PermissionUserType.<clinit>(PermissionUserType.java:44)at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)at java.lang.reflect.Constructor.newInstance(Constructor.java:513)at java.lang.Class.newInstance0(Class.java:355)at java.lang.Class.newInstance(Class.java:308)at org.hibernate.type.TypeFactory.customComponent(TypeFactory.java:144)at org.hibernate.type.TypeFactory.customComponent(TypeFactory.java:135)at org.hibernate.type.TypeFactory.byClass(TypeFactory.java:95)at org.hibernate.type.TypeResolver.heuristicType(TypeResolver.java:130)at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:297)at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:290)at org.hibernate.mapping.Collection.validate(Collection.java:313)at org.hibernate.mapping.Set.validate(Set.java:42)at org.hibernate.cfg.Configuration.validate(Configuration.java:1336)at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1835)at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:860)at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:779)at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)... 36 more2010-12-12 23:02:39 org.apache.catalina.core.StandardContext start严重: Error listenerStart2010-12-12 23:02:39 org.apache.catalina.core.StandardContext start严重: Context [/oa_01] startup failed due to previous errors2010-12-12 23:02:39 org.apache.catalina.core.ApplicationContext log信息: Closing Spring root WebApplicationContext2010-12-12 23:02:39 org.apache.coyote.http11.Http11Protocol start信息: Starting Coyote HTTP/1.1 on http-80802010-12-12 23:02:40 org.apache.jk.common.ChannelSocket init信息: JK: ajp13 listening on /0.0.0.0:80092010-12-12 23:02:40 org.apache.jk.server.JkMain start信息: Jk running ID=0 time=0/63 config=null2010-12-12 23:02:40 org.apache.catalina.startup.Catalina start信息: Server startup in 48564 ms 问题补充:lockwang 写道
解决方案
引用问题补充:我的sessionfactory这样配有错误吗 配置的ms没有错误,你是在哪启动tomcat的?是eclipse还是通过bat文件启动,检查是否有不同版本的spring包同时存在你项目的lib里和tomcat的lib里
解决方案二:
查看你的D:Tomcat6Tomcat 6.0webappsoa_01WEB-INFlib与D:Tomcat6Tomcat 6.0lib下的jar有没有名称一样但版本不一致的,删除较老的版本