Error in return of Vector method

Hi people, I have a problem if a program in runtime: i call a method in a client class named JRSimpleClient and then occur a message of error: NUllPOinterException . let see the server class:
the kind of return is Vector
Vector<Object> myVector = new Vector<Object>(1000);
  public Vector getCompleteResult(int id, String searchString) throws
     RemoteException, SQLException {
         jrc[id].performSearch(searchString);
         while (myVector.toString() != " ")
           result= jrc[id].getNextRow();
             myVector.add(result) ;
       return myVector;
      } so the performSearch and nextRow return a query (in database client.mdb)
the client class just call the method above
servlet.getCompleteResult(id,search);if anyone help me i 'll be thankfull.

while (myVector.toString() != " ") This is one of the strangest termination conditions I have ever seen. Are you seriously expecting one space as the only result of the query? Re-examine this.
It means your vector does not contain any value.Why would that cause an NPE?
@OP: can you provide the complete stack trace? Is the NPE happening directly in your client, or is it being thrown to you from the server?

Similar Messages

  • Error when returning Vector from EJB Session Bean

    I am testing the EJB functionality within JDeveloper(9.0.3). I simply expanded on the tutorial that is in the documentation (departments and employees). I created a method in the stateless session bean that retrieves a Collection of employees for a department, then converts it to a Vector. When I try to return the Vector from the session bean to a sample client, I get an error indicating that the Object is NOT serializable. I know that Vector IS serializable. Why do I get this error? (The error displays on the client message log, NOT the OC4J message log). I tried dumping the Vector to System.out.println - this works fine, so I l know I'm getting data.
    Here is the stack trace and errors that display:
    com.evermind.server.rmi.OrionRemoteException: Error (de-)serializing object: EmployeeLocal_EntityBeanWrapper4
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneSerialize(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:404
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneObject(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:377
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneOneObjectInstance(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:419
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneArrayList(java.util.ArrayList, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:599
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneObject(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:357
         java.util.Collection hrApp_StatelessSessionBeanWrapper2.getEmployeesByDepartment(java.lang.Long)
              hrApp_StatelessSessionBeanWrapper2.java:323
         java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
              native code
         void com.evermind.server.rmi.RMICallHandler.run(java.lang.Thread)
              RMICallHandler.java:119
         void com.evermind.server.rmi.RMICallHandler.run()
              RMICallHandler.java:48
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:803
         void java.lang.Thread.run()
              Thread.java:484
    at connection to localhost/127.0.0.1 as admin
         void com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(java.lang.Throwable)
              RMIConnection.java:1558
         java.lang.Object com.evermind.server.rmi.RMIConnection.invokeMethod(com.evermind.server.rmi.RMIContext, long, long, java.lang.reflect.Method, java.lang.Object[])
              RMIConnection.java:1511
         java.lang.Object com.evermind.server.rmi.RemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
              RemoteInvocationHandler.java:53
         java.lang.Object com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
              RecoverableRemoteInvocationHandler.java:22
         java.lang.Object com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
              StatelessSessionRemoteInvocationHandler.java:50
         java.util.Collection __Proxy1.getEmployeesByDepartment(java.lang.Long)
         javax.swing.table.DefaultTableModel hr.hrAppClientFrame.getTableModel()
              hrAppClientFrame.java:150
         void hr.hrAppClientFrame.jbInit()
              hrAppClientFrame.java:122
         void hr.hrAppClientFrame.<init>()
              hrAppClientFrame.java:58
         void hr.hrAppClientFrame.main(java.lang.String[])
              hrAppClientFrame.java:141
         Nested exception is:
    java.io.NotSerializableException: EmployeeLocal_EntityBeanWrapper4
         void java.io.ObjectOutputStream.outputObject(java.lang.Object)
              ObjectOutputStream.java:1148
         void java.io.ObjectOutputStream.writeObject(java.lang.Object)
              ObjectOutputStream.java:366
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneSerialize(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:390
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneObject(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:377
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneOneObjectInstance(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:419
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneArrayList(java.util.ArrayList, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:599
         java.lang.Object com.evermind.server.ejb.EJBUtils.cloneObject(java.lang.Object, com.evermind.server.ejb.AbstractEJBHome)
              EJBUtils.java:357
         java.util.Collection hrApp_StatelessSessionBeanWrapper2.getEmployeesByDepartment(java.lang.Long)
              hrApp_StatelessSessionBeanWrapper2.java:323
         java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
              native code
         void com.evermind.server.rmi.RMICallHandler.run(java.lang.Thread)
              RMICallHandler.java:119
         void com.evermind.server.rmi.RMICallHandler.run()
              RMICallHandler.java:48
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:803
         void java.lang.Thread.run()
              Thread.java:484
    at connection to localhost/127.0.0.1
         void com.evermind.server.rmi.OrionRemoteException.receive(java.net.InetAddress, java.lang.String)
              OrionRemoteException.java:130
         void com.evermind.server.rmi.RMIConnection.handleMethodInvocationResponse()
              RMIConnection.java:1673
         void com.evermind.server.rmi.RMIConnection.run(java.lang.Thread)
              RMIConnection.java:532
         void com.evermind.server.rmi.RMIConnection.run()
              RMIConnection.java:275
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:797
         void java.lang.Thread.run()
              Thread.java:484
    Any ideas?
    Thanks

    I would suggest opening a case with [email protected] FWIW, I recall seeing
              something like this in WLS 6.0. I believe it is fixed in WLS 6.1
              -- Rob
              Chris Dupuy wrote:
              > Btw, this occurs when I create an stateful session bean that ends up
              > throwing an exception and setRollbackOnly() is called. From that point
              > forward, my logs fill with this message.
              >
              > Chris
              >
              > "Chris Dupuy" <[email protected]> wrote in message
              > news:[email protected]..
              > > anyone know what this means, and what you can do about it?
              > >
              > >
              > > <Error> <ConnectionManager> <atossd03> <cbeyondServer> <ExecuteThread:
              > '14'
              > > for queue: 'd
              > > efault'> <> <> <000000> <Closing:
              > 'weblogic.rjvm.t3.T3JVMConnection@488831'
              > > because of: 'Server received a message over an uniniti
              > > alized connection: 'JVMMessage from: 'null' to:
              > >
              > '5825313123619479267S:10.6.6.40:[8000,8000,8001,8001,8000,8001,-1]:cbeyond:c
              > > beyond
              > > Server' cmd: 'CMD_REQUEST', QOS: '101', responseId: '2', invokableId: '1',
              > > flags: 'JVMIDs Not Sent, TX Context Not Sent', abbrev o
              > > ffset: '204'''>
              > >
              > >
              > >
              

  • Javax.ejb.EJBException: Null primary key returned by ejbCreate method

    Hi all,
    I'm using SunOne 7.1 and I got this error when I call the create on the CMP bean.
    javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: javax.ejb.EJBException: Null primary key returned by ejbCreate method
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: javax.ejb.EJBException: Null primary key returned by ejbCreate method
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.ejb.containers.EntityContainer.postCreate(EntityContainer.java:801)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at uk.co.upco.workflow.applicationAdmin.ejb.ApplicationAdminBean_854379388_ConcreteImpl_LocalHomeImpl.createNewApplication(ApplicationAdminBean_854379388_ConcreteImpl_LocalHomeImpl.java:64)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at uk.co.upco.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean.insertNewApplicationName(SFApplicationAdminBean.java:64)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at uk.co.upco.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean_EJBObjectImpl.insertNewApplicationName(SFApplicationAdminBean_EJBObjectImpl.java:31)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at uk.co.upco.workflow.sessionFacedeApplicationAdmin._SFApplicationAdminBean_EJBObjectImpl_Tie._invoke(Unknown Source)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:569)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:211)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:113)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:275)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:83)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.iplanet.ias.corba.ee.internal.iiop.ServicableWrapper.service(ServicableWrapper.java:25)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.iplanet.ias.util.threadpool.FastThreadPool$ThreadPoolThread.run(FastThreadPool.java:283)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at java.lang.Thread.run(Thread.java:534)
    cmp:
    public java.lang.Integer ejbCreateNewApplication(java.lang.String application) throws javax.ejb.CreateException {
    setApplication(application);
    return null;
    The key is auto_increment and is an integer.
    I'm usin MySQL and it is already set up as ANSI. (running as mysqld --ansi)
    Any Idea?
    Thanks in advance

    What happend when two concourrent user try to get the same key on the table? If for example I have 30 users at same time do I have lock table?
    Any way here the finest log using sunone 8. The error is the same, so I think I missing something:
    [#|2004-08-14T12:11:19.296+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=11;|IM: preInvokeorg.apache.catalina.servlets.DefaultServlet@1acecf3|#]
    [#|2004-08-14T12:11:19.296+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=11;|IM: postInvokeorg.apache.catalina.servlets.DefaultServlet@1acecf3|#]
    [#|2004-08-14T12:11:26.166+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: returning cached ProtectionDomain - CodeSource: ((file:/Test <no certificates>)) PrincipalSet: null|#]
    [#|2004-08-14T12:11:26.166+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: Changing Policy Context ID: oldV = null newV = Test|#]
    [#|2004-08-14T12:11:26.166+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: Access Control Decision Result: true EJBMethodPermission (Name) = SFApplicationAdmin (Action) = create,Home, (Codesource) = (file:/Test <no certificates>)|#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: returning cached ProtectionDomain - CodeSource: ((file:/Test <no certificates>)) PrincipalSet: null|#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: Access Control Decision Result: true EJBMethodPermission (Name) = SFApplicationAdmin (Action) = insertNewApplicationName,Remote,java.util.Hashtable (Codesource) = (file:/Test <no certificates>)|#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=22;|IM: preInvokeuk.co.myDomain.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean@1fa487f|#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: doAsPrivileged contextId(Test)|#]
    [#|2004-08-14T12:11:26.186+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.stream.out|_ThreadID=22;|
    new|#]
    [#|2004-08-14T12:11:26.186+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.stream.out|_ThreadID=22;|
    mgmt: com.sun.enterprise.naming.TransientContext:com.sun.enterprise.naming.TransientContext@ad00b2|#]
    [#|2004-08-14T12:11:26.186+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.stream.out|_ThreadID=22;|
    new|#]
    [#|2004-08-14T12:11:26.186+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.stream.out|_ThreadID=22;|
    SFApplicationAdmin: javax.naming.Reference:Reference Class Name: reference
    Type: url
    Content: ejb/SFApplicationAdmin
    |#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: returning cached ProtectionDomain - CodeSource: ((file:/Test <no certificates>)) PrincipalSet: null|#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: Access Control Decision Result: true EJBMethodPermission (Name) = ApplicationAdmin (Action) = createNewApplication,LocalHome,java.lang.String (Codesource) = (file:/Test <no certificates>)|#]
    [#|2004-08-14T12:11:26.196+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=22;|[Pool-ApplicationAdmin]: Added PoolResizeTimerTask...|#]
    [#|2004-08-14T12:11:26.196+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=22;|IM: preInvokeuk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean_1421299025_ConcreteImpl@7ae165|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|:Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] -->SQLPersistenceManagerFactory.getPersistenceManager().|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] <->SQLPersistenceManagerFactory.getPersistenceManager() FOUND javax.transaction.Transaction: com.sun.ejb.containers.PMTransactionImpl@5.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|<--SQLPersistenceManagerFactory.getFromPool().|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|PersistenceManagerImpl cache properties: _txCacheInitialCapacity=20, _flushedCacheInitialCapacity=20, _flushedCacheLoadFactor=0.75, _weakCacheInitialCapacity=20, _weakCacheLoadFactor=0.75.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.utility|_ThreadID=22;|NullSemaphore constructor() for PersistenceManagerImpl.cacheLock.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.utility|_ThreadID=22;|NullSemaphore constructor() for PersistenceManagerImpl.fieldUpdateLock.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|<--SQLPersistenceManagerFactory.getFromPool() PM: com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@8d18c for JTA com.sun.ejb.containers.PMTransactionImpl@5.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|<->SQLPersistenceManagerFactory.getPersistenceManager() JDO Transaction:   Transaction:
    status = STATUS_NO_TRANSACTION
    Transaction Object = Transaction@16077795
    threads = 0
    .|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.transaction|_ThreadID=22;|Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] Tran[   Transaction:
    status = STATUS_NO_TRANSACTION
    Transaction Object = Transaction@16077795
    threads = 0
    ].begin:status = STATUS_NO_TRANSACTION ,txType: UNKNOWN for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@8d18c.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.transaction|_ThreadID=22;|Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] Tran[   Transaction:
    status = STATUS_NO_TRANSACTION
    Transaction Object = Transaction@16077795
    threads = 0
    ].setStatus: STATUS_NO_TRANSACTION => STATUS_ACTIVE for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@8d18c.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] <->SQLPersistenceManagerFactory.getPersistenceManager() : com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@8d18c for JTA: com.sun.ejb.containers.PMTransactionImpl@5.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|---PersistenceManagerImpl.getCurrentWrapper() > current: null.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|---PersistenceManagerImpl.pushCurrentWrapper() > current: null  new: com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper@567117.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|---PersistenceManagerImpl.popCurrentWrapper() > current: com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper@567117  prev: null.|#]
    [#|2004-08-14T12:11:26.196+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=22;|IM: postInvokeuk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean_1421299025_ConcreteImpl@7ae165|#]
    [#|2004-08-14T12:11:26.196+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=22;|Exception in forceDestroyBean()
    java.lang.IllegalStateException: Primary key not available
         at com.sun.ejb.containers.EntityContextImpl.getPrimaryKey(EntityContextImpl.java:114)
         at com.sun.ejb.containers.EntityContainer.forceDestroyBean(EntityContainer.java:1232)
         at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:2559)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2416)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:763)
         at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:197)
         at $Proxy10.createNewApplication(Unknown Source)
         at uk.co.myDomain.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean.insertNewApplicationName(SFApplicationAdminBean.java:64)
         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 com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:930)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
         at $Proxy7.insertNewApplicationName(Unknown Source)
         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 com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:117)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:651)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:190)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
         at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
    |#]
    [#|2004-08-14T12:11:26.196+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=22;|EJB5018: An exception was thrown during an ejb invocation on [ApplicationAdmin]|#]
    [#|2004-08-14T12:11:26.196+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=22;|
    javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: java.lang.IllegalArgumentException: JDO73013: Primary Key field applicationId for bean 'ApplicationAdmin' cannot be null.
    java.lang.IllegalArgumentException: JDO73013: Primary Key field applicationId for bean 'ApplicationAdmin' cannot be null.
         at com.sun.jdo.spi.persistence.support.ejb.cmp.JDOEJB11HelperImpl.assertPrimaryKeyFieldNotNull(JDOEJB11HelperImpl.java:446)
         at uk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean_1421299025_ConcreteImpl.setApplicationId(ApplicationAdminBean_1421299025_ConcreteImpl.java:102)
         at uk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean.ejbCreateNewApplication(ApplicationAdminBean.java:93)
         at uk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean_1421299025_ConcreteImpl.ejbCreateNewApplication(ApplicationAdminBean_1421299025_ConcreteImpl.java:334)
         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 com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:140)
         at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:168)
         at $Proxy10.createNewApplication(Unknown Source)
         at uk.co.myDomain.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean.insertNewApplicationName(SFApplicationAdminBean.java:64)
         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 com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:930)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
         at $Proxy7.insertNewApplicationName(Unknown Source)
         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 com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:117)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:651)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:190)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
         at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
    javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: java.lang.IllegalArgumentException: JDO73013: Primary Key field applicationId for bean 'ApplicationAdmin' cannot be null.
         at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:2564)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2416)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:763)
         at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:197)
         at $Proxy10.createNewApplication(Unknown Source)
         at uk.co.myDomain.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean.insertNewApplicationName(SFApplicationAdminBean.java:64)
         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 com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:930)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
         at $Proxy7.insertNewApplicationName(Unknown Source)
         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 com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:117)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:651)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:190)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
         at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
    |#]
    Any Idea?
    Thanks in advance for any help

  • Web service task: Error when returning an empty array

    Hi,
    I've encountered an annoying error when using a Web Service Task from an SSIS package in SQL Server Data Tools.
    [Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not execute the Web method. The error is: Index was outside the bounds of the array..
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".
    It seems that the Web Service Task generates this error when returning an empty response from the WSDL. I've seen several topics about this here on MSDN but they are all from 2008-2009 and seem to suggest that
    this is a bug.  The workaround suggested is using a script task but I would really love to avoid that since my programming skills are lacking.
    I'm using Visual studio 2010 with SP1.

    Hello,
    From my own experience: in all the cases where I had to use SSIS 2008 to retrieve data or send data to Webservices, I had to revert to using Script Tasks or Script components. Whenever I tried with a Web service task, because the job looked simple, I had
    to abandon it in favour of Scripts. Keep in mind that I try to make use of the SSIS components as often as possible, before reverting to Scripting. But handling web services is the one exception, where I always use scripts. In SSIS 2012 I did not find
    any significant improvement of the Web service task and hence no compelling reason to use it.
    Jan D'Hondt - SQL server BI development

  • UnmarshalException:error unmarshalling return;nested exception ClassNotFoun

    Hi,
    I have written a client for an enterprise application. The client communicates with the application using APIs provided by the application that internally make RMI calls to the application server.
    I am getting the following error when the client invokes a remote method.
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
        java.lang.ClassNotFoundException: <a.b.c.MyClass>
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:169)The class 'a.b.c.MyClass' is included in the client JAR as well as in the server installation directory. The classes in this directory will be added by server into its classpath automatically. The client and server are running on the same machine but have different classpaths.
    The remote method uses class 'a.b.c.MyClass' in both input parameter and return type.
    This method returns a list of objects found as specified by the input parameters. The input parameter and the result both use the 'a.b.c.MyClass'.
    The code is able to make the call, the server processes the call, but it is failing wihle returning the result. I am not able to understand why it is failing for Unmarshalling the class that it has already (marshalled) used while sending the input parameters.
    The code was working fine previously. I am not able to find out what has made it not working.
    Waiting for your valuable help.
    Providing the complete stack trace for reference
        java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
        java.lang.ClassNotFoundException: <package.class>
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:169)
        at wt.method.MethodServerImpl_Stub.invoke(Unknown Source)
        at wt.method.RemoteMethodServer.invoke(RemoteMethodServer.java:616)
        at wt.fc.PersistenceManagerFwd.find(PersistenceManagerFwd.java:215)
        at ... Client call stack
        at AppSide_Connector.BusObjJavaInterface.poll(BusObjJavaInterface.java:584)
        at AppSide_Connector.AppCalls.poll(AppCalls.java:192)
        at AppSide_Connector.AgentBusinessObjectManager.poll(AgentBusinessObjectManager.java:717)
        at AppSide_Connector.AppPolling.poll(AppPolling.java:310)
        at AppSide_Connector.AppPolling.doPollingContinuousWait(AppPolling.java:574)
        at AppSide_Connector.AppPolling.run(AppPolling.java:137)
        at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.ClassNotFoundException: <package.class>
        at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:219)
        at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:558)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
        at wt.fc.QueryResult$ChunkedExternalization.readObject(QueryResult.java:449)
        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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
        at wt.fc.QueryResult.readExternal(QueryResult.java:156)
        at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1686)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1644)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
        at wt.method.MethodResult.readExternal(MethodResult.java:144)
        at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1686)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1644)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
        at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:297)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:146)
        ... 15 moreRegards,
    jsk1

    did you get the answer, can you share that, am stuck with similar problem
    My remote call returns an object of some pojo which is generated from the class in a jar file. I get this exception
    Client exception: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.lang.ClassNotFoundException: com.xx.fir.xxxx.entity.Crdxx (no security manager: RMI class loader disabled)
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.lang.ClassNotFoundException: com.xx.fir.xxxx.entity.Crdxx (no security manager: RMI class loader disabled)
    Also my ant traget:
    <java classname="com.xxx.cache.CacheServiceEndPoint" fork="yes">
    <jvmarg value="-Djava.rmi.server.codebase=file:/${build}/classes/ file:/${lib}/{color:#ff0000}hibernate-credit.jar{color}" />{color:#ff0000} jar file where the pojo resides
    {color}<jvmarg value="-Djava.security.policy=C:/workspace/Cache/policy.all" />
    thx in advance

  • Java.lang.NoSuchMethodError: java/util/Vector method revove...

    After using jexegen from microsoft to make EXE. I receive this error when i execute the my EXE :
    java.lang.NoSuchMethodError: java/util/Vector method revove...
    Any body know why?
    If i execute from JBuilder i have no problem!

    hi, i don't have much experience with M$ java products, but as far as i remember, M$ java stopped developping since jdk 1.1.4 (or 1.1.7).
    maybe that's the reason for throwing this exception. if you want to "exe" your class-file, try JToExe.
    greetzzz
    chris

  • Compiler Error, Missing Return Statement

    This line of code for the begining of a method that reads a file always throws the compiler error, missing return statement. I can't figure out how to fix it!
    public String[] read(InputStream list) throws Exception {
    Could someone please help?

    you might need to post more code, but basically the
    compiler is complaining because you do not have a
    return statement at the end of your method.
    if you do not have a return statement (with a matching
    return type) then the compiler will complain. If you
    don't understand this then post the code to your
    method and we can get it fixed.
    public String[] read(InputStream list) throws
    Exception {
    String[] stringArray;
    return stringArray;
    The code is the most complex I have written so far but here is some of it. (the begining and the end)
    public String[] read(InputStream list) throws Exception {
    if (list != null) {
    String[] stringArray = null;
    try {
    while {
    //add strings to string array
    }//end of while
    return stringArray;
    }// end try
    catch{
    }//end of method

  • UnmarshalException: error unmarshalling return, java.io.StreamCorruptedExce

    I am developing an application with Jonas and my environment is as follows:
    -Jonas 4.0.0
    -Tomcat 5.0.19 standalone (my web app uses the remote interfaces).
    -I have amongst others those three jars in my web-inf/lib directory:
         *test_guide.jar(my ejb jar)
         *ejb-2_1-api.jar(from jonas)
         *client.jar(from jonas)
    I come across the following error:
    javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested e
    xception is:
            java.io.StreamCorruptedException]
            at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:92)
            at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:98)
            at javax.naming.InitialContext.lookup(InitialContext.java:347)
            at com.softwareag.test_guide.web.util.PGServiceLocator.getRemoteHome(PGServiceLocator.java:82)
            at com.softwareag.test_guide.web.temp.PGSearch.executeNewSearch(PGSearch.java:25)
            at com.softwareag.test_guide.web.temp.PGSearchManagedBean.newSearchAction(PGSearchManagedBean.java:29)
            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 net.sourceforge.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:113)
            at net.sourceforge.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:65)
            at javax.faces.component.UICommand.broadcast(UICommand.java:109)
            at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:84)
            at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:142)
            at net.sourceforge.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:254)
            at net.sourceforge.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:85)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:97)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688)
            at java.lang.Thread.run(Thread.java:534)
    Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
            java.io.StreamCorruptedException
            at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
            at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:88)
            ... 41 more
    Caused by: java.io.StreamCorruptedException
            at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2347)
            at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2380)
            at java.io.ObjectInputStream$BlockDataInputStream.skipBlockData(ObjectInputStream.java:2285)
            at java.io.ObjectInputStream.skipCustomData(ObjectInputStream.java:1795)
            at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1772)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
            ... 43 more
    com.softwareag.test_guide.web.util.PGServiceLocatorException
            at com.softwareag.test_guide.web.util.PGServiceLocator.getRemoteHome(PGServiceLocator.java:92)
            at com.softwareag.test_guide.web.temp.PGSearch.executeNewSearch(PGSearch.java:25)
            at com.softwareag.test_guide.web.temp.PGSearchManagedBean.newSearchAction(PGSearchManagedBean.java:29)
            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 net.sourceforge.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:113)
            at net.sourceforge.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:65)
            at javax.faces.component.UICommand.broadcast(UICommand.java:109)
            at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:84)
            at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:142)
            at net.sourceforge.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:254)
            at net.sourceforge.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:85)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:97)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688)
            at java.lang.Thread.run(Thread.java:534)
    package com.softwareag.test_guide.web.temp;
    import java.rmi.RemoteException;
    import java.util.List;
    import com.softwareag.test_guide.TransferObjects.PGQueryTO;
    import com.softwareag.test_guide.web.util.PGFactory;
    * @author Julien Martin
    public class PGSearchManagedBean {
         private String category;
         private List postcodes;
         private String name;
         private boolean commentsExist;
         private String sortOrderCriterion;
         private int minimumNote;
              public String newSearchAction() throws RemoteException { //TODO: Remove that
                   System.out.println("----------within new search action--------------");
                   PGQueryTO query = PGFactory.getQueryInstance(this);
                   PGSearch search = PGFactory.getSearchInstance();
                   String results = search.executeNewSearch(query);
                   return results;
         public String nextAction() throws RemoteException { //TODO: Remove that
              PGSearch search = PGFactory.getSearchInstance();
              String issue = search.next();
              return issue;
         public String previousAction() throws RemoteException { //TODO: Remove that
              PGSearch search = PGFactory.getSearchInstance();
              String issue = search.previous();
              return issue;
         public String getCategory() {
              return category;
         public boolean getCommentsExist() {
              return commentsExist;
         public int getMinimumNote() {
              return minimumNote;
         public String getName() {
              return name;
         public List getPostcodes() {
              return postcodes;
         public String getSortOrderCriterion() {
              return sortOrderCriterion;
         public void setCategory(String string) {
              category = string;
         public void setCommentsExist(boolean bool) {
              commentsExist = bool;
         public void setMinimumNote(int i) {
              minimumNote = i;
         public void setName(String string) {
              name = string;
         public void setPostcodes(List list) {
              postcodes = list;
         public void setSortOrderCriterion(String string) {
              sortOrderCriterion = string;
    package com.softwareag.test_guide.web.util;
    import java.util.Collections;
    import java.util.HashMap;
    import java.util.Map;
    import java.util.Properties;
    import javax.ejb.EJBHome;
    import javax.ejb.EJBLocalHome;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.rmi.PortableRemoteObject;
    * @author Julien Martin
    public class PGServiceLocator {
         private InitialContext initialContext;
         private Map cache;
         private Properties props;
         private static PGServiceLocator _instance;
         static {
              try {
                   _instance = new PGServiceLocator();
              } catch (PGServiceLocatorException se) {
                   System.err.println(se);
                   se.printStackTrace(System.err);
         private PGServiceLocator() throws PGServiceLocatorException {
              try {
                   props = new Properties();
                   props.put(Context.INITIAL_CONTEXT_FACTORY,PGConstants.INITIAL_CONTEXT_FACTORY);
                   props.put(Context.PROVIDER_URL,PGConstants.PROVIDER_URL);
                   props.put(Context.SECURITY_PRINCIPAL,PGConstants.SECURITY_PRINCIPAL);
                   props.put(Context.SECURITY_CREDENTIALS,PGConstants.SECURITY_CREDENTIALS);
                   initialContext = new InitialContext(props);
                   cache = Collections.synchronizedMap(new HashMap());
              } catch (NamingException ne) {
                   //throw new PGServiceLocatorException(ne);
                   throw new PGServiceLocatorException();
              } catch (Exception e) {
                   //throw new PGServiceLocatorException(e);
                   throw new PGServiceLocatorException();
         static public PGServiceLocator getInstance() {
              return _instance;
         public EJBLocalHome getLocalHome(String jndiHomeName) throws PGServiceLocatorException {
              EJBLocalHome localHome = null;
              try {
                   if (cache.containsKey(jndiHomeName)) {
                        localHome = (EJBLocalHome) cache.get(jndiHomeName);
                   } else {
                        localHome = (EJBLocalHome) initialContext.lookup(jndiHomeName);
                        cache.put(jndiHomeName, localHome);
              } catch (NamingException nex) {
                   //throw new PGServiceLocatorException(nex);
                   throw new PGServiceLocatorException();
              } catch (Exception ex) {
                   //throw new PGServiceLocatorException(ex);
                   throw new PGServiceLocatorException();
              return localHome;
         public EJBHome getRemoteHome(String jndiHomeName, Class homeClassName) throws PGServiceLocatorException {
              EJBHome remoteHome = null;
              try {
                   if (cache.containsKey(jndiHomeName)) {
                        remoteHome = (EJBHome) cache.get(jndiHomeName);
                   } else {
                        Object objref = initialContext.lookup(jndiHomeName);
                        Object obj = PortableRemoteObject.narrow(objref, homeClassName);
                        remoteHome = (EJBHome) obj;
                        cache.put(jndiHomeName, remoteHome);
              } catch (NamingException nex) {
                   //throw new PGServiceLocatorException(nex);
                   System.out.println("-----------------");
                   nex.printStackTrace();
                   System.out.println("-----------------");
                   throw new PGServiceLocatorException();
              } catch (Exception ex) {
                   //throw new PGServiceLocatorException(ex);
                   throw new PGServiceLocatorException();
              return remoteHome;
    package com.softwareag.test_guide.web.temp;
    import java.rmi.RemoteException;
    import java.util.List;
    import javax.ejb.CreateException;
    import com.softwareag.test_guide.TransferObjects.PGQueryTO;
    import com.softwareag.test_guide.searchEngineEJB.PGSearchEngineListHandlerException;
    import com.softwareag.test_guide.searchEngineEJB.PGSearchEngineValueListHandler;
    import com.softwareag.test_guide.searchEngineEJB.PGSearchEngineValueListHandlerHome;
    import com.softwareag.test_guide.web.util.PGServiceLocator;
    import com.softwareag.test_guide.web.util.PGServiceLocatorException;
    import com.softwareag.test_guide.web.util.PGSessionUtil;
    * @author Julien Martin
    public class PGSearch {
         public String executeNewSearch(PGQueryTO query) throws RemoteException { //TODO: remove that exception
              try {
                   //We retrieve the local home object
                   //keep/PGSearchEngineValueListHandlerLocalHome pGSearchEngineHome = (PGSearchEngineValueListHandlerLocalHome) PGServiceLocator.getInstance().getLocalHome("PGSearchEngineValueListHandlerEJBHome_L");
                   PGSearchEngineValueListHandlerHome pGSearchEngineHome = (PGSearchEngineValueListHandlerHome) PGServiceLocator.getInstance().getRemoteHome("PGSearchEngineValueListHandlerEJBHome", PGSearchEngineValueListHandlerHome.class);
                   //We obtain a local interface object from the local home object
                   //keep/PGSearchEngineValueListHandlerLocal pGSearchEngine = pGSearchEngineHome.create();
                   PGSearchEngineValueListHandler pGSearchEngine = pGSearchEngineHome.create();
                   //We put the local interface into the session for later use
                   PGSessionUtil.putSearchEngineEJBIntoSession(pGSearchEngine);
                   //We execute the search
                   boolean containsResults = pGSearchEngine.executeSearch(query);
                   System.out.println("------containsResults------->" + containsResults);
                   //If the search does return results,
                   //1. We fetch the first n elements
                   //2. We put the results into the session
                   //3. We return the following String
                   if (containsResults) {
                        List firstResults = pGSearchEngine.getNextElements(0, 15);
                        PGSessionUtil.putResultsListIntoSession(firstResults);
                        return "displayResults";
                   //If the search does not return results, we return the following String
                   else {
                        return "noResults";
              } catch (CreateException e) {
                   e.printStackTrace();
                   return null;
              } catch (PGServiceLocatorException e) {
                   e.printStackTrace();
                   return null;
              } catch (PGSearchEngineListHandlerException e) {
                   e.printStackTrace();
                   return null;
         public String next() {
              try {
                   //PGSearchEngineValueListHandlerLocal pGSearchEngine = PGSessionUtil.getSearchEngineEJBFromSession();
                   PGSearchEngineValueListHandler pGSearchEngine = PGSessionUtil.getSearchEngineEJBFromSession();
                   List list = pGSearchEngine.getNextElements(15, 20);
                   if (!list.isEmpty()) {
                        return "displayResults";
                   } else {
                        return "endOfResults";
              } catch (RemoteException e) {
                   // TODO Remove that
                   e.printStackTrace();
                   return null;
         public String previous() {
              try {
                   //PGSearchEngineValueListHandlerLocal pGSearchEngine = PGSessionUtil.getSearchEngineEJBFromSession();
                   PGSearchEngineValueListHandler pGSearchEngine = PGSessionUtil.getSearchEngineEJBFromSession();
                   List list = pGSearchEngine.getPreviousElements(15, 20);
                   if (!list.isEmpty()) {
                        return "displayResults";
                   } else {
                        return "endOfResults";
              } catch (RemoteException e) {
                   // TODO Remove that
                   e.printStackTrace();
                   return null;
    }Can anybody help please?
    Thanks in advance,
    Julien Martin.

    Do you use the same version of JDK in EJB container and EJB client ?

  • Java.rmi.MarshalException: error marshalling return;

    Hi All,
    I'm getting the above error whilst performing a query. My set up is,
    Kodo 3.1.5
    Weblogic 8.1
    I have created some classes using the reverse mapping from Sybase,
    enhanced them and uploaded them to my server. I have then attempted to
    retrieve the data via an EJB. However I get NotSerializableExceptions
    whilst doing so.
    I am attempting to return a Collection of enhanced objects, but even a
    single enhanced object throws that error
    I think it may be something to do with my package.jdo or something else.
    Can anyone help?
    My package.jdo looks like this,
    <?xml version="1.0" encoding="UTF-8"?>
    <jdo>
    <package name="com.lehman.clientseg.data">
    <class name="AuditRecord" objectid-class="AuditRecordId"/>
    <class name="Btb" objectid-class="BtbId"/>
    <class name="CashActivity" objectid-class="CashActivityId"/>
    <class name="CashBulk" objectid-class="CashBulkId"/>
    <class name="CcyTypeIndicator" objectid-class="CcyTypeIndicatorId">
    <field name="descn">
    <extension vendor-name="kodo" key="jdbc-size" value="-1"/>
    </field>
    </class>
    <class name="Counterparty" objectid-class="CounterpartyId"/>
    <class name="Currency" objectid-class="CurrencyId"/>
    <class name="DealType" objectid-class="DealTypeId"/>
    <class name="DeliveryInstruction"
    objectid-class="DeliveryInstructionId"/>
    <class name="Entity" objectid-class="EntityId"/>
    <class name="MonitoredEvent" objectid-class="MonitoredEventId"/>
    <class name="PaymentType" objectid-class="PaymentTypeId"/>
    <class name="Sequence" objectid-class="SequenceId"/>
    <class name="SettlementMode" objectid-class="SettlementModeId"/>
    </package>
    </jdo>
    and here is the stack trace,
    java.rmi.MarshalException: error marshalling return; nested exception is:
    java.io.NotSerializableException: com.lehman.clientseg.data.Entity
    at
    weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
    at
    com.lehman.clientseg.server.ejb.JDOBean_1a5ozo_EOImpl_812_WLStub.getAllEntities(Unknown
    Source)
    at com.lehman.clientseg.BeanTest.<init>(BeanTest.java:49)
    at com.lehman.clientseg.BeanTest.main(BeanTest.java:62)
    Caused by: java.io.NotSerializableException:
    com.lehman.clientseg.data.Entity
    at
    java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
    at java.util.LinkedList.writeObject(LinkedList.java:681)
    at sun.reflect.GeneratedMethodAccessor157.invoke(Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at
    java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:795)
    at
    java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1294)
    at
    java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
    at
    java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
    at
    weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:116)
    at
    weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:93)
    at
    com.lehman.clientseg.server.ejb.JDOBean_1a5ozo_EOImpl_WLSkel.invoke(Unknown
    Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
    at
    weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

    Abe White wrote:
    Looks like you're trying to serialize a class that's not serializable,
    probably by returning it (or a class that has a relation to it) from an EJB.Very strange. My classes where autogenerated using the reverse mapping
    tool and weren't serializable. I'm sure I once did make them serializable
    and I got more error messages. I just tried again and everything was fine.
    Hmmm... Must be going mad.
    Cheers,
    Stevie :)

  • PC/SC error SCardConnect return code = 80100009

    I created an application using the OpenCard Framework. I am using a Schlumberger Reflex USB v2 reader. When I run my application, I receive the following error "opencard.core.terminal.CardTerminalException: Pcsc10CardTerminal: PCSC Exception in method SCardConnect: PC/SC Error SCardConnect return code = 80100009".
    This return code corresponds to this variable in windows, SCARD_E_UNKNOWN_READER.
    I know the card reader and the PC/SC driver for the reader work correctly because I have used them with other applications.
    Is there some special configuration I have to make within the OpenCard Framework to have it recognize my reader? Or, is there some configuration I have to do within Windows 2000?
    Thanks

    My java code can detect is a card is in the reader introduced only if i run the program many times.
    With the i variable i debug that not the last running detects that the card was introduced.
    And i can detect that tha card was introduced only with these error.
    PLEASE HELP ME!!!!!!!!!
    Thanks in advanced
    My code looks like:
    import java.awt.Frame;
    import java.io.FileNotFoundException;
    import opencard.core.OpenCardException;
    import opencard.core.service.CardServiceException;
    import opencard.core.service.SmartCard;
    import opencard.core.service.CardRequest;
    import opencard.core.terminal.CardTerminalException;
    import opencard.core.util.OpenCardPropertyLoadingException;
    import opencard.opt.iso.fs.FileAccessCardService;
    import opencard.opt.iso.fs.CardFile;
    public class ReadFile {
         static int i = 16;
    public static void main(String[] args)
    System.out.println("reading smartcard file..."+ i);
    // here, the application code will be filled in
    try {
              SmartCard.start();
    //          wait for a smartcard with file access support
         CardRequest cr =
         new CardRequest(CardRequest.NEWCARD, null, FileAccessCardService.class);
         System.out.println("1");
         SmartCard sc = SmartCard.waitForCard(cr);
         System.out.println("2");
         FileAccessCardService facs = (FileAccessCardService)
         sc.getCardService(FileAccessCardService.class, true);
         System.out.println("3");
         CardFile root = new CardFile(facs);
         System.out.println("4");
         CardFile file = new CardFile(root, ":c009");
         System.out.println("5");
         byte[] data = facs.read(file.getPath(), 0,
         file.getLength() );
         System.out.println("6");
         sc.close();
         System.out.println("7");
         String entry = new String(data);
         System.out.println("8");
         entry = entry.trim();
         System.out.println("9");
         System.out.println(entry);
         System.out.println("10");
         } catch (OpenCardPropertyLoadingException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
         } catch (CardServiceException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
         } catch (CardTerminalException e) {
              cardInserted();
              e.printStackTrace();
         } catch (ClassNotFoundException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
         } catch (FileNotFoundException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
         } catch (OpenCardException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
         finally{
              try {
                   SmartCard.shutdown();
              } catch (CardTerminalException e) {
                   // TODO Auto-generated catch block
                   System.out.print("Halli Hallo ");
                   e.printStackTrace();
    System.exit(0);
    }//main
    static void cardInserted(){
         System.out.println("\ncardInserted" + i + "\n");
    }//cardInserted
    }

  • Can a named query return a Vector of ReportQueryResult objects?

    TopLink experts,
    I would like to know if I can use the method executeQuery() defined in the Session interface to call a predefined named query, which returns a Vector ReportQueryResult objects rather than a Vector of a given domain class objects. If the answer is yes, then how?
    Many thanks for the help!

    I checked the available types of named queries from TopLink 9.0.4.5 Workbench and the ReportQuery type is not on the list. Only ReadObjectQuery and ReadAllQuery are available in its type dropdown list and both of these types would return an object of the descriptor (or say the domain class) where the named query is defined.
    How can I add a ReportQuery type named query to a descriptor in the Workbench? Please help!

  • Trying to return a Vector from stateless session bean.

    I have a simple Java client which needs to retrieve instances from an Entity Bean, to load into a JTable. I used a CMP entity bean, and wrote a getter method in a stateless session bean, to retrieve the instances and load them into a vector (via a Collection). When I try to return the Vector to the client, the client thread throws an exception, indicating that the object (Vector) is NOT serializable. I thought Vector WAS serializable? What am I doing wrong?
    I did run System.out.println on the Vector in the session bean, and it does display the expected data, so I know the Vector is being populated within the session bean.
    Thanks

    Are you sure that the objects (and all dependent objects) contained by the Vector are serializable?

  • Error SCardConnect return code = 80100009 / How to use another SC reader?

    Hello,
    I have 2 card readers connected to my PC. One for harddrive encryption which is part of our internal security and another one for my development (Gemplus GemPC433-SL7). I have installed the OpenCard framework for the first time on my PC because I would like to write a small SmartCard Client application reading some data from a file stored in a smart card.
    My problem is that I would like to use the Gemplus card reader to do this but when I start the batch "GetSmartCard.bat" it seems that it is trying to read the card from the smartcard reader used for my harddrive encryption. Then I get the error PC/SC Error SCardConnect return code = 80100009.
    Can you please tell me how can I force OCF to use the other card reader (GemPC433-SL7)?
    Thanks in advance for your replies.
    Alain

    I managed to get the Gemplus terminal by using the following code. I can detect is the card is inserted by using "terminal.isCardPresent(0);" but when I execute the line "SmartCard sc = SmartCard.waitForCard(cr);"
    I get the error : "opencard.core.terminal.CardTerminalException: Pcsc10CardTerminal: PCSC Exception in method SCardGetStatusChange: error executing SCardGetStatusChange
    return code = 8010002e"
    package com.hitec.chipandpin;
    import opencard.core.service.SmartCard;
    import opencard.core.service.CardRequest;
    import opencard.opt.iso.fs.FileAccessCardService;
    import opencard.opt.iso.fs.CardFile;
    import opencard.core.terminal.CardTerminal;
    import opencard.core.*;
    import java.io.*;
    import opencard.core.terminal.*;
    import opencard.core.service.*;
    import opencard.core.util.*;
    import java.util.Enumeration;
    public class InitFile {
      public static void main(String[] args)
        System.out.println("initializing file...");
          try {
          // initialize framework
            SmartCard.start();
          // get the enumeration of presently registered card terminals
            Enumeration terminals = CardTerminalRegistry.getRegistry().getCardTerminals();
            CardTerminal terminal = null;
            while (terminals.hasMoreElements()) {
              terminal = (CardTerminal) terminals.nextElement();
              if (terminal.getName().indexOf("Gemplus GemPC433") != -1) {
                //Gemplus terminal found
                break;
            // wait for a smartcard with file access support
            CardRequest cr = new CardRequest(CardRequest.ANYCARD , terminal, FileAccessCardService.class);
            SmartCard sc = SmartCard.waitForCard(cr);
            FileAccessCardService facs = (FileAccessCardService)sc.getCardService(FileAccessCardService.class, true);
            CardFile root = new CardFile(facs);
            CardFile file = new CardFile(root, ":c009");
            String entry = args[0].replace(':', '\n');
            byte[] bytes = entry.getBytes();
            int length = bytes.length;
            byte[] data = new byte[file.getLength()];
            if (data.length < length) {
              length = data.length;
            System.arraycopy(bytes, 0, data, 0, length);
            // write the data to the file
            facs.write(file.getPath(), 0, data);
            System.out.println(entry);
          catch (Exception ex) {
            ex.printStackTrace(System.err);
    finally { // even in case of an error...
          try {
            SmartCard.shutdown();
          } catch (Exception e) {
            e.printStackTrace(System.err);
        System.exit(0);
    }Can anyone of you help me to solve this problem?
    Thanks in advance.
    Alain.

  • SubGUI Returning A Vector

    Hi guys,
    I'm adding a new pop-up GUI to my application that will contain several TextFields for user input. What I'd like to do is have the GUI return a Vector containing the Strings of the user's input back to the main GUI or application. Can this be done? Is there a way to configure the Exit method to return a value?
    Thanks

    yes, check the APIs in regards to the particular component you are using.

  • Return a vector

    Hi,
    I am having a problem with some code for part of a project I have included it below. The problem I am having is to do with (List all subjects) method, I need to return a vector of subjects and I am having a problem with this method any help would be appreciated.
    Thanks
    import java.io.*;
    import java.util.*;
    public class Student
         private Vector mSubjects = new Vector();
         private String mStudentnumber;
         private String mFirstname;
         private String mLastname;
         private boolean mConcession;
         public Student(String Studentnumber,String Firstname
                                       , String Lastname, boolean Concession)
              mStudentnumber = Studentnumber;
         mFirstname = Firstname;
              mLastname = Lastname;
              mConcession = false;
         public String GetName()
              return mFirstname + ' ' + mLastname;
         public String GetNumber()
              return mStudentnumber;
         public boolean Status()
              return mConcession;
         public boolean AddSubject(Subject InSubject)
              if (mSubjects.contains(InSubject))
                   return false;
              else
                   mSubjects.addElement(InSubject);
                   return true;
         public boolean DeleteSubject(Subject InSubject)
              if (mSubjects.contains(InSubject))
                   mSubjects.removeElement(InSubject);
                   return true;
              else
                   return false;
         public Subject FindSubject(String GetNumber)
              int Num = mSubjects.size();
              boolean found = false;
              Subject InSubject = null;
              for(int i = 0; i < Num && !found; i++)
                   InSubject = (Subject)mSubjects.elementAt(i);
                   if (InSubject.GetNumber().equals(GetNumber))          
                        found = true;
              if(!found)
                   InSubject = null;
              return InSubject;
         public int NumberSubjects()
              return mSubjects.size();
         public Subject ListSubjects()
    ***********************************************************************

    Hei!
    If you want to return with only one Subject object, than use a simple return statement with one of the elements of the mSubject vector. If you want to return with all of the Elements than you can use the Enumeration interface.
    public Enumeration ListSubjects{
    return mSubject.elements();
    Than you can use the methods of the Enumeration interface to get all the elements of the mSubject vector.
    Pizzarelli

Maybe you are looking for

  • Problem with NVidia Quadro FX 4000 on MSI K8T Master2-Far

    Hello everyone, I am new to the forums here.  I cannot figure out what is causing my problem. I have been having performance issues with my new Quadro FX 4000 on my system.  I have been in communication with Nvidia tech support for a while now.  Here

  • How do I properly handle application closure?

    Hi all, I've got a couple VI's running inside a main VI. One of them is user input, and the other is a controller. The user input VI runs first, and has a cancel button. This button should stop both the user input VI and the controller VI. After the

  • Default email for each contact when emailing to a group?

    Hi When I use Mail.app's shortcut for sending email to a group, I don't seem to have control over which of several emails (work, home, etc.) that exists is being used for each contact. I want to specify a default email for each contact so that I don'

  • Converting iPad publication for Android

    I've developed iPad versions of digital magazines but now we want to make them available to the Android market. I know Viewer Builder will create the Android app, but in terms of screen size/aspect ratio, how does that work? With different tablets ha

  • RMAN procedure

    Hi All, What are the steps to do the RMAN Backup and Recovery. I am using Oracle 9i. I have only theriodical knowledge or RMAN. Kindly explain in detail about RMAN usage.... Cheers, Moorthy.GS