Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-1066

Moving CustomRepresentationService to dom - There is no application attached to current thread main

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • core-1.8.0
    • tidy-up
    • Viewer RO
    • None

    Description

      Hi,

      We are using something similar to CustomRepresentationService of todoapp, we use it to get a simple JSON representation.

      Our CustomRepresentationService is annotated as DomainService, its package is registered in isis.properties (isis.services.ServicesInstallerFromAnnotation.packagePrefix but not in isis.services!) and it is located in the dom module.

      With apache isis 1.7 it was working, now we migrated to isis 1.8 and now this causes an error during maven install:
      WicketRuntimeException: There is no application attached to current thread main

      16:05:09,146  [IsisTransaction      main       INFO ]  abort transaction IsisTransaction@2a49af03[state=MUST_ABORT,commands=0]
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 10.018 sec <<< FAILURE! - in ase.integration.test.ESIntegTest
      ase.integration.test.ESIntegTest  Time elapsed: 10.018 sec  <<< ERROR!
      java.lang.RuntimeException: org.apache.isis.core.runtime.system.transaction.IsisTransactionManagerException: org.apache.wicket.WicketRuntimeException: There is no application attached to current thread main
      	at org.apache.isis.core.integtestsupport.IsisSystemForTest.setUpSystem(IsisSystemForTest.java:350)
      	at ase.integration.AddressSearchEngineSystemInitializer.initIsft(AddressSearchEngineSystemInitializer.java:46)
      	at ase.integration.AbstractAseIntegTest.initClass(AbstractAseIntegTest.java:13)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      

      When I run the application on tomcat everything seems to work, the UI is available and I can access the CustomRepresentationService through Rest API.

      I did the described changes on the todoapp for isis 1.8 and I'm getting same result (I attached my changes with patch.txt).

      I moved the CustomRepresentationService to dom module because I need an possibility to unit test the generated JSON strings.

      Please fix that issue or assist me in creating a workaround.
      Thanks,
      Timothy

      Attachments

        1. RestCustom3.zip
          339 kB
          Timothy Simecsek
        2. RestCustom2.tar.gz
          278 kB
          Martin Tzvetanov Grigorov
        3. RestCustom.zip
          324 kB
          Timothy Simecsek
        4. patch.txt
          6 kB
          Timothy Simecsek

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            Timothy Timothy Simecsek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: