[EJB/JBoss] - Catch javax.ejb.EJBException: Could not activate; failed to
by csplrj
Software
JDK 1.5
JBoss 4.0.5GA
Problem
I know the beow mentioned error is as my bean is getting passivated and then when I try to use the Remote Interface that bean this error is thrown
I require a method by which I can catch this error and create a new bean whenever required. Does anyone knows of any way by which I will catch this specific error and create a new Stateful bean.
I mean to say some way by using the Remote Interface to find out whether the bean is active or has been vanished from the memory
Thanks in advance
CSJakharia
Error
2007-02-27 19:41:23,322 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] Activation failure
| javax.ejb.EJBException: Could not activate; failed to restore state
| at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:343)
| at org.jboss.ejb.plugins.StatefulSessionInstanceCache.activate(StatefulSessionInstanceCache.java:113)
| at org.jboss.ejb.plugins.AbstractInstanceCache.doActivate(AbstractInstanceCache.java:457)
| at org.jboss.ejb.plugins.StatefulSessionInstanceCache.doActivate(StatefulSessionInstanceCache.java:129)
| at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:123)
| at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:236)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
| at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
| at org.jboss.ejb.Container.invoke(Container.java:954)
| at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:819)
| at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
| at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
| at sun.rmi.transport.Transport$1.run(Transport.java:153)
| at java.security.AccessController.doPrivileged(Native Method)
| at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
| at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
| at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
| at java.lang.Thread.run(Thread.java:595)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023107#4023107
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023107
19Â years, 1Â month
[JBoss Seam] - ICEFaces SelectInputText (auto-complete)
by damianharvey
I have a problem with ICEFaces and Seam using the SelectInputText (auto-complete) component.
I can display a list well enough and have it limit based on letters typed in. However when I try to add code to get the selected item, it all goes wrong. The offending line in question is:
SelectInputText autoComplete = (SelectInputText) event.getComponent();
As you'd expect this casts the incoming component to com.icesoft.faces.component.selectinputtext.SelectInputText. This results in a ClassCastException for me.
To further frustrate matters I have checked the incoming component class and it is indeed com.icesoft.faces.component.selectinputtext.SelectInputText.
log.info("Event Component has class :"+event.getComponent().getClass().getName());
14:38:48,571 INFO [STDOUT] Event Component has class :com.icesoft.faces.component.selectinputtext.SelectInputText
I have added code to the ICEFaces sample and the only difference that I can see is that when it is passed in by the ICEFaces example it is an instance of SelectInputText, yet for some reason when I pass it in via Seam (and this includes using the sample code in my Seam project) it is not an instance.
event.getComponent() instanceof com.icesoft.faces.component.selectinputtext.SelectInputText
Does anyone know why this difference might result? As the ICEFaces sample code doesn't run in my project I assume that it is a configuration issue. Has anyone had ClassCast / instanceOf problems before?
Thanks,
Damian.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023104#4023104
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023104
19Â years, 1Â month