Bug 1119851 - SDK crashes when retrieving cluster list
Summary: SDK crashes when retrieving cluster list
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-sdk-java
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.5.0
Assignee: Juan Hernández
QA Contact: Ondra Machacek
URL:
Whiteboard: infra
Depends On: 1119812
Blocks: rhev3.5beta 1156165
TreeView+ depends on / blocked
 
Reported: 2014-07-15 16:19 UTC by Juan Hernández
Modified: 2016-02-10 19:05 UTC (History)
5 users (show)

Fixed In Version: rhevm-sdk-java-3.5.0.2-1.el6_5
Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Clone Of: 1119812
Environment:
Last Closed: 2015-02-16 13:36:02 UTC
oVirt Team: Infra


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 30115 None None None Never
oVirt gerrit 30117 None None None Never

Description Juan Hernández 2014-07-15 16:19:35 UTC
+++ This bug was initially created as a clone of Bug #1119812 +++

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

Comment 1 Juan Hernández 2014-07-18 07:21:38 UTC
This will be fixed with the next rebase from upstream.

Comment 2 Juan Hernández 2014-07-18 10:48:16 UTC
This will be fixed rebasing from upstream 3.5.0.2.

Comment 3 Ondra Machacek 2014-09-16 11:54:37 UTC
Works OK in:
rhevm-sdk-java-3.5.0.5-1.el6ev.noarch


Note You need to log in before you can comment on or make changes to this bug.