+ Reply to Thread
Results 1 to 7 of 7

Thread: Password get *DISABLED

  1. #1
    Guest.Visitor Guest

    Default Password get *DISABLED

    Hi, I have a problem with the prompt property when I try to connect to the AS/400 with com.ibm.as400.access.AS400JDBCDriver(). Im running a java based web application which retreives data from a AS/400. The operation system in the AS/400 is 4.4.0 and security lvl is 30. If I connect with a JDBC connection and have the prompt property set to "false", like: java.sql.DriverManager.registerDriver(new com.ibm.as400.access.AS400JDBCDriver()); systemConnectInit = java.sql.DriverManager.getConnection("jdbc:as400://" + system + "/" + defaultLib + ";" + "prompt=false;.......", userId, password); the user profile get status *disabled, if I leave a incorrect password. The prompt propery have to be "false", cause I'm running one a web server when I make the connection. Still, I want to have 3 attempts before the user profile gets *disabled. Do anyone know how to solve this? Thanks in advance / Leif Sandvik

  2. #2
    Guest.Visitor Guest

    Default Password get *DISABLED

    On your AS/400, check the value of the "maximum sign-on attempts allowed" system value - DSPSYSVAL SYSVAL(QMAXSIGN). It is probably "1" now, in which case you should ask your system administrator to reset it to "3". - Jeff Lee, AS/400 Toolbox for Java

  3. #3
    Guest.Visitor Guest

    Default Password get *DISABLED

    Hi, Yes, that is what I tought it might be at the first time, but we have the "maximum sign-on attempts allowed" set to 3 attempts. Still the user profile gets *disabled in the first attempt when giving wrong password via JDBC when the prompt parameter is set to false. Any other suggestions? TIA / Leif

  4. #4
    Guest.Visitor Guest

    Default Password get *DISABLED

    Hi again, I found out the reason to my problem. There is 2 problems: 1. The first time you try to register a new driver of type com.ibm.as400.access.AS400JDBCDriver() it will be registered as 2 identical drivers into the JVM. 2. Every time you run the registerDriver it will put the com.ibm.as400.access.AS400JDBCDriver() into the JVM, because it is static. Solution: You have to check that only one com.ibm.as400.access.AS400JDBCDriver is registered. Otherwise the java.sql.DriverManager.getConnection will loop on every driver that are registered and try to make a connection to the AS/400. If more than 3 com.ibm.as400.access.AS400JDBCDriver are registered the user profile will be *disabled, becausee the AS/400 only give you 3 attempts. In the attachment you will find an code example to solve this. At least I have tried it in our test environment and it works. Bye / Leif

  5. #5
    Guest.Visitor Guest

    Default Password get *DISABLED

    Leif, Good bit of detective work. Thanks for posting the answer. I certainly had no idea what was causing the symptom. Alex Garrison

  6. #6
    Guest.Visitor Guest

    Default Password get *DISABLED

    I ran this past one of our JDBC experts, and here is his response: Here is the problem we face: The original JDBC specification dictated that a JDBC Driver class should register itself with the DriverManager when it is loaded. The original JDBC documentation suggested that apps explicitly load JDBC drivers using Class.forName() and each driver would then register itself. Later on, the JDBC documentation changed to suggest that apps register drivers themselves by calling DriverManager.registerDriver(). So... if your code does the suggested: DriverManager.registerDriver(new com.ibm.as400.access.AS400JDBCDriver()); ... the driver is registered twice: (1) when the class is loaded, it registers itself and (2) when the app explicitly registers it as above. A simple workaround from an app's perspective is to use the "old" way: Class.forName("com.ibm.as400.access.AS400JDBCDriver"); Now the driver only gets registered once. I have not found a way to keep the driver from getting register twice in the normal case.

  7. #7
    Guest.Visitor Guest

    Default Password get *DISABLED

    Hi, Well, then we use the "old" way. Thanks, I'm really grateful for your help. /Leif

+ Reply to Thread

Similar Threads

  1. Macro to be disabled
    By David Abramowitz in forum General
    Replies: 2
    Last Post: 12-19-2005, 11:38 AM
  2. User Profiles Disabled
    By Guest.Visitor in forum General
    Replies: 10
    Last Post: 11-13-2005, 06:11 PM
  3. DST profiles disabled
    By m_baramova@hotmail.com in forum General
    Replies: 5
    Last Post: 06-18-2002, 03:11 AM
  4. Listing Disabled profiles
    By Guest.Visitor in forum Security
    Replies: 3
    Last Post: 01-11-1999, 08:53 AM
  5. CUME tape disabled CA for WIN3.1
    By Guest.Visitor in forum Programming
    Replies: 1
    Last Post: 06-08-1998, 08:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts