Receive "Null Pointer Exception" when deploying WAR via JON CLI script

Solution Verified - Updated -

Issue

  • I created a script to deploy a new resource (WAR) to my EAP 5.1 server using JON CLI tool.
  • The script runs without error, but the file is not deployed and the agent.log contains the following error

    ERROR [ResourceContainer.invoker.nonDaemon-4] (rhq.plugins.jbossas5.deploy.RemoteDeployer)- Error deploying application for request [CreateResourceReport: ResourceType=[ResourceType[id=0, category=Service, name=Web Application (WAR), plugin=JBossAS5]], ResourceKey=[null]].
    java.lang.NullPointerException
         at org.rhq.plugins.jbossas5.deploy.AbstractDeployer.deploy(AbstractDeployer.java:93)
         at org.rhq.plugins.jbossas5.helper.CreateChildResourceFacetDelegate.createContentBasedResource(CreateChildResourceFacetDelegate.java:124)
         at org.rhq.plugins.jbossas5.helper.CreateChildResourceFacetDelegate.createResource(CreateChildResourceFacetDelegate.java:56)
         at org.rhq.plugins.jbossas5.ApplicationServerComponent.createResource(ApplicationServerComponent.java:304)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)......
    

Environment

  • JBoss Operations Network (JON) 2.4
  • JBoss Operations Network Command Line Interface (CLI) 2.4
  • JBoss Enterprise Application Platform (EAP) 5.x
  • CLI script contains:
    deployConfig.put( new PropertySimple("deployDirectory", "deploy"));
    deployConfig.put( new PropertySimple("deployZipped", "true"));
    deployConfig.put( new PropertySimple("createBackup", "false"));
    

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