<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Bryan,<div><br></div><div>I've applied and tested the PATCH and still does not work.</div><div><br></div><div>Here is the console output:</div><div><br></div><div><div> -> [chipiron04, Domain-0, XenTest, XenTest2, chipiron03]</div><div>Dec 15, 2009 9:49:14 AM net.emotivecloud.virtmonitor.VirtMonitor getCPUPriority</div><div>SEVERE:  Error: getting CPU priority of "XenTest".class java.lang.NullPointerException</div><div>java.lang.NullPointerException</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>at org.libvirt.SchedParameter.create(Unknown Source)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>at org.libvirt.Domain.getSchedulerParameters(Unknown Source)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>at net.emotivecloud.virtmonitor.VirtMonitor.getCPUPriority(VirtMonitor.java:495)</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>at net.emotivecloud.virtmonitor.VirtMonitor.main(VirtMonitor.java:775)</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>at java.lang.reflect.Method.invoke(Method.java:616)</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>at java.lang.Thread.run(Thread.java:636)</div><div>-1</div><div>Dec 15, 2009 9:49:14 AM net.emotivecloud.virtmonitor.VirtMonitor getCPUCapacity</div><div>SEVERE:  Error: getting CPU capacity of "XenTest".</div><div>java.lang.NullPointerException</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>at org.libvirt.SchedParameter.create(Unknown Source)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>at org.libvirt.Domain.getSchedulerParameters(Unknown Source)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>at net.emotivecloud.virtmonitor.VirtMonitor.getCPUCapacity(VirtMonitor.java:470)</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>at net.emotivecloud.virtmonitor.VirtMonitor.main(VirtMonitor.java:776)</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>at java.lang.reflect.Method.invoke(Method.java:616)</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>at java.lang.Thread.run(Thread.java:636)</div><div>-1</div><div><br></div><div><br></div><div>Bot GetCPUCapacity and GetCPUPriority use the schedparameter type. Here is the code and the main. </div><div><br></div><div>getDomain method just returns the domain object itself <font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px;">and I've also tested it's not null value at this point of the code:</span></font></div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span style="color: #961a65"><span class="Apple-tab-span" style="white-space:pre">  </span>public</span> <span style="color: #961a65">int</span> getCPUCapacity(String name) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">          </span><span style="color: #961a65">int</span> ret = -1;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">           </span><span style="color: #961a65">try</span> {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                  </span>Domain d = getDomain(name);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                      </span>SchedParameter[] pars= d.getSchedulerParameters();</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span class="Apple-tab-span" style="white-space:pre">                  </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                      </span><span style="color: #961a65">for</span> (SchedParameter pri : pars) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                              </span><span style="color: #961a65">if</span> (pri.<span style="color: #032fc3">field</span>==<span style="color: #3b3df5">"cap"</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                                    </span>ret=Integer.parseInt(pri.getValueAsString());</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                    </span>}</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">         </span>} <span style="color: #961a65">catch</span> (Exception e) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(59, 61, 245); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">                  </span></span><span style="color: #032fc3">log</span><span style="color: #000000">.error(</span>" Error: getting CPU capacity of \""<span style="color: #000000">+name+</span>"\"."<span style="color: #000000">);</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                   </span>e.printStackTrace();</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">             </span>}</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">         </span><span style="color: #961a65">return</span> ret;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">    </span>}</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(77, 120, 197); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">  </span></span>/**</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(77, 120, 197); "><span class="Apple-tab-span" style="white-space:pre">       </span> * Returns CPU Priority assigned to VM name</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(77, 120, 197); "><span class="Apple-tab-span" style="white-space:pre">    </span> * <span style="color: #8fb0c8">@param</span> name</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(143, 176, 200); "><span style="color: #4d78c5"><span class="Apple-tab-span" style="white-space:pre"> </span> * </span>@return</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(77, 120, 197); "><span class="Apple-tab-span" style="white-space:pre">        </span> */</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">      </span><span style="color: #961a65">public</span> <span style="color: #961a65">int</span> getCPUPriority(String name) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">             </span><span style="color: #961a65">int</span> res=-1;</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span class="Apple-tab-span" style="white-space:pre">               </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">              </span><span style="color: #961a65">try</span> {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                  </span>Domain d = getDomain(name);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                      </span>SchedParameter[] pars = d.getSchedulerParameters();</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                       </span><span style="color: #961a65">for</span> (SchedParameter pri : pars) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                              </span><span style="color: #961a65">if</span> (pri.<span style="color: #032fc3">field</span>==<span style="color: #3b3df5">"weight"</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                                 </span>res=Integer.parseInt(pri.getValueAsString());</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                    </span>}</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span class="Apple-tab-span" style="white-space:pre">                   </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">              </span>} <span style="color: #961a65">catch</span> (Exception e) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(59, 61, 245); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">                  </span></span><span style="color: #032fc3">log</span><span style="color: #000000">.error(</span>" Error: getting CPU priority of \""<span style="color: #000000">+name+</span>"\"."<span style="color: #000000"> + e.getClass());</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                    </span>e.printStackTrace();</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">             </span>}</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span class="Apple-tab-span" style="white-space:pre">           </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">              </span><span style="color: #961a65">return</span> res;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">    </span>}</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span class="Apple-tab-span" style="white-space:pre">   </span> <br class="webkit-block-placeholder"></p></div><div><br></div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span style="color: #961a65">public</span> <span style="color: #961a65">static</span> <span style="color: #961a65">void</span> main(String args[]) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">              </span>VirtMonitor virt = <span style="color: #961a65">new</span> VirtMonitor();</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span class="Apple-tab-span" style="white-space:pre">             </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">           </span>System.<span style="color: #032fc3">out</span>.println(<span style="color: #3b3df5">" -> "</span> + virt.getDomains());</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(72, 144, 117); "><font class="Apple-style-span" color="#000000"><br></font></div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span class="Apple-tab-span" style="white-space:pre">               </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">              </span>System.<span style="color: #032fc3">out</span>.println(virt.getCPUPriority(<span style="color: #3b3df5">"XenTest"</span>));</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                </span>System.<span style="color: #032fc3">out</span>.println(virt.getCPUCapacity(<span style="color: #3b3df5">"XenTest"</span>));</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">}</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><br></div></div><div><div><br></div><div><br></div><div>Thanks in advance,</div><div><br></div><div><br></div><div><br></div><div>Marc Gonzalez Mateo</div><div><a href="mailto:marcg@ac.upc.edu">marcg@ac.upc.edu</a></div><div>Universitat Politècnica de Catalunya</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>El 14/12/2009, a las 16:41, Bryan Kearney escribió:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Can you send me more info on the use case.. and I will try and recreate it? In the mean time.. tell me if the patched jar file at:<br><br><a href="http://bkearney.fedorapeople.org/libvirt-0.4.0-PATCH.jar">http://bkearney.fedorapeople.org/libvirt-0.4.0-PATCH.jar</a><br><br>works. You will need to download this and copy it into<br><br>/usr/share/java/libvirt-0.4.0.jar<br><br>-- bk<br><br>On 12/14/2009 04:22 AM, Marc Gonzalez Mateo wrote:<br><blockquote type="cite">OK, let's see if Bryan has an idea/solution about this.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks guys!<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">MARC<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">El 11/12/2009, a las 14:29, Daniel Veillard escribió:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">On Fri, Dec 11, 2009 at 02:01:36PM +0100, Marc Gonzalez Mateo wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Hi everyvody,<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I'm developing a new API based on libvirt.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I'm currently stucked using getSchedulerParameters, always is returning a<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">nullpointerexception, no matter which Xen Domain I'm passing to the<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">function.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Enclosing both the code and the error console:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">public int getCPUPriority(String name) {<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">        int res=-1;<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">        try {<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">            Domain d = getDomain(name);<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">            SchedParameter[] pars = d.getSchedulerParameters();<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">  Hum, it seems<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">    Domain.getSchedulerParameters()<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">does<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">    SchedParameter[] returnValue = new SchedParameter[0];<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">and<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        public static SchedParameter create(virSchedParameter vParam) {<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">            SchedParameter returnValue = null;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">            switch (vParam.type) {<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">                case (1):<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">and the create method getting there gets a null pointer as the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">initialization argument, which it first dereference ...<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">  so not surprizing looking at the code, maybe Bryan has an idea of what<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">is going on there, I'm a bit lost in this initialization process ...<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Daniel<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">            for (SchedParameter pri : pars) {<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">                if (pri.field=="weight")<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">                    res=Integer.parseInt(pri.getValueAsString());<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">            }<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">        } catch (LibvirtException e) {<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">            log.error(" Error: getting CPU priority of \""+name+"\"." +<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">e.getClass());<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">            e.printStackTrace();<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">        }<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">        return res;<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">    }<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Dec 11, 2009 1:04:18 PM net.emotivecloud.virtmonitor.VirtMonitor<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">getCPUCapacity<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">SEVERE:  Error: getting CPU capacity of "XenTest".<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">java.lang.NullPointerException<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">    at org.libvirt.SchedParameter.create(Unknown Source)<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">    at org.libvirt.Domain.getSchedulerParameters(Unknown Source)<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">    at<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">net.emotivecloud.virtmonitor.VirtMonitor.getCPUCapacity(VirtMonitor.java:462)<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">    at net.emotivecloud.virtmonitor.VirtMonitor.main(VirtMonitor.java:763)<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">    at<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">    at<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">    at java.lang.reflect.Method.invoke(Method.java:616)<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">    at java.lang.Thread.run(Thread.java:636)<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Any ideas?<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Thanks in advance,<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Marc Gonzalez Mateo<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">--<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Libvir-list mailing list<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Libvir-list@redhat.com<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">https://www.redhat.com/mailman/listinfo/libvir-list<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">--<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">daniel@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">http://veillard.com/ | virtualization library  http://libvirt.org/<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><br></div></blockquote></div><br></div></body></html>