Skip to content
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

Misleading exception message "No @JoynrVersion found on interface" while proxy creation #52

Open
svettwer opened this issue Aug 27, 2019 · 0 comments

Comments

@svettwer
Copy link

svettwer commented Aug 27, 2019

Hi all,

as I was creating some integration tests for a joynr application, I came over the following scenario with Joynr Version 1.2.0.

I created a backend proxy like:

this.backendProxy = runtime.getProxyBuilder(
           "my.domain", 
           MyServiceBackendSync.class)
       .build();

and received the exception No @JoynrVersion found on interface [...]

I found out that I just used the backend sync class instead of the backend proxy class. So as I exchanged MyServiceBackendSync.class with MyServiceBackendProxy.class everything was fine.

Nevertheless, to realize that, it took me some time. Therefore I would like to suggest, that the ProxyBuilderDefaultImpl checks whether the given interface class is really a proxy specification before running into the exception thrown from the VersionUtil.
From my perspective, I cannot suggest a solution because the BackendProxy classes seem to have no common interface which one could check.

As this is suggestion is more about convenience, it might won't be on your prio list for a long time but maybe sometimes in the future. =)

EDIT: To be honest, the exception is not misleading at all, as there is really no @JoynrVersion on the interface.
But maybe a message like "ProxyBuilderException: The given interface class does not define a Proxy." would improve the debugging.

BR,
Sven

@svettwer svettwer changed the title Misleading exception message "No @JoynrVersion found on interface" Misleading exception message "No @JoynrVersion found on interface" while proxy creation Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant