2 Replies Latest reply on Jul 31, 2007 6:11 PM by szaccaria

    Could not create Component : class is abstract!

    szaccaria

      Hello to all!
      I 've a problem with deploy of my web app with seam 2.0B1
      I've JBOSS 4.2GA and use .ear project with ejb

      I've recived this kind off error:

      19:49:21,062 ERROR [wfcoin]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      java.lang.RuntimeException: Could not create Component: jwf_clifor
       at org.jboss.seam.init.Initialization.addComponent(Initialization.java:908)
      ....
      ....
      ....
      Caused by: java.lang.IllegalArgumentException: component class is abstract: jwf_clifor
       at org.jboss.seam.Component.<init>(Component.java:225)
       at org.jboss.seam.Component.<init>(Component.java:207)
       at org.jboss.seam.init.Initialization.addComponent(Initialization.java:894)
       ... 139 more
      


      after the 'initialization' have install successfully some component
      like you can look beside.

      19:49:20,922 INFO [Initialization] Installing components...
      19:49:20,969 INFO [Component] Component: authenticator, scope: STATELESS, type: STATELESS_SESSION_BEAN, class: com.cesaco.wfcoin.Authenticator, JND
       com.cesaco.wfcoin/Authenticator/local
      19:49:21,031 INFO [Component] Component: entityManager, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.persistence.ManagedPersistenceC
      text
      19:49:21,031 INFO [Component] Component: gestione, scope: SESSION, type: STATEFUL_SESSION_BEAN, class: com.cesaco.wf.manager.Gestione, JNDI: com.ce
      co.wfcoin/Gestione/local
      19:49:21,062 INFO [Component] Component: jwf_cliente, scope: SESSION, type: ENTITY_BEAN, class: com.cesaco.wf.users.Cliente
      19:49:21,062 ERROR [wfcoin]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      
      


      I don't understand what happens
      Somebody can help me, please ? :_(

      Thanks


        • 1. Re: Could not create Component : class is abstract!

          Hi Stefano,

          As you might have figured out by now, Seam cannot instantiate your component class (defined w/ @Name("jwf_clifor")) because the class is marked as abstract. Looks like @Name can only be used in non-abstract classes.

          I got to the same situation when trying to define an abstract class w/ some @In annotations... since they ignored, I tried to define @Name("myAbstractClass") - which does not make a lot of sense, but..

          Question for Seam advanced users/devels: is it so that Seam annotations in super/abstract classes are not considered by Seam interceptor?? That would be an unfortunate restriction.

          br,
          Diego

          • 2. Re: Could not create Component : class is abstract!
            szaccaria

            Thanks Diego,
            I appreciated your reply!!!
            I had already resolved the problem, but you have cleared me the thing ulteriorly.

            Scusa, ma sei italiano?
            Grazie comunque ;-)