hello,
We have just upgraded our application from Seam 1.1 Beta 2 to jboss-seam-1.1.0.CR2. From
then on i am getting this exception when the classes are being scanned by seam during
server startup.
21:10:14,775 INFO [Initialization] initializing Seam
21:10:14,785 INFO [Scanner] scanning:
C:\devtools\eprocurement-tomcat\webapps\eprocurement\WEB-INF\classes
21:10:19,542 INFO [Scanner] scanning:
/C:/devtools/eprocurement-tomcat/webapps/eprocurement/WEB-INF/lib/jboss-seam.jar
21:10:21,505 ERROR [[/eprocurement]] 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:
emailSession
at org.jboss.seam.init.Initialization.addComponentDescriptor(Initialization.java:351)
at
org.jboss.seam.init.Initialization.installScannedComponentAndRoles(Initialization.java:500)
at org.jboss.seam.init.Initialization.installScannedClass(Initialization.java:449)
at org.jboss.seam.init.Initialization.scanForComponents(Initialization.java:443)
at org.jboss.seam.init.Initialization.init(Initialization.java:426)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
emailSession is an application component defined in components.xml. I pass some properties
to this component through components.xml
| <component class="com.OutboundEmailSession">
| <property name="host">emalhost</property>
| <property name="fromAddress">me(a)test.com
| </property>
| <property name="fromName">My Name</property>
| </component>
|
This error disappears when I remove this component declaration from components.xml
I guess when i declare my component in components.xml the component is found twice by seam
during initialization
This was working fine when in Beta 2. Is there a change in component precedence which i
have to explicitly set for using CR1.2.
regards
Venkatesh
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991655#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...