Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error loading the native OCI library on OS X using 12.1.0.2.0

cj.travisNov 30 2016 — edited Nov 30 2016

Good morning,

I am attempting to leverage the OCI/Thick driver in SQL Developer 4.1.1 running on OS X Yosemite (10.10.5).

For clarity, I've downloaded the 64bit drivers

  • instantclient-basic-macos.x64-12.1.0.2.0.zip
  • instantclient-sqlplus-macos.x64-12.1.0.2.0.zip
  • instantclient-odbc-macos.x64-12.1.0.2.0.zip

and have extracted them to /Applications/instantclient_12_1

I've also followed the directions at the end for 12_1 (Instant Client downloads for Mac OS X (Intel x86) ) for creating the soft links.

Below is my general configuration.

Screenshot 2016-11-30 09.36.05.png

[09:29 AM] cjtravis@MBP01 /Applications/instantclient_12_1

# echo $DYLD_LIBRARY_PATH

/Applications/instantclient_12_1

[09:29 AM] cjtravis@MBP01 /Applications/instantclient_12_1

# echo $PATH

/opt/local/bin:/opt/local/sbin:/Applications/instantclient_12_1:/opt/local/bin:/opt/local/sbin:/Applications/instantclient_12_1:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin

[09:29 AM] cjtravis@MBP01 /Applications/instantclient_12_1

# echo $TNS_ADMIN

/Applications/instantclient_12_1/network/admin

[09:30 AM] cjtravis@MBP01 /Applications/instantclient_12_1

# file /Applications/instantclient_12_1/*

/Applications/instantclient_12_1/BASIC_README: ASCII text

/Applications/instantclient_12_1/ODBC_IC_Readme_Unix.html: HTML document text

/Applications/instantclient_12_1/SQLPLUS_README: ASCII text

/Applications/instantclient_12_1/adrci: Mach-O 64-bit executable x86_64

/Applications/instantclient_12_1/genezi: Mach-O 64-bit executable x86_64

/Applications/instantclient_12_1/glogin.sql: ASCII English text

/Applications/instantclient_12_1/jdbc: directory

/Applications/instantclient_12_1/libclntsh.dylib: Mach-O 64-bit dynamically linked shared library x86_64

/Applications/instantclient_12_1/libclntsh.dylib.12.1: Mach-O 64-bit dynamically linked shared library x86_64

/Applications/instantclient_12_1/libclntshcore.dylib.12.1: Mach-O 64-bit dynamically linked shared library x86_64

/Applications/instantclient_12_1/libnnz12.dylib: Mach-O 64-bit dynamically linked shared library x86_64

/Applications/instantclient_12_1/libocci.dylib: Mach-O 64-bit dynamically linked shared library x86_64

/Applications/instantclient_12_1/libocci.dylib.12.1: Mach-O 64-bit dynamically linked shared library x86_64

/Applications/instantclient_12_1/libociei.dylib: Mach-O 64-bit bundle x86_64

/Applications/instantclient_12_1/libocijdbc12.dylib: Mach-O 64-bit bundle x86_64

/Applications/instantclient_12_1/libons.dylib: Mach-O 64-bit dynamically linked shared library x86_64

/Applications/instantclient_12_1/liboramysql12.dylib: Mach-O 64-bit dynamically linked shared library x86_64

/Applications/instantclient_12_1/libsqlplus.dylib: Mach-O 64-bit dynamically linked shared library x86_64

/Applications/instantclient_12_1/libsqlplusic.dylib: Mach-O 64-bit bundle x86_64

/Applications/instantclient_12_1/libsqora.dylib.12.1: Mach-O 64-bit dynamically linked shared library x86_64

/Applications/instantclient_12_1/network: directory

/Applications/instantclient_12_1/odbc_update_ini.sh: POSIX shell script text executable

/Applications/instantclient_12_1/ojdbc6.jar: Zip archive data, at least v1.0 to extract

/Applications/instantclient_12_1/ojdbc7.jar: Zip archive data, at least v1.0 to extract

/Applications/instantclient_12_1/sqlplus: Mach-O 64-bit executable x86_64

/Applications/instantclient_12_1/uidrvci: Mach-O 64-bit executable x86_64

/Applications/instantclient_12_1/xstreams.jar: Zip archive data, at least v1.0 to extract

When I configure SQL Developer to use the OCI/Thick client:

Screenshot 2016-11-30 09.32.49.png

I receive the following message:

Testing the Instant Client located at /Applications/instantclient_12_1

Testing client directory ... OK

Testing loading Oracle JDBC driver ... OK

Testing checking Oracle JDBC driver version ... OK

Driver version: 12.1.0.2.0

Testing testing native OCI library load ... Failed:

Error loading the native OCI library

The native OCI driver could not be loaded. The system propertyjava.library.path contains the entries from the environment variable DYLD_LIBRARY_PATH. Check it to verify that

the expected native library directory /Applications/instantclient_12_1 is present and precedes any other client installations.

java.library.path = /Users/cjtravis/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.

Screenshot 2016-11-30 09.36.13.png

I've spent more time than I'd like to admit troubleshooting this issue. I've set my $DYLD_LIBRARY_PATH with no luck.

Any feedback is appreciated. Have I overlooked a painfully obvious configuration setting somewhere? Thanks in advance.

Comments

Sanjeev-OFM

Hello Friends,

Any Suggestion??

Thanks
Sanjeev

Timo Hahn

User, tell us your exact JDev version, please!
I don't see any chance to do this declaratively.
You can do this as a groovy script or a java business rule in the VO/EO.

Timo

Sanjeev-OFM

Hi Timo,
Thanks for the update jdev version is 11.1.1.9.0.

Thanks
Sanjeev

Sanjeev-OFM

Hi Timo,
Using groovy script can we validate it with the querytext result, if so please help with some information?
Thanks
Sanjeev

Timo Hahn

On second thought, I would do it in java as a business rule. This way you are free to use pl/sql or other methods to help you implement the validation.
Using groovy limits you somewhat, e.g., you can't easily call other methods from different objects like AM or other VOs.

Timo

Sanjeev-OFM

Hi Timo,
Thanks for the information, want to check one more thing, where we can have this validation in EOImpl.java file or in backing bean, Which one will be the best suggestable approach?
Kindly suggest.
Thanks
Sanjeev

Timo Hahn

The rule of thumb is to install validations at the EO level. This ensures that every data written to the DB has been validated. ADF uses this approach but adds some client-side validation too (e.g. checking for numbers). Still, all data written to DB tables should be valid.
As a DBA I would enforce the final validation in the DB using constraints. In the end, users expect to see valid data in the DB and a DBA will not trust anybody but the DB.
I would implement the validation in the DB (that's the DBAs work) and on EO level.
Timo

Sanjeev-OFM

Hi Timo,
Thanks for the information, want to check can we do the transit attribute level validation in Enitiy Object at attribute level or at entity level.
Please suggest.

Thanks
Sanjeev

Timo Hahn

You can do both. It depends on the use case. If the attribute can be tested without knowing other values from the same EO (or other EOs), you can do it at the attribute level. If the attribute needs information from other attributes of the same EO, it's better to do an entity-level validation. This way, you know that all attributes are given (have the values the user wants to store), and the validation must fulfill the rule.

Timo

Sanjeev-OFM

Hi Timo,
Thanks for the information, I'm having one transit attribute(EMPName) which is based on other db attribute(Ename) of Entity Object.
Here when I'm doing the entity level validation on db attribute(Ename) it's performing the validation and showing the error message properly but when I'm doing the same validation on transit attribute (which is based on db attribute using groovy). I've assign the Ename db attribute value to EMPName transit attribute) the validation is not getting triggered and not showing any validation message.
Jdeveloper version is 11.1.1.9.0.
Kindly suggest.

Thanks
Sanjeev
SA.7z (167.81 KB)

Timo Hahn

Sanjeev, I'm not sure what to do with the test case. I don't see any description on how to get to the problem. Please tell me what to do.
From what I see in the sources, you don't get any exception because there is no rule defined for your transient attribute.

Timo

Sanjeev-OFM

Hi Timo,
Actually having two attribute EName which is db attribute on this if I'm putting validation either on attribute or entity level it's showing the message properly.
DBAttributeListValidationError.JPGDBEntityIstValidation.JPGbut if the same validation i'm applying on transit attribute EMPName (which is based on EName ) is not triggering any validation neither at entity level nor at attribute level and not showing any message.

TransistEntityLevelValidation.JPGTransitAttributeLevelValidation.JPG
Kindly suggest, how i can trigger the validation on transit attribute.
Thanks
Sanjeev

Timo Hahn

Sanjeev, your data model is OK, but the rules you try to implement are not. You can't implement a rule that the data in the DB is not fulfilling. The transient attribute EMPName should be one of the department names from the dept table but must be equal to the emp_name attribute of the employee. This rule is not valid in the data you added to the DB.
So, your test case can't be used to show anything. A test case should show the problem but should not be the problem.
If you remove the emp_name setting from the transient attribute and add a rule that checks if the value entered by the user is a known department name (from the list rule), it works as expected.
Timo

Sanjeev-OFM

Hi Timo,
Thanks for the information and yes you are right in this way we can do the transit attribute validation.
Actually as we need to validate one of the DB attribute which hold 8 combined value ie.("001.100.101.00012.ABC123,24343,12019,ak200") and we need to validate starting 4 value ie.("001.100.101.00012") with other query result so to achieve this declaratively I thought to have 1 transit attribute and compare the value with query result but somehow it's not working so thought to check.
Please suggest if there is any other way to achieve this using declarative approach.
Thanks
Sanjeev

Timo Hahn

Well, I remember that I told you to do this in the DB already.
Sure, you can use a transient or original attribute and compare it against something else. But why do you want to do it declarative?
You need to extract part of the original value and compare it. This you don't do declaratively. Use either a groovy expression or use a method validator.

Timo

1 - 15
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 28 2016
Added on Nov 30 2016
10 comments
16,378 views