Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1
    • Component/s: ide-integration
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Linux

    • Issuezilla Id:
      12,734

      Description

      As I've reported at this link: https://bugs.eclipse.org/bugs/process_bug.cgi

      I'm using Eclipse Helios with "GlassFish Server Open Source Edition 3 (Java EE
      6)" server adapter built by Oracle at this link:
      http://blogs.sun.com/theaquarium/entry/eclipse_3_6_helios_glassfish

      My application is an EAR project and has tree projects: EJB module, EJB client
      module and a Web module.

      Each time that I deploy my aplication in Glassfish via Eclipse I have a
      diferent error, see bellow.

      1) SEVERE: Exception in command execution : java.lang.NullPointerException
      java.lang.NullPointerException
      at
      org.glassfish.javaee.full.deployment.EarDeployer.subContext(EarDeployer.java:301)
      at
      org.glassfish.javaee.full.deployment.EarDeployer.access$100(EarDeployer.java:79)
      at
      org.glassfish.javaee.full.deployment.EarDeployer$CompositeApplicationInfo.getSubContext(EarDeployer.java:180)
      at
      org.glassfish.internal.data.ApplicationInfo.stop(ApplicationInfo.java:251)
      at
      com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:759)
      at
      com.sun.enterprise.v3.server.ApplicationLifecycle.undeploy(ApplicationLifecycle.java:790)
      at
      org.glassfish.deployment.admin.UndeployCommand.execute(UndeployCommand.java:184)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:310)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)

      2) When I try to redeploy I get this error:

      Deployment Error for module: cob: Application name cob is already in use.
      Please pick a different name.%%%EOL%%%java.lang.NullPointerException%%%EOL%%%

      3) When I stop the Glassfish and try a new start and deploy I get this other
      error:

      org.glassfish.deployment.common.DeploymentException: Error in linking security
      policy for 4)cob – Inconsistent Module State
      at
      com.sun.enterprise.security.SecurityUtil.linkPolicyFile(SecurityUtil.java:329)
      at
      com.sun.enterprise.security.SecurityDeployer.linkPolicies(SecurityDeployer.java:259)
      at
      com.sun.enterprise.security.SecurityDeployer.access$100(SecurityDeployer.java:63)
      at
      com.sun.enterprise.security.SecurityDeployer$AppDeployEventListener.event(SecurityDeployer.java:96)
      at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:125)
      at
      org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:224)
      at
      com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
      at
      com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
      at
      org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)

      4) Ok, so I try to delete GLASSFISH/domains/domain1/generated/* and start the
      Glassfish my EAR app start with success. But... the webapp throws a
      ClassNotFoundException. But all jars exists in the WEB-INF/classes. I found the
      jars in GLASSFISH/domains/domain1/eclipseApps/cob/cob-web.war/WEB-INF/lib, but
      when I visit any webpage of this application I get the GlassNotFoundException.

      This is very strange, because if I deploy the application as an EAR generate by
      eclipse via Glassfish Admin the application works fine without
      ClassNotFoundException.

      Reproducible: Sometimes

      Steps to Reproduce:
      1. Create an EAR application with an EJB, EJB-client and Dynamic Web Project.
      2. Deploy and redeploy for many times

        Activity

        Hide
        otaviosg added a comment -
        Show
        otaviosg added a comment - Oops. This is the correct link: https://bugs.eclipse.org/bugs/show_bug.cgi?id=320292
        Hide
        ludo added a comment -

        Can you attach the IDE log file as well? It might be an Eclipse issue...

        Show
        ludo added a comment - Can you attach the IDE log file as well? It might be an Eclipse issue...
        Hide
        otaviosg added a comment -

        Hi ludo. Sorry for my long delay.

        Now, after a deploy I'm getting this error:

        !ENTRY com.sun.enterprise.jst.server.sunappsrv 4 1 2010-08-21 01:54:03.112
        !MESSAGE GlassFish: publishModule kind= 1 deltaKind=0 1 cob

        !ENTRY com.sun.enterprise.jst.server.sunappsrv 4 1 2010-08-21 01:54:09.610
        !MESSAGE GlassFish: deploy is failing=
        !STACK 1
        org.eclipse.core.runtime.CoreException: Deployment Error for module: cob:
        Exception while deploying the app : java.lang.IllegalArgumentException: Invalid
        ejb jar [cob-ejb.jar]: it contains zero ejb. %%%EOL%%%Note: %%%EOL%%%1. A valid
        ejb jar requires at least one session, entity (1.x/2.x style), or message-driven
        bean. %%%EOL%%%2. EJB3+ entity beans (@Entity) are POJOs and please package them
        as library jar. %%%EOL%%%3. If the jar file contains valid EJBs which are
        annotated with EJB component level annotations (@Stateless, @Stateful,
        @MessageDriven, @Singleton), please check server.log to see whether the
        annotations were processed properly.%%%EOL%%%
        at
        com.sun.enterprise.jst.server.sunappsrv.SunAppServerBehaviour.publishDeployedDirectory(SunAppServerBehaviour.java:762)
        at
        com.sun.enterprise.jst.server.sunappsrv.SunAppServerBehaviour.publishModuleForGlassFishV3(SunAppServerBehaviour.java:598)
        at
        com.sun.enterprise.jst.server.sunappsrv.SunAppServerBehaviour.publishModule(SunAppServerBehaviour.java:288)
        at
        org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:1016)
        at
        org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:1106)
        at
        org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:939)
        at
        org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:775)
        at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2888)
        at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:337)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
        !SUBENTRY 1 com.sun.enterprise.jst.server.sunappsrv 4 0 2010-08-21 01:54:09.610
        !MESSAGE Deployment Error for module: cob: Exception while deploying the app :
        java.lang.IllegalArgumentException: Invalid ejb jar [cob-ejb.jar]: it contains
        zero ejb. %%%EOL%%%Note: %%%EOL%%%1. A valid ejb jar requires at least one
        session, entity (1.x/2.x style), or message-driven bean. %%%EOL%%%2. EJB3+
        entity beans (@Entity) are POJOs and please package them as library jar.
        %%%EOL%%%3. If the jar file contains valid EJBs which are annotated with EJB
        component level annotations (@Stateless, @Stateful, @MessageDriven, @Singleton),
        please check server.log to see whether the annotations were processed
        properly.%%%EOL%%%

        If I publish again the project, everything works correctly. Every time I publish
        into server an diferent error occurs. It's only occurs in Glassfish adapter.
        With OC4J never occurs.

        !ENTRY com.sun.enterprise.jst.server.sunappsrv 4 1 2010-08-21 02:00:55.478
        !MESSAGE GlassFish: publishModule kind= 1 deltaKind=0 2 cob

        I was open this bug in Eclipse bug tool, but the Eclipse team says that this is
        Glassfish issue. https://bugs.eclipse.org/bugs/show_bug.cgi?id=320292

        Show
        otaviosg added a comment - Hi ludo. Sorry for my long delay. Now, after a deploy I'm getting this error: !ENTRY com.sun.enterprise.jst.server.sunappsrv 4 1 2010-08-21 01:54:03.112 !MESSAGE GlassFish: publishModule kind= 1 deltaKind=0 1 cob !ENTRY com.sun.enterprise.jst.server.sunappsrv 4 1 2010-08-21 01:54:09.610 !MESSAGE GlassFish: deploy is failing= !STACK 1 org.eclipse.core.runtime.CoreException: Deployment Error for module: cob: Exception while deploying the app : java.lang.IllegalArgumentException: Invalid ejb jar [cob-ejb.jar] : it contains zero ejb. %%%EOL%%%Note: %%%EOL%%%1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message-driven bean. %%%EOL%%%2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar. %%%EOL%%%3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful, @MessageDriven, @Singleton), please check server.log to see whether the annotations were processed properly.%%%EOL%%% at com.sun.enterprise.jst.server.sunappsrv.SunAppServerBehaviour.publishDeployedDirectory(SunAppServerBehaviour.java:762) at com.sun.enterprise.jst.server.sunappsrv.SunAppServerBehaviour.publishModuleForGlassFishV3(SunAppServerBehaviour.java:598) at com.sun.enterprise.jst.server.sunappsrv.SunAppServerBehaviour.publishModule(SunAppServerBehaviour.java:288) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:1016) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:1106) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:939) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:775) at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2888) at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:337) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) !SUBENTRY 1 com.sun.enterprise.jst.server.sunappsrv 4 0 2010-08-21 01:54:09.610 !MESSAGE Deployment Error for module: cob: Exception while deploying the app : java.lang.IllegalArgumentException: Invalid ejb jar [cob-ejb.jar] : it contains zero ejb. %%%EOL%%%Note: %%%EOL%%%1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message-driven bean. %%%EOL%%%2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar. %%%EOL%%%3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful, @MessageDriven, @Singleton), please check server.log to see whether the annotations were processed properly.%%%EOL%%% If I publish again the project, everything works correctly. Every time I publish into server an diferent error occurs. It's only occurs in Glassfish adapter. With OC4J never occurs. !ENTRY com.sun.enterprise.jst.server.sunappsrv 4 1 2010-08-21 02:00:55.478 !MESSAGE GlassFish: publishModule kind= 1 deltaKind=0 2 cob I was open this bug in Eclipse bug tool, but the Eclipse team says that this is Glassfish issue. https://bugs.eclipse.org/bugs/show_bug.cgi?id=320292
        Hide
        otaviosg added a comment -

        This is the ~/workspace/.metadata/.log

        !ENTRY com.sun.enterprise.jst.server.sunappsrv 4 0 2010-08-21 02:29:59.540
        !MESSAGE cannot Deploy cob
        !STACK 1
        org.eclipse.core.runtime.CoreException: Deployment Error for module: cob:
        Application name cob is already in use. Please pick a different
        name.%%%EOL%%%java.lang.NullPointerException%%%EOL%%%
        at
        com.sun.enterprise.jst.server.sunappsrv.SunAppServerBehaviour.publishDeployedDirectory(SunAppServerBehaviour.java:762)
        at
        com.sun.enterprise.jst.server.sunappsrv.SunAppServerBehaviour.publishModuleForGlassFishV3(SunAppServerBehaviour.java:598)
        at
        com.sun.enterprise.jst.server.sunappsrv.SunAppServerBehaviour.publishModule(SunAppServerBehaviour.java:288)
        at
        org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:1016)
        at
        org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:1106)
        at
        org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:939)
        at
        org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:775)
        at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2888)
        at
        org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:337)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
        !SUBENTRY 1 com.sun.enterprise.jst.server.sunappsrv 4 0 2010-08-21 02:29:59.540
        !MESSAGE Deployment Error for module: cob: Application name cob is already in
        use. Please pick a different name.%%%EOL%%%java.lang.NullPointerException%%%EOL%%%

        229,1 Bot

        Show
        otaviosg added a comment - This is the ~/workspace/.metadata/.log !ENTRY com.sun.enterprise.jst.server.sunappsrv 4 0 2010-08-21 02:29:59.540 !MESSAGE cannot Deploy cob !STACK 1 org.eclipse.core.runtime.CoreException: Deployment Error for module: cob: Application name cob is already in use. Please pick a different name.%%%EOL%%%java.lang.NullPointerException%%%EOL%%% at com.sun.enterprise.jst.server.sunappsrv.SunAppServerBehaviour.publishDeployedDirectory(SunAppServerBehaviour.java:762) at com.sun.enterprise.jst.server.sunappsrv.SunAppServerBehaviour.publishModuleForGlassFishV3(SunAppServerBehaviour.java:598) at com.sun.enterprise.jst.server.sunappsrv.SunAppServerBehaviour.publishModule(SunAppServerBehaviour.java:288) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:1016) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:1106) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:939) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:775) at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2888) at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:337) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) !SUBENTRY 1 com.sun.enterprise.jst.server.sunappsrv 4 0 2010-08-21 02:29:59.540 !MESSAGE Deployment Error for module: cob: Application name cob is already in use. Please pick a different name.%%%EOL%%%java.lang.NullPointerException%%%EOL%%% 229,1 Bot
        Hide
        ludo added a comment -

        Can you try a possible fix described in
        https://glassfishplugins.dev.java.net/issues/show_bug.cgi?
        id=316

        It is a new plugin in a test update center

        Show
        ludo added a comment - Can you try a possible fix described in https://glassfishplugins.dev.java.net/issues/show_bug.cgi? id=316 It is a new plugin in a test update center
        Hide
        otaviosg added a comment -

        Ludo, thanks.

        I updated my plugin, and all works fine.

        Regards

        Show
        otaviosg added a comment - Ludo, thanks. I updated my plugin, and all works fine. Regards
        Hide
        ludo added a comment -

        closing this one.
        We'll track it as GLASSFISH-316 on glassfishplugins project

        Show
        ludo added a comment - closing this one. We'll track it as GLASSFISH-316 on glassfishplugins project
        Hide
        ludo added a comment -

        316

        Show
        ludo added a comment - 316

          People

          • Assignee:
            ludo
            Reporter:
            otaviosg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: