aspose file tools*
The moose likes JDBC and the fly likes Broken Pipe Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Broken Pipe Exception" Watch "Broken Pipe Exception" New topic
Author

Broken Pipe Exception

FlatZ28
Greenhorn

Joined: Aug 15, 2003
Posts: 1
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

Joined: Dec 10, 2001
Posts: 7023
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!


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Broken Pipe Exception