I'm using the WSO2 Data Services (3.5.1) Server to connect with some Oracle 12c databases. However, to support the legacy, I also need to connect to different versions like 10g and 8i.
There's the problem, using the ojdbc14.jar driver, the datasources:
8i works
10g works
12c gives: ORA-28040: No matching authentication protocol (due the changes of SHA algorithm in the version 12)
Using the ojdbc6.jar or ojdbc7.jar:
10g works
12c works
8i gives:
org.wso2.carbon.ndatasource.common.DataSourceException: Error establishing data source connection: 4
...
Caused by: java.sql.SQLException: 4
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:290)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:702)
...
Caused by: java.lang.ArrayIndexOutOfBoundsException: 4
at oracle.jdbc.driver.T4C8TTIdty.<init>(T4C8TTIdty.java:491)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1434)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:486)
...
Searching for solution, I've found some alternative, by setting the parameter SQLNET.ALLOWED_LOGON_VERSION=8 in the oracle/network/admin/sqlnet.ora file in the 12c database and using ojdbc14.jar, but due infrastructure restrictions, this approach is not acceptable.
I would like to know if there's a way to use simultaneously both drivers in DSS, maybe specifying some custom Java class extending the different OracleDriver class, and configuring the DSS class loader... or some different solution.
Any help would be appreciated.
This is a known backward compatibility limitation1, 2 in oracle drivers and there's no solution in wso2 DSS as a workaround. This has clearly stated in Oracle version compatibility matrix.
Have you tried different versions of older ojdbc drivers which might work on both oracle versions(eg: oracle driver 10). Of cause not all the features might work, but you might end up with connecting to all the databases and execute basics without issue.
Related
We have an older version (I think its 9) of informix running on our server that is the backend db for a vendor software. I have an ODBC for it to ms access but now they want to do powerbi stuff. Im finding the odbc is throwing error on certain tables and given that its vendor software, they're less inclined to upgrade the version. Everything I've seen seems to show that Informix doesn't like slaves that aren't informix and cloud isn't an option. Any suggestions for getting this data on a different db other than pulling csv files?
We are working on a product migration from jboss 7 running on jdk 7 to wildfly 15 running on jdk 11 and we wanted to do this activity in phases.
So as part of the initial phase release we are first migrating our product's database from oracle 12c to oracle 19c and in the later phase we shall be migrating the product from jboss 7 (running on jdk 7) to wildfly 15 (running on jdk11).
We are aware 19c only supports ojdbc8 and higher versions but to have ojdbc8 or higher we have to migrate jdk first but we see lot of complications as part of jdk migration and jboss migrations, so we wanted to give a initial release with only the database migrated.
so would jdbc7.jar work well with oracle 19c or will there be any complication? from our initial analysis we haven't seen any feature breaks in the product till now.
Oracle JDBC Driver are all backward compatible, only if you don't use new API JDBC functionnalities (you probably see as a compilation error in this case). Read this page https://www.oracle.com/fr/database/technologies/faq-jdbc.html, more precisely these topics :
Which version of JDBC drivers are supported ?
What is the JDBC and RDBMS interoperability matrix or the certification matrix?
What are the Oracle JDBC releases Vs JDK versions?
What are the Oracle JDBC releases Vs JDBC specifications?
You need to upgrade driver only if you want to use new functionnalities of the JDBC driver (see https://jcp.org/en/jsr/detail?id=221) or if you want to be JDK compatible regarding the matrix compatibility shown in the Oracle FAQ.
Though, the older drivers are forward compatible, it is a best practice to have the JDBC driver from the same version as that of the Database. If you have any tighter dependency on 12 driver then you could go with that combination. Otherwise, it is better to consider the latest version.
I'm trying to connect to Athena using the JDBC drivers provided by Amazon, and using SQL Developer as the client. So far, I haven't had any luck with Java 1.8.181 and AthenaJDBC42-2.0.7.jar Has anyone had any luck on this front? Before I try mixing up which versions of Java, JDBC driver, and/or SQL Developer, I thought I'd at least ask if anyone has been successful using SQL Developer with the Athena JDBC drivers.
No.
SQL Developer doesn't allow for just any JDBC driver to be added...we restrict connectivity to the platforms we officially support for database migrations to the Oracle Database platform.
Athena doesn't have migration support, hence the lack of connectivity. If you need assistance with a migration, please send me a note.
Just to let you know about the problem i am facing, I will give a short introduction about what I have been doing.
I am working on a project, where the WEB interface is constructed in Java.
There is a parser built in python, which parses data and stores it into the database.
We were using a MySQL server, but were later asked to change it into DERBY. The java code now works perfectly connecting with the database.
But the python part of the code has problems with connection. I learnt how the derby database works, but find it hard to find articles about connecting to a derby database.
I have the following details:
uname : root
pwd : root
driver class : org.apache.derby.jdbc.EmbeddedDriver
DRIVER LOCATIONS : C:\Users\esusank\AppData\Roaming\RazorSQL\derby\derby10.10.jar
JDBC URL : jdbc:derby:C:\Derby\databases\MyDbTest;create=true
I am finding it hard to find syntax for writing a connection string for DERBY.
I have installed mxODBC driver.
Can someone help me out on this? If you can post some links or some suitable syntax, it will be very much helpful.
To communicate with Derby, you will need to use a JDBC driver. ODBC drivers can't talk directly to Derby; it is a Java-only database.
I believe there are some ODBC-JDBC bridge providers that provide such connection mechanisms, but I'm not sure if they are still in active use.
Another possibility is to use Jython, which is a Java implementation of Python, which may help: see this related question: Derby Database ODBC Connection
I have an old ODBC application which is an ODBC 2.x application (using ODBC 2.x functions). It works fine when I connect to ODBC 3.x drivers. But now, I would like use some of the ODBC 3.x functions in my application, such as SQLBulkOperations.
My question is, whether I need make extra changes if I want to call ODBC 3.x functions in my ODBC 2.x application? If yes, can you give more details?
Note, all the drivers I use is ODBC 3.x
I believe you should be ok doing this as the driver manager looks after all this and will already be mapping your ODBC 2 API calls to ODBC 3 ones in the driver.
It is possible you may need to call SQLSetEnvAttr to set (SQL_ATTR_ODBC_VERSION) the version to 3 but I don't think so and you should hope not as it changes 1) ODBC 3.x codes for date, time, and timestamp 2) returns ODBC 3.x SQLSTATE codes.