Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

SUN minor code: 232 completed: No

 
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any chance that you deployed different JARs containing the same class ? (I don't know what kind you'd get though)
 
Amandeep Singh
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, i deployed only 1 jar.

I came to know what mistake i did. That was really a silly mistake in this code. Will not repeat such code mistake's.

But it is surprising, i was unable to find any much result's for this error message on google.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i was unable to find any much result's for this error message on google.


Because it was a silly mistake ? But there's no silly mistake. It would be interesting to know what caused such an error. Can you share it with us ?
 
Amandeep Singh
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure,

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");



1) if you see my code above, i am injecting carManager instance.

2) instead of using the injected instance carManager, i am making a new instance here when doing JNDI lookup.

My problem resolved by making this small fix.

private static CarManager carManager;
// private static HornType;

public static void main(String[] args) {



try{
InitialContext ctx = new InitialContext();
carManager = (CarManager)ctx.lookup("ejb/SimpleJNDI");

 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>1) if you see my code above, i am injecting carManager instance.
I don't see any injection here, just a plain static field. No @EJB annotation. Did you inject it via the deployment descriptor ? I don't understand why using a local variable shadowing the instance member would be a problem. Even using injection should not be a problem. Anyway, if your problem is solved
 
please buy this thing and then I get a fat cut of the action:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic