Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error calling an EJB method passing a large byte array.

0 views
Skip to first unread message

praveen

unread,
Jan 10, 2005, 11:28:00 AM1/10/05
to
I have a stateless session bean with a method that take a byte array as
an argument to save the incoming data to a file.


Remote client, when invokes this method with a smaller size file it
works fine but when i try to send a file of size about 100mb it raises
an exception. Here is the stack trace:


java.net.SocketException: Software caused connection abort: socket
write error
java.rmi.UnmarshalException: Software caused connection abort: socket
write error; nested exception is:
java.net.SocketException: Software caused connection abort: socket
write error
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:297)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
at
com.burntsand.hmco.dam.aps.session.statelessSession_oizvbi_EOImpl_812_WLStub.setPublicationResult(Unknown
Source)
at
com.burntsand.hmco.dam.aps.session.APSClient.main(APSClient.java:187)
Caused by: java.net.SocketException: Software caused connection abort:
socket write error
at
weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
... 3 more
Caused by: java.net.SocketException: Software caused connection abort:
socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at weblogic.socket.SocketMuxer.write(SocketMuxer.java:721)
at weblogic.rjvm.t3.T3JVMConnection.sendMsg(T3JVMConnection.java:723)
at
weblogic.rjvm.MsgAbbrevJVMConnection.sendOutMsg(MsgAbbrevJVMConnection.java:276)
at
weblogic.rjvm.MsgAbbrevJVMConnection.sendMsg(MsgAbbrevJVMConnection.java:164)
at weblogic.rjvm.ConnectionManager.sendMsg(ConnectionManager.java:549)
at weblogic.rjvm.RJVMImpl.send(RJVMImpl.java:722)
at
weblogic.rjvm.MsgAbbrevOutputStream.flushAndSendRaw(MsgAbbrevOutputStream.java:292)
at
weblogic.rjvm.MsgAbbrevOutputStream.flushAndSend(MsgAbbrevOutputStream.java:300)
at
weblogic.rjvm.MsgAbbrevOutputStream.sendRecv(MsgAbbrevOutputStream.java:322)
at
weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:103)


The code that calls the ejb looks like this:


FileInputStream mFis = new FileInputStream(new File("c:\\abc.pdf"));
m_logger.debug("Fis : " + mFis);
int i = mFis.available();
byte[] PDFBytes = new byte[i];
mFis.read(PDFBytes);
m_logger.debug("READ : ");
mFis.close();


if(PDFBytes != null) {
m_logger.debug("Calling setPublicationResult");
try {
boolean saveOk = apsSession.setPublicationResult(objectId, PDFBytes);
if(saveOk) {
m_logger.debug("Call to setPublicationResult succeeded");


}


else {
m_logger.debug("Call to setPublicationResult failed");

}
}


catch(Exception e) {
m_logger.debug("Exception in call to setPublicationResult, error is " +
e.getMessage());
e.printStackTrace();

}
}


apsSession.remove();

} catch (RemoteException re) {


m_logger.error("RemoteException " + re);
re.printStackTrace();

} catch (RemoveException re) {


m_logger.error("RemoveException " + re);
re.printStackTrace();


} catch(FileNotFoundException fe) {
} catch(IOException ioe) {
}


I tried to change the bean type to "stateful" hoping this will not let
the handle disappear which might be happening in the case of a
stateless session bean but that didnt help either. Got the same error.

0 new messages