I'm just getting started with my first Seam app. I can't get the first page to work because I'm running into the error message in the subject. I opened up the code and added some debugging to figure out what the underlying problem was, and tracked it down to the isInstance() method of Component.java. I have a stateful session bean that got loaded by a org.jboss.mx.loading.UnifiedClassLoader3 class loader. Seam is checking to see if it implements its local interface, but it's using a version of the local interface from a different class loader: org.jboss.web.tomcat.tc5.WebAppClassLoader. So even though my bean implements the local interface, Seam's isAssignableFrom() check returns false because of the class loader discrepancy.
If I edit jbossweb-tomcat55.sar/META-INF/jboss-service.xml and set the UseJBossWebLoader attribute to "true", I can get around this problem, and Seam's isAssignableFrom() test starts working, however, this change causes all kinds of other problems. For instance:
[org.apache.myfaces.webapp.webxml.WebXmlParser] Unable to parse web.xml
at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
Any suggestions would be appreciated. Thanks.
Seems like a simple packaging problem.
Take a look at how we package the example applications.