Description of problem: Api engine = ovirtClient.connect(); for (Cluster cluster: engine.getClusters().list()) { results in [STDOUT] java.lang.NullPointerException [STDOUT] at org.ovirt.engine.sdk.web.HttpProxy.injectHeaders(HttpProxy.java:170) [STDOUT] at org.ovirt.engine.sdk.web.HttpProxy.execute(HttpProxy.java:113) [STDOUT] at org.ovirt.engine.sdk.web.HttpProxyBroker.get(HttpProxyBroker.java:414) [STDOUT] at org.ovirt.engine.sdk.common.CollectionDecorator.list(CollectionDecorator.java:180) [STDOUT] at org.ovirt.engine.sdk.common.CollectionDecorator.list(CollectionDecorator.java:154) [STDOUT] at org.ovirt.engine.sdk.decorators.Clusters.list(Clusters.java:75) [STDOUT] at org.ovirt.optimizer.service.ClusterDiscovery.getClusters(ClusterDiscovery.java:38) [STDOUT] at org.ovirt.optimizer.service.OptimizerServiceBean.discoveryTimeout(OptimizerServiceBean.java:75) [STDOUT] at org.ovirt.optimizer.service.OptimizerServiceBean$Proxy$_$$_WeldClientProxy.discoveryTimeout(Unknown Source) [STDOUT] at org.ovirt.optimizer.service.DiscoveryTimeout.execute(DiscoveryTimeout.java:18) [STDOUT] at org.quartz.core.JobRunShell.run(JobRunShell.java:207) [STDOUT] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560) [STDOUT] 2014-07-15 16:48:57 ERROR ErrorLogger:2460 - Job (DEFAULT.6da64b5bd2ee-cfd784b6-630f-4754-a50a-b10e9e4e731c threw an exception. [STDOUT] org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException] [STDOUT] at org.quartz.core.JobRunShell.run(JobRunShell.java:218) [STDOUT] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560) [STDOUT] Caused by: java.lang.NullPointerException [STDOUT] at org.ovirt.engine.sdk.web.HttpProxy.injectHeaders(HttpProxy.java:170) [STDOUT] at org.ovirt.engine.sdk.web.HttpProxy.execute(HttpProxy.java:113) [STDOUT] at org.ovirt.engine.sdk.web.HttpProxyBroker.get(HttpProxyBroker.java:414) [STDOUT] at org.ovirt.engine.sdk.common.CollectionDecorator.list(CollectionDecorator.java:180) [STDOUT] at org.ovirt.engine.sdk.common.CollectionDecorator.list(CollectionDecorator.java:154) [STDOUT] at org.ovirt.engine.sdk.decorators.Clusters.list(Clusters.java:75) [STDOUT] at org.ovirt.optimizer.service.ClusterDiscovery.getClusters(ClusterDiscovery.java:38) [STDOUT] at org.ovirt.optimizer.service.OptimizerServiceBean.discoveryTimeout(OptimizerServiceBean.java:75) [STDOUT] at org.ovirt.optimizer.service.OptimizerServiceBean$Proxy$_$$_WeldClientProxy.discoveryTimeout(Unknown Source) [STDOUT] at org.ovirt.optimizer.service.DiscoveryTimeout.execute(DiscoveryTimeout.java:18) [STDOUT] at org.quartz.core.JobRunShell.run(JobRunShell.java:207) [STDOUT] ... 1 more Version-Release number of selected component (if applicable): ovirt-engine-sdk-java git bd756ad09cd35bf256bd5be842b5ccbbb203d8c5 ovirt-engine git 4f111044f99ff5245934f5e5267f23d8f458042e How reproducible: Compile and start the ovirt-engine - I have only the Default cluster there and two hosts Regenerate the SDK using all the right commands in the proper dirs: mvn verify -Pupdate-metadata mvn verify -Pupdate-code mvn clean install Write a small program that tries to get a list of clusters. Actual results: NPE Expected results: List of clusters
for(Cluster cluster: api.getClusters().list()) { System.out.println(cluster.getName()); } > Default verified in ovirt-engine-sdk-java-3.5.0.3-0.1.el6.noarch
oVirt 3.5 has been released and should include the fix for this issue.