EJB exception: Attempt to invoke when container is in Initializing

62 views
Skip to first unread message

Alessandro de Manzano

unread,
Jun 10, 2019, 2:47:30 PM6/10/19
to Payara Forum
Hi!

I'm trying to deploy my webapp to Payara 5.192 but I got this trap:


javax
.ejb.EJBException: Attempt to invoke when container is in Initializing



during the deploy phase.


This is coming from an @ApplicationScope CDI bean where I simulate the "@Startup" of EJBs using this construct:

    public void cdiinit(@Observes @Initialized(ApplicationScoped.class) Object init)
   
{
        LOG
.info("fetstartup cdiinit");
   
}



it also contains this @Postconstruct:


    @PostConstruct
   
public void init()
   
{
        LOG
.info("fetstartup init");


       
// carichiamo lo schema in DB
        loadSchemaInDB
();


        LOG
.info("fetstartup completed");
   
}



the exceptions comes from the "loadschemainDb" because I try to use an EJB:


    @EJB
   
private GeneralSettingsEJB generalSettingsEJB;

...
schema
= generalSettingsEJB.getValueByKey(...
...





this machinery works fine with Wildfly 14+ , so I'ld know how to make it works on Payara 5 too.

many thanks!

Ale

Reply all
Reply to author
Forward
0 new messages