Guys when i do run client code, i get this exception, i didn't understand the meaning of this exception.
CarManagerBeanClient.java
---------------
import java.util.Date;
import javax.ejb.EJB;
import javax.naming.InitialContext;
import javax.naming.NamingException;
@EJB
public class CarManagerBeanClient {
private static CarManager carManager;
// private static HornType;
public static void main(
String[] args) {
try{
InitialContext ctx = new InitialContext();
CarManager carManager = (CarManager)ctx.lookup("ejb/SimpleJNDI");
String hornType = "loud";
byte[] steering = new byte[2];
steering[0] = 12;
steering[1] = 14;
carManager.saveCar( HornType.valueOf(hornType) , steering, new Date());
}
catch(NamingException excep){
excep.printStackTrace();
}
}
}
------------------------------
CarManagerBean.java
--------------------
import java.util.Date;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
@Stateless(name="CarManagerBean", mappedName= "ejb/SimpleJNDI")
public class CarManagerBean implements CarManager{
@PersistenceContext(unitName="actionBazaar")
private EntityManager em;
public CarManagerBean(){
}
public void saveCar(HornType horn, byte[] steering, Date chasisDate){
Car car = new Car(horn, steering, chasisDate);
em.persist(car);
}
}
------------------------------------------
i get this exception on executing the code-
-------------------------------
Exception in
thread "main" javax.ejb.EJBException: nested exception is: java.rmi.RemoteException: CORBA BAD_OPERATION 1398079720 No; nested exception is:
org.omg.CORBA.BAD_OPERATION: ----------BEGIN server-side stack trace----------
org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 232 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.methodNotFoundInTie(ORBUtilSystemException.java:699)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.methodNotFoundInTie(ORBUtilSystemException.java:723)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:147)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
----------END server-side stack trace---------- vmcid: SUN minor code: 232 completed: No
java.rmi.RemoteException: CORBA BAD_OPERATION 1398079720 No; nested exception is:
org.omg.CORBA.BAD_OPERATION: ----------BEGIN server-side stack trace----------
org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 232 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.methodNotFoundInTie(ORBUtilSystemException.java:699)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.methodNotFoundInTie(ORBUtilSystemException.java:723)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:147)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
----------END server-side stack trace---------- vmcid: SUN minor code: 232 completed: No
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:364)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:205)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
at __CarManager_Remote_DynamicStub.saveCar(__CarManager_Remote_DynamicStub.java)
at _CarManager_Wrapper.saveCar(_CarManager_Wrapper.java)
at CarManagerBeanClient.main(CarManagerBeanClient.java:26)
Caused by: org.omg.CORBA.BAD_OPERATION: ----------BEGIN server-side stack trace----------
org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 232 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.methodNotFoundInTie(ORBUtilSystemException.java:699)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.methodNotFoundInTie(ORBUtilSystemException.java:723)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:147)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
----------END server-side stack trace---------- vmcid: SUN minor code: 232 completed: No
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:913)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:131)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:685)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:472)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:363)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:219)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:192)
... 5 more
javax.ejb.EJBException: nested exception is: java.rmi.RemoteException: CORBA BAD_OPERATION 1398079720 No; nested exception is:
org.omg.CORBA.BAD_OPERATION: ----------BEGIN server-side stack trace----------
org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 232 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.methodNotFoundInTie(ORBUtilSystemException.java:699)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.methodNotFoundInTie(ORBUtilSystemException.java:723)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:147)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
----------END server-side stack trace---------- vmcid: SUN minor code: 232 completed: No
at _CarManager_Wrapper.saveCar(_CarManager_Wrapper.java)
at CarManagerBeanClient.main(CarManagerBeanClient.java:26)
-----------------------------------------------------
let me know where i am doing wrong.