java.lang.NullPointerException: null

JIRA | Sam Weaver | 3 years ago
  1. 0

    I have another bug for you. I wanted to use a replicaset for mms db and backup db and got problems. Here are my mongodb uris: #mongo.mongoUri=mongodb://lkisdevld007.lkis.local:27100,lkisdevld008.lkis.local:27100/ mongo.mongoUri=mongodb://172.20.2.190:27100,172.20.2.191:27100/ mongo.replicaSet=mmsdb # #################################### # The backupdb # Required to enable backup mongo.backupdb.mongoUri=mongodb://lkisdevld009.lkis.local:27100,lkisdevld010.lkis.local:27100/ mongo.backupdb.replicaSet=backup_blockstore_1 That's the error I get in the mms0.log. Migrations are fine with the uris and backup https server too. Can you please urgently advice how to use replicasets in the mms server. The error from the mms0.log is: {code} 05-08-2014 12:02:44 [main] INFO ServerMain:263 - Starting mms... LoginService=HashLoginService[null] identityService=org.eclipse.jetty.security.DefaultIdentityService@102ad1f0 05-08-2014 12:02:44 [main] INFO AppConfig:45 - Starting app for env: hosted 05-08-2014 12:02:46 [main] WARN WebAppContext:501 - Failed startup of context o.e.j.w.WebAppContext{/,file:/opt/mongodb/mms/tmp/mms-jetty-tmp-0/webapp/},jar:file:/opt/mongodb/mms/classes/mms.jar!/webapp-mms java.lang.IllegalStateException: Injector failed: Failure during replset configuration check of: Config{loadBalance=false, encryptedCredentials=false, dbName='mmsdbprovisioning', replSetName='mmsdb', uri=mongodb://172.20.2.190:27100,172.20.2.191:27100/} at com.xgen.svc.core.AppConfig.getInjector(AppConfig.java:55) ~[mms.jar:1.4.1.62] at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:45) ~[guice-servlet-3.0.jar:na] at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:771) ~[jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424) ~[jetty-servlet-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:763) ~[jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249) ~[jetty-servlet-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) ~[jetty-webapp-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706) ~[jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492) ~[jetty-webapp-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) [jetty-util-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) [jetty-util-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.server.Server.doStart(Server.java:277) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) [jetty-util-8.1.8.v20121106.jar:8.1.8.v20121106] at com.xgen.svc.core.ServerMain.start(ServerMain.java:313) [mms.jar:1.4.1.62] at com.xgen.svc.core.ServerMain.main(ServerMain.java:224) [mms.jar:1.4.1.62] Caused by: java.lang.IllegalStateException: Failure during replset configuration check of: Config{loadBalance=false, encryptedCredentials=false, dbName='mmsdbprovisioning', replSetName='mmsdb', uri=mongodb://172.20.2.190:27100,172.20.2.191:27100/} at com.xgen.svc.mms.MmsAppInvariantUtils.assertReplicaSetConfiguration(MmsAppInvariantUtils.java:141) ~[mms.jar:1.4.1.62] at com.xgen.svc.mms.MmsAppConfig.initGuiceModules(MmsAppConfig.java:35) ~[mms.jar:1.4.1.62] at com.xgen.svc.core.AppConfig.getInjector(AppConfig.java:47) ~[mms.jar:1.4.1.62] ... 16 common frames omitted Caused by: java.lang.IllegalStateException: Invalid replica set configuration: at least 3 nodes required: mongodb://172.20.2.190:27100,172.20.2.191:27100/ at com.xgen.svc.mms.MmsAppInvariantUtils.ensureReplicaSet(MmsAppInvariantUtils.java:167) ~[mms.jar:1.4.1.62] at com.xgen.svc.mms.MmsAppInvariantUtils.assertReplicaSetConfiguration(MmsAppInvariantUtils.java:138) ~[mms.jar:1.4.1.62] ... 18 common frames omitted 05-08-2014 12:02:46 [main] ERROR ServerMain:239 - Cannot start mms server [FATAL-EXITING] - instance: 0 - msg: null java.lang.NullPointerException: null at com.xgen.svc.core.AppConfig.getInstance(AppConfig.java:64) ~[mms.jar:1.4.1.62] at com.xgen.svc.core.ServerMain.start(ServerMain.java:324) ~[mms.jar:1.4.1.62] at com.xgen.svc.core.ServerMain.main(ServerMain.java:224) ~[mms.jar:1.4.1.62] 05-08-2014 12:02:50 [Thread-1] WARN QueuedThreadPool:145 - 192 threads could not be stopped {code} I switched from servernames to ips to see if thats the reason but it doesn't help.

    JIRA | 3 years ago | Sam Weaver
    java.lang.NullPointerException: null
  2. 0

    I have another bug for you. I wanted to use a replicaset for mms db and backup db and got problems. Here are my mongodb uris: #mongo.mongoUri=mongodb://lkisdevld007.lkis.local:27100,lkisdevld008.lkis.local:27100/ mongo.mongoUri=mongodb://172.20.2.190:27100,172.20.2.191:27100/ mongo.replicaSet=mmsdb # #################################### # The backupdb # Required to enable backup mongo.backupdb.mongoUri=mongodb://lkisdevld009.lkis.local:27100,lkisdevld010.lkis.local:27100/ mongo.backupdb.replicaSet=backup_blockstore_1 That's the error I get in the mms0.log. Migrations are fine with the uris and backup https server too. Can you please urgently advice how to use replicasets in the mms server. The error from the mms0.log is: {code} 05-08-2014 12:02:44 [main] INFO ServerMain:263 - Starting mms... LoginService=HashLoginService[null] identityService=org.eclipse.jetty.security.DefaultIdentityService@102ad1f0 05-08-2014 12:02:44 [main] INFO AppConfig:45 - Starting app for env: hosted 05-08-2014 12:02:46 [main] WARN WebAppContext:501 - Failed startup of context o.e.j.w.WebAppContext{/,file:/opt/mongodb/mms/tmp/mms-jetty-tmp-0/webapp/},jar:file:/opt/mongodb/mms/classes/mms.jar!/webapp-mms java.lang.IllegalStateException: Injector failed: Failure during replset configuration check of: Config{loadBalance=false, encryptedCredentials=false, dbName='mmsdbprovisioning', replSetName='mmsdb', uri=mongodb://172.20.2.190:27100,172.20.2.191:27100/} at com.xgen.svc.core.AppConfig.getInjector(AppConfig.java:55) ~[mms.jar:1.4.1.62] at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:45) ~[guice-servlet-3.0.jar:na] at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:771) ~[jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424) ~[jetty-servlet-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:763) ~[jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249) ~[jetty-servlet-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) ~[jetty-webapp-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706) ~[jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492) ~[jetty-webapp-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) [jetty-util-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) [jetty-util-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.server.Server.doStart(Server.java:277) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) [jetty-util-8.1.8.v20121106.jar:8.1.8.v20121106] at com.xgen.svc.core.ServerMain.start(ServerMain.java:313) [mms.jar:1.4.1.62] at com.xgen.svc.core.ServerMain.main(ServerMain.java:224) [mms.jar:1.4.1.62] Caused by: java.lang.IllegalStateException: Failure during replset configuration check of: Config{loadBalance=false, encryptedCredentials=false, dbName='mmsdbprovisioning', replSetName='mmsdb', uri=mongodb://172.20.2.190:27100,172.20.2.191:27100/} at com.xgen.svc.mms.MmsAppInvariantUtils.assertReplicaSetConfiguration(MmsAppInvariantUtils.java:141) ~[mms.jar:1.4.1.62] at com.xgen.svc.mms.MmsAppConfig.initGuiceModules(MmsAppConfig.java:35) ~[mms.jar:1.4.1.62] at com.xgen.svc.core.AppConfig.getInjector(AppConfig.java:47) ~[mms.jar:1.4.1.62] ... 16 common frames omitted Caused by: java.lang.IllegalStateException: Invalid replica set configuration: at least 3 nodes required: mongodb://172.20.2.190:27100,172.20.2.191:27100/ at com.xgen.svc.mms.MmsAppInvariantUtils.ensureReplicaSet(MmsAppInvariantUtils.java:167) ~[mms.jar:1.4.1.62] at com.xgen.svc.mms.MmsAppInvariantUtils.assertReplicaSetConfiguration(MmsAppInvariantUtils.java:138) ~[mms.jar:1.4.1.62] ... 18 common frames omitted 05-08-2014 12:02:46 [main] ERROR ServerMain:239 - Cannot start mms server [FATAL-EXITING] - instance: 0 - msg: null java.lang.NullPointerException: null at com.xgen.svc.core.AppConfig.getInstance(AppConfig.java:64) ~[mms.jar:1.4.1.62] at com.xgen.svc.core.ServerMain.start(ServerMain.java:324) ~[mms.jar:1.4.1.62] at com.xgen.svc.core.ServerMain.main(ServerMain.java:224) ~[mms.jar:1.4.1.62] 05-08-2014 12:02:50 [Thread-1] WARN QueuedThreadPool:145 - 192 threads could not be stopped {code} I switched from servernames to ips to see if thats the reason but it doesn't help.

    JIRA | 3 years ago | Sam Weaver
    java.lang.NullPointerException: null
  3. 0
    Elasticsearch 1.x and 2.x nodes are not compatible, make sure your setup contains nodes of the same major version.
    via GitHub by dakrone
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    It is a JDK bug, no workaround currently.
    via GitHub by jroper
  6. 0
    Some of the parametes ar enull

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      null

      at com.xgen.svc.core.AppConfig.getInstance()
    2. com.xgen.svc
      ServerMain.main
      1. com.xgen.svc.core.AppConfig.getInstance(AppConfig.java:64)[mms.jar:1.4.1.62]
      2. com.xgen.svc.core.ServerMain.start(ServerMain.java:324)[mms.jar:1.4.1.62]
      3. com.xgen.svc.core.ServerMain.main(ServerMain.java:224)[mms.jar:1.4.1.62]
      3 frames