Could not create stateless EJB

1,332 views
Skip to first unread message

xyz1

unread,
May 1, 2018, 10:26:40 AM5/1/18
to Payara Forum
On Payara 5 on trying to deploy EJBs, they are deployed properly but I get the following exception while running application.


Ondro Mihályi

unread,
May 1, 2018, 10:43:44 AM5/1/18
to xyz1, Payara Forum
Can you upload the stracktrace from the server's logs? This screenshot doesn't have necessary information to investigate.

2018-05-01 16:26 GMT+02:00 xyz1 <sko...@gmail.com>:
On Payara 5 on trying to deploy EJBs, they are deployed properly but I get the following exception while running application.


--
You received this message because you are subscribed to the Google Groups "Payara Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to payara-forum+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/a825b25f-8597-4202-b92c-b66bb96254a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

xyz1

unread,
May 1, 2018, 11:13:32 AM5/1/18
to Payara Forum


Hi Ondro

This is the stack trace

Caused by: javax.ejb.EJBException: javax.ejb.EJBException: javax.ejb.CreateException: Could not create stateless EJB
        at com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:446)
        at com.sun.ejb.containers.BaseContainer.getContext(BaseContainer.java:2627)
        at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:2020)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:210)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:90)
        at com.sun.proxy.$Proxy475.findByName(Unknown Source)
        at fr.milliweb.millistages.services.__EJB31_Generated__ConfigParameterFacade__Intf____Bean__.findByName(Unknown Source)
        at fr.milliweb.millistages.beans.AdminBean.isCourseListWithFuture(AdminBean.java:1865)
        at fr.milliweb.millistages.beans.AdminBean$Proxy$_$$_WeldClientProxy.isCourseListWithFuture(Unknown Source)
        at fr.milliweb.millistages.beans.CourseS3eBean.getCountAvailableCoursePlaceString(CourseS3eBean.java:2272)
        at fr.milliweb.millistages.beans.CourseS3eBean.getCountAvailableCoursePlace(CourseS3eBean.java:2233)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at javax.el.BeanELResolver.getValue(BeanELResolver.java:363)
        ... 75 more
Caused by: javax.ejb.EJBException: javax.ejb.CreateException: Could not create stateless EJB
        at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:715)
        at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:220)
        at com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:442)
        ... 90 more
Caused by: javax.ejb.CreateException: Could not create stateless EJB
        at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:525)
        at com.sun.ejb.containers.StatelessSessionContainer.access$000(StatelessSessionContainer.java:99)
        at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:713)
        ... 92 more
Caused by: java.lang.reflect.InvocationTargetException
        at com.sun.ejb.containers.BaseContainer.createEjbInstanceAndContext(BaseContainer.java:1730)
        at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:467)
        ... 94 more
Caused by: java.lang.NullPointerException
        at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
        at org.jboss.weld.manager.BeanManagerImpl.getBean(BeanManagerImpl.java:1168)
        at org.jboss.weld.manager.BeanManagerImpl.getBean(BeanManagerImpl.java:195)
        at org.glassfish.weld.services.JCDIServiceImpl.createInterceptorInstance(JCDIServiceImpl.java:406)
        at com.sun.ejb.containers.BaseContainer.createEjbInterceptors(BaseContainer.java:1799)
        at com.sun.ejb.containers.BaseContainer.createEmptyContextAndInterceptors(BaseContainer.java:1694)
        at com.sun.ejb.containers.BaseContainer.createEjbInstanceAndContext(BaseContainer.java:1708)

xyz1

unread,
May 2, 2018, 4:27:34 AM5/2/18
to Payara Forum
This issue is similar to https://github.com/javaee/glassfish/issues/20566

The reporter above added demo project too:


On Tuesday, May 1, 2018 at 7:26:40 PM UTC+5, xyz1 wrote:

Ondro Mihályi

unread,
May 2, 2018, 10:47:04 AM5/2/18
to xyz1, Payara Forum
The reproducer https://github.com/trajano/test/tree/nullpointer-cdi works on Payara 5 without issues. Can you provide a reproducer that gives the error on Payara 5?

--
You received this message because you are subscribed to the Google Groups "Payara Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to payara-forum+unsubscribe@googlegroups.com.

xyz1

unread,
May 3, 2018, 6:49:38 AM5/3/18
to Payara Forum
did you try it with Payara 5_181 and Java 8?


On Tuesday, May 1, 2018 at 7:26:40 PM UTC+5, xyz1 wrote:

Ondro Mihályi

unread,
May 3, 2018, 12:18:40 PM5/3/18
to Payara Forum
I tried with Payara 5.181 and Zulu JDK 8 and all worked when I accessed the hello URL.
Reply all
Reply to author
Forward
0 new messages