More than one Seam phase listener per application


 

If you face the below exception in a web application involving JBoss-Seam please read on.

java.lang.IllegalStateException: No phase id bound to current thread (make sure you do not have two SeamPhaseListener instances installed)

Also when the server [for example Tomcat] is starting up, we may notice the below warning.

WARNING: There should only be one Seam phase listener per application

The possible reason may be that we played around when trying to get the application
up and running with JBoss-Seam and in the process jboss-seam-2.x.x.jar was copied under
servers common lib folder [in Tomcat it is TOMCAT_HOME\lib].

Then we forgot that copied jar and used Maven or Perhaps to build and deploy the application as a web archive.
Now as two instances of jboss-seam-2.x.x jars are present in classpath [one from the common lib folder
and the other within WEB-INF\lib of the specific web application], the above exception will occur.

The solution is to remove the jar at any one location

 
 
 
 
Comments:

Post a Comment:
  • HTML Syntax: Allowed
 

« January 2009
SunMonTueWedThuFriSat
    
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
       
Today

Valid XHTML or CSS?

[This is a Roller site]
 
© Karthik