TCPS connector, client can't connect

"George H" <[email protected]> Thu, 21 Jun 2007 03:55:13 -0400
Newsgroups gmane.comp.java.openjms.user
Message-ID <[email protected]>
Hi,

I've set up the OpenJMS server with tcp and tcps connectors. I've done
all the steps from the openjms docs to create the keystore and
public-key files. I imported/exported them just as the docs say.

OpenJMS.xml file

<SecurityConfiguration securityEnabled="false"/>
<Connectors>
   <Connector scheme="tcp">
       <ConnectionFactories>
           <ConnectionFactory name="ConnectionFactory"/>
       </ConnectionFactories>
   </Connector>

   <Connector scheme="tcps">
       <ConnectionFactories>
           <ConnectionFactory name="TCPSConnectionFactory"/>
       </ConnectionFactories>
   </Connector>

   <Connector scheme="rmi">
       <ConnectionFactories>
           <QueueConnectionFactory name="JmsQueueConnectionFactory"/>
           <TopicConnectionFactory name="JmsTopicConnectionFactory"/>
       </ConnectionFactories>
   </Connector>

   <TcpsConfiguration
        port="3031"
        keyStore="${openjms.home}/config/openjms.keystore"
        keyStorePassword="mySuperSecretPass"
        keyStoreType="JKS"
        trustStoreType="JKS"
        needClientAuth="false"/>
-------------

The openjms server starts up fine without any errors.
I get problems when I try to connect my client to it. Below is the code:


//I use  jndi.properties file to specify the url
//
// java.naming.provider.url=tcps://myserver.net:3031
// java.naming.factory.initial=org.exolab.jms.jndi.InitialContextFactory

Hashtable<String,String> props = new Hashtable<String,String>();
props.put("org.exolab.jms.net.tcps.keyStore",
System.getProperty("user.dir")+File.separator+"openjms.keystore");
props.put("org.exolab.jms.net.tcps.keyStorePassword", "mySuperSecretPass");
props.put("org.exolab.jms.net.tcps.trustStore",
System.getProperty("user.dir")+File.separator+"openjms.keystore");

context = new InitialContext(props);
connectionFactory =
(TopicConnectionFactory)context.lookup("JmsTopicConnectionFactory");
connection = connectionFactory.createTopicConnection();
connection.start();
--------------

When I run this, I get the following exception when the program tries
to create the initial context

javax.naming.CommunicationException: Failed to get registry service
for URL: tcps://myserver.net:3031 [Root exception is
java.rmi.ConnectIOException: Failed to create connection; nested
exception is:
    org.exolab.jms.net.connector.ConnectException: Failed to start multiplexer]
    at org.exolab.jms.jndi.InitialContextFactory.getInitialContext(InitialContextFactory.java:146)

---
If I comment out all the props stuff and change the url to the regular
tcp then it all works fine.
Is there something I am missing when configuring the openjms server?
or missing something in the code when trying to connect ?

Thanks.

-- 
"Nothing is impossible for the person that doesn't have to do it"
"The probability of anything happening is in inverse ratio to its desirability"
"If I were a roman statue, I'd be made alabastard"
--
George H
[email protected]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/