我把有些类重命名后出错

发布于 2021-11-21 07:37:54 字数 6306 浏览 801 评论 7

07-May-2014 17:36:41.813 SEVERE [http-nio-8084-exec-4] org.apache.catalina.core.StandardContext.filterStart Exception starting filter nutz

 org.nutz.mvc.LoadingException: org.nutz.lang.born.BorningException: Fail to born 'org.nutz.ioc.loader.annotation.AnnotationIocLoader'

 by args: [

  @(net.jcdn)] becasue:

Duplicate beanName=slideAction, by class net.jcdn.admin.action.SlideAction !!  Have been define by class org.nutz.ioc.meta.IocObject !! || Args Error or Abstract Class ?

 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

 at java.lang.reflect.Constructor.newInstance(Constructor.java:525)

 at org.nutz.lang.born.ConstructorBorning.born(ConstructorBorning.java:16)

 at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)

 at org.nutz.lang.Mirror.born(Mirror.java:968)

 at org.nutz.lang.Lang.wrapThrow(Lang.java:165)

 at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:116)

 at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)

 at org.nutz.mvc.NutFilter.init(NutFilter.java:57)

 at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)

 at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)

 at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)

 at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4574)

 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)

 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)

 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)

 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697)

 at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:579)

 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:455)

 at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1554)

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

 at java.lang.reflect.Method.invoke(Method.java:601)

 at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)

 at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

 at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)

 at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1428)

 at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:885)

 at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:343)

 at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)

 at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)

 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:301)

 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

 at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

 at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)

 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

 at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)

 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)

 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)

 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:615)

 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)

 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:74)

 at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)

 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)

 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)

 at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1015)

 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:652)

 at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)

 at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1575)

 at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1533)

 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

 at java.lang.Thread.run(Thread.java:722)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

路还长,别太狂 2021-11-25 17:44:52

太感谢了!

毁梦 2021-11-25 17:41:49

英语水平不行

狼亦尘 2021-11-25 17:41:03

回复
当初的确动过念头,除了注释用中文,连异常信息也用中文,不过还是克制住了这个冲动 :P

坚持沉默 2021-11-25 17:20:20

这个异常很清楚的告诉你 " Duplicate beanName "

悸初 2021-11-25 14:24:01

好了,谢谢

背叛残局 2021-11-25 06:34:26

@IocBean(name="xxxx123")

你曾走过我的故事 2021-11-25 02:45:15

nutz的ioc

1. 不允许bean重名

2. @IocBean 默认生成的bean的名字是首字母小写的类名, 例如 MyService的默认名字是myService

所以, 只需要为同名的类的@IocBean分配不同的名字,就可以了. ps: 同名类可不是什么好实践.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文