开发者

Seam IllegalStateException: Two components with the same name and precedence

When I run my seam application I get the following error

Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
java.lang.IllegalStateException: Two components with the same name and precedence - component name: wizardController, component classes: package.WizardController, package.WizardController
    at org.j开发者_运维百科boss.seam.init.Initialization.addComponentDescriptor(Initialization.java:543)
    at org.jboss.seam.init.Initialization.installScannedComponentAndRoles(Initialization.java:809)
    at org.jboss.seam.init.Initialization.scanForComponents(Initialization.java:756)
    at org.jboss.seam.init.Initialization.init(Initialization.java:629)
    at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:35)

I am not able to resolve this problem.


Seems like you have two components with the name wizardController. Try searching for wizardController and see if you find any duplicates somewhere.


You define the same component twice. Look if you have forgotten a @Name("componentName") inside your code and the same component definition in components.xml.

Or the same @Name("componentName") in two or more classes (copy-pasted and forgot to change the component name).


Assuming you don't have two classes with the same component name:

This sometimes happens if you have renamed a component and didn't clean out your build/deploy directories. The old .class and the new .class with the same component names will still get deployed.

Clean and re-deploy. That should fix it.


make sure the folder WEB-INF/dev is not exported with WAR file. Delete them if exists.

regards, Marcus Vinícius Bastos de Andrade


try checking your exploded-archives and see if is updated. This usually occurs when you created a class and used @Name annotation having the same name as your other class, but then decided to delete the class. You think its deleted, but it is still in the exploded-archives.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜