weblogic.rjvm.PeerGoneException in JVM Runtime

weblogic.rjvm.PeerGoneException

Most users experience the below error in the Weblogic and JVM machines
weblogic.rjvm.PeerGoneException: ; nested exception is:
java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
java.io.InvalidClassException: com.sybase.jdbc2.tds.SybTimestamp; local class incompatible: stream classdesc serialVersionUID = 4038526507615253075, local class serialVersionUID = -4859870295624974195
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:191)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:315)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:250)
at com.bankofny.gdoasis.payment.ejb.PaymentCalculationManagerRemoteEJB_suyjh6_EOImpl_910_WLStub.rollInterestPeriod(Unknown Source)
at com.bankofny.gdoasis.batch.payment.RollInterestPeriod.main(RollInterestPeriod.java:96)
Caused by: java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
java.io.InvalidClassException: com.sybase.jdbc2.tds.SybTimestamp; local class incompatible: stream classdesc serialVersionUID = 4038526507615253075, local class serialVersionUID = -4859870295624974195
at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:430)
at weblogic.rjvm.t3.MuxableSocketT3.dispatch(MuxableSocketT3.java:362)
at weblogic.socket.AbstractMuxableSocket.dispatch(AbstractMuxableSocket.java:359)
at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:851)

Reason:
This is due to invalid class compatibility. May be you are using the two different versions of classes. one at server side and another at your client side. please make sure both are having the SerialVersion Id's.

java.lang.OutOfMemoryError: Java heap space Exception in Java

Question java.lang.OutOfMemoryError: Java heap space
What does this error mean and how can I correct it?  

It means that the JVM has run out of all the memory that has been allocated to it. You can change the amount of memory allocated for use by your JVM using the -Xms and -Xmx command line parameters.

For example, the following says run MyApp in a JVM and allocate a minimum of 5 Megabytes and a maximum of 15 Megabytes off of the heap in order to do so.

   java -Xms5m -Xmx15m MyApp  

In tomcat the heap size can be passed to the java here.
"$_RUNJAVA" -Xmx512M $JAVA_OPTS $CATALINA_OPTS