Help coderanch get a
new server
by contributing to the fundraiser

sadish kumar

Greenhorn
+ Follow
since Jul 21, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sadish kumar

Actually we are getting the password from the user. By using the password, we are creating a file. After that we are serializing the file object. While serializing, i am getting this error.
Note: We are not write anything into the file. We are trying to encrypt the password.
15 years ago
Hi
While i am trying to serialize an object, i got the following error. I have attached the code. Thanks in Advance

java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2247)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2713)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:765)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:283)
My code is:



[edit]Add code tags. CR[/edit]
[ August 19, 2008: Message edited by: Campbell Ritchie ]
15 years ago
Hi all,

I get the following error while compiling my standalone java code to write data into a MQueue.
Find below the Error, followed by the Code.
What is the problem in this. Any suggestions please let me know. Thanks


Error:--------------------------------
Exception in thread "main" javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for '172.26.26.14:B1Q1'
at com.ibm.mq.jms.services.ConfigEnvironment.newExcep tion(ConfigEnvironment.java:546)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection. java:1450)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnec tion.java:960)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueCon nection.java:159)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueCon nection.java:77)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueu eConnection(MQQueueConnectionFactory.java:142)
at Inbound.main(Inbound.java:69)

--------------------------------

Code:--------------------------------
MQQueueConnectionFactory qcf = new MQQueueConnectionFactory();
QueueConnection connection=null;
QueueSession session=null;
Queue orderQueue=null;
QueueSender qs=null;
qcf.setQueueManager("B1Q1");
qcf.setHostName("172.26.26.14");
qcf.setPort(23);
qcf.setChannel("SYSTEM.DEF.SVRCONN");
qcf.setTransportType(0);
connection = (QueueConnection) qcf.createQueueConnection();
session = (QueueSession) connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
orderQueue = session.createQueue("PBS.OFT.NEMKONTO.AFSENDELSE") ;
qs = session.createSender(orderQueue);

--------------------------------
Thanks for your reply.

I am using stand alone java application which uses jms to send message to queue. Client installed the queue and they gave the queue name,queue manager name,etc to me... So if you have any sample programs, it will be good for me.
I want to receive a particular message from a queue. Is it possible using jms?
Hi,
I need to send a xml file to activeMQ... I have send the file as BytesMessage to MQ. But my new requirement is to send the file as it is to MQ. In MQ, my xml file should be reside as xml file not as bytesmessage... Can anyone help me...

Thanks in advance..

Sadish Kumar
SCJP5.0,SCWCD1.4
[ July 21, 2008: Message edited by: sadish kumar ]
I am working with Active MQ.. I need to send a file to MQ.. Previously i have written the contents of the file to bytes message and send it... But the client needs we should send the file as it is to MQ.
For example i need to send a xml file to MQ. In MQ, the file should not be in bytes.. Instead of that it should be a xml file in queue. Can anyone help me... Is it possible in java...