-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom exception not transported to the hazelcast client (disributed executor service) -> instead UndefinedErrorCodeException #9753
Comments
#9713 seems to go in the right direction, am I right? |
When we switched to protocol to support all languages, exceptions support get weakened. Before we were using Java Serialization directly. Right now, we are using our own description for exceptions. For the exceptions are not defined in protocol, we are delivering them via More extensive work on this will be done on 4.0. #9713 is a workaround to be used internally. One idea is to make this public in 4.0 to be used by our users. |
@sancar Would this enhancement mean breaking the client protocol? Should it be just in 4.0 or can at least some research be carried out in 3.11 phase? |
It feels like we can find a way to not to break the protocol when introducing the change. |
I just fell into this problem again, when trying to migrate code which was working using a hazelcast-lite-member into code which uses a hazelcast client instead. Exception handling was broken... and I had to extend the catch block to fix it. It would be really nice if the same API ( I'm looking forward to 3.11! :-) |
@Petikoch Sorry to inform you that we could not prioritize this one and it is postponed. |
@dbrimley |
…registered exception factory can be found. fixes hazelcast#9753
Hi Team, has this been put into formal solution? I am experiencing this in 4.0.2 |
We are throwing UndefinedErrorCodeException if an exception is not on the protocol list. This causes poor experience as the behaviour is different between the client and the member. see hazelcast#9753 This pr does not introduce an ExceptionFactory API as discussed on the issue. The value of an ExceptionFactory API is debetable and left out for now. If the client has the expcetion class on the classpath, the client will create it. If it is not available on the classpath, it is not clear what can a user do with ExceptionFactory API. In that case, we are throwing UndefinedErrorCodeException as before. The main problem seems to be the case where the client have the exact same class on the classpath, so this fix should cover most of the use cases. fixes hazelcast#9753
We are throwing UndefinedErrorCodeException if an exception is not on the protocol list. This causes poor experience as the behaviour is different between the client and the member. see hazelcast#9753 This pr does not introduce an ExceptionFactory API as discussed on the issue. The value of an ExceptionFactory API is debetable and left out for now. If the client has the expcetion class on the classpath, the client will create it. If it is not available on the classpath, it is not clear what can a user do with ExceptionFactory API. In that case, we are throwing UndefinedErrorCodeException as before. The main problem seems to be the case where the client have the exact same class on the classpath, so this fix should cover most of the use cases. Also added assert to check if exception is defined in the protocol When classLoading is introduced it is possible for us to forget to put the exception in the protocol, because it will not longer throw UndefinedErrorCodeException but it will be loaded automatically. Assertion is added to check and warn us. fixes hazelcast#9753
We are throwing UndefinedErrorCodeException if an exception is not on the protocol list. This causes poor experience as the behaviour is different between the client and the member. see hazelcast#9753 This pr does not introduce an ExceptionFactory API as discussed on the issue. The value of an ExceptionFactory API is debetable and left out for now. If the client has the expcetion class on the classpath, the client will create it. If it is not available on the classpath, it is not clear what can a user do with ExceptionFactory API. In that case, we are throwing UndefinedErrorCodeException as before. The main problem seems to be the case where the client have the exact same class on the classpath, so this fix should cover most of the use cases. Also added assert to check if exception is defined in the protocol When classLoading is introduced it is possible for us to forget to put the exception in the protocol, because it will not longer throw UndefinedErrorCodeException but it will be loaded automatically. Assertion is added to check and warn us. fixes hazelcast#9753 (cherry picked from commit 18dd1dd)
We are throwing UndefinedErrorCodeException if an exception is not on the protocol list. This causes poor experience as the behaviour is different between the client and the member. see hazelcast#9753 This pr does not introduce an ExceptionFactory API as discussed on the issue. The value of an ExceptionFactory API is debetable and left out for now. If the client has the expcetion class on the classpath, the client will create it. If it is not available on the classpath, it is not clear what can a user do with ExceptionFactory API. In that case, we are throwing UndefinedErrorCodeException as before. The main problem seems to be the case where the client have the exact same class on the classpath, so this fix should cover most of the use cases. Also added assert to check if exception is defined in the protocol When classLoading is introduced it is possible for us to forget to put the exception in the protocol, because it will not longer throw UndefinedErrorCodeException but it will be loaded automatically. Assertion is added to check and warn us. fixes hazelcast#9753 (cherry picked from commit 18dd1dd)
We are throwing UndefinedErrorCodeException if an exception is not on the protocol list. This causes poor experience as the behaviour is different between the client and the member. see hazelcast#9753 This pr does not introduce an ExceptionFactory API as discussed on the issue. The value of an ExceptionFactory API is debetable and left out for now. If the client has the expcetion class on the classpath, the client will create it. If it is not available on the classpath, it is not clear what can a user do with ExceptionFactory API. In that case, we are throwing UndefinedErrorCodeException as before. The main problem seems to be the case where the client have the exact same class on the classpath, so this fix should cover most of the use cases. Also added assert to check if exception is defined in the protocol When classLoading is introduced it is possible for us to forget to put the exception in the protocol, because it will not longer throw UndefinedErrorCodeException but it will be loaded automatically. Assertion is added to check and warn us. fixes hazelcast#9753
We are throwing UndefinedErrorCodeException if an exception is not on the protocol list. This causes poor experience as the behaviour is different between the client and the member. see hazelcast#9753 This pr does not introduce an ExceptionFactory API as discussed on the issue. The value of an ExceptionFactory API is debetable and left out for now. If the client has the expcetion class on the classpath, the client will create it. If it is not available on the classpath, it is not clear what can a user do with ExceptionFactory API. In that case, we are throwing UndefinedErrorCodeException as before. The main problem seems to be the case where the client have the exact same class on the classpath, so this fix should cover most of the use cases. Also added assert to check if exception is defined in the protocol When classLoading is introduced it is possible for us to forget to put the exception in the protocol, because it will not longer throw UndefinedErrorCodeException but it will be loaded automatically. Assertion is added to check and warn us. fixes hazelcast#9753
We are throwing UndefinedErrorCodeException if an exception is not on the protocol list. This causes poor experience as the behaviour is different between the client and the member. see hazelcast#9753 This pr does not introduce an ExceptionFactory API as discussed on the issue. The value of an ExceptionFactory API is debetable and left out for now. If the client has the expcetion class on the classpath, the client will create it. If it is not available on the classpath, it is not clear what can a user do with ExceptionFactory API. In that case, we are throwing UndefinedErrorCodeException as before. The main problem seems to be the case where the client have the exact same class on the classpath, so this fix should cover most of the use cases. Also added assert to check if exception is defined in the protocol When classLoading is introduced it is possible for us to forget to put the exception in the protocol, because it will not longer throw UndefinedErrorCodeException but it will be loaded automatically. Assertion is added to check and warn us. fixes hazelcast#9753 (cherry picked from commit 18dd1dd)
We are throwing UndefinedErrorCodeException if an exception is not on the protocol list. This causes poor experience as the behaviour is different between the client and the member. see hazelcast#9753 This pr does not introduce an ExceptionFactory API as discussed on the issue. The value of an ExceptionFactory API is debetable and left out for now. If the client has the expcetion class on the classpath, the client will create it. If it is not available on the classpath, it is not clear what can a user do with ExceptionFactory API. In that case, we are throwing UndefinedErrorCodeException as before. The main problem seems to be the case where the client have the exact same class on the classpath, so this fix should cover most of the use cases. Also added assert to check if exception is defined in the protocol When classLoading is introduced it is possible for us to forget to put the exception in the protocol, because it will not longer throw UndefinedErrorCodeException but it will be loaded automatically. Assertion is added to check and warn us. fixes hazelcast#9753
* Try load custom exceptions via class loader on client We are throwing UndefinedErrorCodeException if an exception is not on the protocol list. This causes poor experience as the behaviour is different between the client and the member. see #9753 This pr does not introduce an ExceptionFactory API as discussed on the issue. The value of an ExceptionFactory API is debetable and left out for now. If the client has the expcetion class on the classpath, the client will create it. If it is not available on the classpath, it is not clear what can a user do with ExceptionFactory API. In that case, we are throwing UndefinedErrorCodeException as before. The main problem seems to be the case where the client have the exact same class on the classpath, so this fix should cover most of the use cases. Also added assert to check if exception is defined in the protocol When classLoading is introduced it is possible for us to forget to put the exception in the protocol, because it will not longer throw UndefinedErrorCodeException but it will be loaded automatically. Assertion is added to check and warn us. fixes #9753 (cherry picked from commit 18dd1dd)
* Try load custom exceptions via class loader on client We are throwing UndefinedErrorCodeException if an exception is not on the protocol list. This causes poor experience as the behaviour is different between the client and the member. see #9753 This pr does not introduce an ExceptionFactory API as discussed on the issue. The value of an ExceptionFactory API is debetable and left out for now. If the client has the expcetion class on the classpath, the client will create it. If it is not available on the classpath, it is not clear what can a user do with ExceptionFactory API. In that case, we are throwing UndefinedErrorCodeException as before. The main problem seems to be the case where the client have the exact same class on the classpath, so this fix should cover most of the use cases. Also added assert to check if exception is defined in the protocol When classLoading is introduced it is possible for us to forget to put the exception in the protocol, because it will not longer throw UndefinedErrorCodeException but it will be loaded automatically. Assertion is added to check and warn us. fixes #9753
* Try load custom exceptions via class loader on client We are throwing UndefinedErrorCodeException if an exception is not on the protocol list. This causes poor experience as the behaviour is different between the client and the member. see #9753 This pr does not introduce an ExceptionFactory API as discussed on the issue. The value of an ExceptionFactory API is debetable and left out for now. If the client has the expcetion class on the classpath, the client will create it. If it is not available on the classpath, it is not clear what can a user do with ExceptionFactory API. In that case, we are throwing UndefinedErrorCodeException as before. The main problem seems to be the case where the client have the exact same class on the classpath, so this fix should cover most of the use cases. Also added assert to check if exception is defined in the protocol When classLoading is introduced it is possible for us to forget to put the exception in the protocol, because it will not longer throw UndefinedErrorCodeException but it will be loaded automatically. Assertion is added to check and warn us. fixes #9753
If I use the hazelcast client to call the distributed executor service and the callable throws an exception with a custom type, the exception is not transported to the client. The cause of the
ExecutionException
is then not "my exception", instead it isUndefinedErrorCodeException
. The class of "my exception" is both in the classpath of the "server" and of the "client".If I do the same using a regular hazelcast node (not the client), everything works.
How can I let transport "my exception" as cause to the hazelcast client?
See the below example to show the issue (using hazelcast and hazelcast-client 3.7.5):
The text was updated successfully, but these errors were encountered: