struts2 hibernate3 spring3 整合的时候总是报错,请高手帮忙看看 这是什么错误
严重:Errorunregisteringmbeanjavax.management.RuntimeErrorException:ErrorthrowninpreDere...
严重: Error unregistering mbean
javax.management.RuntimeErrorException: Error thrown in preDeregister method
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.preDeregisterInvoke(DefaultMBeanServerInterceptor.java:1053)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:421)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:403)
at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:506)
at org.apache.tomcat.util.modeler.Registry.unregisterComponent(Registry.java:574)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4087)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1105)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1203)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1307)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1571)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1580)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1560)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoClassDefFoundError: org/apache/struts2/util/ObjectFactoryDestroyable
at org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:265)
at org.apache.struts2.dispatcher.ng.PrepareOperations.cleanupDispatcher(PrepareOperations.java:179)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.destroy(StrutsPrepareAndExecuteFilter.java:100)
at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:332)
at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3728)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4492)
at org.apache.catalina.core.StandardContext.preDeregister(StandardContext.java:5234)
at org.apache.tomcat.util.modeler.BaseModelMBean.preDeregister(BaseModelMBean.java:1130)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.preDeregisterInvoke(DefaultMBeanServerInterceptor.java:1048)
... 14 more
2011-8-9 9:09:12 org.apache.catalina.core.NamingContextListener lifecycleEvent
严重: Creation of the naming context failed: javax.naming.NamingException: Context is read only
2011-8-9 9:09:13 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly. 展开
javax.management.RuntimeErrorException: Error thrown in preDeregister method
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.preDeregisterInvoke(DefaultMBeanServerInterceptor.java:1053)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:421)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:403)
at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:506)
at org.apache.tomcat.util.modeler.Registry.unregisterComponent(Registry.java:574)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4087)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1105)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1203)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1307)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1571)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1580)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1560)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoClassDefFoundError: org/apache/struts2/util/ObjectFactoryDestroyable
at org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:265)
at org.apache.struts2.dispatcher.ng.PrepareOperations.cleanupDispatcher(PrepareOperations.java:179)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.destroy(StrutsPrepareAndExecuteFilter.java:100)
at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:332)
at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3728)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4492)
at org.apache.catalina.core.StandardContext.preDeregister(StandardContext.java:5234)
at org.apache.tomcat.util.modeler.BaseModelMBean.preDeregister(BaseModelMBean.java:1130)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.preDeregisterInvoke(DefaultMBeanServerInterceptor.java:1048)
... 14 more
2011-8-9 9:09:12 org.apache.catalina.core.NamingContextListener lifecycleEvent
严重: Creation of the naming context failed: javax.naming.NamingException: Context is read only
2011-8-9 9:09:13 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly. 展开
5个回答
展开全部
很明显的错误提示:Caused by: java.lang.NoClassDefFoundError:
org/apache/struts2/util/ObjectFactoryDestroyable
找不到ObjectFactoryDestroyable这个类
出现这种问题的原因可能有几个:
1、需要的jar包没导入
把struts2的json-lib-2.1-jdk15.jar包加入到工程试试,或者把它加入到应用服务器的lib目录
如tomcat服务器,加入到{tomcat}\lib (6.0) {tomcat}\common\lib (5.5)
2、如果数据库使用的是sql server,请检查用户表中是否使用了sqlserver的默认字段read
3、如果前面两种情况都不是,最有可能是整合的配置文件哪里配置有问题
最好把配置文件也贴出来看看,情况很多,楼主仔细检查下
org/apache/struts2/util/ObjectFactoryDestroyable
找不到ObjectFactoryDestroyable这个类
出现这种问题的原因可能有几个:
1、需要的jar包没导入
把struts2的json-lib-2.1-jdk15.jar包加入到工程试试,或者把它加入到应用服务器的lib目录
如tomcat服务器,加入到{tomcat}\lib (6.0) {tomcat}\common\lib (5.5)
2、如果数据库使用的是sql server,请检查用户表中是否使用了sqlserver的默认字段read
3、如果前面两种情况都不是,最有可能是整合的配置文件哪里配置有问题
最好把配置文件也贴出来看看,情况很多,楼主仔细检查下
展开全部
晕:1:没有配置org.springframework.web.context.ContextLoader拦截器
2: log4j-peoperty 没有导入
3:我看你根本就不会,很多东西都缺少,搭建的都是豆腐渣工程
2: log4j-peoperty 没有导入
3:我看你根本就不会,很多东西都缺少,搭建的都是豆腐渣工程
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
这种情况来看,你应该是个新手,我建议你先集成struts2和spring,最后在集成hibernate,这样的话,对于初学者来说最好了,简单明了,希望对你有帮助。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
怎么解决的。我现在也是这个问题
java.lang.NoClassDefFoundError: org/apache/struts2/util/ObjectFactoryDestroyable
at org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:265)
at org.apache.struts2.dispatcher.FilterDispatcher.destroy(FilterDispatcher.java:236)
at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:357)
at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:4107)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4876)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1276)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1382)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1389)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1653)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1662)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1642)
at java.lang.Thread.run(Thread.java:662)
java.lang.NoClassDefFoundError: org/apache/struts2/util/ObjectFactoryDestroyable
at org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:265)
at org.apache.struts2.dispatcher.FilterDispatcher.destroy(FilterDispatcher.java:236)
at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:357)
at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:4107)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4876)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1276)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1382)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1389)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1653)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1662)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1642)
at java.lang.Thread.run(Thread.java:662)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
建议楼主用myeclipse建立一个SSH工程再把你的工程导进去。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询