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 » IBM MQ Java / JMS » Websphere MQ v6.0.2 and jdk1.3.1_19/jsse1.0.3_04

Post new topic  Reply to topic
 Websphere MQ v6.0.2 and jdk1.3.1_19/jsse1.0.3_04 « View previous topic :: View next topic » 
Author Message
dlamond1
PostPosted: Wed Feb 14, 2007 8:42 am    Post subject: Websphere MQ v6.0.2 and jdk1.3.1_19/jsse1.0.3_04 Reply with quote

Novice

Joined: 14 Feb 2007
Posts: 12

I'm having some difficulties making this happen. If I use java 1.4 or 1.5, I don't have this problem but because of external reasons I'm stuck with 1.3.1 and jsse1.0.3. I've tried it on both Windows and Solaris.

Here is the error I received when I try to enable SSL.

Exception in thread "main" java.lang.NoSuchMethodError
at com.ibm.mq.SSLHelper.configureSSLSocket(SSLHelper.java:556)
at com.ibm.mq.SSLHelper.createSSLSocket(SSLHelper.java:150)
at com.ibm.mq.MQInternalCommunications.createSocketConnection(MQInternalCommunications.java:2264)
at com.ibm.mq.MQv6InternalCommunications$1.run(MQv6InternalCommunications.java:157)

Looking inside the jars, this method should be in com.ibm.mq.jar and in both case the file is in the CLASSPATH (I don't think I would get this far if not)

Here is the code:

Code:

public static void main(String[] args)
{
    QueueReceiver receiver = null;
    // Queue destionationQueue = null;
    QueueSession session = null;
    String queueName = null;
    String filename = null;
   
    if (args.length > 0) filename = args[0];
    else filename = "./jmstest.properties";
   
    try
    {
        MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
       
        System.out.println("Setting up the factory");           
        factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
       
        Properties mqclnt = new Properties();
   
        Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
   
    try
    {
            FileInputStream in = new FileInputStream(filename);
            mqclnt.load(in);
            in.close();

            if (mqclnt.getProperty("JMSTEST.trustStore") != null)
            {
                System.setProperty( "javax.net.ssl.keyStore", mqclnt.getProperty("JMSTEST.trustStore"));
                System.setProperty( "javax.net.ssl.keyStorePassword", mqclnt.getProperty("JMSTEST.trustStorePassword"));
                System.setProperty( "javax.net.ssl.trustStore", mqclnt.getProperty("JMSTEST.trustStore"));
                System.setProperty( "javax.net.ssl.trustStorePassword", mqclnt.getProperty("JMSTEST.trustStorePassword"));
            }
            factory.setHostName(mqclnt.getProperty("JMSTEST.hostname"));
            factory.setPort(Integer.parseInt (mqclnt.getProperty("JMSTEST.port")));
                factory.setChannel(mqclnt.getProperty("JMSTEST.channel"));
            factory.setQueueManager(mqclnt.getProperty("JMSTEST.queueManagerName"));
          queueName = mqclnt.getProperty("JMSTEST.queueName");


            if (mqclnt.getProperty("JMSTEST.SSL").equalsIgnoreCase("true"))
            {
                factory.setSSLCipherSuite(mqclnt.getProperty("JMSTEST.SLLCIPHER"));
            }
        }
        catch (IOException ioe)
        {   
            System.out.println("Error loading property file [" + ioe.toString() + "]\n");
            return;
        }
       
        System.out.println("Create and start the queue connection");           
        QueueConnection connection = factory.createQueueConnection("myuser", null);
        connection.start();
           
        if (queueName != null && queueName.length() > 0)
        {
            System.out.println("Create the queue session");           
            session = connection.createQueueSession(true, Session.CLIENT_ACKNOWLEDGE);
       
            System.out.println("Create the queue and the receiver");                               
            Queue sourceQueue = session.createQueue(queueName);
            receiver = session.createReceiver(sourceQueue);

            System.out.println("Receive");           
            TextMessage message = (TextMessage) receiver.receive(10000);
            if (message != null)
            {
                String text = message.getText();
                System.out.println(text);
            }
            System.out.println("Session close");                   
            session.close();
        }

        System.out.println("Connection close");                               
        connection.close();
       
    } catch (JMSException je)
    {
        System.err.println("caught " + je);
        Exception e = je.getLinkedException();
        if (e != null)
        {
            System.err.println("subexception: " + e);
        }

    } catch (Exception e)
    {
        e.printStackTrace();
    }
}


Anyone can figure what am I missing?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Feb 14, 2007 9:32 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I think you have to use the jsse that comes with MQ.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
dlamond1
PostPosted: Wed Feb 14, 2007 11:04 am    Post subject: Reply with quote

Novice

Joined: 14 Feb 2007
Posts: 12

I was under the impression I could use Sun Solaris Java 2 Standard Edition, with the JSSE classes.

See http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006263

Sun Solaris Java 2 Standard Edition, for the Sun Solaris operating environment, SDK V1.3.1. [Only if the JDK with the JSSE classes can be obtained. This is suitable for SSL support using Java, but certificate checking against Certificate Revocation Lists (CRLs) is not supported at this level.]

I'll forget windows as my real target is Solaris.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Feb 14, 2007 11:09 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Did you get the SDK with the JSSE?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
dlamond1
PostPosted: Wed Feb 14, 2007 11:37 am    Post subject: Reply with quote

Novice

Joined: 14 Feb 2007
Posts: 12

No, I add to download the jsse separately. Any idea where I can get a JDK with jsse bundled together?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Feb 14, 2007 12:03 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Can you use the JRE that comes with GSKit?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
dlamond1
PostPosted: Thu Feb 15, 2007 5:33 am    Post subject: Reply with quote

Novice

Joined: 14 Feb 2007
Posts: 12

Not really,

It is a third party application that is not certified for anything greater than a Sun 1.3.1.something JVM. They provided us with an MQ module that normally comes with a greater version of their application (and is most probably certified to work with a JVM that includes JSSE).

So unless there is an old version of the GSKIT with a 1.3.1.something jvm that I could grab somewhere ...
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Feb 15, 2007 6:13 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You need to tell the third party that their product is not usable in your environment, and they need to fix it or give you your money back.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Feb 15, 2007 1:28 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Be careful with JDK 1.3 and JCE (Java Cryptology Extension).

You might want to look into some of the commercially available JCE's.

The sun JCE and JSSE support packs do not deliver the full functionality they deliver @ 1.4 and the list of supported algorythms is somewhat restricted...

If your crypto algorythms match and are supported by MQ there is no reason why you should not be able to connect providing your MQ crypto setup matches.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
dlamond1
PostPosted: Fri Feb 16, 2007 7:35 am    Post subject: Reply with quote

Novice

Joined: 14 Feb 2007
Posts: 12

We use RC4_MD5_US on the channel and the corresponding SSL_RSA_WITH_RC4_128_MD5 on the java side. Here is the output with the same code (only listing the available cipher suite in 1.3.1), same config file only different JVMs.

/home/dlamond1>testjms.sh
=============================
Java 1.5
Setting up the factory
Create and start the queue connection
using user :null
Create the queue session
Create the queue and the receiver
Receive
Session close
Connection close
=============================
Java 1.4.2
Setting up the factory
Create and start the queue connection
using user :null
Create the queue session
Create the queue and the receiver
Receive
Session close
Connection close
=============================
Java 1.3.1_19 with JSSE 1_0_3
Cipher Suite 0 = SSL_DHE_DSS_WITH_DES_CBC_SHA
Cipher Suite 1 = SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA
Cipher Suite 2 = SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
Cipher Suite 3 = SSL_RSA_WITH_RC4_128_MD5
Cipher Suite 4 = SSL_RSA_WITH_RC4_128_SHA
Cipher Suite 5 = SSL_RSA_WITH_DES_CBC_SHA
Cipher Suite 6 = SSL_RSA_WITH_3DES_EDE_CBC_SHA
Cipher Suite 7 = SSL_RSA_EXPORT_WITH_RC4_40_MD5
Setting up the factory
Create and start the queue connection
using user :null
Exception in thread "main" java.lang.NoSuchMethodError
at com.ibm.mq.SSLHelper.configureSSLSocket(SSLHelper.java:556)
at com.ibm.mq.SSLHelper.createSSLSocket(SSLHelper.java:150)
at com.ibm.mq.MQInternalCommunications.createSocketConnection(MQInternalCommunications.java:2264)
at com.ibm.mq.MQv6InternalCommunications$1.run(MQv6InternalCommunications.java:157)

I can't get around that NoSuchMethodError. So it does seems I'm stuck.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Sat Feb 17, 2007 9:57 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

You didn't read the specs for WMQ v6.0. Here they are:
http://www-306.ibm.com/common/ssi/fcgi-bin/ssialias?subtype=ca&infotype=an&appname=iSource&supplier=897&letternum=ENUS205-094

If you scroll down to the Solaris or Windows sections, you will see that a JRE (or JDK) of v1.4.2 or higher is required.

Therefore, tell the external party that they are NOT compliant with IBM's WMQ v6.0 specs.

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Sat Feb 17, 2007 6:36 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

What that means is that if you go with Java 1.3 you need an MQ 5.3 client code base in order to be able to connect.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Websphere MQ v6.0.2 and jdk1.3.1_19/jsse1.0.3_04
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.