I am trying to connect my grails project to Oracle databse(Oracle 12c) in windows(8) system. However, whenever I run my application I get following exception :
Caused by: org.apache.commons.dbcp.SQLNestedException:
Cannot create PoolableConnectionFactory (ORA-28040:
No matching authentication protocol)
Caused by:
java.sql.SQLException: ORA-28040:
No matching authentication protocol
According to internet suggestion I also tried editing my *.ora file but it is not working.
I added following snippet in sqlnet.ora file :
SQLNET.ALLOWED_LOGON_VERSION=10
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=10
SQLNET.ALLOWED_LOGON_VERSION_SERVER=10
Here i tried assigning (10,11,12) but neither of them is working.
Can anyone please help me with this ?
I deleted the ojdbc14.jar file and used ojdbc6.jar instead and it worked for me
Here is some text I found at experts-exchange:
Bug 14575666
In 12.1, the default value for the SQLNET.ALLOWED_LOGON_VERSION
parameter has been updated to 11. This means that database clients
using pre-11g JDBC thin drivers cannot authenticate to 12.1 database
servers unless theSQLNET.ALLOWED_LOGON_VERSION parameter is set to the
old default of 8.
This will cause a 10.2.0.5 Oracle RAC database creation using DBCA to
fail with the ORA-28040: No matching authentication protocol error in
12.1 Oracle ASM and Oracle Grid Infrastructure environments.
Workaround: Set SQLNET.ALLOWED_LOGON_VERSION=8 in the
oracle/network/admin/sqlnet.ora file.
This except for adding the following to sqlnet.ora
SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 8
SQLNET.ALLOWED_LOGON_VERSION_SERVER = 8
If you get "ORA-01017: invalid username/password; logon denied" error, then you need to re-create your password.
I resolved this issue by using ojdbc8.jar.
Oracle 12c is compatible with ojdbc8.jar
I was using eclipse and after trying all the other answers it didn't work for me.
In the end, what worked for me was moving the ojdb7.jar to top in the Build Path. This occurs when multiple jars have conflicting same classes.
Select project in Project Explorer
Right click on Project -> Build Path -> Configure Build Path
Go to Order and Export tab and select ojdbc.jar
Click button TOP to move it to top
Very old question but providing some additional information which may help someone else. I also encountered same error and I was using ojdbc14.jar with 12.1.0.2 Oracle Database. On Oracle official web page this information is listed that which version supports which database drivers. Here is the link and it appears that with Oracle 12c and Java 7 or 8 the correct version is ojdbc7.jar.
In the ojdbc6.jar is for 11.2.0.4.
Except for adding the following to sqlnet.ora
SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 8
SQLNET.ALLOWED_LOGON_VERSION_SERVER = 8
I also added the following to both the Client and Server, which resolved my issue
SQLNET.AUTHENTICATION_SERVICES = (NONE)
Also see post
ORA-28040: No matching authentication protocol
Adding
SQLNET.ALLOWED_LOGON_VERSION_SERVER = 8
is the perfect solution
sql.ora directory
..\product\12.1.0\dbhome_1\NETWORK\ADMIN
My Initial error is : ORA-28040: No matching authentication protocol exception
My DB version is 12.2 (Solaris) and client version is 11.2 ( windows). I have added below in both server and client sqlnet.ora
SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 8
SQLNET.ALLOWED_LOGON_VERSION_SERVER = 8
while connecting, I have got invalid username and password hence I have recreated the password ( same password ) in database which is resolved my issue.
While for most cases replacing ojdbc driver jar will be the solution, my case was different.
If you are certain you are using correct ojdbc driver. Double check if you are actually connecting to the database you are thinking you are. In my case jdbc configuration (in Tomcat/conf) was pointing to different database that had different Oracle version.
just install ojdbc-full, That contains the 12.1.0.1 release.
When I go to create a Database Connection in Kettle I am getting the exact same errors as in this question: Kettle / Pentaho Data Integration - unable to create a Database Connection (XulException: java.lang.reflect.InvocationTargetException)
org.pentaho.ui.xul.XulException: java.lang.reflect.InvocationTargetException
And after clicking OK there is this message:
General error in dialog
The difference for me being that I seem to be using the correct Java. I have upgraded to PDI 9.1 and according to the documentation Java 8 is still the only supported Java.
My Config:
MacOS 10.15.7 (Catalina)
Pentaho Data Integration (or Kettle) 9.1.0.0-324
Java jdk1.8.0_161.jdk
What else have I tried?
I cleared my cache as described in the comments below.
I updated my SWT as described in this tread: PDI will not start under MacOS Catalina 10.15
I changed my Java 8 build to jkd1.8.0_202.jdk per this thread: Issue while accessing DB Connections- PDI 8
I am trying to connect to Oracle database Express Edition (XE) Release 18.4.0.0.0 with my application that uses jdk12.
I am using ojdbc10 as an external jar and getting the following error:
java.lang.RuntimeException: Failed to load class of driverClassName [oracle.jdbc.driver.OracleDriver] in either of HikariConfig class loader or Thread context classloader
My ojdbc10.jar is in classpath (it gets loaded in the application). And Oracle official website only states that ojdbc10 is certified with jdk10 and it doesn't say anything
about jdk12.
Does anyone have any ideas about what might be causing this?
Is there any way I can make ojdbc to work with jdk12 because I cannot downgrade jdk?
It is strange.
ojdbc10 is meant for Java JVM 10. That's all you can get from JDBC driver file name.
The rest of information(JDBC ver, DB ver) you get by "executing" the driver.
$ java -jar ojdbc6.jar
Oracle 11.2.0.4.0 JDBC 4.0 compiled with JDK6 on Thu_Jul_03_18:17:32_PDT_2014
#Default Connection Properties Resource
#Wed Jul 15 11:33:31 GMT 2020
In your case the problem has to be something else. JVM 12 should be able to load Java 10 jars.
Also IMHO Java 12 did not introduce any newer JDBC standard update(still on ver JDBC 4.3), so there will not be any ojdbc12.jar driver file - because JDBC version implementation is what really matters.
I cloned a Java project in NetBeans 8.2 on Mac OS High Sierra that uses a Firebird database using jars jaybird-2.2.8.jar and jaybird-full-2-2-8.jar and it works well on computers with Windows 8.2 and 10, and Linux Ubuntu 16.04. The Firebird engine that I use in the development team is 2.5.8. and Java 1.8.
Using Firebird's default tool isql in the terminal works fine and Flamerobin also works, indicating that it is installed properly.
The error it throws in NetBeans, SquirreL SQL (Java), DBeaver (Java) is as follows:
Unexpected Error occurred attempting to open an SQL connection.
class org.firebirdsql.gds.impl.GDSServerVersionException: information type inappropriate for object specified
Version string "UI-V2.5.8.27089-1 Firebird 2.5DUI-V2.5.8.27089-1 Firebird 2.5/tcp (MacBook-Air-de-Ulises.local)/P10" does not match expected format
Expected engine version format: [platform]-[type][major version].[minor version].[variant].[build number] [server name]
Any idea what causes it?
The version number reported by your Firebird installation does not match the format expected by Jaybird. The problem is the -1 in UI-V2.5.8.27089-1.
Firebird will normally report something like UI-V2.5.8.27089 ..., but the build for MacOS needed to be rebuilt due to issues with the initial build. This created a revision 1, and Jaybird does not expect that revision to be included in the version number string.
You have the following workarounds:
Install a Firebird version that does not have a -1 revision
Patch org.firebirdsql.gds.impl.GDSServerVersion and replace it in your Jaybird jar. The change you need to make is replacing
private static final Pattern VERSION_PATTERN =
Pattern.compile("((\\w{2})-(\\w)(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)) ([^-,]+)(?:[-,](.*))?");
with
private static final Pattern VERSION_PATTERN =
Pattern.compile("((\\w{2})-(\\w)(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)(?:-\\S+)?) ([^-,]+)(?:[-,](.*))?");
I have created issue JDBC-534 for this.
This has been fixed in Jaybird 3.0.5 and 2.2.15, which is available from the Firebird JDBC driver download page.
Given you were using a relatively old version of Jaybird 2.2, I do suggest you take a look at the release notes to see all changes and fixes since version 2.2.8.
Disclaimer: I maintain Jaybird.
I am trying to configure activiti to communicate ms-sql 2014 with windows authentication instead of with username/password in connection url.
What i have done ?
downloaded JDBC Driver, put sqljdbc4-3-0.jar in JAVA_HOME and in the web-info\lib
put sqljdbc_auth.dll (64bit) in C:\Windows\System32
set integrated security in db.properties as following:
db.properties (C:\Workflow\apache-tomcat-7.0.62\webapps\activiti-explorer\WEB-INF\classes):
db=mssql
jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc.url=jdbc:sqlserver://127.0.0.1:1433;databaseName=activiti;integratedSecurity=true;
When using regular authentication (I remove the integratedSecurity=true and add user=XXX and password=XXX it works!)
When I open log the last line is:
DEBUG org.springframework.jdbc.datasource.SimpleDriverDataSource: Creating new JDBC Driver Connection to [jdbc:sqlserver://localhost;databaseName=activiti;integratedSecurity=true;]
Then the java application shutsdown and i see hs_err_pid4232.log as attached with exception:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000061a3cf13, pid=4232, tid=8080
What can cause this not to work ?
I want thinking maybe it did not load the DLL/JARS it should be in order to use JDBC driver ? the sql server config looks like this:
The log of process crush is at: http://pastebin.com/xpW5yvEP
This error screams "trouble with the authentication dll". Try these steps:
Download latest sqljdbc, unzip it locally from here: https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774
put the .jar in your classpath and the .dll in your library path. Try using a "real" path by adding -Djava.library.path=PATH/TO/DLL into your startup.
run java -fullversion to make sure you have the right .dll (32 bit vs 64 bit) installed there.
run program again.