The code needs to handle the case when the db. entry is not present. It should fall back on some default value.
-Koushik On 21-Jul-2013, at 12:38 AM, Min Chen <min.c...@citrix.com> wrote: > Thanks Vijay. I just figured out that trick myself:) I will check in a fix > to 4.2, seems that he forgot to seed this config value in > schema410to420.sql. > > -min > > On 7/20/13 12:05 PM, "Vijayendra Bhamidipati" > <vijayendra.bhamidip...@citrix.com> wrote: > >> Hi Min, >> >> Yes it's due to Frank's changes that went into >> 0633608f8035f8f409c271fc6e7548699a63d366 on master (and >> a5ee39a54a8574b030655916d6156d049c99009c on 4.2). He introduced a new >> global configuration variable ucs.sync.blade.interval. So to not run into >> this error, either redeploy your db or insert a row in the configuration >> table manually and then bring up your server. Here's the entry in >> Config.java: >> >> UCSSyncBladeInterval("Advanced", ManagementServer.class, Integer.class, >> "ucs.sync.blade.interval", "3600", "the interval cloudstack sync with UCS >> manager for available blades in case user remove blades from chassis >> without notifying CloudStack", null); >> >> So doing: >> >> mysql> insert into configuration values("Advanced", "DEFAULT", >> "management-server", "ucs.sync.blade.interval", "3600", "the interval >> cloudstack sync with UCS manager for available blades in case user remove >> blades from chassis without notifying CloudStack"); >> Query OK, 1 row affected (0.04 sec) >> >> Should fix this.. on my tree I'm still at one commit behind Frank's. >> >> >> Cheers! >> Regards, >> Vijay >> >> >> >> -----Original Message----- >> From: Min Chen [mailto:min.c...@citrix.com] >> Sent: Saturday, July 20, 2013 11:57 AM >> To: dev@cloudstack.apache.org >> Cc: Frank Zhang >> Subject: Error to start MS on 4.2 >> >> Hi there, >> >> Anybody encounter this issue in starting MS on latest 4.2 branch? >> >> INFO [utils.component.ComponentContext] (Timer-2:) Starting >> com.cloud.ucs.manager.UcsManagerImpl >> ERROR [utils.component.ComponentContext] (Timer-2:) Unhandled exception >> java.lang.NumberFormatException: null >> at java.lang.Integer.parseInt(Integer.java:417) >> at java.lang.Integer.valueOf(Integer.java:554) >> at com.cloud.ucs.manager.UcsManagerImpl.start(UcsManagerImpl.java:178) >> at >> com.cloud.utils.component.ComponentContext.initComponentsLifeCycle(Compone >> ntContext.java:135) >> at >> com.cloud.servlet.CloudStartupServlet$1.run(CloudStartupServlet.java:50) >> at java.util.TimerThread.mainLoop(Timer.java:512) >> at java.util.TimerThread.run(Timer.java:462) >> Exception in thread "Timer-2" java.lang.RuntimeException: Unable to start >> com.cloud.ucs.manager.UcsManagerImpl >> at >> com.cloud.utils.component.ComponentContext.initComponentsLifeCycle(Compone >> ntContext.java:141) >> at >> com.cloud.servlet.CloudStartupServlet$1.run(CloudStartupServlet.java:50) >> at java.util.TimerThread.mainLoop(Timer.java:512) >> at java.util.TimerThread.run(Timer.java:462) >> Caused by: java.lang.NumberFormatException: null at >> java.lang.Integer.parseInt(Integer.java:417) >> at java.lang.Integer.valueOf(Integer.java:554) >> at com.cloud.ucs.manager.UcsManagerImpl.start(UcsManagerImpl.java:178) >> at >> com.cloud.utils.component.ComponentContext.initComponentsLifeCycle(Compone >> ntContext.java:135) >> ... 3 more >> >> CC Frank here to see if he knows any recent change on UcsManagerImpl. >> >> Thanks >> -min >