Bug 769973 - Deploying exploded WAR to JBoss EAP 5 throws NPE operation fails
Summary: Deploying exploded WAR to JBoss EAP 5 throws NPE operation fails
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: unspecified
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
: JON 2.4.2
Assignee: Lukas Krejci
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-22 21:01 UTC by Charles Crouch
Modified: 2015-02-01 23:27 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 669542
Environment:
Last Closed: 2012-01-09 14:52:24 UTC
Embargoed:


Attachments (Terms of Use)

Description Charles Crouch 2011-12-22 21:01:11 UTC
+++ This bug was initially created as a clone of Bug #669542 +++

Description of problem: When deploying an exploded WAR file as a child resource of my jboss as5, the operation says it fails. The error popup window says "java.lang.NullPointerException." The WAR gets deployed, but the MANIFEST.MF isn't updated, and the operation status is "Failure".


Environment: JON 2.4.0, JBoss 5.0/5.1 (tried both), RHEL 5.5, Postgres 8.4.5, java1.6u23, as5 plugin says 3.0.0.GA Build Number: 8fb6059 


How reproducible: Any time I deploy an exploded WAR as a child resource 


Steps to Reproduce:
1. Open the inventory tab of jboss server and use the dropdown to create a new war
2. Upload a war
3. Put noarch (or anything it seems) in the version box, select radio button to deploy exploded
4. Click create
  
Actual results: The WAR is deployed, the operation fails, the manifest doesn't get modified. The WAR doesn't show up in the inventory until it's detected automatically much later.


Expected results: The WAR is deployed, the operation succeeds, the manifest has some version info in it. Should the war show up in inventory right away? I thought it would.


Additional info: The RHQ git repo was still down this morning, but I have skimmed the source code here: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=blob;f=modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/deploy/AbstractDeployer.java;h=5dff4ef19b8995f9afdffb681c4f27645862760c;hb=agentPlugin

Is this the nearest source that went into the JON 2.4.0 plugin?

Line 131: String deploymentName = deployTimeConfig.getSimple(DEPLOYMENT_NAME_PROPERTY).getStringValue();
//Throws NPE if deploymentName = null
URI deployePackageURI = URI.create(deploymentName);
//getPath() returns null if the URI is undefined
String path = deployePackageURI.getPath();
//new File(null) throws NPE
File location = new File(path);

An error in the agent log references the exception.

2011-01-11 12:25:16,503 ERROR [ResourceContainer.invoker.nonDaemon-1] (rhq.plugins.jbossas5.deploy.RemoteDeployer)- Error deploying application for request [CreateResourceReport: ResourceType=[Reso
urceType[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:131)
        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)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)

--- Additional comment from fdrabek on 2011-04-04 07:20:49 EDT ---

branch release-3.0.1 commit 8d936c05f084df1856d895cb10d60d72ebeddd64
branch release-3.0.0 commit 7a31e489c2fa86af2175554131e5ef6cce4480b1
branch master commit 933056376e4c0a9864e07c613e8fa4b7ff53f317

--- Additional comment from mfoley on 2011-05-04 13:15:36 EDT ---

verified RHQ 4.0 community release, by following the steps to reproduce.  i uploaded sample.war

--- Additional comment from cwelton on 2011-05-23 21:11:01 EDT ---

Bookkeeping - closing bug - fixed in recent release.

--- Additional comment from cwelton on 2011-05-23 21:11:03 EDT ---

Bookkeeping - closing bug - fixed in recent release.

Comment 5 Charles Crouch 2012-01-09 14:52:24 UTC
Closing as wontfix as per comments from Stefan and Lukas


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