Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.UnsatisfiedLinkError for JNI Code with "zos" profile #14

Closed
dkelosky opened this issue Jun 26, 2019 · 6 comments
Closed

java.lang.UnsatisfiedLinkError for JNI Code with "zos" profile #14

dkelosky opened this issue Jun 26, 2019 · 6 comments

Comments

@dkelosky
Copy link
Contributor

When adding the zos profile to configuration and calling native code through JNI, you get UnsatisfiedLinkError during invocation. When starting through JCL, messages like this appear in the job log:

08.14.25 JOB51197  TSS7003W Password Will Expire on 07/01/19                                
08.14.25 JOB51197  TSS7000I xxxxxxx Last-Used 26 Jun 19 06:23 System=xxxx Facility=ZOSMF    
08.14.25 JOB51197  TSS7001I Count=00423 Mode=Fail Locktime=None Name=KELOSKY, DANIEL L      
08.14.25 JOB51197  BPXP015I HFS PROGRAM ./libwtojni.so IS NOT MARKED PROGRAM CONTROLLED.    
08.14.25 JOB51197  TSS7236E ENVIRONMENT IS CONTROLLED - UNIX MARK UNCONTROLLED REQUEST RE   
08.14.25 JOB51197  JECTED                                                                   
08.14.25 JOB51197  BPXP014I ENVIRONMENT MUST REMAIN CONTROLLED FOR DAEMON (BPX.DAEMON) PR   
08.14.25 JOB51197  OCESSING.                                                                

Removing the zos from the profile "resolves" the UnsatisfiedLinkError.

@vvvlc
Copy link

vvvlc commented Jun 26, 2019

does ./libwtojni.so have +p program control attribute?
if not use extattr +p libwtojni.so
This should help

@dkelosky
Copy link
Contributor Author

That's it! Is there some good documentation on this? I haven't come across this before.

Thanks!

@dkelosky
Copy link
Contributor Author

Also, do you know why this is needed with the zos profile?

@vvvlc
Copy link

vvvlc commented Jun 26, 2019

I found this https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxb200/dirtyadd.htm

@dkelosky
Copy link
Contributor Author

Great resource - thanks again!

@vvvlc
Copy link

vvvlc commented Jun 26, 2019

I found this regarding zos profile:

jzos provides PlatformAccessControl, this function calls __check_resource_auth_np, but I don't see requirement of program controlled for __check_resource_auth_np.

@dkelosky dkelosky closed this as completed Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants