Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2493

java.lang.IllegalAccessError: tried to access method org.codehaus.groovy.reflection.CachedClass.coerceArgument(Ljava/lang/Object;)Ljava/lang/Object; from class org.codehaus.groovy.runtime.dgm$328

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 1.5.2
    • None
    • None
    • WindowsXP, java 6, groovy rev 10326

    Description

      I get this stacktrace

      java.lang.IllegalAccessError: tried to access method org.codehaus.groovy.reflection.CachedClass.coerceArgument(Ljava/lang/Object;)Ljava/lang/Object; from class org.codehaus.groovy.runtime.dgm$328
      	at org.codehaus.groovy.runtime.dgm$328.doMethodInvoke(Unknown Source)
      	at org.codehaus.groovy.runtime.CallSiteArray$PojoCall.call(CallSiteArray.java:72)
      	at org.codehaus.groovy.runtime.CallSiteArray.call(CallSiteArray.java:40)
      	at app.web.controllers.SearchLanesController$_closure1_closure3.doCall(SearchLanesController.groovy]:51)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
      	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:227)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:873)
      	at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:947)
      	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:76)
      	at app.web.controllers.SearchLanesController$_closure1_closure3.doCall(SearchLanesController.groovy])
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
      	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:227)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:873)
      	at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:947)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:710)
      	at groovy.lang.Closure.call(Closure.java:292)
      	at groovy.lang.Closure.call(Closure.java:287)
      	at ronnie.gosh.UnboundClosure.call(UnboundClosure.java:25)
      	at ronnie.gosh.ApplicationContext.call(ApplicationContext.java:86)
      	at ronnie.gosh.ApplicationContext.call(ApplicationContext.java:97)
      	at ronnie.gosh.GoshDispatcherServlet.doService(GoshDispatcherServlet.java:97)
      	at app.web.HtmlDispatcherServlet.doService(HtmlDispatcherServlet.java:43)
      	at ronnie.gosh.GoshDispatcherServlet.service(GoshDispatcherServlet.java:112)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
      	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
      	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      	at java.lang.Thread.run(Thread.java:619)
      

      I didn't get that with a previous revision.

      At line 48 of SearchLanesController.groovy I have

      def lanes = laneService.search( session.user, origRegions, null, 
      		null, destRegions, null, 
      		null, null, null,
      		(int)0, (boolean)true, (int)( args.maxResults + 1 ), null, 
      		(int)0, null, null, null, null, 
      		(boolean)false, (boolean)false )  
      

      It tries to call a java class method of a business component:

      public List search( SessionUser sessionUser, List originRegionCodes, List originCountryCodes,
      		List originStationCodes, List destinationRegionCodes, List destinationCountryCodes,
      		List destinationStationCodes, List productGroupCodes, final String laneProductGroupType,
      		final int currentTransitTimeValue, boolean includeAuthorizedFlag, int maxResults, List daysOfWeek,
      		final int pickupCutoff, Long minEtp, Long maxEtp, Long minTargetDay, Long maxTargetDay,
      		boolean includeProposed, final boolean getETP )
      

      This method is also in an interface. Together they form a spring bean with transactions, so that there is a proxy around it.
      It worked in a previous revision of groovy 1.6 beta 1.

      Attachments

        Activity

          People

            ait Alex Tkachman
            rene.de.bloois René de Bloois
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: