Uploaded image for project: 'REST Client'
  1. REST Client
  2. MGNLRESTCL-176

Rest client app error due to wrong import

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Neutral
    • 1.6.0
    • 1.5.3
    • None

    Description

      Steps to reproduce

      1. Install magnolia-rest-client-app jar in Magnolia 5.7.14
      2. Open rest client app

      Expected results

      The app starts correctly

      Actual results

      There is an error:

      Caused by: java.lang.VerifyError: Bad type on operand stack
      Exception Details:
        Location:
          info/magnolia/rest/client/app/ui/RestClientAppViewImpl$2.valueChange(Lcom/vaadin/v7/data/Property$ValueChangeEvent;)V @61: invokestatic
        Reason:
          Type 'org/vaadin/aceeditor/AceEditor' (current frame, stack[1]) is not assignable to 'com/vaadin/v7/ui/AbstractField'
        Current Frame:
          bci: @61
          flags: { }
          locals: { 'info/magnolia/rest/client/app/ui/RestClientAppViewImpl$2', 'com/vaadin/v7/data/Property$ValueChangeEvent', 'java/lang/reflect/Method', '[Ljava/lang/String;' }
          stack: { 'info/magnolia/rest/client/app/ui/RestClientAppViewImpl', 'org/vaadin/aceeditor/AceEditor', 'java/lang/String', integer }
        Bytecode:
          0x0000000: 2ab4 0001 b800 03b6 0004 c000 054d 2ab4
          0x0000010: 0001 b800 062c b900 0702 004e 2ab4 0001
          0x0000020: 2ab4 0001 b800 082d 0332 04b8 0009 2ab4
          0x0000030: 0001 2ab4 0001 b800 0a2d 0432 03b8 0009
          0x0000040: b1                                     
      
      
      	at info.magnolia.rest.client.app.ui.RestClientAppViewImpl.createView(RestClientAppViewImpl.java:143) ~[magnolia-rest-client-app-1.5.3.jar:?]
      	at info.magnolia.rest.client.app.ui.RestClientAppViewImpl.setDataSource(RestClientAppViewImpl.java:306) ~[magnolia-rest-client-app-1.5.3.jar:?]
      	at info.magnolia.rest.client.app.ui.RestClientAppPresenter.start(RestClientAppPresenter.java:100) ~[magnolia-rest-client-app-1.5.3.jar:?]
      	at info.magnolia.rest.client.app.ui.RestClientMainSubApp.<init>(RestClientMainSubApp.java:48) ~[magnolia-rest-client-app-1.5.3.jar:?]
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_121]
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_121]
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_121]
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_121]
      	at info.magnolia.objectfactory.ObjectManufacturer.newInstance(ObjectManufacturer.java:129) ~[magnolia-core-5.7.14.jar:?]
      	... 150 more
       

      Development notes

      The problem occurs when instantiating AceEditor as the import loads org.vaadin.aceeditor.AceEditor from aceeditor-0.8.15.jar whereas it must be picked from vaadin-compatibility-aceeditor-1.3.11.jar as org.vaadin.v7.aceeditor.AceEditor. In a nutshell, switching the import from

      import org.vaadin.aceeditor.AceEditor;

      to

      import org.vaadin.v7.aceeditor.AceEditor; 

      should fix the issue.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              chuong.doan Chuong Doan Huy
              jayala Jonathan Ayala
              DeveloperX
              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 - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 2d 5.5h
                    2d 5.5h