|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
failed to create a temporary queue from SYSTEM.DEFAULT.MODEL.QUEUEhi experts,
i get the following exception when i try to write data into the queue when using mule. But if i run from the java application it works fine. I am trying to connect MQ Over an SSL. Please help me out with this. 2009-11-02 07:21:41,383 [jmsConnector.dispatcher.1] ERROR [org.mule.DefaultExceptionStrategy] - Caught exception in Exception Strategy: MQJMS3000: failed to create a temporary queue from SYSTEM.DEFAULT.MODEL.QUEUE javax.jms.JMSException: MQJMS3000: failed to create a temporary queue from SYSTEM.DEFAULT.MODEL.QUEUE at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:586) at com.ibm.mq.jms.MQConnection.createTemporaryQueue(MQConnection.java:2509) at com.ibm.mq.jms.MQSession.createTemporaryQueue(MQSession.java:4592) at com.ibm.mq.jms.MQQueueSession.createTemporaryQueue(MQQueueSession.java:290) at org.mule.transport.jms.Jms11Support.createTemporaryDestination(Jms11Support.java:247) at org.mule.transport.jms.JmsMessageDispatcher.getReplyToDestination(JmsMessageDispatcher.java:483) at org.mule.transport.jms.JmsMessageDispatcher.dispatchMessage(JmsMessageDispatcher.java:171) at org.mule.transport.jms.JmsMessageDispatcher.doDispatch(JmsMessageDispatcher.java:73) at org.mule.transport.AbstractMessageDispatcher$Worker.run(AbstractMessageDispatcher.java:262) at org.mule.work.WorkerContext.run(WorkerContext.java:310) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) at java.lang.Thread.run(Thread.java:619) |
|
|
Re: failed to create a temporary queue from SYSTEM.DEFAULT.MODEL.QUEUEThis not really mule specific error but an MQ authorization error. The QueueSession.createTemporaryQueue method needs access to the model queue that is defined in the QueueConnectionFactory temporaryModel field (by default this is SYSTEM.DEFAULT.MODEL.QUEUE).
I assume you are now accessing MQ using a different user than without SSL. Correct? P.S. If you have the complete SSL setup working please post the config to share with the community .... --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: failed to create a temporary queue from SYSTEM.DEFAULT.MODEL.QUEUEHi Richard ,
It was really helpful. thanks alot I set the Authentication to the user using the setmauth command and then tried it worked. and as you wanted am providing the mule configuration : <?xml version="1.0" encoding="UTF-8"?> <mule xmlns="http://www.mulesource.org/schema/mule/core/2.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.2" xmlns:file="http://www.mulesource.org/schema/mule/file/2.2" xmlns:spring="http://www.springframework.org/schema/beans" xsi:schemaLocation=" http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd http://www.mulesource.org/schema/mule/jms/2.2 http://www.mulesource.org/schema/mule/jms/2.2/mule-jms.xsd http://www.mulesource.org/schema/mule/file/2.2 http://www.mulesource.org/schema/mule/file/2.2/mule-file.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> <!-- Direct MQ Configuration --> <spring:bean id="mqconnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory"> <spring:property name="hostName" value="<ip addr of server>" /> <spring:property name="port" value="1415" /> <spring:property name="channel" value="<channel-name>" /> <spring:property name="queueManager" value="<queueManager>" /> <spring:property name="transportType" value="1" /> <spring:property name="SSLCipherSuite" value="SSL_RSA_WITH_NULL_MD5" /> <spring:property name="SSLSocketFactory" ref="SSLSocketFactoryClass"></spring:property> </spring:bean> <spring:bean name="SSLSocketFactoryClass" class="aero.sita.bagmanager.bsmtomq.sender.DummyMQSSLSocketfactory" > <spring:constructor-arg value="/var/mqm/clients/ssl/KeyringClient.jks"> </spring:constructor-arg> </spring:bean> <jms:websphere-connector name="jmsConnector" acknowledgementMode="AUTO_ACKNOWLEDGE" persistentDelivery="true" specification="1.1" connectionFactory-ref="mqconnectionFactory" > </jms:websphere-connector> <jms:endpoint name="bsmInputQueue" queue="V" connector-ref="jmsConnector" > </jms:endpoint> <file:connector name="fileConnector" pollingFrequency="10000" streaming="false" moveToPattern="${SYSTIME}.txt"> </file:connector> <model name="bsm-mqsender-model"> <service name="bsmMQSenderBean"> <inbound> <file:inbound-endpoint path="/tmp/input/mq/bsm" connector-ref="fileConnector" synchronous="true"> <file:file-to-string-transformer /> </file:inbound-endpoint> </inbound> <outbound> <pass-through-router> <jms:outbound-endpoint ref="bsmInputQueue"> <jms:object-to-jmsmessage-transformer /> </jms:outbound-endpoint> </pass-through-router> </outbound> </service> </model> </mule> i am using a dummy SSLSocketFactory in the configuration. The following code is the dummy socketfactory. import java.io.FileNotFoundException; import java.io.IOException; import java.net.InetAddress; import java.net.Socket; import java.net.SocketException; import java.net.UnknownHostException; import java.security.KeyManagementException; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.UnrecoverableKeyException; import java.security.cert.CertificateException; import javax.net.SocketFactory; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManagerFactory; public class DummyMQSSLSocketfactory extends SSLSocketFactory { private SSLSocketFactory sslSocketFactory = null; public DummyMQSSLSocketfactory() { super(); } public DummyMQSSLSocketfactory ( String fileLocation) { KeyStore keyStore; KeyStore trustStore; try { Class.forName("com.sun.net.ssl.internal.ssl.Provider"); System.out.println("JSSE is installed correctly!"); String pass = "password"; char[ ] password = pass.toCharArray ( ); keyStore = KeyStore.getInstance ( "JKS" ); java.io.FileInputStream fis = new java.io.FileInputStream ( fileLocation ); keyStore.load ( fis, password ); System.out.println("Number of keys on JKS: " + Integer.toString(keyStore.size())); java.io.FileInputStream fis1 = new java.io.FileInputStream ( fileLocation ); trustStore = KeyStore.getInstance ( "JKS" ); trustStore.load ( fis1,null ); // Create a default trust and key manager TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); // Initialise the managers trustManagerFactory.init(trustStore); keyManagerFactory.init(keyStore,password); // Get an SSL context. // Note: not all providers support all CipherSuites. But the // "SSL_RSA_WITH_3DES_EDE_CBC_SHA" CipherSuite is supported on both SunJSSE // and IBMJSSE2 providers // Accessing available algorithm/protocol in the SunJSSE provider // see http://java.sun.com/javase/6/docs/technotes/guides/security/SunProviders.html SSLContext sslContext = SSLContext.getInstance("SSLv3"); System.out.println("SSLContext provider: " + sslContext.getProvider().toString()); // Initialise our SSL context from the key/trust managers sslContext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null); // Get an SSLSocketFactory to pass to WMQ sslSocketFactory = sslContext.getSocketFactory(); fis.close ( ); fis1.close ( ); } catch ( KeyStoreException e ) { // TODO Auto-generated catch block e.printStackTrace ( ); } catch ( FileNotFoundException e ) { // TODO Auto-generated catch block e.printStackTrace ( ); } catch ( NoSuchAlgorithmException e ) { // TODO Auto-generated catch block e.printStackTrace ( ); } catch ( CertificateException e ) { // TODO Auto-generated catch block e.printStackTrace ( ); } catch ( IOException e ) { // TODO Auto-generated catch block e.printStackTrace ( ); } catch ( ClassNotFoundException e ) { // TODO Auto-generated catch block e.printStackTrace(); } catch ( UnrecoverableKeyException e ) { // TODO Auto-generated catch block e.printStackTrace(); } catch ( KeyManagementException e ) { // TODO Auto-generated catch block e.printStackTrace(); } } public static SocketFactory getDefault ( ) { return new DummyMQSSLSocketfactory ( ); } public SSLSocketFactory getSslSocketFactory ( ) { return sslSocketFactory; } public void setSslSocketFactory ( SSLSocketFactory sslSocketFactory ) { this.sslSocketFactory = sslSocketFactory; } @Override public Socket createSocket ( ) throws IOException { Socket socket; try { if ( sslSocketFactory == null ) { getDefault ( ); } socket = sslSocketFactory.createSocket ( ); } catch ( SocketException soc ) { socket = new Socket ( ); } return socket; } @Override public Socket createSocket ( Socket s, String host, int port, boolean autoClose ) throws IOException { return sslSocketFactory.createSocket ( s, host, port, autoClose ); } @Override public String[ ] getDefaultCipherSuites ( ) { return sslSocketFactory.getDefaultCipherSuites ( ); } @Override public String[ ] getSupportedCipherSuites ( ) { return sslSocketFactory.getSupportedCipherSuites ( ); } @Override public Socket createSocket ( String arg0, int arg1 ) throws IOException, UnknownHostException { // TODO Auto-generated method stub return sslSocketFactory.createSocket ( arg0, arg1 ); } @Override public Socket createSocket ( InetAddress arg0, int arg1 ) throws IOException { // TODO Auto-generated method stub return sslSocketFactory.createSocket ( arg0, arg1 ); } @Override public Socket createSocket ( String arg0, int arg1, InetAddress arg2, int arg3 ) throws IOException, UnknownHostException { // TODO Auto-generated method stub return sslSocketFactory.createSocket ( arg0, arg1, arg2, arg3 ); } @Override public Socket createSocket ( InetAddress arg0, int arg1, InetAddress arg2, int arg3 ) throws IOException { // TODO Auto-generated method stub return sslSocketFactory.createSocket ( arg0, arg1, arg2, arg3 ); } } Hope this would help you. once again thank you for the reply. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: failed to create a temporary queue from SYSTEM.DEFAULT.MODEL.QUEUEThanks for sharing!
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |