users@glassfish.java.net

RE: javax.ejb.EJBException:

From: Eve Pokua <gorgeous65_at_msn.com>
Date: Sat, 6 Mar 2010 23:19:28 +0000

Hello everyone,

 

I just needed to add EclipseLink.2.0.jar to my libs and it works now.

 

eve
 


From: gorgeous65_at_msn.com
To: users_at_glassfish.dev.java.net
CC: ejb_at_glassfish.dev.java.net; persistence_at_glassfish.dev.java.net
Date: Sat, 6 Mar 2010 22:28:25 +0000
Subject: javax.ejb.EJBException:



Hello everyone,
 
I have an Enterprise application, using netbeans 8, glassfish v2.x cluster.
 
In my application client I have the following method to retrieve a list
of items-
 
in my main class of the application client, I have -
 
@EJB
     private static ItemBeanRemote itemBeanRemote;
 
 
Then in the constructor -
 
 public Main() {
        initComponents();
         initData();
            }
 
in the initData method -
 
private void initData() {
      List<Items> data = Main.getItems();
        Object[][] rows = new Object[data.size()][3];
        int i = 0;
        for ( Items i : data) {
            rows[i][0] = i.getName();
            rows[i][1] = i.getSize();
            rows[i++][2] = i.getColour();
        }
         Object[] colums = new Object[] {"Name", "Size", "Colour"};
        maintab.setModel(new DefaultTableModel(rows, colums));
     }
 
 
 
The getItems() method in the main class -
 
 public static List<Items> getItems() {
       List<Items> i= null;
        return i=itemBeanRemote.findAllItems();
    }
 
 
And the findAllItems() method -
 
 public List<Items> findAllItems(){
            List<Items> items=null;
  try{
                   items=(List<Items>)em.createNamedQuery("getAllItems").getResultList();
                 return items;
                }catch (Exception ex) {
                    System.err.println("Can not get all items");
            throw new EJBException(ex);
        }
        }
 
Items is an @Entity class which implements Serializable
 
I get the following error -
 
 
Exception in thread "AWT-EventQueue-0" javax.ejb.EJBException: nested exception is: java.rmi.MarshalException: CORBA MARSHAL 1398079745 Maybe; nested exception is:
        org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
java.rmi.MarshalException: CORBA MARSHAL 1398079745 Maybe; nested exception is:
        org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:279)
        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 entityJB.__ItemsBeanRemote_Remote_DynamicStub.findAllItems(entityJB/__ItemsBeanRemote_Remote_DynamicStub.java)
        at entityJB._ItemsBeanRemote_Wrapper.findAllItems(entityJB/_ItemsBeanRemote_Wrapper.java)
        at enterprise.Main.getItems(Main.java:343)
        at enterprise.Main.initData(Main.java:69)
        at enterprise.Main.<init>(Main.java:44)
        at enterprise.Main$7.run(Main.java:313)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
        at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:9679)
        at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:9694)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1042)
        at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:475)
        at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1983)
        at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2208)
        at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1220)
        at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:422)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:362)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:328)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:966)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1052)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:896)
        at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:466)
        at com.sun.corba.ee.impl.corba.TCUtility.unmarshalIn(TCUtility.java:296)
        at com.sun.corba.ee.impl.corba.AnyImpl.read_value(AnyImpl.java:610)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_any(CDRInputStream_1_0.java:748)
        at com.sun.corba.ee.impl.encoding.CDRInputStream.read_any(CDRInputStream.java:406)
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.readAny(Util.java:504)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.read_Array(ValueHandlerImpl.java:690)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:359)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:328)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:966)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1052)
        at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:475)
        at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1983)
        at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2208)
        at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1220)
        at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:422)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:362)
        at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:328)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:966)
        at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1052)
        at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:475)
        at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14.read(DynamicMethodMarshallerImpl.java:368)
        at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readResult(DynamicMethodMarshallerImpl.java:466)
        at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:195)
        ... 16 more
javax.ejb.EJBException: nested exception is: java.rmi.MarshalException: CORBA MARSHAL 1398079745 Maybe; nested exception is:
        org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
        at entityJB._ItemsBeanRemote_Wrapper.findAllItems(entityJB/_ItemsBeanRemote_Wrapper.java)
        at enterprise.Main.getItems(Main.java:343)
        at enterprise.Main.initData(Main.java:69)
        at enterprise.Main.<init>(Main.java:44)
        at enterprise.Main$7.run(Main.java:313)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
BUILD STOPPED (total time: 2 minutes 7 seconds)

I would like to know what I am doing wrong.
 
Thanks
 
eve
 
 



Got a cool Hotmail story? Tell us now
_________________________________________________________________
Tell us your greatest, weirdest and funniest Hotmail stories
http://clk.atdmt.com/UKM/go/195013117/direct/01/