Bug 753827 - Globally uncaught exception pinning drift definition to new template
Globally uncaught exception pinning drift definition to new template
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: drift (Show other bugs)
4.2
Unspecified Unspecified
medium Severity high (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks: 707225
  Show dependency treegraph
 
Reported: 2011-11-14 11:07 EST by Mike Foley
Modified: 2012-02-07 14:20 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-07 14:20:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
image of client-side error (113.34 KB, image/png)
2011-11-14 11:08 EST, Mike Foley
no flags Details
text of client-side error (6.44 KB, text/plain)
2011-11-14 11:08 EST, Mike Foley
no flags Details
server logs (83.96 KB, application/octet-stream)
2011-11-14 11:10 EST, Mike Foley
no flags Details

  None (edit)
Description Mike Foley 2011-11-14 11:07:13 EST
Description of problem:  Globally uncaught exception pinning drift definition to new template


Version-Release number of selected component (if applicable):

Steps to Reproduce:
1.  create a new unpinned drift definition
2.  try to pin to a new template
3.  globally uncaught exception
  
Actual results:
globally uncaught exception

Expected results:
able to pin drift definition to new template

Additional info:

	
Message :	
Globally uncaught exception
Severity :	
Error
	
Time :	
Monday, November 14, 2011 10:50:09 AM Etc/GMT+5
Detail :	

com.google.gwt.core.client.JavaScriptException:(TypeError): this.org_rhq_enterprise_gui_coregui_client_drift_wizard_DriftPinTemplateWizard$1_this$0.org_rhq_enterprise_gui_coregui_client_drift_wizard_AbstractDriftPinTemplateWizard_selectedTemplate is null
 stack: org_rhq_enterprise_gui_coregui_client_drift_wizard_DriftPinTemplateWizard$1_onFailure__Ljava_lang_Throwable_2V([object Object])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html:108314
com_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_$onResponseReceived__Lcom_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_2Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V([object Object],[object Object])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html:9349
org_rhq_enterprise_gui_coregui_client_util_rpc_TrackingRequestCallback_onResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V([object Object],[object Object])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html:168087
com_google_gwt_http_client_Request_$fireOnResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_RequestCallback_2V([object Object],[object Object])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html:4376
com_google_gwt_http_client_RequestBuilder$1_onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V([object XMLHttpRequest])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html:4600
([object Event])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html:12659
com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2((function () {handler.onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V(_this);}),[object XMLHttpRequest],[object Object])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html:2474
([object Event])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html:2463
handleEvent([object Event])@:0
SJOWContentBoundary()@:0

 fileName: http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html
 lineNumber: 108314
--- STACK TRACE FOLLOWS ---
(TypeError): this.org_rhq_enterprise_gui_coregui_client_drift_wizard_DriftPinTemplateWizard$1_this$0.org_rhq_enterprise_gui_coregui_client_drift_wizard_AbstractDriftPinTemplateWizard_selectedTemplate is null
 stack: org_rhq_enterprise_gui_coregui_client_drift_wizard_DriftPinTemplateWizard$1_onFailure__Ljava_lang_Throwable_2V([object Object])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html:108314
com_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_$onResponseReceived__Lcom_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_2Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V([object Object],[object Object])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html:9349
org_rhq_enterprise_gui_coregui_client_util_rpc_TrackingRequestCallback_onResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V([object Object],[object Object])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html:168087
com_google_gwt_http_client_Request_$fireOnResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_RequestCallback_2V([object Object],[object Object])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html:4376
com_google_gwt_http_client_RequestBuilder$1_onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V([object XMLHttpRequest])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html:4600
([object Event])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html:12659
com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2((function () {handler.onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V(_this);}),[object XMLHttpRequest],[object Object])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html:2474
([object Event])@http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html:2463
handleEvent([object Event])@:0
SJOWContentBoundary()@:0

 fileName: http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/773803C56DFCFDC893991F3507D1670C.cache.html
 lineNumber: 108314
   at Unknown.org_rhq_enterprise_gui_coregui_client_drift_wizard_DriftPinTemplateWizard$1_onFailure__Ljava_lang_Throwable_2V(Unknown source:0)
   at Unknown.com_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_$onResponseReceived__Lcom_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_2Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V(Unknown source:0)
   at Unknown.org_rhq_enterprise_gui_coregui_client_util_rpc_TrackingRequestCallback_onResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V(Unknown source:0)
   at Unknown.com_google_gwt_http_client_Request_$fireOnResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_RequestCallback_2V(Unknown source:0)
   at Unknown.com_google_gwt_http_client_RequestBuilder$1_onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)
   at Unknown.com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)
   at Unknown.handleEvent(Unknown source:0)
   at Unknown.SJOWContentBoundary(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)
Comment 1 Mike Foley 2011-11-14 11:08:04 EST
Created attachment 533559 [details]
image of client-side error
Comment 2 Mike Foley 2011-11-14 11:08:57 EST
Created attachment 533560 [details]
text of client-side error
Comment 3 Mike Foley 2011-11-14 11:10:01 EST
server-side exception:

2011-11-14 10:50:08,808 ERROR [org.hibernate.util.JDBCExceptionReporter] ORA-00001: unique constraint (RHQ.RHQ_DRIFT_DEF_TEMPLATE_UNIQUE) violated

2011-11-14 10:50:08,808 WARN  [org.hibernate.util.JDBCExceptionReporter] SQL Error: 1, SQLState: 23000
2011-11-14 10:50:08,808 ERROR [org.hibernate.util.JDBCExceptionReporter] ORA-00001: unique constraint (RHQ.RHQ_DRIFT_DEF_TEMPLATE_UNIQUE) violated

2011-11-14 10:50:08,808 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.exce
Comment 4 Mike Foley 2011-11-14 11:10:52 EST
Created attachment 533561 [details]
server logs
Comment 5 John Sanda 2011-11-16 10:52:55 EST
The underlying problem here is that template names for a resource type have to be unique. There currently is no validation in place to enforce this. I have made three changes that provide validation:

1) Add validation check in DriftTemplateManagerBean.createTemplate. An     IllegalArgumentException is thrown if the name is a duplicate. This handles calls through the remote api as well as through the UI.
    
2) Add a validation check to the wizard in the drift templates view. If you specify a duplicate name, the name field is flagged as being in error when you click finish. The hover text says that the name must be unique.
    
3) Add the same validation check as in 2) to the wizard for pinning a snapshot to a template. 


master commit hash:         2594fa3706f30dd43c7aa566a6f4b5154ffdc863
release_jon3.x commit hash: 29ee2dea37ab4a2720f7d4dd5926acdeb37d4588
Comment 6 Mike Foley 2012-02-07 14:20:38 EST
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE

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