|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
.Cannot find any provider supporting RC4/ECB/NOPADDING error |
« View previous topic :: View next topic » |
Author |
Message
|
martc |
Posted: Mon Aug 17, 2015 9:08 am Post subject: .Cannot find any provider supporting RC4/ECB/NOPADDING error |
|
|
Apprentice
Joined: 23 Mar 2005 Posts: 39
|
Hi, I am attempting to call a Composite Stored Procedure on a JCN and am receiving the following error. This is only happening when executing on the IIB environment (9.x or 10x). Running the JDBC code on a non IIB environment (i.e. SUN Java JDK) does not cause any issues.
Obviously there seems to be conflicts with the IBM JDK implementation as the stack shows the invocation in: com.ibm.crypto.provider.RC4.engineSetMode(Unknown Source)...
Is there a way around this? Anythoughts, solutions.
The java code is a straightforward JDBC call:
public ResultSet getPDDResultSet(String storedProcedure, String jdbcDbUrl, String jdbcDbClass, String username,
String password) throws SQLException, ClassNotFoundException, JSONException, IOException {
if (jdbcDbUrl == null || jdbcDbUrl.isEmpty() || jdbcDbUrl.equalsIgnoreCase("null")) {
jdbcDbUrl = "jdbc:compositesw:dbapi@RCOVLNX031:9401?domain=composite®isterOutputCursors=false&dataSource=mm";
}
if (jdbcDbClass == null || jdbcDbClass.isEmpty() || jdbcDbClass.equalsIgnoreCase("null")) {
jdbcDbClass = "cs.jdbc.driver.CompositeDriver";
}
if (username == null || username.isEmpty() || username.equalsIgnoreCase("null")) {
username = "yy";
}
if (password == null || password.isEmpty() || password.equalsIgnoreCase("null")) {
password = "xx";
}
Connection dbConnection = null;
Class.forName(jdbcDbClass);
Error here: dbConnection = DriverManager.getConnection(jdbcDbUrl, username, password);
CallableStatement theCallableStatement = null;
theCallableStatement = dbConnection.prepareCall(storedProcedure);
ResultSet theResultSet = theCallableStatement.executeQuery();
System.out.println("Got resultset Column Count,Row count:" +
theResultSet.getMetaData().getColumnCount()+","+theResultSet.getFetchSize());
// System.out.println("Got resultset row Count:" +
// theResultSet.getFetchSize());
return theResultSet;
}
Stack Trace:
Exception in thread "main" cs.jdbc.driver.protocol.UnexpectedException: java.security.NoSuchAlgorithmException: Cannot find any provider supporting RC4/ECB/NOPADDING
at cs.jdbc.driver.DriverOptions.encrypt(DriverOptions.java:422)
at cs.jdbc.driver.DriverOptions.encode(DriverOptions.java:164)
at cs.jdbc.driver.ClientChannelConnection$4.encode(ClientChannelConnection.java:1075)
at cs.jdbc.driver.ClientChannelConnection.invokeCommand(ClientChannelConnection.java:965)
at cs.jdbc.driver.ClientChannelConnection.init(ClientChannelConnection.java:1097)
at cs.jdbc.driver.ClientChannelConnection.<init>(ClientChannelConnection.java:189)
at cs.jdbc.driver.CompositeConnection.getChannel(CompositeConnection.java:165)
at cs.jdbc.driver.DatabaseMetaDataImpl.<init>(DatabaseMetaDataImpl.java:39)
at cs.jdbc.driver.CompositeConnection.<init>(CompositeConnection.java:123)
at cs.jdbc.driver.CompositeDriver.connect(CompositeDriver.java:59)
at cs.jdbc.driver.CompositeDriver.connect(CompositeDriver.java:22)
at java.sql.DriverManager.getConnection(DriverManager.java:590)
at java.sql.DriverManager.getConnection(DriverManager.java:232)
at com.ft.pdd.PDSService.getPDDString(PDSService.java:52)
at PDSClient.main(PDSClient.java:21)
Caused by: java.security.NoSuchAlgorithmException: Cannot find any provider supporting RC4/ECB/NOPADDING
at javax.crypto.Cipher.getInstance(Unknown Source)
at cs.jdbc.driver.protocol.Encryption.symmEncrypt(Encryption.java:44)
at cs.jdbc.driver.DriverOptions.encrypt(DriverOptions.java:418)
... 14 more
Caused by: java.security.NoSuchAlgorithmException: Mode is not supported in RC4
at com.ibm.crypto.provider.RC4.engineSetMode(Unknown Source)
at javax.crypto.Cipher$a_.a(Unknown Source)
... 17 more
09:54:18.080 ERROR: [EventDispatcher.cpp:79] Exception in EventDispatcher thread: TransportException [510/201] there isn't an open connection to a debugger
|
|
Back to top |
|
 |
mqjeff |
Posted: Mon Aug 17, 2015 9:14 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You should really be looking at the JDBC type 4 connections available from the Broker Java API directly. This then uses JDBCProvider configurable services that make it much easier for your admin to promote flows through different environments.
You also probably need to double-check the jar files you have available to the flow. |
|
Back to top |
|
 |
martc |
Posted: Mon Aug 17, 2015 1:06 pm Post subject: |
|
|
Apprentice
Joined: 23 Mar 2005 Posts: 39
|
I did that and still getting the same error. I created a Type4 JDBC Configurable service with the parms below:
Code: |
mqsichangeproperties RCOLNX79511 -c JDBCProviders -o COMPOSITE -n connectionUrlFormat,
connectionUrlFormatAttr1,
connectionUrlFormatAttr2,
connectionUrlFormatAttr3,
connectionUrlFormatAttr4,
connectionUrlFormatAttr5,
databaseName,
databaseSchemaNames,
databaseType,
databaseVersion,
description,
environmentParms,
jarsURL,
jdbcProviderXASupport,
maxConnectionPoolSize,
portNumber,
securityIdentity,
serverName,
type4DatasourceClassName,
type4DriverClassName
-v "jdbc:compositesw:dbapi@RCOVLNX031:9401?domain=composite®isterOutputCursors=false&dataSource=GlobalDataServices",
"",
"",
"",
"",
"",
"GlobalDataServices",
"",
"Composite",
"6.2.2",
"Composite JDBC Type 4",
"default_none",
"/var/mqsi/shared-classes",
"true",
"0",
"9401",
"dbapi@RCOVLNX031",
"RCOVLNX031",
"cs.jdbc.driver.CompositeDriver",
"cs.jdbc.driver.CompositeDriver"
code in the JCN:
Connection conn = getJDBCType4Connection("COMPOSITE",
JDBC_TransactionType.MB_TRANSACTION_AUTO);
Error:
[i]
[Broker 'RCOLNX79511'; Execution Group 'APIGEE_API_POC'; Message Flow 'DBFlow'; Node 'Java Compute'; Node Type 'DBFlow_JavaCompute, message: java.security.NoSuchAlgorithmException: Cannot find any provider supporting RC4/ECB/NOPADDING stack trace: [cs.jdbc.driver.DriverOptions.encrypt(DriverOptions.java:422)
cs.jdbc.driver.DriverOptions.encode(DriverOptions.java:164)
cs.jdbc.driver.ClientChannelConnection$4.encode(ClientChannelConnection.java:1075)
cs.jdbc.driver.ClientChannelConnection.invokeCommand(ClientChannelConnection.java:965)
cs.jdbc.driver.ClientChannelConnection.init(ClientChannelConnection.java:1097)
cs.jdbc.driver.ClientChannelConnection.<init>(ClientChannelConnection.java:189)
cs.jdbc.driver.CompositeConnection.getChannel(CompositeConnection.java:165)
cs.jdbc.driver.DatabaseMetaDataImpl.<init>(DatabaseMetaDataImpl.java:39)
cs.jdbc.driver.CompositeConnection.<init>(CompositeConnection.java:123)
cs.jdbc.driver.CompositeDriver.connect(CompositeDriver.java:59)
cs.jdbc.driver.CompositeDriver.connect(CompositeDriver.java:22)
com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection.createNonXAConnection(JDBCType4Connection.java:394)
com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4DatabaseManager.getThreadOwnedConnections(JDBCType4DatabaseManager.java:310)
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)
DBFlow_JavaCompute.getMashupFundList(DBFlow_JavaCompute.java:79)
DBFlow_JavaCompute.evaluate(DBFlow_JavaCompute.java:26)
com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.evaluate(MbRuntimeJavaComputeNode.java:339)
com.ibm.broker.plugin.MbNode.evaluate(MbNode.java:1491)]]
[/i] |
|
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Aug 17, 2015 2:44 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Your connection URLFormat is all wrong...
It's supposed to hold a template, not the values...
Check it out in the infocenter.
Also looking at your previous post, I thought RC4 was no longer allowed as a cipher...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
martc |
Posted: Thu Aug 20, 2015 11:06 pm Post subject: |
|
|
Apprentice
Joined: 23 Mar 2005 Posts: 39
|
Got this resolved with an updated JDBC Driver. The newer driver did not use the older vulnerable RC4 cipher.
Thanks |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Aug 21, 2015 4:33 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
martc wrote: |
Got this resolved with an updated JDBC Driver. The newer driver did not use the older vulnerable RC4 cipher.
Thanks |
You *still* need to change your ConnectionURL to a pattern, if you did not *also* do that. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|