[JBoss Seam] - getting javax.ejb.EJBNoSuchObjectException periodically
by liudan2005
I keep getting this exception periodically. It seems Seam can't find my stateful bean when trying to destroy my timed out conversation. Anyone having the same problem?
| javax.ejb.EJBNoSuchObjectException: Could not find Stateful bean: 5c4o05h-wulhek-f1g66qmp-1-f1ghkdmx-2f
| 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 $Proxy427.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.interceptors.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:31)
| 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_204.destroy(Object_$$_javassist_204.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.endSession(Lifecycle.java:297)
| at org.jboss.seam.servlet.SeamListener.sessionDestroyed(SeamListener.java:45)
| at org.apache.catalina.session.StandardSession.expire(StandardSession.java:687)
| at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:579)
| at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:678)
| at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:663)
| at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1284)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1569)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
| at java.lang.Thread.run(Thread.java:595)
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043957#4043957
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043957
19 years
[JBoss Seam] - Getting Started with Seam and Maven / Migrating from Spring
by -Arthur-
Hi,
i'm fed up with developing Web Apps with Spring.
Spring is cool, no question, but the overhead is pretty too much. And its not a Web Framework.
Seams seems to be the thing i am searching for.
So i'm willing to learn another framework ;)
Seam tends to be an easy way to get things working and enables really cool features.
So, i plan to migrate my recent started own project onto Seam.
I wanna drop the whole spring stuff and migrate completely, because of consistency and so on.
At the moment the project isn't really big; ~ 90 classes. So i hope its not gonna be a bad pain.
My current project is built with Maven2 and i really want to reside on that.
This is the current build:
Facelets, MyFaces, Tomahawk, Ajax4JSF, Richfaces, Acegi, Spring, Hibernate.
I deploy to jetty on development with code/compile/test cycle. Is this possible with seam?
Should i use JBoss AS or Microcontainer?
I'm familar with Hibernate and would like to use it further.
Or yould you advice to change to EJB3?
Has anyone hints / advices / best practices to do my intend?
I've alerady discovered http://software.softeu.cz/seam/index.html for Maven2 support.
How i get started fast? ;)
Thansk very much for fast reply! I'm willing to begin this evening ;)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043953#4043953
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043953
19 years
[EJB 3.0] - EntityManagerFactory creation failure EJB 2.1 - EJB 3.0
by rkite01
I have a sample application I am using to learn EJB 3.0. I am having a problem accessing EJB 3.0 beans from an EJB 2.1 session bean. I can not get an EntityManagerFactory. I need an EntityManager to perform an EJB 3.0 finder from the 2.1 Session bean. I am using JBoss 4.2 CR2. Using EJB 3.0 session and entity Beans together is not a problem. What else needs to be done?
Here is the error I am getting from the EntityManagerFactory creation line.
10:52:50,799 INFO [SettingsFactory] Default entity-mode: pojo
10:52:50,799 INFO [SettingsFactory] Named query checking : enabled
10:52:50,799 INFO [SessionFactoryImpl] building session factory
10:52:50,815 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no
JNDI name configured
10:52:50,815 ERROR [LogInterceptor] RuntimeException in method: public abstract
java.util.TreeSet com.ejb.UserManager.retrieveMessages(java.lang.String) throws
java.lang.Exception,java.rmi.RemoteException:
javax.persistence.PersistenceException: org.hibernate.HibernateException: The ch
osen transaction strategy requires access to the JTA TransactionManager
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Con
figuration.java:720)
// Example of getting EJB 3.0 beans from EJB 2.1 Session Bean.
public List findPosts(String userLogin) throws Exception
{
HashMap map = new HashMap();
InitialContext initialContext = new InitialContext();
EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("imEjb30", map);
EntityManager entityManager = entityManagerFactory.createEntityManager();
entityManagerFactory.close();
Query query = entityManager.createNamedQuery("findPosts");
query.setParameter(0, userLogin);
List list = query.setMaxResults(10).setFirstResult(0).getResultList();
return(list);
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043950#4043950
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043950
19 years
[Management, JMX/JBoss] - MBeans: Unable to cast the returned object instance
by Ulmer
Hi all,
executing a mbean method with a custom return type i can't cast the returned object instance to the appropriate data type.
ClassCastException:
anonymous wrote :
| java.lang.ClassCastException: mypackage.MyDto cannot be cast to mypackage.MyDto
MBean:
| public interface MyMBean extends org.jboss.system.ServiceMBean {
| ...
| public MyDto holeMyDto(String test) throws Exception;
| ...
| }
|
Dto (Data Transfer object)
| public class MyDto implements Serializable {
| private static final long serialVersionUID = 3679919263323839707L;
| ...
| }
|
Client (deployed in a separate .war)
| InitialContext ic = new InitialContext();
| String rmiadaptername = "jmx/invoker/RMIAdaptor";
| MBeanServerConnection mbsc = (MBeanServerConnection) ic.lookup(rmiadaptername);
| ObjectName objectName = new ObjectName(objectNameString);
| Object[] oa = { "P"};
| String[] sa = { "java.lang.String"};
| Object object = mbsc.invoke(objectName, "holeMyDto", oa, sa);
| DataPoolInfo result = (DataPoolInfo) object; // here comes the Exception
|
The execution from the jmx-console works fine. Please help.
Jboss 4.0.5 GA; Jdk 6.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043949#4043949
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043949
19 years
[JBoss Seam] - Re: Seam 1.2 released
by Newlukai
"petemuir" wrote : Post the exception :), see if it pins things down...
|
| If you submit a testcase to JIRA (needs to be simple and have just enough code to demonstrate the problem) I'll take a look at it. You could probably take the ui example and manipulate it...
Hi Peter,
I tested the ui exmaple. It works as expected.
Today I tried to modify the ui example to work with ICEfaces. It's not complete, since the pages aren't rendered correctly. But there's rendered enough to see that the value of the noSelection-option is an empty string instead of "org.jboss.seam.ui.NoSelectionConverter.noSelectionValue".
Here's the code of that page:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:ice="http://www.icesoft.com/icefaces/component"
| template="template.xhtml"
| >
| <ui:param name="tagName" value="s:selectItems" />
| <ui:define name="body">
| <p>This example shows example usage of the <code>s:selectItems</code> tag being used for CRUD on a <code>Person</code> entity.</p>
| <p>The example also uses:</p>
| <ul>
| <li><code>s:span</code></li>
| <li><code>s:convertEnum</code></li>
| <li><code>s:message</code></li>
| <li><code>s:decorate</code></li>
| <li><code>s:link</code></li>
| <li><code>s:conversationPropagation</code></li>
| <li><code>s:decorate</code></li>
| </ul>
|
| <ice:form>
| <s:decorate template="decorateField.xhtml">
| <ui:define name="label">Title</ui:define>
| <h:selectOneMenu value="#{person.honorific}">
| <s:selectItems value="#{honorifics}" var="honorific" label="#{honorific.label}" noSelectionLabel="Please select" />
| <s:convertEnum />
| </h:selectOneMenu>
| </s:decorate>
|
| <s:decorate template="decorateField.xhtml">
| <ui:define name="label">Name</ui:define>
| <ui:define name="description">Enter your name as it appears on your passport</ui:define>
| <h:inputText value="#{person.name}" required="true" />
| </s:decorate>
|
| <s:decorate template="decorateField.xhtml">
| <ui:define name="label">Continent of Birth</ui:define>
| <ice:selectOneMenu value="#{personHome.instance.continent}" required="true" id="continent">
| <s:selectItems value="#{continents.resultList}" var="continent" label="#{continent.name}" noSelectionLabel="Please Select..."/>
| <s:convertEntity />
| </ice:selectOneMenu>
| </s:decorate>
If I had a smooth running example I would post it. Perhaps you've better luck switching from ajax4jsf to ICEfaces in the ui example.
Thanks in advance
Newlukai
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043948#4043948
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043948
19 years