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

Maven swagger goal failed: No Session opened for this thread

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.12.1
    • 1.13.0
    • ZZZ Core: Maven Plugin
    • None

    Description

      In addition to ISIS-1315, there seems to be another problem not related to action contributions.

      As described in http://markmail.org/message/n33avio7bu6ynsi2:

      I have the same error with 1.12.1 (cf. stack trace below) while running
      in my integration test module and using the real AppManifest as
      suggested in ISIS-1295 [1] (although I had to comment out the security
      module temporarily because it led to another error) .

      I am trying to debug it and it seems like the session is already closed
      by the time IsisContext.getPersistenceSession is called in below stack.

      [ERROR] Failed to execute goal org.apache.isis.tool:isis-maven-plugin:1.12.1:swagger (default) on project message-service-integration: Execution default of goal org.apache.isis.tool:isis-maven-plugin:1.12.1:swagger failed: No Session opened for this thread -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.isis.tool:isis-maven-plugin:1.12.1:swagger (default) on project message-service-integration: Execution default of goal org.apache.isis.tool:isis-maven-plugin:1.12.1:swagger failed: No Session opened for this thread
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.apache.isis.tool:isis-maven-plugin:1.12.1:swagger failed: No Session opened for this thread
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      	... 19 more
      Caused by: java.lang.IllegalStateException: No Session opened for this thread
      	at org.apache.isis.core.runtime.system.context.IsisContext.getSession(IsisContext.java:455)
      	at org.apache.isis.core.runtime.system.context.IsisContext.getPersistenceSession(IsisContext.java:483)
      	at org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession.getPersistenceSession(RuntimeContextFromSession.java:268)
      	at org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession.access$000(RuntimeContextFromSession.java:61)
      	at org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession$2.adapterFor(RuntimeContextFromSession.java:102)
      	at org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionContributee.getServiceAdapter(ObjectActionContributee.java:328)
      	at org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionContributee.getParameters(ObjectActionContributee.java:140)
      	at org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault.getParameterTypes(ObjectActionDefault.java:209)
      	at org.apache.isis.core.metamodel.services.swagger.internal.ClassExcluder.exclude(ClassExcluder.java:44)
      	at org.apache.isis.core.metamodel.services.swagger.internal.Util$2.accept(Util.java:145)
      	at org.apache.isis.core.metamodel.services.swagger.internal.Util$2.accept(Util.java:142)
      	at org.apache.isis.applib.filter.Filters$6.apply(Filters.java:101)
      	at com.google.common.collect.Iterators$7.computeNext(Iterators.java:675)
      	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
      	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
      	at com.google.common.collect.Iterators.addAll(Iterators.java:364)
      	at com.google.common.collect.Lists.newArrayList(Lists.java:162)
      	at com.google.common.collect.Collections2$FilteredCollection.toArray(Collections2.java:215)
      	at java.util.ArrayList.addAll(ArrayList.java:577)
      	at org.apache.isis.core.metamodel.specloader.specimpl.ObjectSpecificationAbstract.getObjectActions(ObjectSpecificationAbstract.java:766)
      	at org.apache.isis.core.metamodel.services.swagger.internal.Util.actionsOf(Util.java:142)
      	at org.apache.isis.core.metamodel.services.swagger.internal.Generation.appendObjectPathsAndDefinitions(Generation.java:213)
      	at org.apache.isis.core.metamodel.services.swagger.internal.Generation.generate(Generation.java:124)
      	at org.apache.isis.core.metamodel.services.swagger.internal.SwaggerSpecGenerator.generate(SwaggerSpecGenerator.java:44)
      	at org.apache.isis.core.metamodel.services.swagger.SwaggerServiceDefault.generateSwaggerSpec(SwaggerServiceDefault.java:69)
      	at org.apache.isis.tool.mavenplugin.IsisMojoSwagger.writeSwaggerSpec(IsisMojoSwagger.java:120)
      	at org.apache.isis.tool.mavenplugin.IsisMojoSwagger.doExecute(IsisMojoSwagger.java:89)
      	at org.apache.isis.tool.mavenplugin.IsisMojoAbstract.execute(IsisMojoAbstract.java:68)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
      	... 20 more
      [DEBUG] finalizing hash of pojos
      [ERROR] 
      [DEBUG] finalizing persistence session
      

      Attachments

        Issue Links

          Activity

            People

              danhaywood Daniel Keir Haywood
              darabi Kambiz Darabi
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: