It's all about the answers!

Ask a question

Issue with RTC Build Engine


Andrew Trobec (49713144139) | asked Mar 05 '12, 8:03 a.m.
Hello!

I have an RTC project under source control that is prepared by an Ant build script. When I run the build script it compiles and is deployed without issue.

However, when I create a build engine and build definition to invoke the same Ant script, it fails with:

taskdef class org.apache.catalina.ant.DeployTask cannot be found

In order to try to help the software locate catalina-ant.jar, I have put it in every classpath available with no luck. I have added it to the Ant arguments in the build definition configuration, but that doesn't work either.

How can I resolve?

Thank you in advance and best regards,

Andrew

4 answers



permanent link
David Lafreniere (4.8k7) | answered Mar 05 '12, 9:39 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hello!

I have an RTC project under source control that is prepared by an Ant build script. When I run the build script it compiles and is deployed without issue.

However, when I create a build engine and build definition to invoke the same Ant script, it fails with:

taskdef class org.apache.catalina.ant.DeployTask cannot be found

In order to try to help the software locate catalina-ant.jar, I have put it in every classpath available with no luck. I have added it to the Ant arguments in the build definition configuration, but that doesn't work either.

How can I resolve?

Thank you in advance and best regards,

Andrew


I'm assuming you did this, but just in case, did you put "-lib <path_to_the_directory_which_contains_catalina>" in the "Ant arguments" field in the build definition?

permanent link
Spencer Murata (2.3k115971) | answered Mar 05 '12, 9:41 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
When you run the build script by itself is it running on the same system as the JBE engine?

~Spencer

Hello!

I have an RTC project under source control that is prepared by an Ant build script. When I run the build script it compiles and is deployed without issue.

However, when I create a build engine and build definition to invoke the same Ant script, it fails with:

taskdef class org.apache.catalina.ant.DeployTask cannot be found

In order to try to help the software locate catalina-ant.jar, I have put it in every classpath available with no luck. I have added it to the Ant arguments in the build definition configuration, but that doesn't work either.

How can I resolve?

Thank you in advance and best regards,

Andrew

permanent link
Andrew Trobec (49713144139) | answered Mar 05 '12, 10:25 a.m.
Thank you for the replies!

daviddl: yes, I have tried that with no luck.

Spencer: everything is running on the same system, yes.

If I run the build script from the Java EE perspective (no RTC build engine involved) everything works. If I change perspective and request a build from the RTC build definition (which points to the same build script), it fails.

I am using RTC 3.0 as a plugin for Eclipse. Also, the code is under source control, so I have a build workspace.

Regards,

Andrew

permanent link
Andrew Trobec (49713144139) | answered Mar 06 '12, 2:30 a.m.
Hello!

I managed to solve the issue. It was the stupidest thing!

In the Ant configuration tab of the Build Definition, the necessary libraries were located in folders that had spaces in their directory path. In order for the system to access these folders, I put quotes which weren't there before:

-lib "C:\Program Files\Apache Software Foundation\Tomcat 7.0\lib\catalina-ant.jar;C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin\tomcat-juli.jar"

If there is more that one folder, they must all be included in a single set of quotes:

-lib "C:\folder with spaces\jarfile.jar;C:\folder with spaces\jarfile2.jar"

NOT:

-lib "C:\folder with spaces\jarfile.jar";"C:\folder with spaces\jarfile2.jar"

I kicked myself and almost cried :lol:

Thanks guys!

Andrew

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.