0

I have an SAP ASE 16 server on a Windows OS. I have enabled the java service:

sp_configure 'enable java'
Parameter Name Default     Memory Used Config Value Run Value    Unit   Type  
-------------- ----------- ----------- ------------ ------------ ------ ------
enable java              0           0            1            1 switch static

Rows affected (1) Time (0.094 s) 

I have created a basic class to test the service (JDBCExamples.java):

import java.sql.*; // JDBC
public class JDBCExamples {

    public static void main(String args[]){
        if (args.length != 2) {
            System.out.println("\n Usage: " + "name secondName \n");
            return;
        }
        try {
            String name = args[0];
            String secondName = args[1].toLowerCase();
            System.out.println("\n HOLA " + name + " " + secondName +" FUNCIONO!!!\n");
        } catch (Exception e) {
            System.out.println("\n Exception: ");
            e.printStackTrace();
        }
    }
}

I have the class file JDBCExamples.class and I make a file JDBCExamples.jar.

When I try to install the jar file it shows the error message:

instjava -f JDBCExamples.jar -SDEFAULT -Uuser -Ppassword -Ddatabase -new  

Server Message:  - Msg 5702, Level 10, State 1:
ASE is terminating this process.

I don't see any in log database.

Any idea what the problem is?

Update: I posted the same problem in https://answers.sap.com/questions/13241081/ase-is-terminating-this-process-when-trying-to-ins.html

In this post suspect the issue is caused by an ASE bug fixed in PL06:

2687973 - NTPCI__exit(1); Native Thread failed to unwind - SAP ASE http://service.sap.com/sap/support/notes/2687973

I have a trial version and I can not download a newer patch (PL06 at least but recommend PL09 as most recent)

Does anyone have this patch?

Daniel Vera
  • 77
  • 1
  • 10
  • the last few 100 lines of the log show the `instjava` program generating a couple stack traces due to *"... generated by a storage access violation"*; unfortunately this is a rather generic message; assuming you're installing your java code into the `test_rut` database I'd want to verify no access issues with the OS device(s) this db sits on; can you create a table in the `test_rut` database and perform inserts/updates/deletes against said table? if this causes errors then we'll want to see those error message(s) and any related lines from the ASE log – markp-fuso Jan 27 '21 at 22:59
  • I created a table and inserted records into the `test_sut` database and it allowed me to do so without any problems. – Daniel Vera Jan 28 '21 at 03:18

0 Answers0