Bug 765795
Summary: | java.lang.StackOverflowError Exception when using createPackageBackedResource method | |||
---|---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | bkramer <bkramer> | |
Component: | CLI | Assignee: | Stefan Negrea <snegrea> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | |
Severity: | high | Docs Contact: | ||
Priority: | urgent | |||
Version: | 4.2 | CC: | hrupp, loleary, snegrea | |
Target Milestone: | --- | |||
Target Release: | JON 3.0.1 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | jon-3.0.1 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 785887 (view as bug list) | Environment: | ||
Last Closed: | 2013-09-03 15:17:11 UTC | Type: | --- | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 760116, 781607, 785887, 785899, 806590, 808636, 910832 | |||
Attachments: |
Description
bkramer
2011-12-09 13:03:17 UTC
Created attachment 544537 [details]
Script that can be used to reproduce the problem
The original scripts and instructions provided did not allow for this issue to be reproduced without quite a bit of work. I have reproduced the issue and simplified the test: #. Install JON 3.0.0 Server, Agent, and Remote Client API (CLI) #. Import RHQ Agent and RHQ Server into inventory #. Copy deploy-script.js and GuessANumber.war to /tmp #. From Remote Client API, execute test script: cd <RHQ_CLI_HOME>/bin ./rhq-cli.sh -s localhost -u rhqadmin -p rhqadmin -f /tmp/deploy-script.js /tmp/GuessANumber.war Actual Result: Test WAR did not get deployed to RHQ Server and the following exception appeared on the console: Caused by: java.lang.RuntimeException: [Warning] java.lang.StackOverflowError at org.rhq.core.util.exception.WrappedRemotingException.getCause(WrappedRemotingException.java:121) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:512) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:514) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:514) at java.lang.Throwable.printStackTrace(Throwable.java:485) at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1001) at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:992) at java.lang.Thread.dispatchUncaughtException(Thread.java:1845) ... Server log contains: Caused by: java.lang.StackOverflowError at org.rhq.enterprise.server.resource.ResourceFactoryManagerBean.createPackageBackedResource(ResourceFactoryManagerBean.java:524) at org.rhq.enterprise.server.resource.ResourceFactoryManagerBean.createPackageBackedResource(ResourceFactoryManagerBean.java:524) ... repeats many many times Expected Result: WAR should be deployed with no error Created attachment 551047 [details]
Test script to deploy the specified WAR to the RHQ Server JBoss AS resource
Created attachment 551048 [details]
A test WAR that can be used to reproduce the issue
This is a simple test WAR but any WAR will do.
The error was due to a recursive self-call in the method noted above; updated the code to call the correct method to a new create resource. Note: there are two variants of createPackageBackedResource; one with a timeout parameter and one without the timeout parameter. Only the variant with the timeout parameter was affected by this BZ. Even without this fix, users could still attempt to create new resources by using the method variant without the timeout. The script example posted in comment 4 sets the timeout to null. So the method that works would be invoked just by removing the last parameter. During my tests, I set the timeout to null and resources were created correctly. master commit: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=3f2e1dd08dfcfb38ef22aba22d6609c1a44b20da Created attachment 551298 [details]
Sample script for JBoss EAP5
The script posted in comment 4 works only for JBoss AS4. The script will not work for JBoss EAP5. There are differences in querying for the server, resources, and the actual deployment configuration. I am attaching a new script for JBoss EAP5. Note that the most important difference is in the deployment configuration, it requires a different set of properties. See attachment 551298 [details]. I take back the note from comment 6. The remote interfaces has been cleaned and only one variant of creatPackageBackedResource is now exposed for the CLI (the one with the timeout parameter). To be able to create resources from the CLI, the fix associated with this BZ is required. Committed to release/jon3.0.x branch as: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=1e50f290f975541077728074c0cccdb0b131928c The fix for this bug has been back ported to the jon3.0.1 branch however this is likely to cause a merge conflict when Stefan's other content related changes come in for addressing the issues blocking: https://bugzilla.redhat.com/show_bug.cgi?id=758753 So for right now I'm going to put this back to ON_DEV so that we can make sure this fix gets handled probably on merge, and then QE'd This fix was only added to master branch since it was initially scheduled for an earlier patch. The branch with updates for the content system does not have this fix. There will be no merge conflicts. (11:32:10 AM) ccrouch: stefan_n_: so https://bugzilla.redhat.com/show_bug.cgi?id=765795, the fix went into the jon3.0.1 branch as well as master (11:32:34 AM) ccrouch: is your point that your branch commits just won't conflict with the fix for this issue? (11:33:24 AM) stefan_n_: ccrouch, that is correct verified JON 3.01 RC4 Bulk closing of old issues in VERIFIED state. |