Geronimo-Devtools
  1. Geronimo-Devtools
  2. GERONIMODEVTOOLS-689

NullPointerException when publishing with Geronimo Eclipse Plugin v2.1.7

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0, 3.0_M1, 2.1.7, 3.0
    • Fix Version/s: 3.0-M2, 2.2.1, 2.1.8
    • Component/s: eclipse-plugin
    • Labels:
      None

      Description

      Hi everybody,

      I just updated to Geronimo Eclipse Plugin v2.1.7, and now I get a NullpointerException whenever I try to publish to the server:

      java.lang.NullPointerException
      at java.util.concurrent.ConcurrentHashMap.put(Unknown Source)
      at org.apache.geronimo.st.core.internal.DependencyHelper.getEnvironment(DependencyHelper.java:442)
      at org.apache.geronimo.st.core.internal.DependencyHelper.reorderModules(DependencyHelper.java:109)
      at org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate.publishModules(GeronimoServerBehaviourDelegate.java:243)
      at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:948)
      at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:775)
      at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2889)
      at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:337)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

      The project I used for testing is the one described here:
      https://cwiki.apache.org/GMOxDOC21/5-minute-tutorial-on-enterprise-application-development-with-eclipse-and-geronimo.html

      The exception disappears when switching back to 2.1.6 of the eclipse plugin

      I'm using Eclipse 3.6.1

      Any ideas?

      Martin

      1. openejb-jar.xml
        1 kB
        Han Hong Fang
      2. SampleProject.zip
        16 kB
        Han Hong Fang

        Activity

        Han Hong Fang made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Han Hong Fang added a comment -

        Released with GEP 221, so I close this JIRA.

        Show
        Han Hong Fang added a comment - Released with GEP 221, so I close this JIRA.
        Han Hong Fang made changes -
        Fix Version/s 3.0-M2 [ 12316071 ]
        Affects Version/s 3.0_M1 [ 12315176 ]
        Affects Version/s 3.0 [ 12314732 ]
        Hide
        Han Hong Fang added a comment -

        Same problem in trunk.

        Commit fix for trunk at revision 1058850

        Show
        Han Hong Fang added a comment - Same problem in trunk. Commit fix for trunk at revision 1058850
        Han Hong Fang made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Han Hong Fang added a comment -

        Change status to resolved.

        Show
        Han Hong Fang added a comment - Change status to resolved.
        Hide
        Han Hong Fang added a comment -

        commit in branch v21 at revision: 1051013

        Show
        Han Hong Fang added a comment - commit in branch v21 at revision: 1051013
        Han Hong Fang made changes -
        Fix Version/s 2.2.1 [ 12314499 ]
        Fix Version/s 2.1.8 [ 12315972 ]
        Affects Version/s 2.2.0 [ 12313331 ]
        Hide
        Han Hong Fang added a comment -

        commit for branch v22 at revision: 1051007.

        Show
        Han Hong Fang added a comment - commit for branch v22 at revision: 1051007.
        Han Hong Fang made changes -
        Assignee Delos Dai [ delos ] Han Hong Fang [ hanhongfang ]
        Han Hong Fang made changes -
        Field Original Value New Value
        Attachment SampleProject.zip [ 12466186 ]
        Attachment openejb-jar.xml [ 12466187 ]
        Hide
        Han Hong Fang added a comment -

        Attached is the export of my sample projects (including a "Utility Project"), plus the openejb-jar.xml file that I removed according to the instructions in the tutorial - it runs with GEP 2.1.6, and generates a NullpointerException in GEP 2.1.7

        Best regards,
        Martin

        Show
        Han Hong Fang added a comment - Attached is the export of my sample projects (including a "Utility Project"), plus the openejb-jar.xml file that I removed according to the instructions in the tutorial - it runs with GEP 2.1.6, and generates a NullpointerException in GEP 2.1.7 Best regards, Martin
        Hide
        Han Hong Fang added a comment -

        Hi again,

        after a little bit of debugging, it seems to me that the problem is that I've deleted ejbModule/META-INF/openejb-jar.xml in the SampleEJB project, as is suggested in

        https://cwiki.apache.org/GMOxDOC21/5-minute-tutorial-on-enterprise-application-development-with-eclipse-and-geronimo.html

        Since that file is gone, the check
        file.getName().equals(GeronimoUtils.OPENEJB_PLAN_NAME) && file.exists()
        in DependencyHelper Line 538 is false, so "environment" in DependencyHelper Line 442 is never set for the EJB project.

        Did I misread the instructions to delete ejbModule/META-INF/openejb-jar.xml?

        By the way, a NullpointerException also occurs if one adds a "Utility Project" to the EAR (since there's only handling for Web, EJB, EAR, RAR and AppClient modules).

        Maybe I'm simply misunderstanding how Geronimo works (I've been using JBoss for a long time, and have just started using Geronimo).

        Best regards,
        Martin

        Show
        Han Hong Fang added a comment - Hi again, after a little bit of debugging, it seems to me that the problem is that I've deleted ejbModule/META-INF/openejb-jar.xml in the SampleEJB project, as is suggested in https://cwiki.apache.org/GMOxDOC21/5-minute-tutorial-on-enterprise-application-development-with-eclipse-and-geronimo.html Since that file is gone, the check file.getName().equals(GeronimoUtils.OPENEJB_PLAN_NAME) && file.exists() in DependencyHelper Line 538 is false, so "environment" in DependencyHelper Line 442 is never set for the EJB project. Did I misread the instructions to delete ejbModule/META-INF/openejb-jar.xml? By the way, a NullpointerException also occurs if one adds a "Utility Project" to the EAR (since there's only handling for Web, EJB, EAR, RAR and AppClient modules). Maybe I'm simply misunderstanding how Geronimo works (I've been using JBoss for a long time, and have just started using Geronimo). Best regards, Martin
        Hide
        Han Hong Fang added a comment -

        This problem is reported on user mailing list by Martin.

        Show
        Han Hong Fang added a comment - This problem is reported on user mailing list by Martin.
        Han Hong Fang created issue -

          People

          • Assignee:
            Han Hong Fang
            Reporter:
            Han Hong Fang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development