• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

java.io.EOFException: null while writing my file

 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following code from my Java process (a spring boot app which listens to ActiveMQ) which is deployed on tomcat and it is throwing following error. Sometimes it has worked and I saw the file getting created at an appropriate directory. Howver, sometimes it fails.
Is there something wrong in my java code?

The error from tomcat log is shown below:


Code from my java process(spring boot app) deployedo on tomcat



Edited post to include more details below:

The following is the code which is listening to ActiveMQ continously and as soon as it sees COMPLETE, it sends out an email to the user after generating a file.


My RequestDao interface looks like the following:




And RequestDaoImpl.java looks like the following:






In application.properties file, I have the following defined:


 
Master Rancher
Posts: 4663
49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see where in that code that has anything to do with activemq?

The stacktrace doesn't involve your code at all, and seems to be activemq trying to read data from somewhere and failing.

Note, when posting code use code tags, not quote tags.
 
Jack Tauson
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Dave Tolls wrote:I don't see where in that code that has anything to do with activemq?

The stacktrace doesn't involve your code at all, and seems to be activemq trying to read data from somewhere and failing.

Note, when posting code use code tags, not quote tags.



Thanks for your message. I have edited my post with more details. Also updated original post code with code tags instead of quote.

Once it's approved by the staff member, you should be able to see it. Please take a look at it then.
 
Dave Tolls
Master Rancher
Posts: 4663
49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And the error is saying it is failing to read anything (indeed, looks like it's failing to connect to the only URI it has been given).

So that's the first place to look.
 
Jack Tauson
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Dave Tolls wrote:And the error is saying it is failing to read anything (indeed, looks like it's failing to connect to the only URI it has been given).

So that's the first place to look.



Looking at the documentation below:

https://activemq.apache.org/failover-transport-reference.html

There is an option for the client to be configured to use the failover transport to automatically reconnect to the broker when it loses its connection:



So if it fails with this URL - tcp://localhost:61616 ,then it could try to connect via another URL(tcp://remotehost:61616) as per the documentation.

But I am wondering what would be remotehost in this scenario, are they referring to ActiveMQ installed on other RHEL server?
 
    Bookmark Topic Watch Topic
  • New Topic