• Admin-Scout-small-Banner
           
    CURSOR Admin-Scout
    get the ultimate tool for Informix
    pfeil  
invispix 10x10
invispix 10x10
Latest versionsfixlist
14.10.xC5 FixList
12.10.xC14.X5 FixList
11.70.xC9.XB FixList
11.50.xC9.X2 FixList
11.10.xC3.W5 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26
Question in the chat LiveZilla Live Help

Informix - Problem description

Problem IT30336 Status: Closed

NULLPOINTEREXCEPTION FROM GETTABLES WHEN USING IFX_PAD_VARCHAR=TRUE

product:
INFORMIX SERVER / 5725A3900 / 450 - Informix 4.50
Problem description:
getTables() throws an NullPointerException exception if
IFX_PAD_VARCHAR is set to 'true'.
To avoid the error use the expected values 0 or 1 for the
IFX_PAD_VARCHAR variable.

To see the problem compile and run the following code against a
14.10 engine:

    D:InfxworkJava>grep IFX e.java
            String
url="jdbc:informix-sqli://:/sysmaster:informixse
rver=i
ds1410;user=informix;password=;IFX_PAD_VARCHAR=true";

    D:InfxworkJava>

    D:InfxworkJava>java com.informix.jdbc.Version
    IBM Informix JDBC Driver Version 4.50.JC2

    D:InfxworkJava>javac e.java

    D:InfxworkJava>java e
    Connected

    D:InfxworkJava>javac e.java

    D:InfxworkJava>java e
    Connected
    java.lang.NullPointerException
    java.lang.NullPointerException
            at
com.informix.jdbc.IfxDatabaseMetaData.getTables(IfxDatabaseMetaD
ata.java:2677)
            at e.main(e.java:22)

    D:InfxworkJava>

It works with 4.10.JC11

    D:InfxworkJava>set
CLASSPATH=..informix-jdbc_410jc11.jar;.

    D:InfxworkJava>java e
    Connected

    D:InfxworkJava>java com.informix.jdbc.Version
    IBM Informix JDBC Driver Version 4.10.JC11

    D:InfxworkJava>


// -------- e.java ------------
import java.sql.*;
public class e
{
    private static Connection    m_connection;
    static {
        try {
            Class.forName("com.informix.jdbc.IfxDriver");
        } catch (Exception ex) {
            System.err.println(ex);
            System.exit(1);
        }
    }

    public static void main(String[] args)
    {
    String
url="jdbc:informix-sqli://:/sysmaster:informixse
rver=i
ds1410;user=informix;password=;IFX_PAD_VARCHAR=true";

        try {
            m_connection = DriverManager.getConnection(url,
"informix", "ximrofni");
            System.err.println("Connected");
            DatabaseMetaData databaseMetaData =
m_connection.getMetaData();
            databaseMetaData.getTables(null, null, null, null);
            System.in.read();
            System.in.skip(System.in.available());
        } catch (Exception ex) {
            System.err.println(ex);
            ex.printStackTrace();
            System.exit(1);
        }
    }
}
// -------- e.java ------------
Problem Summary:
****************************************************************
* USERS AFFECTED:                                              *
* Users of Informix JDBC prior to 4.50.JC3.                    *
****************************************************************
* PROBLEM DESCRIPTION:                                         *
* NULLPOINTEREXCEPTION FROM GETTABLES WHEN USING               *
* IFX_PAD_VARCHAR=TRUE                                         *
****************************************************************
* RECOMMENDATION:                                              *
* Upgrade to Informix JDBC 4.50.JC3.                           *
****************************************************************
Local Fix:
Solution
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
20.09.2019
02.12.2019
02.12.2019
Problem solved at the following versions (IBM BugInfos)
4.50.JC3
Problem solved according to the fixlist(s) of the following version(s)
invispix 10x10
invispix 10x10
invispix 10x10
Technical InfoTechnical Info

Technical Info

DocumentationDocumentation

Documentation

IBM NewsletterIBM Newsletter

IBM Newsletter

Current BugsCurrent Bugs

Current Bugs

Bug ResearchBug Research

Bug Research

Bug FixlistsBug Fixlists

Bug Fixlists

Release NotesRelease Notes

Release Notes

Machine NotesMachine Notes

Machine Notes

Release NewsRelease News

Release News

Product LifecycleProduct Lifecycle

Lifecycle

Media DownloadMedia Download

Media Download

invispix 10x10
Service und SupportService und Support

Service and Support

Informix MonitoringInformix Monitoring

Informix Monitoring

Admin-Scout forInformixAdmin-Scout forInformix

Admin-Scout for Informix

Informix News & InfosInformix News & Infos

Informix News & Infos

This site uses cookies to make it easier for us to provide you with our services. By using our site you agree to the use of cookies.