1 Reply Latest reply on May 8, 2006 5:41 PM by Gavin King

    value found for In attribute has the wrong type

    Tim McCune Novice

      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
      java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
      at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
      at org.apache.myfaces.webapp.webxml.WebXmlParser.parse(WebXmlParser.java:76)

      Any suggestions would be appreciated. Thanks.