Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

部署war包到Tomcat时,出现下列Error,求大神帮忙解答一下啊!谢谢了 #159

Open
chrisyxg opened this issue Dec 15, 2017 · 7 comments

Comments

@chrisyxg
Copy link

2017-12-15 08:39:28,340 ERROR [main] org.springframework.web.context.ContextLoader:331 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'compositeFilter' defined in file [D:\apache-tomcat-6.0.36\webapps\lemon-1.8.0\WEB-INF\classes\spring\ctx-common-filter.xml]: Cannot resolve reference to bean 'springSecurityFilterChainProxy' while setting bean property 'filters' with key [5]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChainProxy' defined in file [D:\apache-tomcat-6.0.36\webapps\lemon-1.8.0\WEB-INF\classes\spring\ctx-common-filter.xml]: Cannot resolve reference to bean 'springSecurityFilterChain' while setting bean property 'filter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChainProxy': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: A universal match pattern ('/') is defined before other patterns in the filter chain, causing them to be ignored. Please check the ordering in your security:http namespace or FilterChainProxy bean configuration
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:336) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:359) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:157) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1457) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1198) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762) ~[spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) ~[spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) ~[spring-web-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) ~[spring-web-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) [spring-web-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206) [catalina.jar:6.0.36]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705) [catalina.jar:6.0.36]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) [catalina.jar:6.0.36]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) [catalina.jar:6.0.36]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) [catalina.jar:6.0.36]
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943) [catalina.jar:6.0.36]
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778) [catalina.jar:6.0.36]
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504) [catalina.jar:6.0.36]
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317) [catalina.jar:6.0.36]
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) [catalina.jar:6.0.36]
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) [catalina.jar:6.0.36]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065) [catalina.jar:6.0.36]
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) [catalina.jar:6.0.36]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) [catalina.jar:6.0.36]
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) [catalina.jar:6.0.36]
at org.apache.catalina.core.StandardService.start(StandardService.java:525) [catalina.jar:6.0.36]
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) [catalina.jar:6.0.36]
at org.apache.catalina.startup.Catalina.start(Catalina.java:595) [catalina.jar:6.0.36]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_45]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_45]
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) [bootstrap.jar:6.0.36]
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) [bootstrap.jar:6.0.36]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChainProxy' defined in file [D:\apache-tomcat-6.0.36\webapps\lemon-1.8.0\WEB-INF\classes\spring\ctx-common-filter.xml]: Cannot resolve reference to bean 'springSecurityFilterChain' while setting bean property 'filter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChainProxy': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: A universal match pattern ('/
') is defined before other patterns in the filter chain, causing them to be ignored. Please check the ordering in your security:http namespace or FilterChainProxy bean configuration
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:336) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1457) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1198) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
... 41 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChainProxy': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: A universal match pattern ('/') is defined before other patterns in the filter chain, causing them to be ignored. Please check the ordering in your security:http namespace or FilterChainProxy bean configuration
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1554) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
... 51 common frames omitted
Caused by: java.lang.IllegalArgumentException: A universal match pattern ('/
') is defined before other patterns in the filter chain, causing them to be ignored. Please check the ordering in your security:http namespace or FilterChainProxy bean configuration
at org.springframework.security.config.http.DefaultFilterChainValidator.checkPathOrder(DefaultFilterChainValidator.java:51) ~[spring-security-config-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.security.config.http.DefaultFilterChainValidator.validate(DefaultFilterChainValidator.java:40) ~[spring-security-config-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.security.web.FilterChainProxy.afterPropertiesSet(FilterChainProxy.java:151) ~[spring-security-web-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
... 58 common frames omitted

@chrisyxg
Copy link
Author

在线等

@xuhuisheng
Copy link
Owner

看不出是什么问题。报错说/这个url映射重复了。但是配置里只有一个哟。

@chrisyxg
Copy link
Author

问一下,有可以在tomcat上成功运行的工程包吗?可以发一个吗? @xuhuisheng

@chrisyxg
Copy link
Author

我这边就需要一个能运行起来的,最简单的就行,多谢大神了 @xuhuisheng

@xuhuisheng
Copy link
Owner

xuhuisheng commented Dec 22, 2017

能运行起来的,下载这个
https://pan.baidu.com/s/1skJ1GgX
就是数据库有点儿问题,账号密码都过期了。需要手工进入data/lemon/lemon.script,把ACCOUNT_CREDENTAIL的EXPIRE_TIME改成未来一个时间。

@chrisyxg
Copy link
Author

多谢了!这个对应的源码能发一份吗?多谢了,就是能成功编译打包部署的源码 @xuhuisheng

@xuhuisheng
Copy link
Owner

请参考github最新代码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants