I have installed DB2 10.1 in a Red hat box. During the installation I was asked to create several users (db2inst1, db2fenc1 etc). I have been using db2inst1 to perform all operations with DB2 and it works perfectly fine. The sqllib files are located in
The installation files are located in
All users have access to both these folders. I now want to perform the DB2 operations with another user, namely "john". Given that db2 uses the underlying user/password of the host machine, I added the groups dasadm1 and ds2iadm1 to the "john" user (which are the ones listed in db2inst1).
uid=500(john) gid=500(john) groups=500(john),101(dasadm1),102(db2iadm1)
I can properly enter the db2 cmd with the user "john"
[john@rhel6 java]$ /home/db2inst1/sqllib/bin/db2
but when I run my java app as user "john" I get the following error:
SQLException: com.ibm.db2.jcc.am.SqlException: [jcc][4.13.127] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError: db2jcct2 (Not found in java.library.path): ERRORCODE=-4472, SQLSTATE=null
this error does not appear if I run the same java app as user db2inst1. The library paths are the exactly the same for both users. Any idea what is going wrong?