4 Replies Latest reply on Dec 2, 2009 7:51 PM by Nicklas Karlsson

    Inject SLSB into SFSB with @Inject failed

    Alexander Bell Newbie

      Hi,


      I want to inject a SLSB into a SFSB via the @Inject annotation.
      The SLSB implements the Serializable interface but unfortunately I get the following error:



      14:40:04,733 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=vfsfile:/C:/projects/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.0_Server/deploy/JBOSS-ear.ear/_WeldBootstrapBean state=Create: org.jboss.weld.UnserializableDependencyException: The bean org.jboss.weld.bean-flat-SessionBean-MyManagerImpl declares a passivating scope but has non-serializable dependency: org.jboss.weld.bean-flat-SessionBean-EmployeeServiceImpl
           at org.jboss.weld.Validator.validateInjectionPointPassivationCapable(Validator.java:191)
      




      SLSB



      @Stateless
      @Remote(org.j4fry.api.remote.EmployeeService.class)
      @Local(org.j4fry.api.local.EmployeeService.class)
      @TransactionManagement(TransactionManagementType.CONTAINER)
      public class EmployeeServiceImpl implements EmployeeService, Serializable  {     
           private static final long serialVersionUID = 1L;
      ...





      SFSB



      @Stateful
      @Local(MyManager.class)
      @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
      public class MyManagerImpl implements MyManager, Serializable {
           private static final long serialVersionUID = 1L;
           @Inject
           private EmployeeService e;
      ...





      Any suggestions?


      Alex