java.lang.UnsatisfiedLinkError: no ocijdbc12 in java.library.path - oracle

We are trying to move away from Oracle 10g which has the lib and lib32 folders and the jars used are ojdbc14.jar and classes12.zip folders.
I am not sure where i am missing any files. Could some one please guide me to get this database conenction issue fixed?
we are trying to move to Oracle 12 and in the oracle home path we have the ojdbc6.jar that we have to use. and in the lib folder we are suppose to have the libocijdbc12.so file which I do.
But when i try to establish the java connection i get the below error:
java.lang.UnsatisfiedLinkError: no ocijdbc12 in java.library.path

Related

Error on Websphere Application after restart

Can someone please advise how I can solve this issue. I am getting this error on my websphere application after restart.
SystemErr R Thread[server.startup : 1,5,main] java.io.FileNotFoundException: /opt/IBM/WebSphere/AppServer/derby/derby.log (Permission denied)
Booting Derby version The Apache Software Foundation - Apache Derby - 10.8.3.1 - (1452645): instance a816c00e-0170-ce1a-1169-ffff86094069
on database directory /opt/IBM/WebSphere/AppServer/profiles/AppNode/databases/EJBTimers/peoplemember02/EJBTimerDB with class loader com.ibm.ws.bootstrap.ExtClassLoader#9096b0eb
Loaded from file:/opt/IBM/WebSphere/AppServer/derby/lib/derby.jar
java.runtime.version=pxa6470sr10fp5-20170421_01 (SR10 FP5)
java.fullversion=JRE 1.7.0 IBM J9 2.6 Linux amd64-64 Compressed References 20170407_343227 (JIT enabled, AOT enabled)
The error indicates that it lacks permission to the log file for the Apache Derby database that is used for EJB Persistent Timers. Have you tried checking the permissions of the file and granting read/write access?
For example, to grant read & write access to all, you could do,
chmod a+rw /opt/IBM/WebSphere/AppServer/derby/derby.log
If this doesn't work, it is possible that permissions might be lacking to the folder which contains derby.log

SQL Server Driver Error Failed to find or load the JDBC driver:

I am getting below error while trying to connect to SQL SERVER. I have already done following and still getting the error:
downloaded Sqljdbc42.jar file
placed it in "C:\tibco\tpcl\5.9\jdbc" folder
updated designer.tra file - appended tibco.env.CUSTOM_CP_EXT and tibco.env.STD_CP_EXT with "C:\tibco\tpcl\5.9\lib\sqljdbc42.jar"
I also did tried placing the jar file in "C:\tibco\tpcl\5.9\lib" and
"C:\tibco\bw\5.12\lib" folder and repeated Step3 above, however, no luck..
any suggestions ?
Error:
BW-JDBC-100033 "Configuration Test Failed. Failed to find or load the
JDBC driver: tibcosoftwareinc.jdbc.sqlserver.SQLServerDriver"
tibcosoftwareinc.jdbc.sqlserver.SQLServerDriver driver comes with tibco BW installation. looks like the tibco tibcosoftwareinc.jdbc.sqlserver.SQLServerDriver driver was not installed in your environment.
If you want to use sqljdbc42.jar you need to specify correct jdbc driver class in Tibco connection configuration in "JDBC Driver" field (please see screenshot).
For sqljdbc42.jar the "JDBC Driver" is
com.microsoft.sqlserver.jdbc.SQLServerDriver
you can find The JDBC driver class name and connection string example in https://learn.microsoft.com/en-us/sql/connect/jdbc/using-the-jdbc-driver?view=sql-server-2017
the connection string should look like:
jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks;user=MyUserName;password=*****;
as you said you need to add sqljdbc42.jar to C:\tibco\tpcl\5.x\jdbc folder.
The folder C:\tibco\bw\5.x\lib also works.
You need to restart designer after adding jars.

How to fix "Unable to instantiate JDBC driver" Flyway command line error?

I'm new to Flyway. I'm using Flyway 3.2.1 on windows 64bit and just tried the command line tool with my local Oracle database installation (11g). I'm getting the following error:
ERROR: Unable to instantiate JDBC driver: oracle.jdbc.OracleDriver
What did I do wrong? In flyway.conf I configured my jdbc url and also username and password.
Thanks in advance
Matze
Problem solved. For Oracle you have to put the jdbc driver jar in the drivers sub directory.
This is documented here.
In summary: Go to http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html and choose the required Oracle JDBC driver version. Then download the "ojdbc6.jar" file and move it into the drivers folder beneath where Flyway is installed. The next time you run Flyway this should be picked up automatically.

Callable statement in jdbc

hi i wrote a jdbc program using callable statement and i installed the connector j also .I have created a stored procedure also in mysql .I installed the following driver also
C:\Program Files\MySQL\mysql-connector-java-5.1.21 (3)\mysql-connector-java-5.1.21
but i am still getting an error
java.sql.SQLException: No suitable driver found for jdbc:mysql:localhost
java.lang.NullPointerException
if you are doing this through eclipse then you have to put the mysql required jar file to the lib folder of the project structure or else using build path of the eclipse. If you are doing this local system then you have to set path(Environmental variable).

Oracle tns listener error

I've just installed Oracle 10g When I try to connect to oracle db i get an error:
could not start OracleOraHome92TNSListener
when i got to services and try to start it, it says that the file doesnt exist. the service file is C:\oracle\ora92\BIN\TNSLSNR (TNSLSNR is a file not a directory)
C:\oracle\ora92\BIN\TNSLSNR doesn't exist on my machine at all. do you know how to get it?
Could not start the Oracle Ora92 Listener service on Local Computer.Error 2: The system cannot find the file specified
Here's a couple of issues I see. You say you installed 10g but the error is a 9.2 error. It could be that your computer already had an Oracle 9i on it that was mis-configured or uninstalled and that is leading to the error.
You need to check your disk and find the ORACLE_HOME (directory) where Oracle 10g was installed. Once you find that you can adjust the PATH and ORACLE_HOME and TNS_ADMIN environment variables to point to the right place. This should allow you to start the database and the listener.
If you need to install the Oracle Client for 10g then this information below will be helpful as well.
The Oracle client can be installed separately. Just go to this address, download the client and unzip it into a subdirectory and then run the Oracle Universal Installer by running setup.exe from the directory.
Oracle Downloads Page

Resources