Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1115

UnserializableDependencyException with dependency on SLSB

    Details

      Description

      An application containing the following beans (among others) fails to deploy with org.jboss.weld.exceptions.UnserializableDependencyException.

      @SessionScoped
      @Stateful
      public EjbGameBean implements Serializable {
       ...
       @Inject
       RandomStatelessEjb randomStatelessEjb;
      
       ...
      }
      
      @Stateless
      public class RandomStatelessEjb
      {
         @Inject
         @Random
         Instance<Integer> randomNumber;
         
         public int getRandom() {
            return randomNumber.get();
         }
      }
      

      It probably shouldn't require a @Stateless session bean to be Serializable.

      JBAS014777:   Services which failed to start:      service jboss.deployment.unit."weld-clustering-tests.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."weld-clustering-tests.war".WeldService: org.jboss.weld.exceptions.UnserializableDependencyException: WELD-001413 The bean Session bean [class org.jboss.weld.tests.clustering.numberguess.decorator.EjbGameBean with qualifiers [@Default @Named @Any]; local interfaces are [GameLocal] declares passivating scope but has non-serializable dependency Session bean [class org.jboss.weld.tests.clustering.numberguess.decorator.RandomStatelessEjb with qualifiers [@Any @Default]; local interfaces are [RandomStatelessEjb]
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jharting Jozef Hartinger
                  Reporter:
                  maschmid Marek Schmidt
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: