Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-12182

Bypass Java GString to String conversion in ObjectType::simpleTypeOrObjectConvert

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 17.12.06, 18.12.01
    • None
    • None

    Description

      Follows https://markmail.org/message/azn7e4g2rbpo7tvj

      Here is a copy:

      I spotted this error in log

      2021-02-13 10:17:03,503 |jsse-nio-8443-exec-8 |Converters                    |W| *** No converter found, converting from org.codehaus.groovy.runtime.GStringImpl to java.lang.String. Please report this message to the developer community s
      o a suitable converter can be created. ***
      2021-02-13 10:17:03,503 |jsse-nio-8443-exec-8 |ObjectType                    |E| null
      java.lang.ClassNotFoundException: No converter found for org.codehaus.groovy.runtime.GStringImpl->java.lang.String
              at org.apache.ofbiz.base.conversion.Converters.getConverter(Converters.java:119) ~[main/:?]
              at org.apache.ofbiz.base.util.ObjectType.simpleTypeOrObjectConvert(ObjectType.java:328) [main/:?]
              at org.apache.ofbiz.base.util.ObjectType.simpleTypeOrObjectConvert(ObjectType.java:256) [main/:?]
              at org.apache.ofbiz.base.util.ObjectType.simpleTypeOrObjectConvert(ObjectType.java:375) [main/:?]
              at org.apache.ofbiz.entity.GenericEntity.set(GenericEntity.java:550) [main/:?]
              at org.apache.ofbiz.entity.GenericEntity.set(GenericEntity.java:502) [main/:?]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_202]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_202]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_202]
              at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_202]
              at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101) [groovy-2.5.11.jar:2.5.11]
              at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) [groovy-2.5.11.jar:2.5.11]
              at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2754) [groovy-2.5.11.jar:2.5.11]
              at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:3809) [groovy-2.5.11.jar:2.5.11]
              at org.codehaus.groovy.runtime.InvokerHelper.setProperty(InvokerHelper.java:217) [groovy-2.5.11.jar:2.5.11]
              at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(ScriptBytecodeAdapter.java:496) [groovy-2.5.11.jar:2.5.11]
              at DataServices.saveLocalFileDataResource(DataServices.groovy:280) [script:?]
              at DataServices$saveLocalFileDataResource.callCurrent(Unknown Source) [script:?]
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51) [groovy-2.5.11.jar:2.5.11]
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:156) [groovy-2.5.11.jar:2.5.11]
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:168) [groovy-2.5.11.jar:2.5.11]
              at DataServices.attachUploadToDataResource(DataServices.groovy:191) [script:?]
      [...]
      2021-02-13 10:17:03,507 |jsse-nio-8443-exec-8 |ObjectType                    |I| No special conversion required for org.codehaus.groovy.runtime.GStringImpl to String, returning object.toString().
      
      

      To prevent this message, I propose to bypass GString to String conversion.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jleroux Jacques Le Roux
            jleroux Jacques Le Roux
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment