Skip to content

Commit

Permalink
Enh 37137606 - ENH: Improve proxy log message to include serializer t…
Browse files Browse the repository at this point in the history
…ype mismatch between the server and client.

(auto-submit 112347 after successfully running remote remote.full)
Job ID: job.9.20250106163326.19842

[git-p4: depot-paths = "//dev/coherence-ce/main/": change = 113235]
  • Loading branch information
chpatel3 committed Jan 6, 2025
1 parent 62a0a90 commit 72259b7
Showing 1 changed file with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
* Copyright (c) 2000, 2025, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -1804,8 +1804,8 @@ public void onMessage(com.tangosol.net.messaging.Message message)
message.run();
}

/**
* Called when an exception occurs during Message decoding. This method is
/**
* Called when an exception occurs during Message decoding. This method is
* called on the service thread.
*
* @param e the Throwable thrown during decoding
Expand All @@ -1815,13 +1815,13 @@ public void onMessage(com.tangosol.net.messaging.Message message)
* configured WrapperStreamFactory objects
*
* @see #onNotify
*/
*/
protected void onMessageDecodeException(Throwable e, com.tangosol.io.ReadBuffer.BufferInput in, com.tangosol.coherence.component.net.extend.Connection connection, boolean fFilter)
{
// import Component.Net.Extend.Channel;
// import Component.Net.Extend.Connection;
// import java.io.IOException;

// resolve the Channel
Channel channel;
try
Expand All @@ -1833,7 +1833,7 @@ protected void onMessageDecodeException(Throwable e, com.tangosol.io.ReadBuffer.
}
channel = (Channel) connection.getChannel(in.readPackedInt());
}
catch (IOException ee)
catch (IOException ioe)
{
channel = null;
}
Expand All @@ -1845,13 +1845,14 @@ protected void onMessageDecodeException(Throwable e, com.tangosol.io.ReadBuffer.

if (channel != null)
{
sb.append(" This service is configured with a serializer: ")
sb.append(String.format(" This service is using serializer \"%s\": ", channel.getSerializer().getName()))
.append(channel.getSerializer())
.append(", which may be incompatible with the serializer configured by the connecting client.");
.append(", which is different or incompatible with the serializer being used by the connecting client.")
.append(String.format(" Please ensure connecting client is using the same serializer as the one configured for this service"));
}

_trace(e, sb.toString());

// close the Channel or Connection
if (channel == null || !channel.isOpen() || channel.getId() == 0)
{
Expand All @@ -1862,7 +1863,7 @@ protected void onMessageDecodeException(Throwable e, com.tangosol.io.ReadBuffer.
channel.close(true, e);
}
}

/**
* Called when an exception occurs during Message encoding. This method is
* called on both client and service threads.
Expand Down

0 comments on commit 72259b7

Please sign in to comment.