NutzCN Logo
问答 发现有重复的bean name,兽兽哥,如何解决这个问题?
发布于 3261天前 作者 lanxianghua 3263 次浏览 复制 上一个帖子 下一个帖子
标签:

我明明覆盖了类,却还是报重名?
@IocBean
@InjectName
@At({ "/btnUtilController" })
@Fail("error")
@AuthBy(login = false)
public class BtnUtilController {
}
2016-01-19 11:28:53,630 [localhost-startStop-1] ERROR org.nutz.mvc.impl.NutLoading - Error happend during start serivce!
org.nutz.lang.born.BorningException: Fail to born 'org.nutz.ioc.loader.annotation.AnnotationIocLoader'
by args: [
@(com.venustech.tsoc.cupid)] becasue:
Duplicate beanName=btnUtilController, by class com.venustech.tsoc.cupid.audit.util.BtnUtilController !! Have been define by class org.nutz.ioc.meta.IocObject !!
at org.nutz.lang.born.DynamicConstructorBorning.born(DynamicConstructorBorning.java:21)
at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
at org.nutz.lang.Mirror.born(Mirror.java:923)
at org.nutz.ioc.loader.combo.ComboIocLoader.createIocLoader(ComboIocLoader.java:85)
at org.nutz.ioc.loader.combo.ComboIocLoader.(ComboIocLoader.java:69)
at com.venustech.tsoc.cupid.commons.mvc.ioc.ComboIocProvider.create(SourceFile:40)
at org.nutz.mvc.impl.NutLoading.createIoc(NutLoading.java:311)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:86)
at com.venustech.tsoc.CupidNutLoading.load(SourceFile:22)
at org.nutz.mvc.ActionHandler.(ActionHandler.java:19)
at org.nutz.mvc.NutFilter.init(NutFilter.java:54)
at com.venustech.tsoc.CupidNutFilter.init(SourceFile:36)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:103)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1637)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:745)
Caused by: java.lang.reflect.InvocationTargetException
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:526)
at org.nutz.lang.born.DynamicConstructorBorning.born(DynamicConstructorBorning.java:18)
... 28 more

8 回复

日子往前找,肯定已经有了一个btnUtilController

@wendal 你的意思是有第二个重复的bean name?

肯定是重名了才报这个

@wendal 我以前都是按原来的目录路径覆盖,都没事的?不可能有重复的

查报错之前的日志

@wendal 之前的日志没有报错,就是从这里开始报的?

@wendal public class BtnUtilController {
Logger logger = Logger.getLogger(getClass().getName());

public static String CONDITION_SESSION_KEY = "audit.realtime.condition";

public static int columnNums = 40;

public static long refreshTime = 10000L;

public static int eventNum_export = 30000;

会不会跟那个log的getClass有关系?

很多时候,就是没clean没编译...

添加回复
请先登陆
回到顶部