WSO2 Identity Server 5.0.0 / JDBC MSSQL - jdbc

I'm just getting started with WSO2 Identity Server 5.0.0 on Window Server 2008 R2.
I have a MSSQL database and I've followed the Admin Guide on how to set up the system with a MSSQL database instead of using the built in H2 database.
I'm getting stuck with JDBC. I've downloaded every possible JDBC driver (4.0, 4.1, 4.2 and even 6). I have JDK 1.7u80 installed. I tried all the different sqljdbc.jar files including sqljdbc4.jar. In all cases I'm getting an error message telling me that the driver is not compatible with JDK 1.7.
This is the WSO2 doc I was using to set up MSSQL database.
I also read the Microsoft JDBC website Microsoft JDBC Driver for SQL Server Support Matrix and at least one of the JAR files should have worked with 1.7 according to the documentation.
The WSO2 doc says JDK 1.8 is not supported so I haven't tried this.
Any ideas anyone?
Error:
...
[2015-12-06 23:00:20,962] ERROR {org.wso2.carbon.user.core.util.DatabaseUtil} -
Database Error - Java Runtime Environment (JRE) version 1.7 is not supported by
this driver. Use the sqljdbc4.jar class library, which provides support for JDB
C 4.0.
java.sql.SQLException: Java Runtime Environment (JRE) version 1.7 is not support
ed by this driver. Use the sqljdbc4.jar class library, which provides support fo
r JDBC 4.0.
...

Based on the documentation you can find at the link below 4.0 supports Java 5 & 6. 4.1 Supports Java 5, 6 & 7. 4.2 Supports Java 5,6,7 & 8. So sqljdbc4.jar would not work for you if you are using 7, but the rest should. I am assuming you updated the driver name in your master-datasources.xml file? Are you able to share that file? We are using sqljdbc4_1.0.0.jar and JDK 1.7 with no issues.
https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774
Joe

Related

Oracle 12.2.0.4 and JDK 1.6.0_45

We're upgrading the database of an application which is on jdk 1.6.
Is there any way to connect 1.6 app with oracle 12.2.0.4?
As I could see on official oracle site, the only version of ojdbc that 12.2.0.4 supports is ojdbc8 which requires jdk 8.
I think you meant "12.2.0.1" as I don't think "12.2.0.4" exists. Unless you have "11.2.0.4" in mind? Anyway you don't have to upgrade the JDBC driver. You can continue to use the old JDBC driver that supports JDK6. The "12.2.0.2" server will be compatible with the JDBC driver from "11.2" ojdbc6.jar.
Yes a Java 6 application will work with a 12c database. You can carry on using the existing ojdbc jar and it will work. I think what you're referring to might be something else.

ojdbc jar version & DataStoreHelper class in websphere application server 7.x for Oracle 12c

I am working with JDK 7 and Oracle 12c.
In Websphere application server 7.x version,
JDBC provider configurations:
Which version of ojdbc jar i can keep in classpath to support oracle 12c?
DataSource configurations:
Whcih Oracle DataStorehelper class can be kept?
According to the following oracle documentation, you should be using ojdbc7.jar for Oracle 12c
Regarding data store helpers, the latest available one ought to work based on forward compatibility, which is:
com.ibm.websphere.rsadapter.Oracle11gDataStoreHelper

Glassfish with Oracle DS

I am using glassfish 3.1 and configure Oracle Datasource. However, I tried to Ping from glassfish admin console, but hitting an error with oracle.jdbc.pool.OracleDataSource not found. What could be the Issue?
As per http://docs.oracle.com/cd/E18930_01/html/821-2432/gkyan.html - you need to insert Oracle jdbc driver manually as it does not come bundled with Glassfish 3.1 installation. Just put the required jar into domain/lib directory.
Driver jar is downloadable from http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html

Apache DBCP 2.1 to work with Oracle v11.2.0.1

we are planning to use Apache DBCP 2.1 for our connection pooling, We currently have following technology stack
Tomcat 8
Jre 7
Oracle DB 11.2.0.1
As per the Apache DBCP home page the DBCP v2.1 only works with jre7 and it requires JDBC 4.1 drivers.
I am finding very hard to get the JDBC 4.1 drivers for Oracle DB. Also I am not sure if the Oracle 11.2.0.1 even supports JDBC 4.1 drivers.
I did a lot of research on google but was not able to find link or maven dependency to use JDBC 4.1 version.
Following is where I stumbled upon
Can I use Apache DBCP 2.1 with Oracle 11.2.0.1 in Tomcat 8
Where I can find Maven dependency for JDBC 4.1 drivers for Oracle DB
Note: I do not want to use tomcat DBCP
Oracle 11g does not support JDBC 4.1. Only Oracle 12c does.
See this table on Oracle site that describes with versions of Java and JDBC is supported in which Oracle Database version.
(JDBC 4.1 is part of JDK 1.7)
I checked few versions of Oracle JDBC/ODBC drivers, but haven't find any sign of JDK 1.7 nor JDBC 4.1 compliance. So I assume it is not.
Can't you use different connection pool. We are working with c3p0 and I've seen it to be solid, if you tune it well.
Response to comment:
According table #Tunaki provided and Apache Commons DBCP site, yes your matrix is:
ODBC 11.2.0.4 (JDBC 4.0 compliant)
Apache DBCP 1.4 (JDBC 4.0 compliant)
JDK 1.7
EDIT2:
Do you know that Apache DBCP is not consired as production ready by various sources:
http://docs.spring.io/spring-boot/docs/1.2.1.RELEASE/reference/htmlsingle/#boot-features-connect-to-production-database
http://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html#Introduction
Connection pooling options with JDBC: DBCP vs C3P0
Why do you have such crazy requirement?

Does Websphere 7.0 support JAX-WS 2.1?

I have a web application that use a JAX-WS 2.1 in order to create a client .. when running the application on Webshpere 2.1 I keep getting NoDefClassFoundError on XMLStreamBuffer. I googled the error but I couldn't find anything helpful. Please help.
From the WAS 7 Infocenter:
WebSphere® Application Server Version 7.0 supports the JAX-WS 2.1 specification.
Since there is no type called XMLStreamBuffer in the Java 6 SE, Java EE 5 or JAX-WS 2.1 public APIs you are perhaps importing a type from another implementation - either directly or via some generated code.

Resources