Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-8094

Groovy classes are not found

    XMLWordPrintable

Details

    • Yes
    • Maintenance 57
    • 3

    Description

      Steps to reproduce

      1.  Import the sample classes (com.baloise.actions.HelloWorldDefinition and com.baloise.actions.HelloWorld) in the groovy app: scripts.com.xml
      2.  Configure a new action in, for example, contacts app that uses the groovy classes. config.modules.contacts.apps.contacts.subApps.browser.actions.sayHello.xml
      3. Add new action to the action bar.
      4. Open contacts app

      Expected results

      When opening the app, the new action appears and when clicking on it, the message is printed

      Actual results

      When opening the app, there's an error

      Workaround

      Using classes from a maven module

      Development notes

      This seems to be related to ByteBuddy, specifically ByteBuddyI18nizer. In fact, when using a groovy class for a command, as this example, it works ok since byte buddy is not involved. Besides, in 5.7 it does not happen.
      This is the stack trace

      ERROR agnolia.ui.framework.app.AppInstanceControllerImpl: Sub-app [browser] of app [contacts] failed to start
      java.lang.IllegalArgumentException: Could not create type
      	at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:154) ~[byte-buddy-1.10.8.jar:?]
      	at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:365) ~[byte-buddy-1.10.8.jar:?]
      ...
      Caused by: java.lang.ClassNotFoundException: com.baloise.actions.HelloWorldDefinition
      	at net.bytebuddy.dynamic.loading.ByteArrayClassLoader.findClass(ByteArrayClassLoader.java:348) ~[byte-buddy-1.10.8.jar:?]
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121]
      

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              fgrilli Federico Grilli
              jayala Jonathan Ayala
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD

                  Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 1h
                    1h