0

I have a problem with deployed Java web application containing one Stateful session bean. Everything works fine until I try to invoke this bean. I get an exception:

javax.ejb.NoSuchObjectLocalException: The EJB does not exist. session-key: 1f0090bf8a25c4d1-6500a82656529888-2

I tried to google it and I have found that this exception means that Stateful session bean with corresponding session-key does not exist or for some reason was destroyed. However on my localhost everything works fine.

According to some article on the web there might be some database error causing this session bean to be destroyed. I have found nothing in MySQL error log. Other STATELESS session beans work fine and operates over the database without any problems.

I am stucked here and dont know what to try. Do you have any ideas what can be wrong? Is there anythig I have to setup in JDBC connection pool or resource to manage session beans to work?

UPDATE: I believe these error messages from log explain the error in some way:

[#|2013-05-09T18:32:31.386+0000|INFO|glassfish3.1.2|org.shoal.ha.cache.command.load_request|_ThreadID=27;_ThreadName=Thread-2;|Skipped Loading of 1f0090bf8a25c4d1-6500a8265c5d6306-c since there is only one instance running in the cluster.|#]

[#|2013-05-09T18:32:31.386+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.container.ejb.com.sun.ejb.containers.util.cache|_ThreadID=27;_ThreadName=Thread-2;|NRU-cz.compoundsearch.resources.SimilarityResource: Cannot load from  BACKUPSTORE FOR Key: <1f0090bf8a25c4d1-6500a8265c5d6306-c>|#]

[#|2013-05-09T18:32:31.387+0000|WARNING|glassfish3.1.2|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=27;_ThreadName=Thread-2;|EJB5184:A system exception occurred during an invocation on EJB SimilarityResource, method: public java.util.List cz.compoundsearch.resources.SimilarityResource.returnResults(java.lang.Integer,java.lang.Integer)|#]
4

2 回答 2

0

system exception occurred during an invocation on EJB means that there a runtime exception was thrown from the bean. You surely have it in your log as well, right after the last line you posted.

When an unchecked exception not annotated with @AplicationException is thrown from EJB method, the bean is immediately destroyed and trying to invoke any method of it results is this error.

Can you please explain how are you using stateful bean from a Rest resource? How does Glassfish know which instance to invoke? Last time I checked @ConversationScoped or @SessionScoped were not playing nicely with JAX-RS.

于 2013-05-15T18:25:21.300 回答
-1

你在哪里调用 EJB?在会话 bean 中?在控制器中?转到实体并查看您是否不更改名称中的单个字符...

这种情况发生在我身上,问题是我错误地切换了一个角色寻找名称(...)facade

一些大写字母被错误地改变了

试试看这个

为我工作

于 2013-05-09T18:21:58.663 回答