Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMS , MQSeries and WebSphere

 
purushottam joshi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am working with JMS , MQSeries on Websphere.I am working with the migration of an application developed on Weblogic
to Websphere.I am facing a problem in which folowing exception
thrown while sending a message to a queue .The exception is as follows :
avax.jms.MessageNotWriteableException: MQJMS0008: JMS Client attempts to write a read-only message
at javax.jms.JMSException.<init>(JMSException.java:50)
at javax.jms.MessageNotWriteableException.<init>(MessageNotWriteableException.java:33)
at com.ibm.jms.JMSMessage.newMessageNotWriteableException(JMSMessage.java:2513)
at com.ibm.jms.JMSObjectMessage.setObject(JMSObjectMessage.java:257)
at SIDataMining.run(SIDataMining.java:99)
at java.lang.Thread.run(Thread.java:481)
I don't know what does it mean by read only messages.
If anybody knows the solution to the problme please reply
me as soon as possible.I'll appreciate.
Thanks
Purushottam
 
Dave Bautis
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you must change the parameter
on the message creation to write
it is currently read
 
Sameer Bhardwaj
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Purushottam,
can u please throw some light on how are you using the JMS with mq series. When i run the JMSAdmin tool it throws the following error
5648-C60 (c) Copyright IBM Corp. 1999. All Rights Reserved.
Starting MQSeries classes for Java(tm) Message Service Administration
Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/rmi/iiop/ORB
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.omg.CORBA.ORB.create_impl(Unknown Source)
at org.omg.CORBA.ORB.init(Unknown Source)
at com.ibm.CORBA.iiop.GlobalORBFactory.init(GlobalORBFactory.java:42)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:196)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:93)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:65)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:47)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:343)
at com.ibm.ejs.ns.jndi.CNInitialContextFactory.initORB(CNInitialContextFactory.java:355)
please let me know
Sameer
Originally posted by purushottam joshi:
Hi
I am working with JMS , MQSeries on Websphere.I am working with the migration of an application developed on Weblogic
to Websphere.I am facing a problem in which folowing exception
thrown while sending a message to a queue .The exception is as follows :
avax.jms.MessageNotWriteableException: MQJMS0008: JMS Client attempts to write a read-only message
at javax.jms.JMSException.<init>(JMSException.java:50)
at javax.jms.MessageNotWriteableException.<init>(MessageNotWriteableException.java:33)
at com.ibm.jms.JMSMessage.newMessageNotWriteableException(JMSMessage.java:2513)
at com.ibm.jms.JMSObjectMessage.setObject(JMSObjectMessage.java:257)
at SIDataMining.run(SIDataMining.java:99)
at java.lang.Thread.run(Thread.java:481)
I don't know what does it mean by read only messages.
If anybody knows the solution to the problme please reply
me as soon as possible.I'll appreciate.
Thanks
Purushottam

 
Manzoor M
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Purushottam,
I would like to know the architecture on integrating JMS, MQ Series and WebSphere App. Server and how you are currently doing it.
Could you pls. reply me.
Thanks,
Manzoor
manzooram@yahoo.com
 
lzhang5
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The architect of JMS, MQ and Websphere is:
MQ JMS is a JMS Java wrap on the MQ.
You can use MQ JMS to send and receive message under JMS model. JMS is also a way of communication between different Web apps.
You should use a servlet or a Message Bean (Only in EJB 2.0) to implement the onMessage() method to do that.
Lance
 
pavankumark kumar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Purushottam,
u will get that problem when u create a StreamMessage and try message.writeString("blah bla"); in a loop..This is one of the conditions but not all..U need to use message=createStreamMessage() also in loop..But a textMessage can be done in a loop with message.setText("blah");..it sends as many messages as u loop..but not with stream messages...MQAuthors should clarify this behavior
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic