java.io.IOException: Broken pipe

What are the possible causes for this exception when running code on a linux machine that has previosuly worked perfectly on a windows machine in a tomcat environment?

I'm using the following api:

http://eclipse.crosscoreop.com/doc/javadoc/JavaEclipseInterface/index.html

and I get the following errors:

java.io.IOException: Broken pipe

at java.io.FileOutputStream.writeBytes(Native Method)

at java.io.FileOutputStream.write(FileOutputStream.java:260)

at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)

at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)

at sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:410)

at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152)

at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)

at java.io.BufferedWriter.flush(BufferedWriter.java:236)

at com.parctechnologies.eclipse.OutOfProcessEclipse.startLocalEclipse(OutOfProcessEclipse.java:290)

at com.parctechnologies.eclipse.OutOfProcessEclipse.<init>(OutOfProcessEclipse.java:73)

at com.jae.jaeQuestion.QuestionSet.<init>(QuestionSet.java:79)

at com.jae.jaeQuestion.QuestionServlet.getOutput(QuestionServlet.java:96)

at com.jae.jaeQuestion.QuestionServlet.doGet(QuestionServlet.java:63)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)

at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)

at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)

at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)

at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

at java.lang.Thread.run(Thread.java:595)

then subsequently:

java.lang.NumberFormatException: null

at java.lang.Integer.parseInt(Integer.java:415)

at java.lang.Integer.parseInt(Integer.java:497)

at com.parctechnologies.eclipse.OutOfProcessEclipse.<init>(OutOfProcessEclipse.java:82)

at com.jae.jaeQuestion.QuestionSet.<init>(QuestionSet.java:79)

at com.jae.jaeQuestion.QuestionServlet.getOutput(QuestionServlet.java:96)

at com.jae.jaeQuestion.QuestionServlet.doGet(QuestionServlet.java:63)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:25)

I get similar errors when I run the code as a standalone program (with main method).

The code works perfectly in tomcat running on windows.

Thanks,

Lilalfyalien

Message was edited by:

lil_alfy_alien

Message was edited by:

lil_alfy_alien

[3833 byte] By [lil_alfy_aliena] at [2007-11-26 16:20:04]
# 1
Broken pipe refers to a networking error, it has little to do with the code. I'm sorry to say that the solution will probably lie in the configuration of the machine you are running the application on.
gimbal2a at 2007-7-8 22:43:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Networking? They're both internal processes?!
lil_alfy_aliena at 2007-7-8 22:43:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
It seems like the file You are trying to write to is not available on that machine.> at java.io.FileOutputStream.write(FileOutputStream.java:260)> ...> com.jae.jaeQuestion.QuestionServlet.getOutput(QuestionServlet.java:96)
_Dima_a at 2007-7-8 22:43:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
This is very worrying as I've basically just copied exactly what there was on my windows machine and installed all the files needed.... which would lead me to think that the error is being generated from code whcih I haven't written :S and therefore can't debug.
lil_alfy_aliena at 2007-7-8 22:43:37 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
Have You compiled the app on linux?What is constructor for com.jae.jaeQuestion.QuestionSet?What is Your use of com.parctechnologies.eclipse.OutOfProcessEclipse?
_Dima_a at 2007-7-8 22:43:37 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6

The other app comes precompiled- it's Eclipse Prolog. The com.parctechnologies.eclipse package is an interface between Eclipse Prolog and Java. And because I'll be producing some very complicated data structures I need an interface to wrap these data structures.

The constructor for QuestionSet requires an int, a String and another String. It's very simple.

lil_alfy_aliena at 2007-7-8 22:43:37 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7
I would say this wrapper tries to serialize itself to some unreacheble destination...See docs for it. May be it is just a matter of path.
_Dima_a at 2007-7-8 22:43:37 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 8

By running java -verbose on the file I've determined that it's dying when it tries to run a process which uses:

java.net.InetAddress from shared objects file

This would imply that it's a networking error, it would also explain the other Number exceptions I was getting as teh code is obviously trying to convert a string which represents an IP address into sepearate numbers. This seems a little pointless as it's all being run locally but hey, I didn't write the code.

So... it's definitely a networking error, does anyone have any further ideas on how I can solve this? I'm quite a n00b when it comes to linux...

Message was edited by:

lil_alfy_alien

lil_alfy_aliena at 2007-7-8 22:43:37 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...