generate-project.bat创建项目,部署到tomcat-6.0.32启动报错

iph 发布于 2013/07/26 17:04
阅读 1K+
收藏 0

@江南白衣 你好,想跟你请教个问题:

generate-project.bat创建项目,部署到tomcat-6.0.32启动报错

使用src/main/java/test 中的QuickStartServer.java运行项目一切正常!

通过Myeclipse6.6中的Add deployment 到Tomcat中运行时报如下错误:


16:51:29.194 [main] DEBUG o.s.w.c.s.StandardServletEnvironment - Adding [servletConfigInitParams] PropertySource with lowest search precedence
16:51:29.195 [main] DEBUG o.s.w.c.s.StandardServletEnvironment - Adding [servletContextInitParams] PropertySource with lowest search precedence
16:51:29.195 [main] DEBUG o.s.w.c.s.StandardServletEnvironment - Adding [jndiProperties] PropertySource with lowest search precedence
16:51:29.195 [main] DEBUG o.s.w.c.s.StandardServletEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
16:51:29.195 [main] DEBUG o.s.w.c.s.StandardServletEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
16:51:29.195 [main] DEBUG o.s.w.c.s.StandardServletEnvironment - Initialized StandardServletEnvironment with PropertySources [servletConfigInitParams,servletContextInitParams,jndiProperties,systemProperties,systemEnvironment]
16:51:29.196 [main] DEBUG o.s.web.filter.DelegatingFilterProxy - Initializing filter 'shiroFilter'
2013-7-26 16:51:29 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter shiroFilter
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'shiroFilter' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:568)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1108)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:278)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1121)
at org.springframework.web.filter.DelegatingFilterProxy.initDelegate(DelegatingFilterProxy.java:326)
at org.springframework.web.filter.DelegatingFilterProxy.initFilterBean(DelegatingFilterProxy.java:236)
at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:194)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4071)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4725)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
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:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
16:51:29.299 [main] DEBUG o.s.w.c.s.StandardServletEnvironment - Initializing new StandardServletEnvironment


加载中
0
救赎明天
救赎明天
我也有同样的问题。请求 @江南白衣 解决一下
江南白衣
江南白衣
我试了quickstart本身在tomcat 7下没问题吧。tomcat6 还真没试过,你们可以试一下tomcat6+quickstart么?
0
iph
iph

@江南白衣 

tomcat6+quickstart 是是会出现上面帖子的异常信息。

不难发现是 :  Initializing filter 'shiroFilter' 这一步报错

严重: Exception starting filter shiroFilter


org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named'shiroFilter' is defined

是tomcat6不支持shiro 吗?不熟习这个



0
w
wj481199

我也遇到过这个错误,请查看项目是否有错误,我的错误是:

在myeclipse中项目右键builders 里面有一个红叉, 删除 就可以了

返回顶部
顶部