You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Jochen Theodorou (JIRA)" <ji...@apache.org> on 2017/02/07 14:35:41 UTC

[jira] [Issue Comment Deleted] (GROOVY-8076) A more helpful error message should be logged when a custom Java class cannot be resolved by the Groovy component due to a Java major/minor version mismatch

     [ https://issues.apache.org/jira/browse/GROOVY-8076?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Theodorou updated GROOVY-8076:
-------------------------------------
    Comment: was deleted

(was: I'd like to know too, because the description is confusing.  "Unsupported major.minor version x.yy" is the text of an error thrown by the JVM if the class was found, but we are unable to load it. And this is no ClassNotFoundException. If it results in one instead, then there is an error as cause somewhere, which would be a bug as the error is either ignored or catched and wrapped in a ClassNotFoundException.)

> A more helpful error message should be logged when a custom Java class cannot be resolved by the Groovy component due to a Java major/minor version mismatch
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-8076
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8076
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-runtime
>            Reporter: ANDREY GRIGORYEV
>
> I spent a couple of hours investigating why my application would no longer successfully deploy to the mule standalone ESB server, yet it would deploy fine to the embedded mule ESB runtime in Anypoint Studio. The error message that I found in the server log was something along the lines of the following:
> "... Script1.groovy: 1: unable to resolve class com.mycompany.MyReallyUsefulCustomClass ..."
> I went down all the wrong avenues trying to figure out why the Java class was not being resolved by the Groovy interpreter.
> Eventually I stumbled upon an explanation of the problem via a Google search: a Java major/minor version mismatch between the version of the Java runtime being used by the Mule ESB runtime and the Java target version of the compiled custom Java classes used by a Mule application being deployed to the Mule ESB server.
> The cause of my problem was indeed due to a Java version mismatch: the ESB server runtime was running JRE 1.7, but the custom class being referenced by the embedded Groovy script was compiled in Anypoint Studio using JDK 1.8.
> I would like to formally submit an Enhancement Request for Engineering to improve the customer experience for us developers; possibly by updating the Groovy interpreter component to detect the conflicting Java version issues and log a more helpful error message to the logger.
> The current message "... unable to resolve class ..." is too general and does not adequately reflect the problem of a mismatch between the JRE version and the compiled byte-code version.
> An "Unsupported major.minor version x.yy" error message instead would be an improvement.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)