Random low level error
tdhak Oct 25, 2002 6:22 PMHi,
I've got a jar file with basically 4 EJBs in it, 1 stateful fascade bean that looks up the home interfaces of the other 3 entity beans on creation.
I then call a method on the fascade that takes one object as a parameter; this then in turn uses the entity beans to update a datasource.
Now, when the server has just been restarted, and the beans have just been deployed, everything seems to work as expected (although not all the time).
If I then redeploy the beans, I get the following error :-
2002-10-25 22:14:51,590 TRACE [org.jboss.invocation.jrmp.server.JRMPInvoker] operation failed
It seems like a low level error, socket level, or protocol level, but to be honest I haven't got a clue as to why it keeps randomly breaking.
Below is a full trace of the error that is being generated in the logs :-
2002-10-25 22:14:37,515 INFO [org.jboss.deployment.MainDeployer] Successfully completed deployment of package: file:/usr/local/apps/jboss/server/default/deploy/ejbs.jar
2002-10-25 22:14:51,406 TRACE [org.jboss.ejb.plugins.LogInterceptor] Start method=create
2002-10-25 22:14:51,407 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is null
2002-10-25 22:14:51,408 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for create
2002-10-25 22:14:51,409 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx null
2002-10-25 22:14:51,414 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Starting new tx TransactionImpl:XidImpl [FormatId=257, GlobalId=pluto//22, BranchQual=]
2002-10-25 22:14:51,416 TRACE [org.jboss.ejb.plugins.StatefulSessionInstancePool] Get instance org.jboss.ejb.plugins.StatefulSessionInstancePool@91f022#true#class tsd_software.j2ee.user_management.ejbs.implementations.UserManageSessionEJB
2002-10-25 22:14:51,587 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT: In finally
2002-10-25 22:14:51,589 TRACE [org.jboss.ejb.plugins.LogInterceptor] End method=create
2002-10-25 22:14:51,590 TRACE [org.jboss.invocation.jrmp.server.JRMPInvoker] operation failed
java.rmi.ServerException: null
Embedded Exception
$Proxy30; nested exception is:
javax.ejb.EJBException: null
Embedded Exception
$Proxy30
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:119)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
at org.jboss.ejb.StatefulSessionContainer.invokeHome(StatefulSessionContainer.java:368)
at org.jboss.ejb.Container.invoke(Container.java:726)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:362)
at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
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:536)
Caused by: javax.ejb.EJBException: null
Embedded Exception
$Proxy30
at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.createSession(StatefulSessionFilePersistenceManager.java:186)
at org.jboss.ejb.StatefulSessionContainer.createHome(StatefulSessionContainer.java:441)
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:324)
at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invokeHome(StatefulSessionContainer.java:756)
at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:104)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invokeHome(StatefulSessionInstanceInterceptor.java:128)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
... 17 more
Here is my stand alone java client that I'm using to use the fascade bean :-
package client;
/*
* EjbClient.java
*
* Created on 25 August 2002, 20:21
*/
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.ejb.CreateException;
import tsd_software.j2ee.user_management.ejbs.interfaces.*;
import tsd_software.j2ee.user_management.beans.UserBean;
import tsd_software.j2ee.user_management.UserExistsException;
/**
*
* @author Tarwinder Dhak
*/
public class EjbSessionClient {
/** Creates a new instance of EjbClient */
public EjbSessionClient() {
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
System.out.println("Starting EJB Client");
UserManageSessionEJB remote;
try
{
Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
prop.put(Context.PROVIDER_URL,"jnp://pluto:1099");
Context ctx = new InitialContext(prop);
Object obj = ctx.lookup("ams/user/UserManageSessionHome");
UserManageSessionEJBHome home = (UserManageSessionEJBHome)javax.rmi.PortableRemoteObject.
narrow(obj, UserManageSessionEJBHome.class);
remote = home.create();
//add method calls here !!
UserBean user1 = new UserBean("Phil", "password2", UserBean.ENABLED_STATE);
UserBean user2 = new UserBean("Colin", "password3", UserBean.ENABLED_STATE);
user2.setName("Colin", "Riddle");
user2.setAddress("21 a road", "an area", "kettering", "Northamptonshire", "NH1 2UB", "UK");
user2.setContact("0987273", "col@riddle.com");
UserBean user3 = new UserBean("Dan", "password4", UserBean.ENABLED_STATE);
user3.setContact("837463786", "dan@robinson.com");
try
{
remote.addUser(user1);
remote.addUser(user2);
remote.addUser(user3);
remote.addUser(user1);
}
catch(CreateException e)
{
System.out.println("Creation failed !!");
}
catch(UserExistsException e)
{
System.out.println(e.getMessage());
}
//remove the user management bean
remote.remove();
System.out.println("Finished EJB Client");
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
If anybody can help me to understand what the hell is going on, it would be very much appreciated.
Thanks
Tarwinder Dhak