[JBoss Seam] - javax.ejb.EJBNoSuchObjectException
by sradford
Hi,
In the last couple of days we've started seeing EJBNoSuchObjectExceptions happening and cannot work out why. I note a bunch of JIRA issues relating to this, but they are all marked as resolved, and as we are using the latest version of Seam think it must be something else.
In the below stacktrace, the session bean has the following annotations:
@Name("mySessionBean")
@Scope(ScopeType.EVENT)
@Stateful(name = "mySessionBean")
@Restrict("#{s:hasPermission('admin','search',null)}")
Any ideas?
Thanks and regards,
Sean
09:52:22,211 WARN [Contexts] Could not destroy component: mySessionBean
javax.ejb.EJBNoSuchObjectException: Could not find Stateful bean: a1ti30-dry6bf-f1ketavl-1-f1kevak9-10
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)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
at $Proxy323.destroy(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:40)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
at org.javassist.tmp.java.lang.Object_$$_javassist_40.destroy(Object_$$_javassist_40.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:123)
at org.jboss.seam.Component.callComponentMethod(Component.java:1834)
at org.jboss.seam.Component.callDestroyMethod(Component.java:1765)
at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:231)
at org.jboss.seam.contexts.Lifecycle.flushAndDestroyContexts(Lifecycle.java:439)
at org.jboss.seam.contexts.Lifecycle.endRequest(Lifecycle.java:315)
at org.jboss.seam.jsf.AbstractSeamPhaseListener.afterRender(AbstractSeamPhaseListener.java:256)
at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:115)
at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044907#4044907
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044907
19 years, 1 month
[JBoss Seam] - Problem of Multi selectOneMenu
by zengqi
Hi, all. I want to setup 4 level category selectOneMenu. When the first category value change, the second category selectItems will change automaticlly according to the value of the first category.
I use QuoteHisSearch to store search infomation:
package com.baida.beans;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import javax.persistence.EntityManager;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.log.Log;
@Name("quoteHisSearch")
public class QuoteHisSearch {
/*
* search parameters
*/
private Category topCategory;
private Category secondCategory;
private Category thirdCategory;
private Category fourthCategory;
private List topCategories;
private List secondCategories;
private List thirdCategories;
private List fourthCategories;
public Category getTopCategory() {
return topCategory;
}
public void setTopCategory(Category topCategory) {
this.topCategory = topCategory;
}
public Category getSecondCategory() {
return secondCategory;
}
public void setSecondCategory(Category secondCategory) {
this.secondCategory = secondCategory;
}
public Category getThirdCategory() {
return thirdCategory;
}
public void setThirdCategory(Category thirdCategory) {
this.thirdCategory = thirdCategory;
}
public Category getFourthCategory() {
return fourthCategory;
}
public void setFourthCategory(Category fourthCategory) {
this.fourthCategory = fourthCategory;
}
public List getTopCategories() {
return topCategories;
}
public void setTopCategories(List topCategories) {
this.topCategories = topCategories;
}
public List getSecondCategories() {
return secondCategories;
}
public void setSecondCategories(List secondCategories) {
this.secondCategories = secondCategories;
}
public List getThirdCategories() {
return thirdCategories;
}
public void setThirdCategories(List thirdCategories) {
this.thirdCategories = thirdCategories;
}
public List getFourthCategories() {
return fourthCategories;
}
public void setFourthCategories(List fourthCategories) {
this.fourthCategories = fourthCategories;
}
}
In QuoteHisList.java, I add these two function:
public void updateCategories(){
quoteHisSearch.setTopCategories(getChildrenCatgorys(null));
if(quoteHisSearch.getTopCategory() != null)
quoteHisSearch.setSecondCategories(getChildrenCatgorys(quoteHisSearch.getTopCategory()));
if(quoteHisSearch.getSecondCategory() != null)
quoteHisSearch.setThirdCategories(getChildrenCatgorys(quoteHisSearch.getSecondCategory()));
if(quoteHisSearch.getThirdCategory() != null)
quoteHisSearch.setFourthCategories(getChildrenCatgorys(quoteHisSearch.getThirdCategory()));
}
public List getChildrenCatgorys(Category category){
EntityManager entityManager = getEntityManager();
List children = null;
if(category == null){
children = entityManager.createQuery("from Category where category=null").getResultList();
}else{
children = (List)entityManager.createQuery("from Category where category=:category")
.setParameter("category", category)
.getResultList();
}
if(children == null){
children = new LinkedList();
}
return children;
}
Then add in QuoteList.page.xhtml.
QuoteList.xhtml's code is like that:
<s:decorate id="categoryDecoration" template="layout/display.xhtml">
<ui:define name="label">#{messages['category.category']}</ui:define>
<h:selectOneMenu id="topCategory"
value="#{quoteHisList.quoteHisSearch.topCategory}" onchange="submit()">
<s:selectItems value="#{quoteHisList.quoteHisSearch.topCategories}"
var="category"
label="#{category.categoryName}"
noSelectionLabel="#{messages['common.noSelection']}"
hideNoSelectionLabel="false"/>
<s:convertEntity/>
</h:selectOneMenu>
<h:selectOneMenu id="secondCategory" value="#{quoteHisList.quoteHisSearch.secondCategory}" >
<s:selectItems value="#{quoteHisList.quoteHisSearch.secondCategories}"
var="category"
label="#{category.categoryName}"
noSelectionLabel="#{messages['common.noSelection']}"
hideNoSelectionLabel="false"/>
<s:convertEntity/>
<a:support event="onselectchange" reRender="categoryDecoration"/>
</h:selectOneMenu>
<h:selectOneMenu id="thirdCategory" value="#{quoteHisList.quoteHisSearch.thirdCategory}" >
<s:selectItems value="#{quoteHisList.quoteHisSearch.thirdCategories}"
var="category"
label="#{category.categoryName}"
noSelectionLabel="#{messages['common.noSelection']}"
hideNoSelectionLabel="false"/>
<s:convertEntity/>
<a:support event="onselectchange" reRender="categoryDecoration"/>
</h:selectOneMenu>
</s:decorate>
I can get the top categories as well. But when I change the top category, the seconde category selectitems will not change. I add log to look what's the wrong, I found that the qouteHisSearch.topCategory is always not changed, so the method updateCategories() will not change the value of quoteHisSearch.secondCategories.
Would you help me to fix this problem?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044906#4044906
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044906
19 years, 1 month
[JBoss jBPM] - org.hibernate.ObjectNotFoundException: No row with the given
by heiko.zehner
Hi there,
we use JMS/MDB instead of the scheduler servlet. After creating a new process instance and if the first process step is asynchronous, a
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.jbpm.graph.exe.Token#677214]
at org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27)
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:65)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:98)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:133)
at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$85898e65.getProcessInstance()
at org.jbpm.command.MessageWrapper.toString(MessageWrapper.java:65)
at java.lang.String.valueOf(String.java:2131)
at java.lang.StringBuffer.append(StringBuffer.java:370)
at de.tonline.ccms.msg.mdb.JbpmMessageListener.onMessage(JbpmMessageListener.java:62)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
occurs. As work- around, we added a sleep of 10 secs in JbpmMessageListener onMessage.
Is there a better solution avaliable for this issue?
Thanks
Heiko
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044901#4044901
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044901
19 years, 1 month