[EJB 3.0] - Odd javax.ejb.EJBNoSuchObjectException
by tom_goring
Hi,
I've got an EJB3 app working with jboss seam.
On one of my SFSB I'm getting a javax.ejb.EJBNoSuchObjectException.
Within a single HTTP request (so no timeout issues) The SFSB is getting created, called but at the end of the request I get the exception. The Remove is not getting called on the bean. There is no other exception occouring that would have removed the SFSB as well.
Any ideas why this would happen ? I'd understand it if it was a timeout and my remove had been called.
| 13:43:22,765 WARN [Contexts] Could not destroy component: employeeCompanyListBean
| javax.ejb.EJBNoSuchObjectException: Could not find Stateful bean: 5c4o05-mir5ct-ezv68x77-1-ezv76mcd-1o
| at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:268)
| at org.jboss.ejb3.stateful.StatefulRemoveInterceptor.removeSession(StatefulRemoveInterceptor.java:127)
| at org.jboss.ejb3.stateful.StatefulRemoveInterceptor.invoke(StatefulRemoveInterceptor.java:87)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
|
| @Local
| public interface EmployeeCompanyCRUD {
| public void create();
| public void destroy();
| public void postActivate();
| public void prePassivate();
|
| public void initList();
| public void initFilter();
|
| public String editEntity();
| public String updateEntity();
| public String deleteEntity();
| public String newEntity();
| public String cancelEntity();
|
|
|
| public Employee getEditingEmployeeCompany();
| public void setEditingEmployeeCompany(Employee editingEmployee);
| public EmployeeFilter getEmployeeCompanyFilter();
| public void setEmployeeCompanyFilter(EmployeeFilter employeeCompanyFilter);
| public List<Employee> getEmployeeList();
| public void setEmployeeList(List<Employee> employeeList);
|
| public final static String Success = "success";
| }
|
| @Stateful
| @Scope(ScopeType.CONVERSATION)
| @Name("employeeCompanyListBean")
| @CacheConfig(idleTimeoutSeconds=100)
| public class EmployeeCompanyCRUDBean implements EmployeeCompanyCRUD, Serializable {
| private static final long serialVersionUID = 1L;
| ..
| @EJB
| private CompanyManagerLocal companyManager=null;
|
| @EJB
| private EmployeeManagerLocal employeeManager=null;
| ..
| @Create
| public void create() {
| log.info("create "+toString());
| }
|
| @PostActivate
| public void postActivate() {
| log.info("postActivate"+toString());
| }
|
| @PrePassivate
| public void prePassivate() {
| log.info("prePassivate"+toString());
| }
|
|
| @Remove @Destroy
| public void destroy() {
| log.info("destroy");
| }
|
| ..
| }
|
|
|
| | 13:43:16,796 INFO [EmployeeCompanyCRUDBean] create jnet.fui.bl.accountant.EmployeeCompanyCRUDBean@f8093f
| | 13:43:16,796 INFO [EmployeeCompanyCRUDBean] initFilter
| | 13:43:16,796 INFO [EmployeeCompanyCRUDBean] initList
| | ..
| | 13:43:17,687 INFO [UserConversation] destory 7 - 1175172197171 - ConversationContext(5)
| | 13:43:22,765 INFO [UserComponentManagerBean] destroy
| | 13:43:22,765 WARN [Contexts] Could not destroy component: employeeCompanyListBean
| | javax.ejb.EJBNoSuchObjectException: Could not find Stateful bean: 5c4o05-mir5ct-ezv68x77-1-ezv76mcd-1o
| |
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032742#4032742
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032742
19Â years
[Installation, Configuration & Deployment] - add custome appenders to log4j.xml
by Lidon80
Hi, I created my own appender that logging data to another ejb using JNDI. My question is, how can I add my external jar package to log4j.xml, beause when I do this:
| <appender name="xxxx" class="logg.to.MyClass ">
|
| <layout class="org.apache.log4j.PatternLayout">
|
| <param name="ConversionPattern" value="%t %d %x %-5p [%c.%M] %m%n"/>
|
| </layout>
| </appender>
|
| <category name="ptk.cv.scoring">
| <priority value="INFO" />
| <appender-ref ref="xxxx"/>
| </category>
|
I get the error:
?Could not create an Appender. Reported error follows.
java.lang.ClassNotFoundException: logg.to.MyClass?
I added jar with my appender class in: jboss/server/default/lib
I put this appender in to log4j.xml because I have to be able change logg level dynamicly through jmx-console.
I?m using jboss-4.0.5.GA and sdk_1.4.2_13.
Thanks for any help.
Lidon.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032741#4032741
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032741
19Â years
[JBossCache] - CacheAPI
by FredrikJ
I'm using the 2.0 Habanero cache and I want to access my cache as a CacheSPI. The reason being that I want to access nodes as NodeSPI so I can inspect (and possible upgrade) the node lock.
Now,
I started to check the Javadoc on how to get the CacheSPI instead of the regular Cache interface, but couldn't relly find anything. So I checked the test implementations for the 2.0, and found that you do this:
cache = (CacheSPI) DefaultCacheFactory.getInstance().createCache(...);
However, in the Javadoc we find:
You should NEVER attempt to directly cast a Cache instance to this interface.
ok, so I'm guessing that you want guys like me not to look at the unit tests and cast the Cache to a CacheSPI (because it may not work in the future) =)
But, do you have any recommend way of getting a CacheSPI?
Is there any other way then to make a cast at the moment?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032738#4032738
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032738
19Â years