Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-1601

Cannot deploy OSGi webapp bundle with *.war suffix

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.1.0.Beta1
    • 7.0.0.Final, 7.0.1.Final
    • OSGi, Web
    • None

    Description

      Impossible to deploy OSGi war bundle. The same war bundle deploys perfectly in eclipse Virgo server. I get the following when I try to deploy my war:

      14:37:46,065 INFO [org.jboss.as.server.deployment] (MSC service thread 1-12) Starting deployment of "inputstream:aps-admin-web-1.0.0.war"
      14:37:47,129 INFO [org.jboss.as.jpa] (MSC service thread 1-5) added javax.persistence.api dependency to inputstream:aps-admin-web-1.0.0.war
      14:37:47,131 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."inputstream:aps-admin-web-1.0.0.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."inputstream:aps-admin-web-1.0.0.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "inputstream:aps-admin-web-1.0.0.war"
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
      at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]
      at java.lang.Thread.run(Thread.java:680) [:1.6.0_26]
      Caused by: java.lang.NullPointerException
      at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.deploy(BusinessViewAnnotationProcessor.java:72)
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
      ... 5 more

      14:37:47,134 INFO [org.jboss.as.server.controller] (pool-3-thread-1) Deployment of "inputstream:aps-admin-web-1.0.0.war" was rolled back with failure message {"Failed services" => {"jboss.deployment.unit.\"inputstream:aps-admin-web-1.0.0.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"inputstream:aps-admin-web-1.0.0.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"inputstream:aps-admin-web-1.0.0.war\""}}
      14:37:47,143 INFO [org.jboss.as.server.deployment] (MSC service thread 1-9) Stopped deployment inputstream:aps-admin-web-1.0.0.war in 8ms
      14:37:47,147 WARN [/] (Background Install /var/folders/3l/2n_xhr7s6ksc_bddrvl1hthm0000gn/T/install6377037636958039788.tmp) %bundles.pluginTitle: Cannot install or update bundle from /var/folders/3l/2n_xhr7s6ksc_bddrvl1hthm0000gn/T/install6377037636958039788.tmp: org.osgi.framework.BundleException: Cannot deploy bundle: [aps-admin-web:1.0.0,location=inputstream:aps-admin-web-1.0.0.war]
      at org.jboss.as.osgi.service.BundleInstallProviderIntegration.installBundle(BundleInstallProviderIntegration.java:120)
      at org.jboss.osgi.framework.internal.AbstractBundleContext.installBundle(AbstractBundleContext.java:211)
      at org.jboss.osgi.framework.internal.AbstractBundleContext.installBundleInternal(AbstractBundleContext.java:189)
      at org.jboss.osgi.framework.internal.AbstractBundleContext.installBundle(AbstractBundleContext.java:125)
      at org.apache.felix.webconsole.internal.core.InstallHelper.doRun(InstallHelper.java:54) [InstallHelper.class:]
      at org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.doRun(BaseUpdateInstallHelper.java:89) [BaseUpdateInstallHelper.class:]
      at org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.run(BaseUpdateInstallHelper.java:121) [BaseUpdateInstallHelper.class:]
      at java.lang.Thread.run(Thread.java:680) [:1.6.0_26]
      Caused by: java.lang.Exception: {"Failed services" => {"jboss.deployment.unit.\"inputstream:aps-admin-web-1.0.0.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"inputstream:aps-admin-web-1.0.0.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"inputstream:aps-admin-web-1.0.0.war\""}}
      at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getActionResult(ServerDeploymentPlanResultFuture.java:99)
      at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getResultFromNode(ServerDeploymentPlanResultFuture.java:88)
      at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.get(ServerDeploymentPlanResultFuture.java:70)
      at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.get(ServerDeploymentPlanResultFuture.java:42)
      at org.jboss.as.osgi.service.BundleInstallProviderIntegration.executeDeploymentPlan(BundleInstallProviderIntegration.java:144)
      at org.jboss.as.osgi.service.BundleInstallProviderIntegration.installBundle(BundleInstallProviderIntegration.java:113)
      ... 7 more

      The bundle manifest looks like this:
      Manifest-Version: 1.0
      Embed-Directory: lib
      Bundle-ClassPath: WEB-INF/classes
      Built-By: tommy
      Tool: Bnd-1.43.0
      Bundle-Name: APS Administration Web
      Created-By: Apache Maven Bundle Plugin
      Web-ContextPath: apsadminweb
      Build-Jdk: 1.6.0_26
      Bundle-Version: 1.0.0
      Bnd-LastModified: 1313841491925
      Bundle-ManifestVersion: 2
      Bundle-Activator: osgi.aps.apsadminweb.APSAdminWebActivator
      Bundle-License: http://www.apache.org/licenses/LICENSE-2.0
      Bundle-Description: APS Administration Web
      Bundle-SymbolicName: aps-admin-web
      Import-Package: org.osgi.framework;version="[1.5,2)",org.osgi.service.
      log;version="[1.3,2)",org.osgi.util.tracker;version="[1.4,2)",se.bilt
      more.osgi.aps.api.core.tools;version="[1.0,2)"
      Embed-Dependency: *;scope=compile

      All that is included in the war in addition to the activator is and index.jsp that looks like this:
      ----------------------------------
      <%@page contentType="text/html" pageEncoding="UTF-8"%>
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/loose.dtd">

      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>JSP Page</title>
      </head>
      <body>
      <h1>Hello World!</h1>
      </body>
      </html>
      ----------------------------------

      In other words, this is an extremely simple war bundle that I made for testing war bundle deploy. The activator does nothing yet. It has empty start(...) and stop(...) methods. Therefore I find the following line from the stack trace above interesting:

      org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.deploy(BusinessViewAnnotationProcessor.java:72)

      It is a simple war with a single jsp page, so why is it trying to do ejb3 depployment ? And also it is not the full server I'm running, only the web profile, which as far as I know should not contain ejb3.

      All I have done in the configuration (standalone) is to change start level from 1 to 3, and change osgi from lazy to eager.

      As I said above this war file deploys perfectly in the Virgo server and I can bring up http://localhost:8080/apsadminweb in the browser and get the "Hello World!". Thereby I feel that my simple war is correct.

      As another test I tried to deploy one of the war bundles that came with the Virgo server and it resulted in exactly the same stack trace as above.

      Attachments

        Issue Links

          Activity

            People

              tdiesler@redhat.com Thomas Diesler
              tommybs Tommy Svensson (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: