Topic
1 reply Latest Post - ‏2013-05-13T16:23:24Z by bergmark
Adrian
Adrian
3 Posts
ACCEPTED ANSWER

Pinned topic wlp-8.5.next beta : CDI and EJB results in Passivation capable beans must satisfy passivation capable dependencies

‏2013-05-13T14:35:36Z |

 

Hello,
 
I'm using wlp-1.0.1.20130309-1525/websphere-kernel_1.0.1 (WAS 8.5 Liberty Profile .next beta).
 
I'm developping a JSF application with CDI beans for my presentation layer (Sample [1]) and inject Stateless EJB (sample [2]) into the controllers.
 
When I call the first page of the application, I get :
[ERROR   ] Passivation capable beans must satisfy passivation capable dependencies. Bean : SampleController, Name:sampleController, WebBeans Type:MANAGED, API Types:[java.lang.Object,java.io.Serializable,tmp.pag.exemple.common.SampleController], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  sampleService, Bean Owner : [SampleController, Name:sampleController, WebBeans Type:MANAGED, API Types:[java.lang.Object,java.io.Serializable,tmp.pag.exemple.common.SampleController], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
Passivation capable beans must satisfy passivation capable dependencies. Bean : SampleController, Name:sampleController, WebBeans Type:MANAGED, API Types:[java.lang.Object,java.io.Serializable,tmp.pag.exemple.common.SampleController], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  sampleService, Bean Owner : [SampleController, Name:sampleController, WebBeans Type:MANAGED, API Types:[java.lang.Object,java.io.Serializable,tmp.pag.exemple.common.SampleController], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
[ERROR   ] Une erreur sest produite lors du démarrage du contexte dapplication : [/exemple-web]
 
Adding Serializable interface to my EJB resolves this issue, but I shouldn't have to do that.
 
Is it possible to raise an issue for WAS 8.5 Liberty Profile .next Beta ?
 
Thanks,
Adriàn
 
[1] Sample controller
package tmp.pag.exemple.common;
 
import java.io.Serializable;
 
import javax.enterprise.context.SessionScoped;
import javax.inject.Inject;
import javax.inject.Named;
 
@Named
@SessionScoped
public class SampleController implements Serializable {
 
  @Inject
  private  SampleService sampleService;
 
  }
 
[2] Sample service :
package tmp.pag.exemple.common;
 
import javax.ejb.Stateless;
 
@Stateless
public class SampleService {
 
  public void doIt() {
  }
 
}
 
  • bergmark
    bergmark
    42 Posts
    ACCEPTED ANSWER

    Re: wlp-8.5.next beta : CDI and EJB results in Passivation capable beans must satisfy passivation capable dependencies

    ‏2013-05-13T16:23:24Z  in response to Adrian

    Thank you for reporting this issue with the beta.  I believe in this case the EJB was not correctly identified as an EJB (Type:Managed vs. WSEJBBean) and as such was not being detected as passivation capable.