Bug 568275 - HTTPService of netservices plugin fails with ClassNotFoundError
Summary: HTTPService of netservices plugin fails with ClassNotFoundError
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
(Show other bugs)
Version: 3.0.0
Hardware: All All
low
low vote
Target Milestone: ---
: ---
Assignee: Heiko W. Rupp
QA Contact: Rajan Timaniya
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-25 09:24 UTC by Heiko W. Rupp
Modified: 2010-08-12 16:51 UTC (History)
1 user (show)

Fixed In Version: 2.4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-12 16:51:44 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Verify added HTTPService show green ('Available') (97.80 KB, image/png)
2010-03-29 09:49 UTC, Rajan Timaniya
no flags Details

Description Heiko W. Rupp 2010-02-25 09:24:26 UTC
This very probably comes from the upgrade of commons-httpclient to 3.0.1 in b45de2f33d043724e3afbec791295bf40b013e1c

 
2010-02-25 09:46:49,844 DEBUG [InventoryManager.availability-1] (rhq.core.pc.inventory.AvailabilityExecutor)- Failed to collect availability on resource Resource[id=11703, type=HTTPService, key=http://localhost, name=http://localhost, parent=vm60as011.test.ns.nl]
java.lang.reflect.UndeclaredThrowableException
        at $Proxy49.getAvailability(Unknown Source)
        at org.rhq.core.pc.inventory.AvailabilityExecutor.checkInventory(AvailabilityExecutor.java:167)
        at org.rhq.core.pc.inventory.AvailabilityExecutor.checkInventory(AvailabilityExecutor.java:209)
        at org.rhq.core.pc.inventory.AvailabilityExecutor.call(AvailabilityExecutor.java:106)
        at org.rhq.core.pc.inventory.AvailabilityExecutor.run(AvailabilityExecutor.java:70)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:146)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:170)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.Exception: java.lang.NoClassDefFoundError: org/apache/commons/codec/DecoderException
        at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:530)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
        at java.util.concurrent.FutureTask.run(FutureTask.java:123)
        ... 3 more
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/codec/DecoderException
        at org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:217)

Comment 1 Heiko W. Rupp 2010-02-25 10:28:24 UTC
Yep 2.0.2 had commons-codec included in 3.x it is a dependency that needs to be added to the plugin jar

Workaround: for existing code base: unzip netservices-plugin, put commons-codec-1.2.jar into its lib directory, zip the plugin up again and deploy via RHQ server.

Fix for RHQ 3 is in 568275

Comment 2 Corey Welton 2010-03-24 17:15:38 UTC
qa-> rtimaniy

Comment 3 Rajan Timaniya 2010-03-29 09:49:42 UTC
Created attachment 403249 [details]
Verify added HTTPService show green ('Available')

Comment 4 Rajan Timaniya 2010-03-29 09:50:44 UTC
Verified on master (build #133) GIT Revision: bf2ad7ab6e9532e4869f4373712fcbc0c04f8618

Verified the bug with following steps:
[0] Deploy the plugin
[1] Manual Add HTTPService with the url of a httpserver

Result:
[0] There is no error like:
Failed to collect availability on
resource Resource[id=11703, type=HTTPService, key=http://localhost,
name=http://localhost, parent=vm60as011.test.ns.nl]
[1] The added HTTPService show green ('Available') after some time.

Comment 5 Corey Welton 2010-08-12 16:51:44 UTC
Mass-closure of verified bugs against JON.


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