The Jira link you quote is related to Maven and therefore has no relevance. I suspect your issue is related to your ANT environment.
Have you placed jars in one of the following locations?
- $ANT_HOME/lib
- $HOME/.ant/lb
These will be automatically added to your classpath and could cause this reported class clash. A good way to investigate classpath problems is to run ANT in debug and/or diagnostics mode.
ant generate.wsdl -diagnostics
Will include a report of what jars and where are loaded by ANT.
Working Example
Using ANT 1.9.0
$ ant -version
Apache Ant(TM) version 1.9.0 compiled on March 5 2013
I extracted the quickstart project from the downloaded axis2 distribution
$ cp -r $AXIS2_HOME/samples/quickstart .
$ tree
.
└── quickstart
├── build.xml
├── README.txt
├── resources
│ └── META-INF
│ └── services.xml
└── src
└── samples
└── quickstart
└── service
└── pojo
└── StockQuoteService.java
Running the
$ ant -f quickstart/build.xml generate.wsdl -DAXIS2_HOME=$AXIS2_HOME
Buildfile: /home/mark/tmp/quickstart/build.xml
compile.service:
[mkdir] Created dir: /home/mark/tmp/quickstart/build
[mkdir] Created dir: /home/mark/tmp/quickstart/build/classes
[javac] /home/mark/tmp/quickstart/build.xml:42: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1 source file to /home/mark/tmp/quickstart/build/classes
[javac] Note: /home/mark/tmp/quickstart/src/samples/quickstart/service/pojo/StockQuoteService.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
generate.wsdl:
[java2wsdl] log4j:WARN No appenders could be found for logger (org.apache.axis2.util.Loader).
[java2wsdl] log4j:WARN Please initialize the log4j system properly.
BUILD SUCCESSFUL
Total time: 2 seconds
Produces the expected files
$ tree
.
├── build
│ └── StockQuoteService.wsdl
└── quickstart
├── build
│ └── classes
│ └── samples
│ └── quickstart
│ └── service
│ └── pojo
│ └── StockQuoteService.class
├── build.xml
├── README.txt
├── resources
│ └── META-INF
│ └── services.xml
└── src
└── samples
└── quickstart
└── service
└── pojo
└── StockQuoteService.java
The ANT debug output shows the AXIS2 commons-logging jar being used:
$ ant -f quickstart/build.xml generate.wsdl -DAXIS2_HOME=$AXIS2_HOME -debug | grep "org/apache/commons/logging"
Loaded from /opt/axis2-1.6.2/lib/commons-logging-1.1.1.jar org/apache/commons/logging/LogFactory.class
Loaded from /opt/axis2-1.6.2/lib/commons-logging-1.1.1.jar org/apache/commons/logging/LogConfigurationException.class
Loaded from /opt/axis2-1.6.2/lib/commons-logging-1.1.1.jar org/apache/commons/logging/LogFactory$6.class
Loaded from /opt/axis2-1.6.2/lib/commons-logging-1.1.1.jar org/apache/commons/logging/impl/WeakHashtable.class
Loaded from /opt/axis2-1.6.2/lib/commons-logging-1.1.1.jar org/apache/commons/logging/LogFactory$1.class
Loaded from /opt/axis2-1.6.2/lib/commons-logging-1.1.1.jar org/apache/commons/logging/impl/WeakHashtable$Referenced.class
Loaded from /opt/axis2-1.6.2/lib/commons-logging-1.1.1.jar org/apache/commons/logging/impl/WeakHashtable$WeakKey.class
Loaded from /opt/axis2-1.6.2/lib/commons-logging-1.1.1.jar org/apache/commons/logging/LogFactory$4.class
Loaded from /opt/axis2-1.6.2/lib/commons-logging-1.1.1.jar org/apache/commons/logging/LogFactory$3.class
Loaded from /opt/axis2-1.6.2/lib/commons-logging-1.1.1.jar org/apache/commons/logging/LogFactory$2.class
Loaded from /opt/axis2-1.6.2/lib/commons-logging-1.1.1.jar org/apache/commons/logging/impl/LogFactoryImpl.class
Loaded from /opt/axis2-1.6.2/lib/commons-logging-1.1.1.jar org/apache/commons/logging/impl/LogFactoryImpl$2.class
Loaded from /opt/axis2-1.6.2/lib/commons-logging-1.1.1.jar org/apache/commons/logging/impl/LogFactoryImpl$1.class
Loaded from /opt/axis2-1.6.2/lib/commons-logging-1.1.1.jar org/apache/commons/logging/impl/Log4JLogger.class
Loaded from /opt/axis2-1.6.2/lib/commons-logging-1.1.1.jar org/apache/commons/logging/Log.class