ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » JDBC TYPE 4 SQL Server 2008 cannot connect in IIB v 9

Post new topic  Reply to topic
 JDBC TYPE 4 SQL Server 2008 cannot connect in IIB v 9 « View previous topic :: View next topic » 
Author Message
gisly
PostPosted: Sat Feb 20, 2016 8:49 am    Post subject: JDBC TYPE 4 SQL Server 2008 cannot connect in IIB v 9 Reply with quote

Apprentice

Joined: 10 May 2012
Posts: 29

Hi!
I cannot configure SQL Server JDBCProvider for IIB v 9.0.0.3 (the Oracle one works on the same machine; there's a requirement to use JDBC for SQL Server).
This is a fragment from the exception trace:
Code:

 Exception details:  message: java.lang.ExceptionInInitializerError stack trace: [java.lang.J9VMInternals.initialize(J9VMInternals.java:259)
javax.crypto.KeyAgreement.getInstance(Unknown Source)
com.ibm.jsse2.lb.g(lb.java:44)
com.ibm.jsse2.lb.a(lb.java:108)
com.ibm.jsse2.l$c_.a(l$c_.java:6)
com.ibm.jsse2.l.a(l.java:80)
com.ibm.jsse2.m.a(m.java:15)
com.ibm.jsse2.m.h(m.java:13)
com.ibm.jsse2.qc.a(qc.java:38)
com.ibm.jsse2.qc.<init>(qc.java:632)
com.ibm.jsse2.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:16)
com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1606)
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1324)
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:992)
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:828)
com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnectionInternal(SQLServerDataSource.java:629)
com.microsoft.sqlserver.jdbc.SQLServerPooledConnection.createNewConnection(SQLServerPooledConnection.java:60)
com.microsoft.sqlserver.jdbc.SQLServerPooledConnection.<init>(SQLServerPooledConnection.java:42)
com.microsoft.sqlserver.jdbc.SQLServerXAConnection.<init>(SQLServerXAConnection.java:30)
com.microsoft.sqlserver.jdbc.SQLServerXADataSource.getXAConnection(SQLServerXADataSource.java:51)
com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection.createXAConnection(JDBCType4Connection.java:244)
com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4DatabaseManager.getThreadOwnedConnections(JDBCType4DatabaseManager.java:308)
com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandler.getConnection(JDBCType4SinglePhaseTrxnHandler.java:262)
com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandler.getConnection(JDBCType4SinglePhaseTrxnHandler.java:154)
com.ibm.broker.jdbctype4.connfact.JDBCType4ConnectionFactory.getConnection(JDBCType4ConnectionFactory.java:163)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
java.lang.reflect.Method.invoke(Method.java:619)
com.ibm.broker.plugin.MbNode.getJDBCType4Connection(MbNode.java:1575)
ru.cinimex.fr2back.FR2BACK_DB_InsertMessage_JavaCompute.fillInCache(FR2BACK_DB_InsertMessage_JavaCompute.java:115)
ru.cinimex.fr2back.FR2BACK_DB_InsertMessage_JavaCompute.createCache(FR2BACK_DB_InsertMessage_JavaCompute.java:102)
ru.cinimex.fr2back.FR2BACK_DB_InsertMessage_JavaCompute.evaluate(FR2BACK_DB_InsertMessage_JavaCompute.java:38)
com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.evaluate(MbRuntimeJavaComputeNode.java:339)
com.ibm.broker.plugin.MbNode.evaluate(MbNode.java:1491)


I've tried the latest versions of sqlserver4.jar and sqlserver41.jar, but the error is the same.
I can connect to the database using these drivers and the same settings from outside IIB.

I am using the following settings:
Code:
for URL: jdbc:sqlserver://[serverName]:[portNumber];DatabaseName=[databaseName]
for dsClassname: com.microsoft.sqlserver.jdbc.SQLServerXADataSource
for driverClassname: com.microsoft.sqlserver.jdbc.SQLServerDriver


When configuring the JDBCProvider, I'm setting values for:
jarsURL
serverName
portNumber
databaseName
Back to top
View user's profile Send private message
smdavies99
PostPosted: Sat Feb 20, 2016 9:31 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

I can see a lot of
Code:

com.ibm.jsse2.


Are you trying to use some sort of encrypted connection?


That aside, have you been albe to create a DB view of this Database in the Toolkit? That would prove that you can connect to the SQLServer via JDBC.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
gisly
PostPosted: Wed Feb 24, 2016 12:19 am    Post subject: Reply with quote

Apprentice

Joined: 10 May 2012
Posts: 29

Quote:
That aside, have you been albe to create a DB view of this Database in the Toolkit? That would prove that you can connect to the SQLServer via JDBC.

Thanks for the tip. Yes, it's created successfully.

Quote:
Are you trying to use some sort of encrypted connection?

Well, I do not specify any encryption myself.
When creating the the JDBC provider, I added a security identity.

The error occurs in:
Code:
Connection conn = getJDBCType4Connection(THE_NAME_OF_THE_PROVIDER, JDBC_TransactionType.MB_TRANSACTION_AUTO);
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Feb 24, 2016 7:43 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Have you verified that the SQLServer accepts JDBC connections from outside of broker?

Have you verified that the SQLServer requires or does not allow SSL connections?

Have you talked to your SQLServer admins?

... I don't remember what the name of the mqsi command to check a database connection is, nor if it works with JDBC connections. But the Toolkit database functions (not in IIB projects, but in data projects) should allow you to test the JDBC connection directly.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » JDBC TYPE 4 SQL Server 2008 cannot connect in IIB v 9
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.