Bug 1203799 - Ant Contrib tasks not recognized in Bundle Deployer Tool
Summary: Ant Contrib tasks not recognized in Bundle Deployer Tool
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Provisioning
Version: JON 3.3.0
Hardware: All
OS: All
medium
high
Target Milestone: ER01
: JON 3.3.5
Assignee: Lukas Krejci
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-19 17:04 UTC by dsteigne
Modified: 2019-04-16 14:44 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-02-03 15:02:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Sample Bundle zip (1.20 KB, application/zip)
2015-03-19 17:04 UTC, dsteigne
no flags Details
Sample bundle 2 (1.36 KB, application/zip)
2015-12-09 18:14 UTC, dsteigne
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1386023 0 None None None Never
Red Hat Product Errata RHSA-2016:0118 0 normal SHIPPED_LIVE Critical: Red Hat JBoss Operations Network 3.3.5 update 2016-02-03 20:00:55 UTC

Description dsteigne 2015-03-19 17:04:53 UTC
Created attachment 1003915 [details]
Sample Bundle zip

Description of problem:
Ant Contrib tasks not recognized in Bundle Deployer Tool.  If you deploy the bundle via JBoss ON UI it succeeds.

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

How reproducible:
Always

Steps to Reproduce:
1. Download and unzip the rhq-bundle-deployer-4.12.0.JON330GA.zip
2. Create a directory and unzip the test.zip(attached)
3. In the above directory set your PATH
PATH="/jon3.3.0/rhq-bundle-deployer-4.12.0.JON330GA/lib:$PATH"
4. Run the test tool:
rhq-ant -Drhq.deploy.dir=/testdeploy -Dlogin.type=test


Actual results:
Receive the below error in regards to the if statement in the deploy.xml

preinstall:
RHQ_AUDIT_MESSAGE___FAILURE___Error Occurred___The deployment could not complete successfully.Thu Mar 19 10:56:35 CDT 2015___org.apache.tools.ant.BuildException:Problem: failed to create task or type if
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
___/NotBackedUp/dsteigne/jon3.3.0/rhq-bundle-deployer-4.12.0.JON330GA/test/deploy.xml:22: Problem: failed to create task or type if
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

	at org.apache.tools.ant.UnknownElement.getNotFoundException(UnknownElement.java:487)
	at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:419)
	at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:163)
	at org.apache.tools.ant.Task.perform(Task.java:347)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.rhq.bundle.ant.type.DeploymentUnitType.install(DeploymentUnitType.java:162)
	at org.rhq.bundle.ant.task.BundleTask.execute(BundleTask.java:159)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	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.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:179)
	at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:80)
	at org.rhq.bundle.ant.AntMain.initProject(AntMain.java:761)
	at org.rhq.bundle.ant.AntMain.runBuild(AntMain.java:626)
	at org.rhq.bundle.ant.AntMain.startAnt(AntMain.java:213)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

BUILD FAILED
/NotBackedUp/dsteigne/jon3.3.0/rhq-bundle-deployer-4.12.0.JON330GA/test/deploy.xml:22: Problem: failed to create task or type if
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.


Total time: 0 seconds


Expected results:


Additional info:

Comment 3 TheLizard 2015-11-02 17:11:03 UTC
Really?  

This bug makes many deployment recipes completely untestable.  There is no workaround.  If it was pushed off to future releases three times over 6 months at "high" priority, what happens to it at a lower priority?

Also, what is "ER01"?  Is there a new product line that will EOL JON?

Comment 4 Larry O'Leary 2015-11-02 17:51:39 UTC
I understand your concern. Please note that you can test your bundles by deploying them to a test agent. The test tool is only provided as a helper.

ER01 is part of the internal build process of Red Hat products. It represents a build and test milestone. The expectation is to review this issue further as part of update-05 for JBoss ON 3.3.

In regards to priority, the original priority of "high" had been set as part of the original bug report. After triage, it was determined that the priority of this issue as it relates to the update-05 payload is medium. This does not mean that the bug is not something that should be addressed but that based on the severity and how critical other issues are within the payload, this issue has a medium priority. 

For alternative solutions or workarounds, I would suggest you contact Red Hat Global Support Services (https://access.redhat.com/support/cases/new).

Comment 5 TheLizard 2015-11-02 17:57:39 UTC
Thank you for the explanation. 

Test agents is my current work-around, just not nearly as efficient.

Comment 6 Michael Burman 2015-11-06 14:17:14 UTC
The deploy.xml is missing taskdef:

 <taskdef resource="net/sf/antcontrib/antlib.xml"/>

Add that line before rhq:bundle and it should work just fine.

Comment 7 Michael Burman 2015-11-13 16:32:11 UTC
Fixed in the master:

commit d05fc4eaa282e93332383f2202bdffb4225cd790
Author: Michael Burman <miburman>
Date:   Fri Nov 13 18:31:19 2015 +0200

    [BZ 1203799] Add liquidbase and antcontrib to taskdef-default-path in bundle-deployer tool

Comment 8 Michael Burman 2015-11-18 15:49:53 UTC
Merged to release/jon3.3.x:

commit 75ac45d30d4fef546bdd8813f8e3c4d132e72c2f
Author: Michael Burman <miburman>
Date:   Fri Nov 13 18:31:19 2015 +0200

    [BZ 1203799] Add liquidbase and antcontrib to taskdef-default-path in bundle-deployer tool
    
    (cherry picked from commit d05fc4eaa282e93332383f2202bdffb4225cd790)

Comment 9 Simeon Pinder 2015-12-09 06:29:07 UTC
Moving to ON_QA as available to test with the following brew build:

JON Cumulative patch build: https://brewweb.devel.redhat.com/buildinfo?buildID=469635
  *Note: jon-server-patch-3.3.0.GA.zip maps to DR01 build of jon-server-3.3.0.GA-update-05.zip.

Comment 10 dsteigne 2015-12-09 18:14:34 UTC
Created attachment 1104066 [details]
Sample bundle 2

Comment 13 errata-xmlrpc 2016-02-03 15:02:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-0118.html


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