REQUEST does not return

tsharang
2011-08-11
2012-11-29
  • tsharang

    tsharang - 2011-08-11

    I have a test program which tries to access method from com object implementing custom interface. When I try to invoke a simple method from that object my test program does not return from new JIComServer constructor. Following is the log I see in command line

    Aug 11, 2011 2:29:01 PM org.jinterop.dcom.core.JIComOxidRuntime$ServerPingTimerT
    ask run
    INFO: Running ServerPingTimerTask !
    Aug 11, 2011 2:29:01 PM org.jinterop.dcom.core.JISession createSession
    INFO: Created Session: 1013030842
    Aug 11, 2011 2:29:01 PM org.jinterop.dcom.core.JISession$Release_References_Time
    rTask run
    INFO: Release_References_TimerTask: Session:  1013030842 , listOfDeferenced
    Ipids.size(): 0
    Aug 11, 2011 2:29:01 PM org.jinterop.dcom.core.JIComOxidRuntime$ClientPingTimerT
    ask run
    INFO: Running ClientPingTimerTask !
    ## Reached here 1
    Aug 11, 2011 2:29:01 PM org.jinterop.dcom.common.JISystem internal_dumpMap
    INFO: mapOfHostnamesVsIPs: {}
    Aug 11, 2011 2:29:01 PM rpc.DefaultConnection processOutgoing
    INFO:
    Sending BIND
    Aug 11, 2011 2:29:01 PM rpc.DefaultConnection processIncoming
    INFO:
    Recieved BIND_ACK
    Aug 11, 2011 2:29:01 PM rpc.DefaultConnection processOutgoing
    INFO:
    Sending AUTH3
    Aug 11, 2011 2:29:01 PM rpc.DefaultConnection processOutgoing
    INFO:
    Sending ALTER_CTX
    Aug 11, 2011 2:29:01 PM rpc.DefaultConnection processIncoming
    INFO:
    Recieved ALTER_CTX_RESP
    Aug 11, 2011 2:29:01 PM rpc.DefaultConnection processOutgoing
    INFO:
    Sending REQUEST
    Aug 11, 2011 2:32:01 PM org.jinterop.dcom.core.JISession$Release_References_Time
    rTask run
    INFO: Release_References_TimerTask: Session:  1013030842 , listOfDeferenced
    Ipids.size(): 0
    Aug 11, 2011 2:33:01 PM org.jinterop.dcom.core.JIComOxidRuntime$ClientPingTimerT
    ask run
    INFO: Running ClientPingTimerTask !
    Aug 11, 2011 2:35:01 PM org.jinterop.dcom.core.JISession$Release_References_Time
    rTask run
    INFO: Release_References_TimerTask: Session:  1013030842 , listOfDeferenced
    Ipids.size(): 0
    Aug 11, 2011 2:37:01 PM org.jinterop.dcom.core.JIComOxidRuntime$ServerPingTimerT
    ask run
    INFO: Running ServerPingTimerTask !
    Aug 11, 2011 2:37:01 PM org.jinterop.dcom.core.JIComOxidRuntime$ClientPingTimerT
    ask run
    INFO: Running ClientPingTimerTask !
    Aug 11, 2011 2:38:01 PM org.jinterop.dcom.core.JISession$Release_References_Time
    rTask run
    INFO: Release_References_TimerTask: Session:  1013030842 , listOfDeferenced
    Ipids.size(): 0

    Smaple code as  below.

    try
         {
         JISession session = JISession.createSession("i3188ads.com","sthorat","bitali_789");
        
         System.out.println("## Reached here 1");
         JProgId prog = JProgId.valueOf(
         JIComServer comServer = new JIComServer(JIClsid.valueOf("8606266B-EB10-4D91-BC85-82C69AE97023"),"130.21.185.79",session);
         System.out.println("## Reached here 2");
         IJIComObject comObject = comServer.createInstance();
         System.out.println("## Reached here 3");
         JICallBuilder obj = new JICallBuilder();
         obj.reInit();
         obj.setOpnum(10);
         System.out.println("## Reached here 3");
         Short shortValue = new Short(new Integer(1).shortValue());
         obj.addOutParamAsObject(new JIPointer(JIUnsignedFactory.getUnsigned(shortValue,JIFlags.FLAG_REPRESENTATION_UNSIGNED_BYTE ),true),0);
         System.out.println("############################## Calling desired method ###################");
         Object[] result = comObject.call(obj);
         System.out.println("############################## destryoing session ###################");
         JISession.destroySession(session);
         }catch(Exception e)
         {
            e.printStackTrace();
         }
    
     
  • tsharang

    tsharang - 2011-08-11

    One more thing I observed here is I can instantiate my com objects from Oleview utility with out any issue.

    If I try code below to get  JIComServer based on progId I get  NullPointeException.

    java.lang.NullPointerException
            at org.jinterop.dcom.core.JIProgId.getIdFromWinReg(JIProgId.java:113)
            at org.jinterop.dcom.core.JIProgId.getCorrespondingCLSID(JIProgId.java:1
    62)
            at IRMTest.main(IRMTest.java:31)

    JIProgId progid = JIProgId.valueOf("MsoIrmPolicyInfoRMS.1");
         //JIClsid clsid = JIClsid.valueOf("8606266B-EB10-4D91-BC85-82C69AE97023");
            JIClsid clsid = progid.getCorrespondingCLSID();
            System.out.println("######### CLSID is: " + clsid.getCLSID());
         JIComServer comServer = new JIComServer(clsid,"130.21.185.79",session);
    

    Looks like somehow my J-Interop is not able to read my registry.

    Any help will be appreciated.

    Regards,
    tsharang

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks