Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8072005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:52:27+00:00 2026-06-05T13:52:27+00:00

Getting java.io.EOFException while sending a large java object using AciveMQ. Below is the large

  • 0

Getting java.io.EOFException while sending a large java object using AciveMQ.

Below is the large object that I am trying to send

class TestDataBean implements Serializable
{
private String testName = "TestName";
private String testDesc = "testDesc";

private String bigData = getBigString();

@Override
public String toString() {
    return testName +" : "+testDesc+" : "+bigData.length();
}


private static String getBigString() 
{
    StringBuffer stringBuffer = new StringBuffer();

    for(int i=0;i<1000; i++)
    {
        stringBuffer.append("tsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss");
    }

    return stringBuffer.toString();
}

}

Below is the stackTrace.

java.io.EOFException
    at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.readUTFBody(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.readLongUTF(Unknown Source)
at java.io.ObjectInputStream.readString(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)Recieved MSG : 0 : null

at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at poc_publisher_subsciber.common.CommonUtil.getObject(CommonUtil.java:18)
at blob_messages.bsr_clients.GenesisMessageListener.onMessage(GenesisMessageListener.java:30)
at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1298)
at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131)
at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202)
at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Producer showing that its sending a proper object. But on consumer side it throws above exception.

I have also tried below configurations with ActiveMQConnectionFactory

ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(url);
        factory.setProducerWindowSize(1024000000);
        factory.setSendTimeout(600000);

Please suggest me some solution.
Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T13:52:29+00:00Added an answer on June 5, 2026 at 1:52 pm

    Sorry, this was my mistake. Let me explain u what I was doing. – I was sending the message as StreamMessage – And reading this one in a byte array The size of data I was sending was about 70K bytes and As a SILLY MISTAKE the array I had was jus 10K capacity. n so I was getting this EOFException. Sorry I take ur time. And posting this hoping that no one else would be doing similar mistake 🙂 Thanks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting below error whilst trying to persist an object that has a
I used the SystemEnvironment class in Java for getting system information. In that I
I'm using JBOSS Seam 2.0 with JBoss 6 to send emails. I'm getting java.lang.UnsupportedOperationException
I am getting java.lang.UnsatisfiedLinkError while trying to get IcePush client up and running. GWTPushContext.getInstance()
I'm getting a java outOfMemoryError when I call this method - i'm using it
IN JAVA CODE IN JSP as below i m getting null value for fieldnoOfRecords.
I am getting java.util.concurrentmodificationexception for my implementation below try{ Date fromDate = new Date().parse(yyyy-MM-dd,
I am getting java.lang.VerifyError.I am posting my log-file and code below. I have looked
I am getting Java: Could not find the main class. Program will exit when
I'm trying to use JNI and getting java.lang.UnsatisfiedLinkError. Unlike the other million questions asked

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.