Broken Pipe exception

L

laredotornado

Hi,

I'm using Java 1.5. What does a "broken pipe" exception mean in the
context of parsing a file? Below is my code and the exception is
generated on the "xmlReader.parse" line. Stack trace is below. Any
ideas for troubleshooting further are appreciated. Thanks, - Dave


GPGInputSource gpgInputSource =
new GPGInputSource(new FileInputStream(file));
try {
InputStream inputStream =
getInflatorStream(file.getName(), gpgInputSource.getInputStream
());
xmlReader.parse(new InputSource(inputStream));
} catch(AddressRequestLimitException e) {
logger.error(e.getMessage(), e);
} finally {
if(gpgInputSource.close() != 0)
logger.error(gpgInputSource.getStandardErrorString());
if(gpgOutputSource.close() != 0)
logger.error(gpgOutputSource.getStandardErrorString());
}


java.lang.RuntimeException: java.lang.RuntimeException: Broken Pipe!
at
myco.dor.dmv.driver.youthful.xml.AddressRequestFileHandler.endElement
(AddressRequestFileHandler.java:128)
at org.apache.xerces.parsers.AbstractSAXParser.endElement
(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.endElement
(Unknown Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
$FragmentContentDispatcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at myco.dor.dmv.driver.youthful.xml.AddressFileUtility.lookup
(AddressFileUtility.java:201)
at myco.dor.dmv.driver.youthful.AddressFileProcessor.execute
(AddressFileProcessor.java:178)
at myco.dor.dmv.driver.youthful.AddressFileProcessor.main
(AddressFileProcessor.java:82)
Caused by: java.lang.RuntimeException: Broken Pipe!
at
myco.dor.dmv.driver.youthful.PhpAddressNormalizer.normalAddress
(PhpAddressNormalizer.java:33)
at
myco.dor.dmv.driver.youthful.xml.AddressRequestFileHandler.endElement
(AddressRequestFileHandler.java:124)
... 12 more
 
M

markspace

laredotornado said:
Hi,

I'm using Java 1.5. What does a "broken pipe" exception mean in the
context of parsing a file? Below is my code and the exception is


It means "IO Error," basically. Something external to the process
closed or stopped the connection.
generated on the "xmlReader.parse" line. Stack trace is below. Any
ideas for troubleshooting further are appreciated. Thanks, - Dave


Google "broken pipe socket" to get some ideas what might be going on.
Basically you have to troubleshoot the network or the system, not the app.

Could be:

1. Network time out
2. CPU limit (time waiting/processing)
3. Other side closes connection/times out
4. Other local/remote network failure
5. Sunspots
6. ... other....
 
L

Lothar Kimmeringer

laredotornado said:
I'm using Java 1.5. What does a "broken pipe" exception mean in the
context of parsing a file?

The message and type of the Exception comes from your own code:
java.lang.RuntimeException: java.lang.RuntimeException: Broken Pipe!
at
myco.dor.dmv.driver.youthful.xml.AddressRequestFileHandler.endElement
(AddressRequestFileHandler.java:128)

so you might check there what can cause this.


Regards, Lothar
--
Lothar Kimmeringer E-Mail: (e-mail address removed)
PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

Always remember: The answer is forty-two, there can only be wrong
questions!
 
R

Roedy Green

All the explanations there are wrong. What this error means is that the
process reading the pipe has closed it, so you can't write more data to it.

Perhaps for this particular case. However if you google this error
message you will find others have traced the error message to the
causes mentioned.
--
Roedy Green Canadian Mind Products
http://mindprod.com

Nothing is so good as it seems beforehand.
~ George Eliot (born: 1819-11-22 died: 1880-12-22 at age: 61) (Mary Ann Evans)
 
E

EJP

Roedy said:
if you google this error
message you will find others have traced the error message to the
causes mentioned.

So you are assuming that everything on the Internet is true?

'Broken pipe' corresponds to EPIPE/SIGPIPE which has the single cause I
mentioned: 'EPIPE: An attempt is made to write to a pipe that is not
open for reading by any process'.
 
L

Lothar Kimmeringer

EJP said:
So you are assuming that everything on the Internet is true?

'Broken pipe' corresponds to EPIPE/SIGPIPE

Sorry to say that, but all the "broken pipe" messages I've seen
so far were lower case. In the OP we have a "Broken Pipe!" so
this message comes from different class than the usual.

As well, no sockets are used here but a FileInputStream, so
this message could come from GPGInputSource or one of the
classes the OP was implementing by himself.

So without further knowledge of the origin of this message
(and the RuntimeException being thrown instead of an IOException)
as I asked yesterday, it's just pure guessing.


Regards, Lothar
--
Lothar Kimmeringer E-Mail: (e-mail address removed)
PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

Always remember: The answer is forty-two, there can only be wrong
questions!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top