History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RHQ-1127
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Heiko W. Rupp
Reporter: Mark Burchard
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
RHQ Project

selecting Ok after editing apache connection properties causes 500 error when target apache server does not have SNMP modules configured

Created: 17/Nov/08 02:17 PM   Updated: 18/Dec/08 08:12 AM
Component/s: Core UI, Usability
Affects Version/s: 1.1
Fix Version/s: 1.2

Time Tracking:
Not Specified

File Attachments: 1. HTML File edit-connection-errors.html (22 kb)

Environment: JON agent/server 2.1.0, RHEL5, apache 2.2.3

Resolution Date: 25/Nov/08 07:39 AM
Date of First Response: 24/Nov/08 10:30 AM
Tester: Corey Welton
VCS Revision: 2,118


 Description  « Hide
If you attempt to edit the connection properties for an apache server that does not have the SNMP modules enabled, it throws a 500 in the browser, with this stack trace:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: #{ConnectionPropertiesUIBean.update}: javax.ejb.EJBTransactionRolledbackException: Unable to find org.rhq.core.domain.resource.ResourceError with id 500552
javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
org.ajax4jsf.Filter.doFilter(Filter.java:175)
org.rhq.enterprise.gui.legacy.AuthenticationFilter.doFilter(AuthenticationFilter.java:128)
org.rhq.enterprise.gui.common.upload.MultipartFilter.doFilter(MultipartFilter.java:63)
org.rhq.helpers.rtfilter.filter.RtFilter.doFilter(RtFilter.java:113)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

root cause

javax.faces.FacesException: #{ConnectionPropertiesUIBean.update}: javax.ejb.EJBTransactionRolledbackException: Unable to find org.rhq.core.domain.resource.ResourceError with id 500552
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
javax.faces.component.UICommand.broadcast(UICommand.java:387)
org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:316)
org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:291)
org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:248)
org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:461)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
org.ajax4jsf.Filter.doFilter(Filter.java:175)
org.rhq.enterprise.gui.legacy.AuthenticationFilter.doFilter(AuthenticationFilter.java:128)
org.rhq.enterprise.gui.common.upload.MultipartFilter.doFilter(MultipartFilter.java:63)
org.rhq.helpers.rtfilter.filter.RtFilter.doFilter(RtFilter.java:113)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


(I'll attach the full stack trace)

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Mark Burchard - 17/Nov/08 02:18 PM
full stack trace for RHQ-1127

Heiko W. Rupp - 24/Nov/08 10:30 AM
root cause

javax.persistence.EntityNotFoundException: Unable to find org.rhq.core.domain.resource.ResourceError with id 509566
...
org.rhq.enterprise.server.configuration.ConfigurationManagerBean.completePluginConfigurationUpdate(ConfigurationManagerBean.java:182)
...
$Proxy251.completePluginConfigurationUpdate(Unknown Source)
org.rhq.enterprise.server.configuration.ConfigurationManagerBean.updatePluginConfiguration(ConfigurationManagerBean.java:237)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


Underlying issue seems to be this piece of code in ConfigurationManagerBean:completePluginConfigurationUpdate()

            handlePluginConfiguratonUpdateRemoteException(resource, response.getStatus().toString(), response
                .getErrorMessage());

which creates a new instance of ResourceError, which seems to be wiped away by the flush() (not completely sure yet), as the new RE was not persisted in its own Tx.

Heiko W. Rupp - 24/Nov/08 10:31 AM
Marking as critical, as this prevents fixing the configuration errors.

Heiko W. Rupp - 24/Nov/08 01:51 PM
The bad guy is the flush() introduced in rev1653 from RHQ-883. Commenting out the flush() and also the merge, which seems unnecessary to me as all related objects are managed by the EntityMager, cures above error.
I still need to do more testing.

Heiko W. Rupp - 25/Nov/08 07:39 AM

QA: please do some extensive testing around taking stuff in inventory - especially where the connection properties are wrong/not enough (like a EAP instance without password )

Corey Welton - 18/Dec/08 08:12 AM
QA Verified, user able to change General and Connection properties when SNMP is not enabled. Also assured this could be done whether or not monitoring via URL was enabled or not.