Author Topic: ODWEK 7.1.2.9 logon failure  (Read 6145 times)

matej_j

  • Guest
ODWEK 7.1.2.9 logon failure
« on: October 29, 2007, 12:12:45 AM »
I have a problem with ODServer.logon running with the latest maintenance level (7.1.2.9) on z/OS V1.6. The following is the output when running sample Odwek1.java in USS:

= = > Java Odwek1

Initialized!                                                                   
Login >>>>>>>>>>>>>>>>>>>                                                       
ODException: com.ibm.edms.od.ODException: Connection cannot be established for the 10.16.1.252 server  id = 2086                                                                   
  msg = Connection cannot be established for the 10.16.1.252 server com.ibm.edms.od.ODException: Connection cannot be established for the 10.16.1.252 server                                                                       
        at com.ibm.edms.od.ODServer.logon(ODServer.java:541)                   
        at com.ibm.edms.od.ODServer.logon(ODServer.java:411)                   
        at Odwek1.main(Odwek1.java:34)                                         
Sample Odwek1.java:
//*******************************************************************
import java.util.*;
import java.io.*;
import com.ibm.edms.od.*;

public class Odwek1
{
  public static void main ( String argvݨ )
  {
    try
    {
      System.out.println("Initializing...");
      ODConfig cfg = new ODConfig(
          ODConstant.PLUGIN,
          ODConstant.APPLET,
          null,
          100,
          "/usr/lpp/ars/www/applets/",
          "ENU",
          "/u/in7788",
          "/u/in7788",
          1);
      ODServer odServer = new ODServer(cfg);
      odServer.initialize( "Odwek1.java" );
      cfg.printConfig();
      System.out.println( "Initialized!" );
      odServer.setPort( 1445);
      odServer.setServerName( "10.16.1.252" );
      odServer.setUserId( "arsuser" );
      odServer.setPassword( "XXXXXXXX" );
      odServer.setConnectType(ODConstant.CONNECT_TYPE_TCPIP);      System.out.println("Login >>>>>>>>>>>>>>>>>>>");
      odServer.logon( "10.16.1.252" ,
                      "arsuser" ,
                      "XXXXXXXX" );
 

      System.out.println( "Server  : " + odServer.getServerName( ) );
      System.out.println( "Port    : " + odServer.getPort( ) );
      System.out.println( "User Id : " + odServer.getUserId( ) );
      System.out.println( "Password: " + odServer.getPassword( ) );
      System.out.println( "Connect Type: " + getConnectTypeName( odServer.getConnectType( ) ) );


      //----------
      // Cleanup
      //----------
      System.out.println( "Logging off..." );
      odServer.logoff( );
      odServer.terminate( );
      System.out.println( "" );
      System.out.println( "---------------------------------------------------" );
      System.out.println( "" );
      System.out.println( "Testcase completed - analyze if required" );
      System.out.println( "" );
    }

    catch ( ODException e )
    {
      System.out.println( "ODException: " + e );
      System.out.println( "   id = " + e.getErrorId( ) );
      System.out.println( "  msg = " + e.getErrorMsg( ) );
      e.printStackTrace( );
    }

    catch ( Exception e2 )
    {
      System.out.println( "exception: " + e2 );
      e2.printStackTrace( );
    }
 }

  static String getConnectTypeName( char type )
  {
    String str;

    switch( type )
    {
      case ODConstant.CONNECT_TYPE_TCPIP:
        str = "TCPIP";
        break;
      case ODConstant.CONNECT_TYPE_LOCAL:
        str = "LOCAL";
        break;
      default:
        str = "*** Unknown connect type";
      break;
    }

    return str;
  }
}
// end of Odwek1.java

Any suggestion on ODServer.logon usage would be highly appreciated.

Regards, Matej

Karthikkumark

  • Guest
Re: ODWEK 7.1.2.9 logon failure
« Reply #1 on: December 18, 2013, 11:04:52 PM »
I too getting the same error.

Can anyone help me too.

Thanks,
Karthik k

Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: ODWEK 7.1.2.9 logon failure
« Reply #2 on: February 03, 2014, 07:25:54 AM »
I too getting the same error.
Can anyone help me too.

This is quite difficult to track... What I can give you, is a sample application to test if a CMOD is alive (like a ping):

Code: [Select]
import com.ibm.edms.od.*;

class PingCMOD {

  public void testODServerConnect() throws Exception {
    String betwChar = new String(new byte [] {0x01});
    String[] argv = {"localhost", "admin", "ondemand"}; // server, user, pw

    ODConfig odConfig = new ODConfig();
    ODServer odServer = new ODServer(odConfig);
    odServer.setServerName(argv[0]);
    odServer.setPort(1445);
    odServer.setUserId(argv[1]);
    odServer.setPassword(argv[2]);
    odServer.initialize("TestPocArchive.java");
   
    odServer.logon();   
    System.out.println("CMOD is alive");
    odServer.logoff();
    odServer.terminate();
  }

  public static void main(String[] args) throws Exception {
    new PingCMOD().testODServerConnect();
  }
}


Hope that helps a little bit.

Sincerely yours,
Alessandro
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML