0

We had a build setup with only a root user on CentOS. Ant command was running fine until we created some users. Now these users are not able to run ant command. Users see following error message

axis:
  [taskdef] Could not load definitions from resource axis-tasks.properties. It could not be found.

BUILD FAILED

/home/akshay/code_17sp1/vobs/company/ipnpm_src/Pwg/build.xml:100: Problem: failed to create task or type axis-wsdl2java
    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.

And build.xml:100

<axis-wsdl2java url="${company-pwg.base}/src/NpViewService.wsdl"
            output="${axis.output}">

I figure it has something to do with classpath OR permissions.

EDIT:

Classpaths:

export MSPSDK=8.10.0.3
export SONA_WSDL_VERSION=12.5.0.1
export TMPDIR=$HOME/tmp
export RELEASE=$HOME/Release
export JAVA_HOME=/usr/java/current
export ANT_HOME=/usr/local/apache-ant-1.6.5
export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH

for root $HOME = /root for user akshay $HOME = /home/akshay

tryingToLearn
  • 10,691
  • 12
  • 80
  • 114
  • yes it seems like a classpath issue. You need `axis-ant.jar` in ur classpath to use that task. Can u plz post your full CLASSPATH - for root and for another user? – Pat Jul 31 '14 at 10:58
  • @Pat Edited the question to add CLASSPATH. Can u plz verify that these are correct? – tryingToLearn Jul 31 '14 at 11:45
  • these are just your environment vars. where is ur classpath? Or you meant that all these paths are `ADDED` to your `CLASSPATH` variable? Also, verify whether ur user has access to `axis-ant.jar` file. – Pat Jul 31 '14 at 13:16
  • @Pat 1. The $CLASSPATH variable is not set for root or any other user. The output for "echo $CLASSPATH" is empty. 2. User has read permissions to access axis-ant.jar – tryingToLearn Aug 01 '14 at 05:14
  • @Pat What should be the values of $CLASSPATH variable for root and other users? – tryingToLearn Aug 01 '14 at 05:17
  • ur classpath may be set from ant's build.xml. check the values in classpath and check the link that Mark has mentioned in his answer below. This is most certainly a classpath issue. You need to analyze ur classpath entries more carefully. – Pat Aug 01 '14 at 07:54

1 Answers1

0

The axis ANT task jar and dependencies are missing from the classpath. I'm guessing that the root user has some extra jars located it's home directory?

  • /root/.ant/lib

For a generic solution that works for all users checkout the following answer:

It uses the Apache ivy plugin to manage dependencies.

Community
  • 1
  • 1
Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185