0 Replies Latest reply on Aug 31, 2008 9:25 AM by Enping Yang

    Could not instantiate Seam component caused by java.lang.ClassCastException:

    Enping Yang Newbie

      Hi, All,

      I test Seam with a JSF page and a back bean(one POJO edition and another session bean edition), the back bean provides a string property display by the JSF page. The application runtime environment: Windows, JDK 1.5.011, Glassfish V2UR1, Seam 2.0.2SP1.
      The test failed, neither POJO component nor session bean component, the following is the error message when use POJO component:

      Could not instantiate Seam component: helloBean2
           at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:50)
      Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: helloBean2
           at org.jboss.seam.Component.newInstance(Component.java:1986)
      Caused by: java.lang.ClassCastException: test.POJOHelloWorld
           at org.jboss.seam.Component.wrap(Component.java:1369)
           at org.jboss.seam.Component.instantiateJavaBean(Component.java:1324)

      Test case with session bean component run incorrect too, no exception raised, but the session bean method was never invoked.

      I checked the application startup log, the component helloBean2 was found by Seam.

      Any tips is appreciated, thanks!