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

Terence Mill commented on GROOVY-8076:
--------------------------------------

Well i don't have that

 
{code:java}
Status_v1643897779786: 11: unable to resolve class 
com.oler.dvb.ras.api.exceptions.RasException
 @ line 11, column 2.
    catch(com.oler.dvb.ras.api.exceptions.RasException e) { throw e;}
    ^
Status_v1643897779786: 12: unable to resolve class 
com.oler.dvb.ras.api.exceptions.RasException
 @ line 12, column 46.
   g.RuntimeException r) { throw new com.ol
                                 ^
4406 errors
    at 
org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:295)
    at 
org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:914)
    at 
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:627)
    at 
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:610)
    at 
com.oler.dvb.ras.baf.scripts.groovy.GroovyCompiler.compile(GroovyCompiler.java:53)
    at 
com.oler.dvb.ras.baf.scripts.groovy.GroovyCompiler.createGroovyByteCode(GroovyCompiler.java:36)
    at 
com.oler.dvb.xxr.client.ras.RasCacheableFeignManager.compileScripts(RasCacheableFeignManager.java:221)
    at 
com.oler.dvb.xxr.client.ras.RasCacheableFeignManager.getLatestRasModelRevision(RasCacheableFeignManager.java:114)
    at 
com.oler.dvb.xxr.client.ras.RasCacheableFeignManager$$FastClassBySpringCGLIB$$28670dda.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
    at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:779)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
    at 
org.springframework.cache.interceptor.CacheInterceptor.lambda$invoke$0(CacheInterceptor.java:54)
    at 
org.springframework.cache.interceptor.CacheAspectSupport.invokeOperation(CacheAspectSupport.java:366)
    at 
org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:421)
    at 
org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:345)
    at 
org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:64)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
    at 
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:692)
    at 
com.oler.dvb.xxr.client.ras.RasCacheableFeignManager$$EnhancerBySpringCGLIB$$f6878460.getLatestRasModelRevision(<generated>)
    at 
com.oler.dvb.xxr.client.ras.RasClientController.newerRasModelRevisionExists(RasClientController.java:325)
    at 
com.oler.dvb.xxr.client.ras.RasClientController.lambda$refreshTcuModelContainers$2(RasClientController.java:308)
    at 
java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
    at 
java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
    at 
java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at 
java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
    at 
java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at 
java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at 
java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at 
java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
{code}
 

> 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
>            Priority: Major
>         Attachments: Groovy8076.zip
>
>
> 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
(v8.20.1#820001)

Reply via email to