Attempt to delete agent using JBoss ON CLI fails with exception "java.lang.IllegalArgumentException: attempt to create delete event with null entity"

Solution Unverified - Updated -

Issue

  • Attempt to delete agent using JBoss ON CLI script fails with the error: java.lang.IllegalArgumentException: attempt to create delete event with null entity
  • Attempt to delete agent using JBoss ON CLI script fails and the following is logged in the server.log file:
11:27:19,925 ERROR [org.rhq.enterprise.server.remote.RemoteSafeInvocationHandler] (http-/0.0.0.0:7080-12) Failed to invoke remote request: java.lang.reflect.InvocationTargetException
...
Caused by: javax.ejb.EJBException: java.lang.IllegalArgumentException: attempt to create delete event with null entity
...
  • Attempt to delete agent using JBoss ON CLI fails with exception "java.lang.IllegalArgumentException: attempt to create delete event with null entity"

Environment

  • Red Hat JBoss Operations Network (ON) 3.3.3
  • Red Hat JBoss ON Command Line Interface (CLI) 3.3.3
  • Attempt to execute script:
var criteria = new AgentCriteria();  
var agents = AgentManager.findAgentsByCriteria(a); 
var myAgent = agents.get(0);
ResourceManager.uninventoryAllResourcesByAgent(myAgent);
AgentManager.deleteAgent(myAgent);        

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content