Author Topic: ODServer code is non-responsive  (Read 2442 times)

mroutlander

  • Jr. Member
  • **
  • Posts: 33
    • View Profile
ODServer code is non-responsive
« on: April 16, 2015, 04:28:46 AM »
Hi all,

I have been facing a very typical problem. When connecting to a remote CMOD server from a standalone program, I am able to get through but when the same is being tried through a web application, it gets stuck.

ODServer instance never gets created and of course never gets initialized.
Code connecting to OD (works just fine in the standalone program):
                     odConfig=new ODConfig();
         odServer = new ODServer(odConfig);
         odServer.initialize("RetrieveODDoc.java" );
         System.out.println( "Logging on to the CMOD server...." );
         odServer.setPort( 1445);
         odServer.setServerName( "ServerName" );
         odServer.setUserId( "Username" );
         odServer.setPassword( "Password" );
         odServer.setConnectType(ODConstant.CONNECT_TYPE_TCPIP);
                     odServer.logon(); 
   

On the web application side, it just doesn't respond  :'(
                             odConfig = new ODConfig();
      System.out.println("OD Config is fine");
      odServer = new ODServer(odConfig);
      System.out.println("If you see this, ODServer is fine");
It just doesn't seem to get past line 2.

Env. details: ODWEK 9.0.0.0, Java 1.7.0_65 (64-bit) , Win 7 Enterpise 64-bit client, Win Server 2008 R2 Enterprise (64-bit) CMOD Server, Eclipse Juno 64-bit (IDE)

Any assistance will be much appreciated.
Thanks in advance

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 1202
    • View Profile
Re: ODServer code is non-responsive
« Reply #1 on: April 16, 2015, 09:06:33 AM »
First recommendation I have is to upgrade ODWEK from 9.0.0.0...many things have been fixed since then.

9.0.0.5 is current and you're probably able to run 9.5.0.1.

Ed
#zOS #ODF

mroutlander

  • Jr. Member
  • **
  • Posts: 33
    • View Profile
Re: ODServer code is non-responsive
« Reply #2 on: April 16, 2015, 09:49:09 PM »
Thanks Ed!

While I'll surely try that, I still don't understand the reason for this behavioural difference between 'call from webapp' and 'call from standalone'  :-\

mroutlander

  • Jr. Member
  • **
  • Posts: 33
    • View Profile
Re: ODServer code is non-responsive
« Reply #3 on: April 17, 2015, 12:20:54 AM »
Got it working! The problem was much simpler. I just moved the ODServer declaration to class-level (was getting a connection, so seemed appropriate) , rebuilt the code and restarted Eclipse (sometimes Eclipse does behave like an arrogant kid)

And voila! It worked.  ;D

Thanks Ed!