You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2014/11/25 13:29:12 UTC

[jira] [Commented] (TAP5-2421) @Operation usage leads to java.lang.VerifyError if annotated method throws Error

    [ https://issues.apache.org/jira/browse/TAP5-2421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14224468#comment-14224468 ] 

Jochen Kemnade commented on TAP5-2421:
--------------------------------------

I'm beginning to understand the problem: {{java.lang.reflect.Method.getExceptionTypes()}} is badly named because it returns everything that the method declares to throw, {{Exception}}s as well as {{Error}}s. {{org.apache.tapestry5.internal.plastic.MethodAdviceManager.createProceedToAdvisedMethod()}} generates a {{catch}} clause for each of those types, in which {{MethodInvocation.setCheckedException(Exception)}} is called with the caught object. If that is an {{Error}} rather than an {{Exception}}, the JRE throws a VerifyError with an unhelpful error message.
I wonder why the error (the VerifyError) occurs on the other machine but not on mine. The Error from the method is thrown on neither one.

> @Operation usage leads to java.lang.VerifyError if annotated method throws Error
> --------------------------------------------------------------------------------
>
>                 Key: TAP5-2421
>                 URL: https://issues.apache.org/jira/browse/TAP5-2421
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.4
>            Reporter: Jochen Kemnade
>
> I have annotated a method in a page class with {{@Operation}}. When the method is called, a {{VerifyError}} is thrown:
> {code}
> 2014-11-24 13:19:46,685 [ajp-nio-9209-exec-33] ERROR o.a.t.m.T.RequestExceptionHandler - Processing of request failed with uncaught exception: java.lang.VerifyError: (class: pages/PageName$Invocation_methodName_1d10f8d1d549bc, method: proceedToAdvisedMethod signature: ()V) Incompatible argument to function
> {code}.
> The problem occurs with Java 7 as well as with Java 8 and regardless of whether the operation description contains a {{%}} or not.
> Unfortunately, I cannot reproduce the problem on a different machine.
> If I use {{OperationTracker}} "manually", no {{VerifyError}} is thrown.
> The advised method throws multiple checked exceptions and an {{Error}}.
> I'm not entirely sure what the error means, but I assume, the {{proceedToAdvisedMethod}} method is invoked with parameters, so it might be an issue with plastic rather than with tapestry-core.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)