1 Reply Latest reply on Jul 22, 2007 4:18 AM by mvlach

    Problem with injection

    mvlach

      I have problem with injection to the component.

      On the view I have the form with <h:inputText value="#{reason.reason}" />

      This is populated to the bean named reason which contains only one String reason.

      But the I invoke the action method in the reason is not instance of reason but this:

      cz.bpsolutions.ims.beans.Reason_$$_javassist_7

      There is problem with our validation solution, which use reflection to call validation method. This validation solution could't find the possible method bedause of type diference....

      My question is: why isn't injected instance of Reason object instead of javaassist ?

      Thanks Mila

      Caused by: java.lang.NoSuchMethodException: cz.bpsolutions.mis.request.SimpleValidator.<init>(cz.bpsolutions.ims.beans.Reason_$$_javassist_7)
       at java.lang.Class.getConstructor0(Class.java:2678)
       at java.lang.Class.getDeclaredConstructor(Class.java:1953)
      



        • 1. Re: Problem with injection
          mvlach

          I found the reason why it is javaassist.

          The entity Reason is not marked @Entity. When I add annotation @Entity, outjected bean to the page is class cz....Reason (not javaassist) and all works good. But this isn't entity - couldn't be mapped to the database.

          Is this bug in seam ?

          M.