[MCOL-1671] Windows mcsapi - add option to install libraries directly into Java Created: 2018-08-22  Updated: 2023-10-26  Resolved: 2018-11-10

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 1.1.6
Fix Version/s: 1.1.7, 1.2.1

Type: New Feature Priority: Major
Reporter: Jens Röwekamp (Inactive) Assignee: Zdravelina Sokolovska (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Environment:

Windows 10


Attachments: File MariaDB ColumnStore Bulk Write SDK-1.1.7-1-x64.msi     File test.jar    
Sprint: 2018-18, 2018-19, 2018-20

 Description   

The mcsapi Windows installer should have an option to install javamcsapi directly into the Java JRE installation directory.



 Comments   
Comment by Jens Röwekamp (Inactive) [ 2018-10-08 ]

Including javamcsapi directly into the JRE or JDK wasn't possible as javamcsapi wouldn't be transferred to new JRE or JDK directories after a Java update.

Instead the Windows PATH is extended to mcsapi's library directory. This way Java is able to access javamcsapi's shared libraries and customer's don't have to specify the java.library.path while executing Java programs relying on javamcsapi.

The setting of the PATH entry can be deactivated in the installer if not needed or required.

For QA:

  • run the regression test suite
  • execute attached test.jar from the Desktop via java -jar test.jar and verify that the program doesn't exit with an error message that dependent shared libraries aren't found.
Comment by Zdravelina Sokolovska (Inactive) [ 2018-11-08 ]

checked on Windows10 with the attached msi
C:\Users\elena.kotsinova\Downloads>java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) Client VM (build 25.191-b12, mixed mode, sharing)

C:\Users\elena.kotsinova\Downloads>java -jar test.jar
Native code library failed to load by parent classloader.
Ensure that it is loaded by a child classloader
java.lang.UnsatisfiedLinkError: C:\Program Files\MariaDB\ColumnStore Bulk Write SDK\lib\javamcsapi.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.mariadb.columnstore.api.javamcsapiJNI.new_ColumnStoreDriver__SWIG_1()J
at com.mariadb.columnstore.api.javamcsapiJNI.new_ColumnStoreDriver__SWIG_1(Native Method)
at com.mariadb.columnstore.api.ColumnStoreDriver.<init>(ColumnStoreDriver.java:78)
at grew.Blub.main(Blub.java:8)

C:\Users\elena.kotsinova\Downloads>

Comment by Jens Röwekamp (Inactive) [ 2018-11-08 ]

mcsapi can only be used on 64Bit systems. Therefore, please test with a 64Bit Windows.

I opened MCOL-1865 to check why you were able to install mcsapi on a 32Bit system.

Generated at Thu Feb 08 02:30:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.