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 » Domino to MQ connection

Post new topic  Reply to topic Goto page 1, 2  Next
 Domino to MQ connection « View previous topic :: View next topic » 
Author Message
NANNURU
PostPosted: Fri Jan 08, 2010 10:57 am    Post subject: Domino to MQ connection Reply with quote

Novice

Joined: 08 Jan 2010
Posts: 13

domino error messgae when connecting to MQ
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jan 08, 2010 11:49 am    Post subject: Re: Domino to MQ connection Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

NANNURU wrote:
domino error messgae when connecting to MQ


Congratulations. Was there a question? If so, would you care to share a few details? Like the error message (sorry, messgae) text? When the error occurs? Or would you prefer that we guessed?


_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
exerk
PostPosted: Fri Jan 08, 2010 1:58 pm    Post subject: Re: Domino to MQ connection Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Vitor wrote:
...Congratulations. Was there a question? If so, would you care to share a few details? Like the error message (sorry, messgae) text? When the error occurs? Or would you prefer that we guessed?



You're a little harsh my Master, surely the answer is because the first Domino toppled and the rest followed?
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jan 08, 2010 2:12 pm    Post subject: Re: Domino to MQ connection Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

exerk wrote:
Vitor wrote:
...Congratulations. Was there a question? If so, would you care to share a few details? Like the error message (sorry, messgae) text? When the error occurs? Or would you prefer that we guessed?



You're a little harsh my Master, surely the answer is because the first Domino toppled and the rest followed?


Ah - the poster is describing a cascade failure, where on connecting to WMQ one part of the application crashes, followed by another and another. I see.

I still think I'd see more if I could see the messgae text. And perhaps offer advice or a solution. It's unlikely but I'm prepared to risk it.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
NANNURU
PostPosted: Sun Jan 10, 2010 9:39 am    Post subject: Reply with quote

Novice

Joined: 08 Jan 2010
Posts: 13

Thanks a ll for the patient response, Sorry for the confusion , when i was typing my net got disconnected.

Actually i am connecting form Domnio to QM.

I have cretead the the Java agent in the in the lotuse notes server and i am connecting to the MQ server remotely by using the server connection channel.

I am giving the below details to get teh intial context factory.

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.mq.jms.context.WMQInitialContextFactory");
env.put(Context.PROVIDER_URL,"<server name>:<port where queue manager is running>/<server channel>");
javax.naming.InitialContext ctx = new InitialContext( env );

javax.jms.ConnectionFactory qcf = (ConnectionFactory) ctx.lookup("JMS_ConnectionFactory");

I am getting the below error.
Kindly advise..
Deatils:-

javax.naming.ServiceUnavailableException: Unable to connect to the target queue manager ,"<server name>:<port where queue manager is running>/<server channel>[Root exception is com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2009'.]
at com.ibm.mq.jms.context.MQContext.<init>(MQContext.java:196)
at com.ibm.mq.jms.context.WMQInitialContextFactory.getInitialContext(WMQInitialContextFactory.java:29)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:679)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:259)
at javax.naming.InitialContext.init(InitialContext.java:235)
at javax.naming.InitialContext.<init>(InitialContext.java:209)
at JavaAgent.NotesMain(JavaAgent.java:33)
at lotus.domino.AgentBase.runNotes(Unknown Source)
at lotus.domino.NotesThread.run(Unknown Source)
Caused by: com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2009'.
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:235)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11._createManagedConnection(MQClientManagedConnectionFactoryJ11.java:505)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11.createManagedConnection(MQClientManagedConnectionFactoryJ11.java:547)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:95)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:182)
at com.ibm.mq.MQQueueManagerFactory.obtainBaseMQQueueManager(MQQueueManagerFactory.java:869)
at com.ibm.mq.MQQueueManagerFactory.procure(MQQueueManagerFactory.java:761)
at com.ibm.mq.MQQueueManagerFactory.constructQueueManager(MQQueueManagerFactory.java:712)
at com.ibm.mq.MQQueueManagerFactory.createQueueManager(MQQueueManagerFactory.java:171)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:597)
at com.ibm.mq.pcf.PCFAgent.connect(PCFAgent.java:243)
at com.ibm.mq.pcf.PCFAgent.<init>(PCFAgent.java:177)
at com.ibm.mq.pcf.PCFMessageAgent.<init>(PCFMessageAgent.java:146)
at com.ibm.mq.jms.context.MQContext.<init>(MQContext.java:183)
... 8 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2009
at com.ibm.mq.jmqi.remote.internal.RemoteHconn.receiveAsyncTsh(RemoteHconn.java:1739)
at com.ibm.mq.jmqi.remote.internal.RemoteHconn.receiveTSH(RemoteHconn.java:1037)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnection.addHconn(RemoteConnection.java:791)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnectionPool.getConnection(RemoteConnectionPool.java:306)
at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:1371)
at com.ibm.mq.MQSESSION.MQCONNX_j(MQSESSION.java:915)
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:224)
... 21 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2195
at com.ibm.mq.jmqi.remote.internal.RemoteRcvThread.run(RemoteRcvThread.java:459)
at java.lang.Thread.run(Thread.java:810)
Caused by: java.lang.ThreadDeath
at java.lang.Thread.stop(Thread.java:1007)
at java.lang.ThreadGroup.stopHelper(ThreadGroup.java:684)
at java.lang.ThreadGroup.stopHelper(ThreadGroup.java:689)
at java.lang.ThreadGroup.stop(ThreadGroup.java:667)
at lotus.domino.AgentLoader.runAgent(Unknown Source)
Back to top
View user's profile Send private message
exerk
PostPosted: Sun Jan 10, 2010 9:45 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Search this site (and the Info Centre) for MQRC 2009, there will be plenty of hits on how/why it can occur.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
NANNURU
PostPosted: Sun Jan 10, 2010 9:51 am    Post subject: Reply with quote

Novice

Joined: 08 Jan 2010
Posts: 13

Thanks a lpt for the reply . I have tried using teh serach by MQRC 2009.

they were saying taht chekc the target queu manager and channel whether is it running, and security.

In my case my case both are working properly.

ONly my chnanle can open by "mqm " user.

In my domino client code when i am connecting, i did not pass any user id.

if so what is the id i need to pass.

Thanks,
Nannuru
Back to top
View user's profile Send private message
exerk
PostPosted: Sun Jan 10, 2010 9:58 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

More information on platform, WMQ version etc. would be of use before further advice is offered...
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
NANNURU
PostPosted: Sun Jan 10, 2010 9:59 am    Post subject: Reply with quote

Novice

Joined: 08 Jan 2010
Posts: 13

I am connecting lotus notes 8 to WMQ v7.

please let me kwno if you need more info.

Thanks,
Nannuru
Back to top
View user's profile Send private message
exerk
PostPosted: Sun Jan 10, 2010 10:02 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

exerk wrote:
More information on platform, WMQ version etc. would be of use before further advice is offered...


Still too little information provided...
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
NANNURU
PostPosted: Sun Jan 10, 2010 10:09 am    Post subject: Reply with quote

Novice

Joined: 08 Jan 2010
Posts: 13

Clinet is running on the lotus notes server and MQ server v7 is installed on the Linux 64 - bit server

import java.util.Hashtable;
import lotus.domino.*;
import javax.jms.Connection;
import javax.naming.*;
import javax.jms.*;
import java.io.*;
import java.io.Writer;
import java.io.StringWriter;
import java.io.PrintWriter;


public class JavaAgent extends AgentBase {

public static String getStackTrace(Throwable aThrowable) {
final Writer result = new StringWriter();
final PrintWriter printWriter = new PrintWriter(result);
aThrowable.printStackTrace(printWriter);
return result.toString();
}

public void NotesMain() {

try {
System.out.println("Started" );
lotus.domino.Session notesSession = getSession();
AgentContext agentContext = notesSession.getAgentContext();
Database db = agentContext.getCurrentDatabase();
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.mq.jms.context.WMQInitialContextFactory");

env.put(Context.PROVIDER_URL,","<server name>:<port where queue manager is running>/<server channel>"); ");

javax.naming.InitialContext ctx = new InitialContext( env );
System.out.println(ctx + "ctx");
javax.jms.ConnectionFactory qcf = (ConnectionFactory)
ctx.lookup("JMS_ConnectionFactory");
System.out.println(qcf + "qcf" );
javax.jms.Connection jmsCon = qcf.createConnection();
jmsCon.start();
System.out.println(jmsCon + "jmscon" );
javax.jms.Session jmsSess = jmsCon.createSession(true,javax.jms.Session.AUTO_ACKNOWLEDGE);
System.out.println(jmsSess + "jmsSess" );
javax.jms.Destination jmsDest = (Destination) ctx.lookup("<queu name>
System.out.println(jmsDest + "jmsDest" );

MessageConsumer jmsConsumer = jmsSess.createConsumer(jmsDest);
Message jmsIncoming = null;

do {
// The consumer will wait 1 second (1000 milliseconds) between polls
jmsIncoming = jmsConsumer.receive(1000);

if( jmsIncoming instanceof TextMessage ) {
System.out.println( "\n" + "Got message: "+((TextMessage) jmsIncoming).getText());
Document doc = db.createDocument();
doc.replaceItemValue("Form", "JMS_Imported");
doc.replaceItemValue("JMS_MsgID", jmsIncoming.getJMSMessageID());
doc.replaceItemValue("JMS_Message", ((TextMessage) jmsIncoming).getText());
doc.save(true, true);
}
jmsSess.commit();
} while ( jmsIncoming != null );
} catch(Exception e) {
System.out.println(getStackTrace(e));
}
}
}
Back to top
View user's profile Send private message
Vitor
PostPosted: Sun Jan 10, 2010 10:23 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

In this thread you said you were getting a bind error and are asking about connection factories. In this thread you're getting a 2009 error.

As you've been told before, it's considered rude here to double post. It's even ruder to keep 2 threads going, and worse to post conflicting or misleading information on them.

Review what you've been told in your 2 threads. Review your code. Decide what you're going to do, change your code as you see fit them try it. If you have ongoing problems, post a new thread with consistent information, a description of the problem and a coherent question.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
NANNURU
PostPosted: Sun Jan 10, 2010 10:26 am    Post subject: Reply with quote

Novice

Joined: 08 Jan 2010
Posts: 13

Thanks a lot for your suggestion.

Maily 2 problems i have connecting to the queue manager from the client and JMS bindings in the MQ server.

for JMS bindings i will definately craete the new topic.

Sorry for the inconvinence.

Thanks,
Pradeep
Back to top
View user's profile Send private message
Vitor
PostPosted: Sun Jan 10, 2010 10:33 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

You should also explain why (at a design level) you're using both kinds of connection. Directly binding to a queue manager is unusual enough, but it's even more unusual to combine it in a single solution with a client connection.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
NANNURU
PostPosted: Sun Jan 10, 2010 10:34 am    Post subject: Reply with quote

Novice

Joined: 08 Jan 2010
Posts: 13

I am new to the MQ.

Kindly explain me more clearly.

i did not got your point.

Thanks a lot for your patinace.

Thanks,
Nannuru
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Java / JMS » Domino to MQ connection
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.