Hello,
what can be the reason why the EJBs disappear every now and then? Is there a bug in the EJB management of Glassfish/Payara?
Steven
Hello,
what can be the reason why the EJBs disappear every now and then? Is there a bug in the EJB management of Glassfish/Payara?
Steven
Can you provide the class definition with the annotations of the EJB? And perhaps the beans.xml, if applicable? In which situation is this error thrown?
Hello,
here’s an example:
@Stateful
@StatefulTimeout(unit = TimeUnit.HOURS, value = 12)
public class ParentAdministrationImpl extends CommonEntityAdministrationAbstract<ParentEntity> implements ParentAdministration<ParentEntity> {
private static final Logger LOGGER = LogManager.getLogger(ParentAdministrationImpl.class);
...
@Override
public List<String> getInvisibilityFieldNameList(String jsfFileName, String parentId) {
List<String> invisibleFieldNameList = CommonUtil.createList();
try {
Optional<ParentEntity> parent = getParentEntity(jsfFileName, parentId);
if (parent.isPresent()) {
parent.get().getInvisibilityEntityList()
.forEach(entity -> invisibleFieldNameList.add(entity.getChildComponentId()));
} else {
// do nothing
}
} catch (Exception e) {
LOGGER.error(e);
}
return invisibleFieldNameList;
}
...
beans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
version="2.0"
bean-discovery-mode="all">
</beans>
Exception:
:stackTrace:
javax.ejb.NoSuchEJBException: The EJB does not exist. session-key: 1907f0100001f-1d95f4a-267
at com.sun.ejb.containers.BaseContainer.mapLocal3xException(BaseContainer.java:2394)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2183)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2104)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:90)
at de.huss.mds.ParentAdministration$Serializable$172206067$Proxy$_$$_Weld$EnterpriseProxy$.getInvisibilityFieldNameList(Unknown Source)
This happens once every weeks. I intercept all critical areas with try/catch. I can’t understand what makes Payara do this. There may be a general problem with the EJB management, but it seems to be an exception for me.
It always shows up with other method calls too…
Steven