Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Broken Pipe Exception

 
FlatZ28
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When calling the below function I receive "java.lang.Exception: java.sql.SQLException: Io exception: Broken pipe" To add to the confusion, when running this function on my machine using weblogic 8.1 as a server, it works just fine and does not throw any exceptions but when place on a dedicated server also running weblogic 8.1 I get the exception above. Your help is greatly appreciated.
public RowSet executeQuery(String connectionJndiName, String query) throws Exception{
//executes a query against a JDNI datasource (passed in as connectionString)
try {
DataSource ds = getDataSource(connectionJndiName);

RowSetFactory factory = RowSetFactory.newInstance();
WLCachedRowSet rs = factory.newCachedRowSet();
rs.setDataSource(ds);
rs.setCommand(query);
rs.execute();

return rs;

} catch (SQLException e){
System.out.println(e.getMessage());
throw new Exception(e);
}

}
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FlatZ28,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic