ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

JDBC broken at v7r3, is there a way out?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • JDBC broken at v7r3, is there a way out?

    I've got an application that uses Scott Klement's JDBCR4 code along with the SQLite JDBC driver in order to create lightweight SQLite databases which power a fleet of handheld devices. This has been in daily use since v5r3. We attempted a migration to a new Power 9 box running v7r3 last weekend, this JDBC application, along with others, no longer work. The error message indicates that the JDBC drivers have no native OS400 libraries. IBM has been zero help other than to suggest I contact the JDBC driver suppliers in order to find out how to install the drivers on the As400 with OS400 native libraries. Three different JDBC drivers no longer work; MSSQL, jTDS and SQLite.

    Long story short, we aborted the migration and reverted back to a v7r1 box, the customer is not amused now that he owns a $60k paperweight.

    One option is to load the Power 9 with v7r2 that supposedly will allow JDBC to run the way it has been. But, the point of upgrading was not to start by downgrading.

    Very frustrating to say the least. Has anyone here hit this speed bump and found a way out? Ideas welcomed?

  • #2
    I ran into a similar situation when upgrading from 7.1 to 7.3 because the default Java version went from Java 6 to Java 7 and Java 6 was no longer supported on the new release. I was using the Help Systems SEQUEL utility to communicate with a Microsoft SQL Server and using an older version (4 I think) of Microsoft's JDBC driver, which worked with Java 6 but didn't work with the newer Java versions. When I updated the JDBC driver to the latest release (6), everything started working again, although that release had separate drivers for Java 7 and Java 8 that you had to pick depending on which version of Java you were going to run on the system.

    I'm not sure if your JDBC drivers are up to date or not, but if not, it might be worth a try installing the latest version.

    Comment


    • #3
      I think there's a chance a newer Microsoft or jTDS driver might fix this, my more immediate concern is the SQlite driver. I'll poke around there to see if a newer driver might be available which might fix this.

      EDIT: I confirmed the most recent version SQLite JDBC driver does NOT resolve this issue, "no native library found for OS400".

      Comment


      • #4
        We're using JDBCR4 on 7.3 with jTDS to connect to MS SQL Server. I'm not familiar with that message. Being Java, I have to ask the obligatory question whether you've confirmed your CLASSPATH?

        Comment


        • #5
          jtaylor, yes, I have checked the CLASSPATH. I went as far as not setting the CLASSPATH to verify the error message is completely different.

          I've now tried the latest MS JDBC drivers; they all fail, that's the bad news. The good news is they are failing for a different reason than missing native libraries. I haven't had time to dissect the new reason,will get to that later.

          If you have time, what jTDS driver version are you running, same question for MS SQL?

          Thanks

          Comment


          • #6
            I have a few comments on this thread:

            1. This issue is not (directly) related to 7.3 vs 7.1. It is related to the change in the Java Runtime Environment (JRE). On IBM i, we are used to things that work in one release automatically working in the next one -- but this isn't the strategy that they employ in Java. In Java, new versions can break older code. (There are typically warnings given for a year or two to notify people to update their code.) For this reason, you often need to download the latest copy of things when you update Java. (If whatever you're updating is no longer being developed, you're stuck looking for an alternative.) It is a different philosophy from what we're used to, but is very common outside of IBM i.

            2. A Native Library is when Java calls native code. For example, you can write Java applications that call RPG programs under the covers to get their work done... that RPG code would be a native library. It sounds like the JDBC driver you found is designed to call a native library, probably C/C++ code compiled for Windows. That sort of JDBC driver simply isn't going to work on IBM i (unless the vendor wanted to provide the C/C++ code for IBM i, but I'd call that unlikely.) Instead, look for a pure Java implementation of the driver. These are sometimes called "Type 4" JDBC drivers.

            3. I have no experience with SQLite, but I would recommend looking at their web site and/or contacting their support asking if they have a pure Java driver for the JRE version you're running.

            4. I have heard much better things about jTDS instead of Microsoft JDBC, and would recommend those instead.

            Comment


            • #7
              Scott, thanks for jumping in.

              I have this issue resolved now.

              The latest version of the jTDS driver is working with both instances of MS SQL server.

              I found a pure Java version of the SQLite driver which is also working properly.

              Thanks all for the help, much appreciated!

              Comment

              Working...
              X