操作时要求能够保持回滚,然后kill 里面的进程

 

ERROR org.springframework.web.servlet.DispatcherServlet - Context initializatio
2011-09-03 18:06:02,714 [main] ERROR org.springframework.web.servlet.DispatcherServlet - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Cannot map handler 'fieldController' to URL path [/manager/field/upload]: There is already handler of type [class com.yanfa.web.controller.manager.ExpertController] mapped.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:286) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.createDefaultStrategy(DispatcherServlet.java:682) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.getDefaultStrategies(DispatcherServlet.java:651) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.initHandlerMappings(DispatcherServlet.java:444) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:339) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:328) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:523) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:749) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:1) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.event.GenericApplicationListenerAdapter.onApplicationEvent(GenericApplicationListenerAdapter.java:51) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.event.SourceFilteringListener.onApplicationEventInternal(SourceFilteringListener.java:97) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.event.SourceFilteringListener.onApplicationEvent(SourceFilteringListener.java:68) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at javax.servlet.GenericServlet.init(GenericServlet.java:212) [servlet-api.jar:na]
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172) [catalina.jar:na]
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992) [catalina.jar:na]
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058) [catalina.jar:na]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371) [catalina.jar:na]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) [catalina.jar:na]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) [catalina.jar:na]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) [catalina.jar:na]
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926) [catalina.jar:na]
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889) [catalina.jar:na]
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) [catalina.jar:na]
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149) [catalina.jar:na]
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) [catalina.jar:na]
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) [catalina.jar:na]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) [catalina.jar:na]
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) [catalina.jar:na]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) [catalina.jar:na]
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) [catalina.jar:na]
at org.apache.catalina.core.StandardService.start(StandardService.java:516) [catalina.jar:na]
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) [catalina.jar:na]
at org.apache.catalina.startup.Catalina.start(Catalina.java:578) [catalina.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_01]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_01]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_01]
at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_01]
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) [bootstrap.jar:na]
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) [bootstrap.jar:na]
Caused by: java.lang.IllegalStateException: Cannot map handler 'fieldController' to URL path [/manager/field/upload]: There is already handler of type [class com.yanfa.web.controller.manager.ExpertController] mapped.
at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:390) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:362) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.detectHandlers(AbstractDetectingUrlHandlerMapping.java:82) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.initApplicationContext(AbstractDetectingUrlHandlerMapping.java:58) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:119) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:72) [org.springframework.web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:106) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:85) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1413) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
... 49 common frames omitted
2011-9-3 18:06:02 org.apache.catalina.core.ApplicationContext log
严重: StandardWrapper.Throwable
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Cannot map handler 'fieldController' to URL path [/manager/field/upload]: There is already handler of type [class com.yanfa.web.controller.manager.ExpertController] mapped.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:286)
at org.springframework.web.servlet.DispatcherServlet.createDefaultStrategy(DispatcherServlet.java:682)
at org.springframework.web.servlet.DispatcherServlet.getDefaultStrategies(DispatcherServlet.java:651)
at org.springframework.web.servlet.DispatcherServlet.initHandlerMappings(DispatcherServlet.java:444)
at org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:339)
at org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:328)
at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:523)
at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:749)
at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:1)
at org.springframework.context.event.GenericApplicationListenerAdapter.onApplicationEvent(GenericApplicationListenerAdapter.java:51)
at org.springframework.context.event.SourceFilteringListener.onApplicationEventInternal(SourceFilteringListener.java:97)
at org.springframework.context.event.SourceFilteringListener.onApplicationEvent(SourceFilteringListener.java:68)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
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:926)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
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.IllegalStateException: Cannot map handler 'fieldController' to URL path [/manager/field/upload]: There is already handler of type [class com.yanfa.web.controller.manager.ExpertController] mapped.
at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:390)
at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:362)
at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.detectHandlers(AbstractDetectingUrlHandlerMapping.java:82)
at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.initApplicationContext(AbstractDetectingUrlHandlerMapping.java:58)
at org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:119)
at org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:72)
at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73)
at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:106)
at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:85)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1413)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
... 49 more
2011-9-3 18:06:02 org.apache.catalina.core.StandardContext loadOnStartup
严重: Servlet threw load() exception
java.lang.IllegalStateException: Cannot map handler 'fieldController' to URL path [/manager/field/upload]: There is already handler of type [class com.yanfa.web.controller.manager.ExpertController] mapped.
at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:390)
at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:362)
at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.detectHandlers(AbstractDetectingUrlHandlerMapping.java:82)
at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.initApplicationContext(AbstractDetectingUrlHandlerMapping.java:58)
at org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:119)
at org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:72)
at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73)
at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:106)
at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:85)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1413)
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.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:286)
at org.springframework.web.servlet.DispatcherServlet.createDefaultStrategy(DispatcherServlet.java:682)
at org.springframework.web.servlet.DispatcherServlet.getDefaultStrategies(DispatcherServlet.java:651)
at org.springframework.web.servlet.DispatcherServlet.initHandlerMappings(DispatcherServlet.java:444)
at org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:339)
at org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:328)
at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:523)
at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:749)
at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:1)
at org.springframework.context.event.GenericApplicationListenerAdapter.onApplicationEvent(GenericApplicationListenerAdapter.java:51)
at org.springframework.context.event.SourceFilteringListener.onApplicationEventInternal(SourceFilteringListener.java:97)
at org.springframework.context.event.SourceFilteringListener.onApplicationEvent(SourceFilteringListener.java:68)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
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:926)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
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)
2011-9-3 18:06:04 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
2011-09-03 18:06:13,334 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: alter table yanfa.contact_log add index FK274E6A55DE61EAC (company_id), add constraint FK274E6A55DE61EAC foreign key (company_id) references yanfa.company
2011-09-03 18:06:13,342 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Can't create table '.yanfa#sql-7f8_721.frm' (errno: 150)
2011-09-03 18:06:13,446 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: alter table yanfa.projects add index FKC479187A5DE61EAC (company_id), add constraint FKC479187A5DE61EAC foreign key (company_id) references yanfa.company
2011-09-03 18:06:13,446 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Can't create table '.yanfa#sql-7f8_721.frm' (errno: 150)
2011-09-03 18:06:13,454 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: alter table yanfa.users add index FK6A68E08482E942A (research_fields), add constraint FK6A68E08482E942A foreign key (research_fields) references yanfa.fields
2011-09-03 18:06:13,455 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Can't create table '.yanfa#sql-7f8_721.frm' (errno: 150)
2011-09-03 18:06:13,509 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: alter table yanfa.users add index FK6A68E085DE61EAC (company_id), add constraint FK6A68E085DE61EAC foreign key (company_id) references yanfa.company
2011-09-03 18:06:13,510 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Can't create table '.yanfa#sql-7f8_721.frm' (errno: 150)
Hibernate: select this_.id as id35_0_, this_.role_desc as role2_35_0_, this_.role_name as role3_35_0_ from yanfa.roles this_
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select resources0_.role_id as role1_35_1_, resources0_.resource_id as resource2_1_, resourcese1_.id as id32_0_, resourcese1_.name as name32_0_, resourcese1_.url as url32_0_ from role_resource resources0_ inner join yanfa.resources resourcese1_ on resources0_.resource_id=resourcese1_.id where resources0_.role_id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
Hibernate: select this_.id as id32_1_, this_.name as name32_1_, this_.url as url32_1_, roles3_.resource_id as resource2_32_, role1_.id as role1_, role1_.id as id35_0_, role1_.role_desc as role2_35_0_, role1_.role_name as role3_35_0_ from yanfa.resources this_ inner join role_resource roles3_ on this_.id=roles3_.resource_id inner join yanfa.roles role1_ on roles3_.role_id=role1_.id where role1_.id=?
2011-09-03 18:06:17,003 [main] WARN org.springframework.security.web.access.intercept.FilterSecurityInterceptor - Could not validate configuration attributes as the SecurityMetadataSource did not return any attributes from getAllConfigAttributes()
2011-9-3 18:06:18 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet 'yanfa'
2011-09-03 18:06:22,270 [main] ERROR org.springframework.web.servlet.DispatcherServlet - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Cannot map handler 'fieldController' to URL path [/manager/field/upload]: There is already handler of type [class com.yanfa.web.controller.manager.ExpertController] mapped.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:286) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.createDefaultStrategy(DispatcherServlet.java:682) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.getDefaultStrategies(DispatcherServlet.java:651) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.initHandlerMappings(DispatcherServlet.java:444) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:339) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:328) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:523) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:749) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:1) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.event.GenericApplicationListenerAdapter.onApplicationEvent(GenericApplicationListenerAdapter.java:51) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.event.SourceFilteringListener.onApplicationEventInternal(SourceFilteringListener.java:97) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.event.SourceFilteringListener.onApplicationEvent(SourceFilteringListener.java:68) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at javax.servlet.GenericServlet.init(GenericServlet.java:212) [servlet-api.jar:na]
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172) [catalina.jar:na]
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992) [catalina.jar:na]
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058) [catalina.jar:na]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371) [catalina.jar:na]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) [catalina.jar:na]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) [catalina.jar:na]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) [catalina.jar:na]
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926) [catalina.jar:na]
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889) [catalina.jar:na]
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) [catalina.jar:na]
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149) [catalina.jar:na]
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) [catalina.jar:na]
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) [catalina.jar:na]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) [catalina.jar:na]
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) [catalina.jar:na]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) [catalina.jar:na]
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) [catalina.jar:na]
at org.apache.catalina.core.StandardService.start(StandardService.java:516) [catalina.jar:na]
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) [catalina.jar:na]
at org.apache.catalina.startup.Catalina.start(Catalina.java:578) [catalina.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_01]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_01]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_01]
at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_01]
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) [bootstrap.jar:na]
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) [bootstrap.jar:na]
Caused by: java.lang.IllegalStateException: Cannot map handler 'fieldController' to URL path [/manager/field/upload]: There is already handler of type [class com.yanfa.web.controller.manager.ExpertController] mapped.
at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:390) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:362) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.detectHandlers(AbstractDetectingUrlHandlerMapping.java:82) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.initApplicationContext(AbstractDetectingUrlHandlerMapping.java:58) [org.springframework.web.servlet-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:119) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:72) [org.springframework.web-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:106) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:85) [org.springframework.context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1413) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) [org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
... 49 common frames omitted
2011-9-3 18:06:22 org.apache.catalina.core.ApplicationContext log
严重: StandardWrapper.Throwable
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Cannot map handler 'fieldController' to URL path [/manager/field/upload]: There is already handler of type [class com.yanfa.web.controller.manager.ExpertController] mapped.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:286)
at org.springframework.web.servlet.DispatcherServlet.createDefaultStrategy(DispatcherServlet.java:682)
at org.springframework.web.servlet.DispatcherServlet.getDefaultStrategies(DispatcherServlet.java:651)
at org.springframework.web.servlet.DispatcherServlet.initHandlerMappings(DispatcherServlet.java:444)
at org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:339)
at org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:328)
at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:523)
at org.springframework.web.servlet.FrameworkSer

;with tran_locks as(
select resource_type,db_name(resource_database_id) as db_name,resource_description
   ,object_name(resource_associated_entity_id,resource_database_id) as object_name,request_mode,request_type,request_status,request_session_id
   from sys.dm_tran_locks
   where resource_type='OBJECT'
union
select resource_type,db_name(resource_database_id) as db_name,resource_description
   ,object_name(p.object_id,l.resource_database_id) as object_name,request_mode,request_type,request_status,request_session_id
   from sys.dm_tran_locks as l
   join sys.partitions as p on l.resource_associated_entity_id=p.hobt_id
   where resource_type in ('PAGE','KEY')
union
select resource_type,db_name(resource_database_id) as db_name,resource_description
   ,null as object_name,request_mode,request_type,request_status,request_session_id
   from sys.dm_tran_locks as l
   where resource_type not in ('OBJECT','PAGE','KEY')
)select l.*,s.login_name,text from tran_locks as l
    join sys.dm_exec_sessions as s on s.session_id=l.request_session_id
    left join sys.dm_exec_requests as r on r.session_id=s.session_id
    cross apply sys.dm_exec_sql_text(sql_handle)
    where not (resource_type='DATABASE' and request_mode='S' and request_type='LOCK' and request_status='GRANT')
    --and db_name=''
    --and object_name=''
    order by db_name,object_name,request_type

mysql 数据库数据订正

工作过程中时常遇到数据订正的需求,该操作本身不难。操作时要求能够保持回滚~对于能够满足回滚的要求,我通常执行备份表,然后执行变更!如果发送订正错误或者用户要求回滚的时候,就完全恢复整个表,这样做会有多余的操作,因为我们只要

实际上可以选择备份要进行更正的数据!比如如下需求:

将表resource中usage_type='unused' 并且 user_id=166 的记录更新为user_id=169 !更新100条!

1 首先备份表

create table test.resource_20120221 as 

select * from resource where usage_type='unused' and user_id=166 order by id limit 100;

2 执行数据订正操作

update resource set user_id=169 where user_id=166 and id in ( select id from test.resource_20120221);

如果需要回滚的话,只需执行

update resource set user_id=166 where id in ( select id from test.resource_20120221);

即可!

这里涉及到小批量数据的订正,如果大量的数据,就要使用批量提交的方法了!

 

附上:

 M-M架构的DDL变更技巧

l  M-M 复制架构,只有一台提供全部或主数据服务

推荐DDL语句,在当下M-M架构中属于备用数据库服务器上优先执行,有四项优点:

1 不立即影响数据库提供的 数据服务;

2 不阻塞主备之间数据复制的日志恢复操作;

3 DDL语句执行过程,若出问题只影响备库的稳定性,而很少会影响主库;

4 若有数据服务无缝切换功能(例如:heartbeat、自主数据层等),可以在备库执行完成后,进行数据服务提供的主备库切换,尤其是数据容量大的表变更时,可以减少对业务影响程度及减少停机维护时间和次数;

 

 

数据订正前备份表
将表resource中usage_type='unused' 并且 user_id=166 的记录更新为user_id=169 !更新100条!
1、首先备份表
create table test.resource_20120221 as
select * from resource where usage_type='unused' and user_id=166 order by id limit 100;
2、执行数据订正操作
update resource set user_id=169 where user_id=166 and id in ( select id from test.resource_20120221);
3、如果需要回滚的话,只需执行
update resource set user_id=166 where id in ( select id from test.resource_20120221);

如果是GTID不能用CTAS,用insert into select
1、创建一张同结构空表
show create table test22G;
*************************** 1. row ***************************
Table: test22
Create Table: CREATE TABLE `test23` (
`id` int(11) DEFAULT NULL,
`name` varchar(20) DEFAULT NULL,
`dy` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8
2、备份表
insert into test23
select * from test22 where name='w' order by id limit 100;
3、执行数据订正操作
update test22 set name='p' where name='w' and id in ( select id from test23);
4、如果需要回滚的话,只需执行
update test22 set name='w' where id in ( select id from test23);

三个表,其中一个是中间表,如何把resource_seriall,还有他的id放到一个字段
SELECT
p.product_id,p.product_name,p.product_type,p.msg_level,p.state,p.create_account,
i.name,i.create_account,i.id,GROUP_CONCAT(r.resource_seriall) r.resource_serial,GROUP_CONCAT r.id
FROM product_info p,product_type i,resources_info r,product_resources_info pr where p.product_type=i.id and p.create_account=i.create_account
and p.product_id=12133 and r.id=pr.resource_id and pr.product_id=12133

本文由必威发布于必威-数据,转载请注明出处:操作时要求能够保持回滚,然后kill 里面的进程

TAG标签:
Ctrl+D 将本页面保存为书签,全面了解最新资讯,方便快捷。