Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Java + SQL/MP on OSS

200 views
Skip to first unread message

Andre White

unread,
Apr 28, 2016, 12:36:02 AM4/28/16
to
Hi everyone, I try created example program use java and sql/mp in OSS.
I'm getting the below error during run the program:

Error number is -8025
java.sql.SQLException: SQLMP error: The SQL reqion was not sql compiled
Exception in thread "main" java.lang.NullPointerException at sqlmpExample.main(sqlmpExample.java:40)

Kindly help if you know what is causing this error and how I can resolve this.

Thanks Guys.

Bill Honaker

unread,
Apr 28, 2016, 12:33:48 PM4/28/16
to
Andre,

It seems that the JNI SQL/MP driver library isn't running with your Java instance, leading to the null pointer. The manuals refer to how to resolve this, although it depends on Java version and SQL/MP version. Can you supply that?

It probaby requres the environment variable "_RLD_LIB_PATH" to be set correctly.

What is the source statement being called at line 40 of the java program?

All of this should be in chapter 2 of the "HP NonStop JDBC Type 2 Driver Programmer's Reference for SQL/MX" manual on the HPE web site.

Andre White

unread,
Apr 28, 2016, 12:58:44 PM4/28/16
to
Hi Bill,

Thanks for your answer :-). My program run already.

Bill Honaker

unread,
Apr 28, 2016, 2:43:09 PM4/28/16
to
On Thu, 28 Apr 2016 09:58:43 -0700 (PDT), Andre White <s4n...@gmail.com> wrote:

>Hi Bill,
>
>Thanks for your answer :-). My program run already.


Glad to hear, Andre!
It's customary to post when you solve things and how, so that people don't spend time responding when it's not needed; and so that others can learn from what fixed your problem.

Bill

Frans Jongma

unread,
Apr 29, 2016, 2:37:42 AM4/29/16
to
Please add some more about what you try to do.
Typically, you would access SQL/MP from Java via the SQL/MX JDBC drivers
so the exception that refers to an (SQLMP) compled region seems to
indicate you try to use SQL/MP (library ?) modules that should not be
used.

Andre White

unread,
May 2, 2016, 9:25:13 AM5/2/16
to
HI Bill,

First time I read the manual book from G series documentation (Nonstop Server for Java Programmer's Guide). From manual book i found out like this

To use JDBCTM to access SQL/MP databases, you must compile the java object using theSQL Compiler. You can do this either directly or by using/usr/tandem/java/install/Makefile. Using the Makefile is recommended. Forinformation about the Makefile, see /usr/tandem/java/install/README

After that I can't found the Makefile in Install folder. Because our system running in J Series (Java version 1.6).
I also check manual book from J Series base on your recommendation(HP NonStop JDBC Type 2 Driver Programmer's Reference for SQL/MX). I just add _RLD_LIB_PATH to set my jdbcmpLib.so and I add also the CLASSPATH to set my jdbcMP.rar

Bill Honaker

unread,
May 2, 2016, 1:06:25 PM5/2/16
to
Andre,

Thank for the update. As you saw, the H/J series fix is significantly different from the G-Series. Glad you were able to make it work!

Bill

Keith Dick

unread,
May 25, 2016, 7:10:54 PM5/25/16
to
Maybe it is typical that people use the SQL/MX JDBC driver to access SQL/MP tables (via SQL/MX aliases for the SQL/MP tables, I assume), but there does exist a SQL/MP JDBC driver, and it does have to be SQL-compiled. I have used it. I have gotten an error that said it had to be SQL-compiled. I made a copy of the driver, SQL-compiled it (according to the installation instructions in the manual), and it then worked properly.

I believe the SQL/MP JDBC driver is a type 2 driver, and can only be used with Java programs executing on the NonStop system. The SQL/MX JDBC driver is a type 4 driver, and so can be used on any computer, not just on a NonStop computer. That probably is why the SQL/MX JDBC driver is more commonly used -- it can be used on any computer.

I think many system managers either don't know or don't care that they have to SQL-compile the SQL/MP JDBC driver.

I did this was some time ago, so I don't know whether the error reported here is the same one I got, but it seems to me likely that it is.

Frans Jongma

unread,
Jun 6, 2016, 10:44:03 AM6/6/16
to
There are twodrivers for JDBC/MX, one is a Type-2 driver, to be used on
the NonStop host, the other is a Type-4 driver, and this can be used on
any platform that supports a JVM. Many customers, (why not all) use
SQL/MX drivers because they support a more standard SQL language. And
the SQL/MX functionality (also for MP tables) is bigger.
Another important reason to use the T2 driver of MX over the one for MP
is performance when the JVM services multiple clients (as in iTP
Webserver).
The JDBC/MP driver I/O is process blocking whereas the JDBC/MX T2 driver
is only thread blocking.
Side note: The SQL/MX T2 driver also supports accessing MP tables with
their Guardian names, so you don't *have* to use aliases.

frans.

Keith Dick

unread,
Jun 6, 2016, 3:23:27 PM6/6/16
to
Thanks for the information about the type 2 JDBC driver for SQL/MX. I had not known about it. It might help to use it in a project I have to do soon, so I will look for the documentation about it.
0 new messages