2 Replies Latest reply on Mar 14, 2007 8:08 PM by x y

    outjection problem?

    x y Newbie

      hi -

      i have the code below that works in one project and but not in a second one and i could not find why because i have the same entity/action beans in both projects.. both use the same seam/jboss setup.. the error i am getting is the following:

      "attempted to bind an Out attribute of the wrong type to: registerUser.newAddress"

      any clue is appreciated. thanks.

      @Stateful
      @Name("registerUser")
      public class RegisterUserAction implements RegisterUser, Serializable {

      @In(required = false) @Out
      private User newUser;

      @In(required = false) @Out
      private Address newAddress;

      @In(required=false, create=true)
      private EntityManager entityManager;

      @In @Out
      Identity identity;

      @Logger
      private Log log;

      private String addressTag;

      @Factory("newUser") @Begin
      public void start() {
      newUser = new User();
      newAddress = new Address();
      }
      ...
      ...

        • 1. Re: outjection problem?
          Norman Richards Master

          Did you change the jboss-app.xml to give them separate classloader repositories?

          • 2. Re: outjection problem?
            x y Newbie

            Norman - Thanks for the quick reply. I have removed all other ears and restarted the server so the problem should not be related to the classpath confusion. Since it works in one project, I guess it is ok to outject multiple objects, some of different type than the factory's type.

            @Factory("newUser") @Begin
            public void start() {
            newUser = new User();
            newAddress = new Address();
            }