1 Reply Latest reply: Sep 4, 2012 12:45 AM by 927509 RSS

    Warehouse Receving Shipments - SIM

    927509
      Hi,

      I am trying to receive a shipment without using the front end application.

      I am setting the quantity of the received items in a WarehouseDelivery object and passing this object to "receiveWarehouseDelivery" function,
      in the Shipment Helper class...

      When I do this, I am getting a null pointer exception..

      Any idea what I am doing wrong, or will it work the way i am trying to do the receiving by invoking that function.



      Here is the stack trace,

      2012-08-30 07:44:25,476 ERROR [main][shipment.ShipmentEJBServices] Unexpected error in EJB connection attempt (0) <java.lang.NullPointerException; nested exception is:
           java.lang.NullPointerException>
      oracle.oc4j.rmi.OracleRemoteException: java.lang.NullPointerException
           at com.evermind.server.ejb.EJBUtils.getUserException(EJBUtils.java:346)
           at com.evermind.server.ejb.interceptor.system.AbstractTxInterceptor.convertAndHandleMethodException(AbstractTxInterceptor.java:75)
           at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:52)
           at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
           at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
           at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
           at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
           at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
           at ShipmentBean_RemoteProxy_3h4233m.receiveWarehouseDelivery(Unknown Source)
           at sun.reflect.GeneratedMethodAccessor391.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
           at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
           at java.lang.Thread.run(Thread.java:595)
      at connection to as-unx06/192.168.135.4

           at com.evermind.server.rmi.RMICall.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMICall.java:110)
           at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:128)
           at com.evermind.server.rmi.RMIClientConnection.obtainRemoteMethodResponse(RMIClientConnection.java:472)
           at com.evermind.server.rmi.RMIClientConnection.invokeMethod(RMIClientConnection.java:416)
           at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:63)
           at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:28)
           at com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(StatelessSessionRemoteInvocationHandler.java:43)
           at __Proxy1.receiveWarehouseDelivery(Unknown Source)
           at oracle.retail.sim.closed.shipment.ShipmentEJBServices.receiveWarehouseDelivery(ShipmentEJBServices.java:590)
           at oracle.retail.sim.closed.shipment.ShipmentHelper.receiveWarehouseDelivery(ShipmentHelper.java:99)
           at com.bnt.oracle.Main.main(Main.java:62)

           Nested exception is:
      java.lang.NullPointerException
           at oracle.retail.sim.closed.util.UniversalContext.getSessionId(UniversalContext.java:47)
           at oracle.retail.sim.closed.activitylocking.ActivityLockingUtility.createActivityLock(ActivityLockingUtility.java:134)
           at oracle.retail.sim.closed.activitylocking.ActivityLockingUtility.confirmLock(ActivityLockingUtility.java:59)
           at oracle.retail.sim.closed.shipment.WarehouseDeliveryReceiveCommand.doExecute(WarehouseDeliveryReceiveCommand.java:127)
           at oracle.retail.sim.closed.common.Command.execute(Command.java:17)
           at oracle.retail.sim.closed.shipment.ShipmentServerServices.receiveWarehouseDelivery(ShipmentServerServices.java:41)
           at oracle.retail.sim.closed.shipment.ejb.ShipmentBean.receiveWarehouseDelivery(ShipmentBean.java:357)
           at sun.reflect.GeneratedMethodAccessor390.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
           at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
           at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
           at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
           at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
           at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
           at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
           at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
           at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
           at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
           at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
           at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
           at ShipmentBean_RemoteProxy_3h4233m.receiveWarehouseDelivery(Unknown Source)
           at sun.reflect.GeneratedMethodAccessor391.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
           at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
           at java.lang.Thread.run(Thread.java:595)
      at connection to as-unx06/192.168.135.4

           at oracle.oc4j.rmi.OracleRemoteException.receive(OracleRemoteException.java:123)
           at oracle.oc4j.rmi.RmiTransport.annotateException(RmiTransport.java:141)
           at com.evermind.server.rmi.RMIClientConnection.handleMethodInvocationResponse(RMIClientConnection.java:812)
           at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:242)
           at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:197)
           at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:179)
           at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:154)
           at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:126)
           at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:105)
           at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
           at java.lang.Thread.run(Thread.java:595)
        • 1. Re: Warehouse Receving Shipments - SIM
          927509
          Got it working...

          The universalcontext object was null, so the session which it created was giving null values..

          Once i explicitly started the session using UniversalContext class, i was able to connect through to the server.

          Then came Locking issue, so i had to release all locks held by user and obtain lock for myself.. and now its working..!

          Thanks anyway