glassfish
  1. glassfish
  2. GLASSFISH-20871

Using embedded glassfish with Java EE 7 web profile

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I have tried using embedded glassfish to achieve Java EE 7 web profile.

      <plugin>
      <groupId>org.glassfish.embedded</groupId>
      <artifactId>maven-embedded-glassfish-plugin</artifactId>
      <version>3.1.2.2</version>
      <configuration>
      <app>$

      {project.build.directory}\${project.build.finalName}.ear</app>
      <fileName>${project.build.directory}

      \$

      {project.build.finalName}

      .ear</fileName>
      <name>myportal</name>
      <ports>
      <http-listener>8282</http-listener>
      <https-listener>8383</https-listener>
      </ports>
      </configuration>
      <dependencies>
      <dependency>
      <groupId>org.glassfish.main.common</groupId>
      <artifactId>simple-glassfish-api</artifactId>
      <version>4.0</version>
      </dependency>
      <dependency>
      <groupId>org.glassfish.main.extras</groupId>
      <artifactId>glassfish-embedded-all</artifactId>
      <version>4.0</version>
      </dependency>
      </dependencies>
      </plugin>

      Received the following error, help me how to successfully deploy my ear. I have been struggling to deploy java ee 7 ear in embedded glassfish.

      Oct 24, 2013 10:08:37 PM PluginUtil doUndeploy
      WARNING: Unable to undeploy myportal. Exception = No runtime builder available for this configuration:

      {GlassFish_Platform=Static}

      null
      Hit ENTER to redeploy, X to exit

        Activity

        Hide
        anemdhana added a comment -

        I run mvn clean package embedded-glassfish:run

        Show
        anemdhana added a comment - I run mvn clean package embedded-glassfish:run
        Hide
        Romain Grécourt added a comment -

        Can you run with -e and share the stack trace ?

        Show
        Romain Grécourt added a comment - Can you run with -e and share the stack trace ?
        Hide
        anemdhana added a comment - - edited

        no stacktrace I seen with -e, same output.
        I noticed this, I removed <depdendencies> section from the <plugin>, and it works, looks like I should not use glassfish embedded api version 4.0.
        But, still I am getting the following errors when I hit 'Enter' to redeploy.

        Am I doing correctly, I need to ensure I deployed in Java EE 7 web profile, pls guide me.

        WARNING: DPL8031: Ignoring myportal-web_war/ because the containing archive C:\Users\Dhana\AppData\Local\Temp\gfembed7938430606564918903tmp\applications\myportal recorded it as a pre-existing stale file
        Oct 25, 2013 8:57:53 AM com.sun.enterprise.deploy.shared.FileArchive$StaleFileManagerImpl isEntryValid
        WARNING: DPL8031: Ignoring myportal-web_war/ because the containing archive C:\Users\Dhana\AppData\Local\Temp\gfembed7938430606564918903tmp\applications\myportal recorded it as a pre-existing stale file
        Oct 25, 2013 8:57:53 AM com.sun.enterprise.deploy.shared.FileArchive$StaleFileManagerImpl isEntryValid
        WARNING: DPL8031: Ignoring myportal-web_war/ because the containing archive C:\Users\Dhana\AppData\Local\Temp\gfembed7938430606564918903tmp\applications\myportal recorded it as a pre-existing stale file
        Oct 25, 2013 8:57:53 AM org.glassfish.api.ActionReport failure
        SEVERE: Exception while deploying the app [myportal]
        Oct 25, 2013 8:57:53 AM com.sun.enterprise.v3.server.ApplicationLifecycle deploy
        SEVERE: Could not find sub module [myportal-web.war] as defined in application.xml
        java.lang.IllegalArgumentException: Could not find sub module [myportal-web.war] as defined in application.xml
        at com.sun.enterprise.deployment.archivist.ApplicationArchivist.readModulesDescriptors(ApplicationArchivist.java:585)
        at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:258)
        at com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:240)
        at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:175)
        at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:94)

        Show
        anemdhana added a comment - - edited no stacktrace I seen with -e, same output. I noticed this, I removed <depdendencies> section from the <plugin>, and it works, looks like I should not use glassfish embedded api version 4.0. But, still I am getting the following errors when I hit 'Enter' to redeploy. Am I doing correctly, I need to ensure I deployed in Java EE 7 web profile, pls guide me. WARNING: DPL8031: Ignoring myportal-web_war/ because the containing archive C:\Users\Dhana\AppData\Local\Temp\gfembed7938430606564918903tmp\applications\myportal recorded it as a pre-existing stale file Oct 25, 2013 8:57:53 AM com.sun.enterprise.deploy.shared.FileArchive$StaleFileManagerImpl isEntryValid WARNING: DPL8031: Ignoring myportal-web_war/ because the containing archive C:\Users\Dhana\AppData\Local\Temp\gfembed7938430606564918903tmp\applications\myportal recorded it as a pre-existing stale file Oct 25, 2013 8:57:53 AM com.sun.enterprise.deploy.shared.FileArchive$StaleFileManagerImpl isEntryValid WARNING: DPL8031: Ignoring myportal-web_war/ because the containing archive C:\Users\Dhana\AppData\Local\Temp\gfembed7938430606564918903tmp\applications\myportal recorded it as a pre-existing stale file Oct 25, 2013 8:57:53 AM org.glassfish.api.ActionReport failure SEVERE: Exception while deploying the app [myportal] Oct 25, 2013 8:57:53 AM com.sun.enterprise.v3.server.ApplicationLifecycle deploy SEVERE: Could not find sub module [myportal-web.war] as defined in application.xml java.lang.IllegalArgumentException: Could not find sub module [myportal-web.war] as defined in application.xml at com.sun.enterprise.deployment.archivist.ApplicationArchivist.readModulesDescriptors(ApplicationArchivist.java:585) at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:258) at com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:240) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:175) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:94)
        Hide
        marina vatkina added a comment -

        you can't deploy an ear file on a web profile

        Show
        marina vatkina added a comment - you can't deploy an ear file on a web profile
        Hide
        anemdhana added a comment -

        Sorry, my question is not clear,Maven Embedded glassfish plugin is able to deploy the ear, testing ui(jsf), the only minor issue noticed is unable to redeploy which i get the exception mentioned in my previous comment.

        Show
        anemdhana added a comment - Sorry, my question is not clear,Maven Embedded glassfish plugin is able to deploy the ear, testing ui(jsf), the only minor issue noticed is unable to redeploy which i get the exception mentioned in my previous comment.
        Hide
        anemdhana added a comment -

        Pls consider closing this bug, it works, alternatively i preferred to choose wtp feature and able to deploy in an installed glassfish, but, for even jsf pages it needs to be repubished, can't this be avoided,i.e, achieve hot deployment ?

        Show
        anemdhana added a comment - Pls consider closing this bug, it works, alternatively i preferred to choose wtp feature and able to deploy in an installed glassfish, but, for even jsf pages it needs to be repubished, can't this be avoided,i.e, achieve hot deployment ?
        Hide
        Romain Grécourt added a comment -

        Closing as per user's request

        Show
        Romain Grécourt added a comment - Closing as per user's request

          People

          • Assignee:
            Unassigned
            Reporter:
            anemdhana
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: