Glassfish server does not start. NullPointeException










7















I just downloaded the GlassFish 5.0 archive - Full Platform, unzipped it, I run it through the command line.




asadmin start-domain




problem:



Exception in thread "main" java.lang.NullPointerException
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.initializeServiceLocator(AbstractModulesRegistryImpl.java:152)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.newServiceLocator(AbstractModulesRegistryImpl.java:144)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:218)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:224)
at com.sun.enterprise.module.single.StaticModulesRegistry.createServiceLocator(StaticModulesRegistry.java:88)
at com.sun.enterprise.admin.cli.CLIContainer.getServiceLocator(CLIContainer.java:217)
at com.sun.enterprise.admin.cli.CLIContainer.getLocalCommand(CLIContainer.java:255)
at com.sun.enterprise.admin.cli.CLICommand.getCommand(CLICommand.java:231)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:371)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:306)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:57)


I tried to set the path in the file asenv.bat -> set path = C:/.../Java/bin - did not help. Tried so to launch: asadmin start-domain domain1 - did not help.



Installed: jdk-9.0.1 Also tried on the 8th, did not help. What to do???










share|improve this question
























  • Possible duplicate of What is a NullPointerException, and how do I fix it?

    – Digvijaysinh Gohil
    Nov 23 '17 at 14:49






  • 13





    Are you seriously?? Please read my description!

    – Aleksandr
    Nov 23 '17 at 14:53











  • I did already, that's why I'm saying Possible duplicate. Not exact

    – Digvijaysinh Gohil
    Nov 23 '17 at 14:55












  • Like @Jonathan said, GlassFish 5 in not compatible with Java 9, for my case I was using GlassFish 5.1, Clear/Uninstall java 9 from your system and install Java 8. Make sure when you type java -version on command line the response you get is java 8 and not 9

    – crakama
    Apr 2 '18 at 15:05











  • Vifier Lockla provided the solution: you just need to specify which version of Java you want to use for Glassfih or Payara. I had the same issue for Payara server.

    – moldovean
    Aug 26 '18 at 8:57
















7















I just downloaded the GlassFish 5.0 archive - Full Platform, unzipped it, I run it through the command line.




asadmin start-domain




problem:



Exception in thread "main" java.lang.NullPointerException
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.initializeServiceLocator(AbstractModulesRegistryImpl.java:152)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.newServiceLocator(AbstractModulesRegistryImpl.java:144)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:218)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:224)
at com.sun.enterprise.module.single.StaticModulesRegistry.createServiceLocator(StaticModulesRegistry.java:88)
at com.sun.enterprise.admin.cli.CLIContainer.getServiceLocator(CLIContainer.java:217)
at com.sun.enterprise.admin.cli.CLIContainer.getLocalCommand(CLIContainer.java:255)
at com.sun.enterprise.admin.cli.CLICommand.getCommand(CLICommand.java:231)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:371)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:306)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:57)


I tried to set the path in the file asenv.bat -> set path = C:/.../Java/bin - did not help. Tried so to launch: asadmin start-domain domain1 - did not help.



Installed: jdk-9.0.1 Also tried on the 8th, did not help. What to do???










share|improve this question
























  • Possible duplicate of What is a NullPointerException, and how do I fix it?

    – Digvijaysinh Gohil
    Nov 23 '17 at 14:49






  • 13





    Are you seriously?? Please read my description!

    – Aleksandr
    Nov 23 '17 at 14:53











  • I did already, that's why I'm saying Possible duplicate. Not exact

    – Digvijaysinh Gohil
    Nov 23 '17 at 14:55












  • Like @Jonathan said, GlassFish 5 in not compatible with Java 9, for my case I was using GlassFish 5.1, Clear/Uninstall java 9 from your system and install Java 8. Make sure when you type java -version on command line the response you get is java 8 and not 9

    – crakama
    Apr 2 '18 at 15:05











  • Vifier Lockla provided the solution: you just need to specify which version of Java you want to use for Glassfih or Payara. I had the same issue for Payara server.

    – moldovean
    Aug 26 '18 at 8:57














7












7








7


3






I just downloaded the GlassFish 5.0 archive - Full Platform, unzipped it, I run it through the command line.




asadmin start-domain




problem:



Exception in thread "main" java.lang.NullPointerException
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.initializeServiceLocator(AbstractModulesRegistryImpl.java:152)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.newServiceLocator(AbstractModulesRegistryImpl.java:144)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:218)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:224)
at com.sun.enterprise.module.single.StaticModulesRegistry.createServiceLocator(StaticModulesRegistry.java:88)
at com.sun.enterprise.admin.cli.CLIContainer.getServiceLocator(CLIContainer.java:217)
at com.sun.enterprise.admin.cli.CLIContainer.getLocalCommand(CLIContainer.java:255)
at com.sun.enterprise.admin.cli.CLICommand.getCommand(CLICommand.java:231)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:371)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:306)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:57)


I tried to set the path in the file asenv.bat -> set path = C:/.../Java/bin - did not help. Tried so to launch: asadmin start-domain domain1 - did not help.



Installed: jdk-9.0.1 Also tried on the 8th, did not help. What to do???










share|improve this question
















I just downloaded the GlassFish 5.0 archive - Full Platform, unzipped it, I run it through the command line.




asadmin start-domain




problem:



Exception in thread "main" java.lang.NullPointerException
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.initializeServiceLocator(AbstractModulesRegistryImpl.java:152)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.newServiceLocator(AbstractModulesRegistryImpl.java:144)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:218)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:224)
at com.sun.enterprise.module.single.StaticModulesRegistry.createServiceLocator(StaticModulesRegistry.java:88)
at com.sun.enterprise.admin.cli.CLIContainer.getServiceLocator(CLIContainer.java:217)
at com.sun.enterprise.admin.cli.CLIContainer.getLocalCommand(CLIContainer.java:255)
at com.sun.enterprise.admin.cli.CLICommand.getCommand(CLICommand.java:231)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:371)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:306)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:57)


I tried to set the path in the file asenv.bat -> set path = C:/.../Java/bin - did not help. Tried so to launch: asadmin start-domain domain1 - did not help.



Installed: jdk-9.0.1 Also tried on the 8th, did not help. What to do???







java intellij-idea nullpointerexception glassfish payara






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 26 '18 at 10:59









moldovean

1,8832324




1,8832324










asked Nov 23 '17 at 14:46









AleksandrAleksandr

3816




3816












  • Possible duplicate of What is a NullPointerException, and how do I fix it?

    – Digvijaysinh Gohil
    Nov 23 '17 at 14:49






  • 13





    Are you seriously?? Please read my description!

    – Aleksandr
    Nov 23 '17 at 14:53











  • I did already, that's why I'm saying Possible duplicate. Not exact

    – Digvijaysinh Gohil
    Nov 23 '17 at 14:55












  • Like @Jonathan said, GlassFish 5 in not compatible with Java 9, for my case I was using GlassFish 5.1, Clear/Uninstall java 9 from your system and install Java 8. Make sure when you type java -version on command line the response you get is java 8 and not 9

    – crakama
    Apr 2 '18 at 15:05











  • Vifier Lockla provided the solution: you just need to specify which version of Java you want to use for Glassfih or Payara. I had the same issue for Payara server.

    – moldovean
    Aug 26 '18 at 8:57


















  • Possible duplicate of What is a NullPointerException, and how do I fix it?

    – Digvijaysinh Gohil
    Nov 23 '17 at 14:49






  • 13





    Are you seriously?? Please read my description!

    – Aleksandr
    Nov 23 '17 at 14:53











  • I did already, that's why I'm saying Possible duplicate. Not exact

    – Digvijaysinh Gohil
    Nov 23 '17 at 14:55












  • Like @Jonathan said, GlassFish 5 in not compatible with Java 9, for my case I was using GlassFish 5.1, Clear/Uninstall java 9 from your system and install Java 8. Make sure when you type java -version on command line the response you get is java 8 and not 9

    – crakama
    Apr 2 '18 at 15:05











  • Vifier Lockla provided the solution: you just need to specify which version of Java you want to use for Glassfih or Payara. I had the same issue for Payara server.

    – moldovean
    Aug 26 '18 at 8:57

















Possible duplicate of What is a NullPointerException, and how do I fix it?

– Digvijaysinh Gohil
Nov 23 '17 at 14:49





Possible duplicate of What is a NullPointerException, and how do I fix it?

– Digvijaysinh Gohil
Nov 23 '17 at 14:49




13




13





Are you seriously?? Please read my description!

– Aleksandr
Nov 23 '17 at 14:53





Are you seriously?? Please read my description!

– Aleksandr
Nov 23 '17 at 14:53













I did already, that's why I'm saying Possible duplicate. Not exact

– Digvijaysinh Gohil
Nov 23 '17 at 14:55






I did already, that's why I'm saying Possible duplicate. Not exact

– Digvijaysinh Gohil
Nov 23 '17 at 14:55














Like @Jonathan said, GlassFish 5 in not compatible with Java 9, for my case I was using GlassFish 5.1, Clear/Uninstall java 9 from your system and install Java 8. Make sure when you type java -version on command line the response you get is java 8 and not 9

– crakama
Apr 2 '18 at 15:05





Like @Jonathan said, GlassFish 5 in not compatible with Java 9, for my case I was using GlassFish 5.1, Clear/Uninstall java 9 from your system and install Java 8. Make sure when you type java -version on command line the response you get is java 8 and not 9

– crakama
Apr 2 '18 at 15:05













Vifier Lockla provided the solution: you just need to specify which version of Java you want to use for Glassfih or Payara. I had the same issue for Payara server.

– moldovean
Aug 26 '18 at 8:57






Vifier Lockla provided the solution: you just need to specify which version of Java you want to use for Glassfih or Payara. I had the same issue for Payara server.

– moldovean
Aug 26 '18 at 8:57













3 Answers
3






active

oldest

votes


















7














OK, Glassfish 5.1 doesn't exist for the moment. Continue with Glassfish 5.0 with this solution:



Just set the AS_JAVA variable in your asenv.bat file located here: C:DEVENVglassfish5glassfishconfig.



File to edit: add last line
screenshot of code



Relaunch your server....enjoy :
screenshot of relaunch command to start your server






share|improve this answer
































    6














    This looks to be this issue - https://github.com/eclipse-ee4j/glassfish/issues/22130.



    GlassFish 5 does not work on JDK9, it may be fixed for 5.1.






    share|improve this answer

























    • Damn! What a time waster... Wasted 10 minutes trying to figure out what exactly I did wrong...

      – RestInPeace
      May 30 '18 at 15:03











    • This link has died since javaee was moved under the eclipse umbrella. Here is the new link. github.com/eclipse-ee4j/glassfish/issues/22130

      – klog
      Dec 18 '18 at 3:30


















    1














    For me it didn't work what @Vifier Lockla did. I had to change the path/glassfish5/glassfish/config/asenv.conf file in a linux mint machine. At the bottom of the file the path of the jdk 1.8, i.e.



    AS_JAVA="/usr/lib/jvm/jdk1.8.0_191"





    share|improve this answer






















      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47458119%2fglassfish-server-does-not-start-nullpointeexception%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      7














      OK, Glassfish 5.1 doesn't exist for the moment. Continue with Glassfish 5.0 with this solution:



      Just set the AS_JAVA variable in your asenv.bat file located here: C:DEVENVglassfish5glassfishconfig.



      File to edit: add last line
      screenshot of code



      Relaunch your server....enjoy :
      screenshot of relaunch command to start your server






      share|improve this answer





























        7














        OK, Glassfish 5.1 doesn't exist for the moment. Continue with Glassfish 5.0 with this solution:



        Just set the AS_JAVA variable in your asenv.bat file located here: C:DEVENVglassfish5glassfishconfig.



        File to edit: add last line
        screenshot of code



        Relaunch your server....enjoy :
        screenshot of relaunch command to start your server






        share|improve this answer



























          7












          7








          7







          OK, Glassfish 5.1 doesn't exist for the moment. Continue with Glassfish 5.0 with this solution:



          Just set the AS_JAVA variable in your asenv.bat file located here: C:DEVENVglassfish5glassfishconfig.



          File to edit: add last line
          screenshot of code



          Relaunch your server....enjoy :
          screenshot of relaunch command to start your server






          share|improve this answer















          OK, Glassfish 5.1 doesn't exist for the moment. Continue with Glassfish 5.0 with this solution:



          Just set the AS_JAVA variable in your asenv.bat file located here: C:DEVENVglassfish5glassfishconfig.



          File to edit: add last line
          screenshot of code



          Relaunch your server....enjoy :
          screenshot of relaunch command to start your server







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jul 28 '18 at 10:53









          ascripter

          2,29851932




          2,29851932










          answered Jul 28 '18 at 10:25









          Vifier LocklaVifier Lockla

          9112




          9112























              6














              This looks to be this issue - https://github.com/eclipse-ee4j/glassfish/issues/22130.



              GlassFish 5 does not work on JDK9, it may be fixed for 5.1.






              share|improve this answer

























              • Damn! What a time waster... Wasted 10 minutes trying to figure out what exactly I did wrong...

                – RestInPeace
                May 30 '18 at 15:03











              • This link has died since javaee was moved under the eclipse umbrella. Here is the new link. github.com/eclipse-ee4j/glassfish/issues/22130

                – klog
                Dec 18 '18 at 3:30















              6














              This looks to be this issue - https://github.com/eclipse-ee4j/glassfish/issues/22130.



              GlassFish 5 does not work on JDK9, it may be fixed for 5.1.






              share|improve this answer

























              • Damn! What a time waster... Wasted 10 minutes trying to figure out what exactly I did wrong...

                – RestInPeace
                May 30 '18 at 15:03











              • This link has died since javaee was moved under the eclipse umbrella. Here is the new link. github.com/eclipse-ee4j/glassfish/issues/22130

                – klog
                Dec 18 '18 at 3:30













              6












              6








              6







              This looks to be this issue - https://github.com/eclipse-ee4j/glassfish/issues/22130.



              GlassFish 5 does not work on JDK9, it may be fixed for 5.1.






              share|improve this answer















              This looks to be this issue - https://github.com/eclipse-ee4j/glassfish/issues/22130.



              GlassFish 5 does not work on JDK9, it may be fixed for 5.1.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Dec 21 '18 at 10:10

























              answered Nov 23 '17 at 15:04









              Jonathan CoustickJonathan Coustick

              751214




              751214












              • Damn! What a time waster... Wasted 10 minutes trying to figure out what exactly I did wrong...

                – RestInPeace
                May 30 '18 at 15:03











              • This link has died since javaee was moved under the eclipse umbrella. Here is the new link. github.com/eclipse-ee4j/glassfish/issues/22130

                – klog
                Dec 18 '18 at 3:30

















              • Damn! What a time waster... Wasted 10 minutes trying to figure out what exactly I did wrong...

                – RestInPeace
                May 30 '18 at 15:03











              • This link has died since javaee was moved under the eclipse umbrella. Here is the new link. github.com/eclipse-ee4j/glassfish/issues/22130

                – klog
                Dec 18 '18 at 3:30
















              Damn! What a time waster... Wasted 10 minutes trying to figure out what exactly I did wrong...

              – RestInPeace
              May 30 '18 at 15:03





              Damn! What a time waster... Wasted 10 minutes trying to figure out what exactly I did wrong...

              – RestInPeace
              May 30 '18 at 15:03













              This link has died since javaee was moved under the eclipse umbrella. Here is the new link. github.com/eclipse-ee4j/glassfish/issues/22130

              – klog
              Dec 18 '18 at 3:30





              This link has died since javaee was moved under the eclipse umbrella. Here is the new link. github.com/eclipse-ee4j/glassfish/issues/22130

              – klog
              Dec 18 '18 at 3:30











              1














              For me it didn't work what @Vifier Lockla did. I had to change the path/glassfish5/glassfish/config/asenv.conf file in a linux mint machine. At the bottom of the file the path of the jdk 1.8, i.e.



              AS_JAVA="/usr/lib/jvm/jdk1.8.0_191"





              share|improve this answer



























                1














                For me it didn't work what @Vifier Lockla did. I had to change the path/glassfish5/glassfish/config/asenv.conf file in a linux mint machine. At the bottom of the file the path of the jdk 1.8, i.e.



                AS_JAVA="/usr/lib/jvm/jdk1.8.0_191"





                share|improve this answer

























                  1












                  1








                  1







                  For me it didn't work what @Vifier Lockla did. I had to change the path/glassfish5/glassfish/config/asenv.conf file in a linux mint machine. At the bottom of the file the path of the jdk 1.8, i.e.



                  AS_JAVA="/usr/lib/jvm/jdk1.8.0_191"





                  share|improve this answer













                  For me it didn't work what @Vifier Lockla did. I had to change the path/glassfish5/glassfish/config/asenv.conf file in a linux mint machine. At the bottom of the file the path of the jdk 1.8, i.e.



                  AS_JAVA="/usr/lib/jvm/jdk1.8.0_191"






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 14 '18 at 9:05









                  Symeon MattesSymeon Mattes

                  359117




                  359117



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47458119%2fglassfish-server-does-not-start-nullpointeexception%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      這個網誌中的熱門文章

                      Barbados

                      How to read a connectionString WITH PROVIDER in .NET Core?

                      Node.js Script on GitHub Pages or Amazon S3