Closed deodeveloper closed 6 years ago
Finally, I got it.
One of method in the interface was throwing UnsupportedEncodingException. So code generation failed.
Long story short, make sure the service interface methods doesn't throw any checked exception, otherwise code generation fails.
Here is the method in the interface.
void generateQRUrl(User user, Handler<AsyncResult<String>> resultHandler) throws UnsupportedEncodingException;
Compilation failure with release 3.5.1 On generated service proxy, Error - unreported exception java.io.UnsupportedEncodingException; must be caught or declared to be thrown
generate proxy code -
public void handle(Message msg) {
try {
...
}
catch (Throwable t) {
msg.reply(new ServiceException(500, t.getMessage()));
throw t;
}
}
Stacktrace - UserAsyncServiceVertxProxyHandler.java:[339,7] unreported exception java.io.UnsupportedEncodingException; must be caught or declared to be thrown
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure /Users/admin/Documents/Development/langAppServer/vertxweb/target/generated-sources/annotations/com/bijay/langapp/web/verticles/user/UserAsyncServiceVertxProxyHandler.java:[339,7] unreported exception java.io.UnsupportedEncodingException; must be caught or declared to be thrown