Tom Howe wrote:
> Luca, yes. I'm surprised, because I got that error before I changed
version, but then didn't after I changed. Could you send me your ant
file?
>
> -Tom
>
Dear Tom,
I double checked, and I am still getting the same error.
Attached the build file that I am using...
I think you are interested to this part of the build:
------------------------------------
<taskdef name="wsdl2java"
classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask">
<classpath refid="classpath" />
</taskdef>
<!-- Generate stubs if necessary -->
<target name="generateStubs" depends="setenv" unless="stubs.present">
<!-- Create a new directory to generate stubs -->
<mkdir dir="${build.generated}" />
<!-- Create java files for the securitycacl service -->
<wsdl2java url="wsdl/SecurityCACLService.wsdl"
output="${build.generated}"
serverSide="yes"
noimports="no"
verbose="no"
typeMappingVersion="1.1"
testcase="no">
<mapping namespace="urn:axis"
package="edu.sdsc.gama.client.security.securitycacl" />
</wsdl2java>
<!-- Create java files for the securitymyproxy service -->
<wsdl2java url="wsdl/SecurityMyproxyService.wsdl"
output="${build.generated}"
serverSide="yes"
noimports="no"
verbose="no"
typeMappingVersion="1.1"
testcase="no">
<mapping namespace="urn:axis"
package="edu.sdsc.gama.client.security.securitymyproxy"
/>
</wsdl2java>
<!-- Create java files for the securitymyproxylogin service -->
<wsdl2java url="wsdl/SecurityMyproxyloginService.wsdl"
output="${build.generated}"
serverSide="yes"
noimports="no"
verbose="no"
typeMappingVersion="1.1"
testcase="no">
<mapping namespace="urn:axis"
package="edu.sdsc.gama.client.security.securitymyproxylogin"
/>
</wsdl2java>
<!-- Create java files for the securityuserimport service -->
<wsdl2java url="wsdl/SecurityUserImportService.wsdl"
output="${build.generated}"
serverSide="yes"
noimports="no"
verbose="no"
typeMappingVersion="1.1"
testcase="no">
<mapping namespace="urn:axis"
package="edu.sdsc.gama.client.security.securityuserimport"
/>
</wsdl2java>
</target>
------------------------------------
I am puzzled because looking at the code on the CVS:
http://svn.apache.org/viewvc/webservices/axis/tags/gt395/java/tools/org/apache/axis/tools/ant/wsdl/Wsdl2javaAntTask.java?view=markup
I see
//extract the scope
Scope scope = Scope.getScope(deployScope, null);
where scope is
import org.apache.axis.enum.Scope;
and the error I am getting makes no sense ????????
[wsdl2java] java.lang.NoSuchMethodError:
org.apache.axis.constants.Scope.getScope(Ljava/lang/String;Lorg/apache/axis/constants/Scope;)Lorg/apache/axis/constants/Scope;
[wsdl2java] at
org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask.execute(Wsdl2javaAntTask.java:214)
Thanks again for your support,
Luca
<!-- =======================================================================
GridSphere generated build file
Notes:
This is a build file for use with the Jakarta Ant build tool.
Prerequisites:
jakarta-ant from http://jakarta.apache.org
Build Instructions:
To build, invoke "ant"
Copyright:
2002,2003,2004
- $Id: build.xml,v 1.5 2006/08/21 23:19:17 kurt Exp $
============================================================================ -->
<project name="Grid Accounts" default="help" basedir=".">
<property file="build.properties"/>
<import file="userbuild.xml" optional="true"/>
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="${gridsphere.home}/lib/ant-contrib-0.3.jar"/>
</classpath>
</taskdef>
<property name="optimize" value="false"/>
<property name="debug" value="on"/>
<property name="deprecation" value="true"/>
<property name="project" value="${project.title} ${project.version}"/>
<property name="project.api" value="${project.title} API ${project.version}"/>
<!-- GridSphere build targets -->
<property name="build.lib" value="${project.build}/lib"/>
<property name="build.classes" value="${project.build}/classes"/>
<property name="build.webapp" value="${project.build}/webapp"/>
<property name="build.docs" value="${project.build}/docs"/>
<property name="build.javadoc" value="${build.docs}/javadocs"/>
<property name="build.tests" value="${project.build}/tests"/>
<property name="build.generated" value="${project.build}/generated"/>
<property environment="env"/>
<!-- Check for catalina.sh in CATALINA_HOME/bin -->
<target name="check-catalina">
<condition property="catalina.exists">
<available file="${env.CATALINA_HOME}/bin/bootstrap.jar"/>
</condition>
<fail message="Unable to find Tomcat 4.1.+. Make sure you have set $CATALINA_HOME set" unless="catalina.exists"/>
</target>
<!-- =================================================================== -->
<!-- Sets the CLASSPATH -->
<!-- =================================================================== -->
<path id="classpath">
<pathelement location="${build.classes}"/>
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${env.CATALINA_HOME}/common/lib">
<include name="*.jar"/>
</fileset>
<!-- this is for the XML JARs in Tomcat 4.1.x -->
<fileset dir="${env.CATALINA_HOME}/common/endorsed">
<include name="*.jar"/>
</fileset>
<fileset dir="${env.CATALINA_HOME}/shared/lib">
<include name="*.jar"/>
<exclude name="${project.name}-services.jar"/>
</fileset>
<fileset dir="${gridsphere.build}/lib">
<include name="*.jar"/>
</fileset>
<pathelement path="${java.class.path}"/>
</path>
<!-- =================================================================== -->
<!-- Functions -->
<!-- =================================================================== -->
<target name="setenv" depends="check-catalina" description="Check for libraries and print out config information">
<!-- Make build directories -->
<mkdir dir="src"/>
<mkdir dir="lib"/>
<mkdir dir="${project.build}"/>
<mkdir dir="${build.lib}"/>
<mkdir dir="${build.classes}"/>
<mkdir dir="${build.webapp}"/>
<mkdir dir="${build.docs}"/>
<property name="TEST_HOME" value="${env.CATALINA_HOME}/webapps/${project.name}/WEB-INF/test"/>
<available file="${build.generated}"
type="dir"
property="stubs.present" />
<echo message="--- Build environment for ${project} ---"/>
<echo message="--- Flags (Note: If the {property name} is displayed,"/>
<echo message=" then the component is not present)"/>
<echo message=""/>
<echo message="ANT_HOME is set to = ${env.ANT_HOME}"/>
<echo message="JAVA_HOME is set to = ${env.JAVA_HOME}"/>
<echo message="CATALINA_HOME is set to = ${env.CATALINA_HOME}"/>
<echo message="TEST_HOME is set to = ${TEST_HOME}"/>
<echo message="--- Property values ---"/>
<echo message="debug=${debug}"/>
<echo message="deprecation=${deprecation}"/>
<echo message="optimize=${optimize}"/>
</target>
<!-- =================================================================== -->
<!-- Print usage information -->
<!-- =================================================================== -->
<target name="help" description="shows help about useful target">
<echo message="target description"/>
<echo message="-----------------------------------------------------------------"/>
<echo message="install Installs ${project.title} to tomcat "/>
<echo message="clean Cleans up the build dir "/>
<echo message="compile Compiles all the code "/>
<echo message="jar Create a ${project.name} JAR "/>
<echo message="war Create a ${project.name} WAR "/>
<echo message="docs Creates ${project.title} Javadoc API "/>
<echo message="deploy Deploys ${project.title} to tomcat "/>
</target>
<taskdef name="wsdl2java" classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask">
<classpath refid="classpath" />
</taskdef>
<!-- Generate stubs if necessary -->
<target name="generateStubs" depends="setenv" unless="stubs.present">
<!-- Create a new directory to generate stubs -->
<mkdir dir="${build.generated}" />
<!-- Create java files for the securitycacl service -->
<wsdl2java url="wsdl/SecurityCACLService.wsdl"
output="${build.generated}"
serverSide="yes"
noimports="no"
verbose="no"
typeMappingVersion="1.1"
testcase="no">
<mapping namespace="urn:axis"
package="edu.sdsc.gama.client.security.securitycacl" />
</wsdl2java>
<!-- Create java files for the securitymyproxy service -->
<wsdl2java url="wsdl/SecurityMyproxyService.wsdl"
output="${build.generated}"
serverSide="yes"
noimports="no"
verbose="no"
typeMappingVersion="1.1"
testcase="no">
<mapping namespace="urn:axis"
package="edu.sdsc.gama.client.security.securitymyproxy" />
</wsdl2java>
<!-- Create java files for the securitymyproxylogin service -->
<wsdl2java url="wsdl/SecurityMyproxyloginService.wsdl"
output="${build.generated}"
serverSide="yes"
noimports="no"
verbose="no"
typeMappingVersion="1.1"
testcase="no">
<mapping namespace="urn:axis"
package="edu.sdsc.gama.client.security.securitymyproxylogin" />
</wsdl2java>
<!-- Create java files for the securityuserimport service -->
<wsdl2java url="wsdl/SecurityUserImportService.wsdl"
output="${build.generated}"
serverSide="yes"
noimports="no"
verbose="no"
typeMappingVersion="1.1"
testcase="no">
<mapping namespace="urn:axis"
package="edu.sdsc.gama.client.security.securityuserimport" />
</wsdl2java>
</target>
<!-- =================================================================== -->
<!-- Compiles all source code in distribution -->
<!-- =================================================================== -->
<target name="compile-all" depends="compile, compile-tests" description="Compiles all source code in distribution"/>
<!-- =================================================================== -->
<!-- Compiles source code -->
<!-- =================================================================== -->
<target name="compile" depends="setenv, generateStubs" description="Compile project source code">
<!-- Compile the gama service generated java files -->
<echo>Compiling auto-generated web service stubs</echo>
<javac srcdir="${build.generated}"
destdir="${build.classes}"
debug="${debug}"
classpathref="classpath"
source="1.4"
optimize="${optimize}"/>
<echo>Compiling project source code</echo>
<javac srcdir="src"
destdir="${build.classes}"
classpathref="classpath"
debug="${debug}"
optimize="${optimize}"
deprecation="false"/>
</target>
<!-- =================================================================== -->
<!-- Compiles JUnit tests -->
<!-- =================================================================== -->
<target name="compile-tests" depends="compile" description="Compiles all JUnit tests">
<echo>Compiling JUnit Tests</echo>
<javac srcdir="tests"
destdir="${build.classes}"
classpathref="classpath"
debug="${debug}"
optimize="${optimize}"
deprecation="${deprecation}">
</javac>
</target>
<!-- =================================================================== -->
<!-- Database stuff -->
<!-- =================================================================== -->
<target name="configure-database" depends="setenv">
<mkdir dir="${env.CATALINA_HOME}/webapps/${project.name}/WEB-INF/persistence/"/>
<copy overwrite="true" file="webapp/WEB-INF/persistence/hibernate.properties" todir="${env.CATALINA_HOME}/webapps/${project.name}/WEB-INF/persistence/"/>
<replace file="${env.CATALINA_HOME}/webapps/${project.name}/WEB-INF/persistence/hibernate.properties"
token="@3RDPARTY_WEBAPP@"
value="${env.CATALINA_HOME}/webapps/${project.name}"/>
</target>
<target name="create-database" depends="setenv, configure-database, deploy">
<taskdef name="dbtask"
classname="org.gridlab.gridsphere.core.persistence.hibernate.DBTask"
classpathref="classpath"/>
<dbtask
configdir="${env.CATALINA_HOME}/webapps/${project.name}"
action="CREATE"/>
</target>
<target name="update-database" depends="setenv, configure-database, deploy">
<taskdef name="dbtask"
classname="org.gridlab.gridsphere.core.persistence.hibernate.DBTask"
classpathref="classpath"/>
<dbtask
configdir="${env.CATALINA_HOME}/webapps/${project.name}"
action="UPDATE"/>
</target>
<!-- =================================================================== -->
<!-- Creates a JAR library archive configured for Tomcat -->
<!-- =================================================================== -->
<target name="jar" depends="portlets-jar, services-jar, ws-client-jar" description="Creates project JAR"/>
<!-- =================================================================== -->
<!-- Creates a JAR library archive configured for Tomcat -->
<!-- =================================================================== -->
<target name="portlets-jar" depends="compile" description="Creates portlets JAR">
<echo>Creating JAR for Tomcat</echo>
<jar jarfile="${build.lib}/${project.name}.jar" basedir="${build.classes}">
<include name="**/portlets/**"/>
</jar>
</target>
<!-- =================================================================== -->
<!-- Creates a @PROJECT_TITLE@ JAR library archive configured for Tomcat -->
<!-- =================================================================== -->
<target name="services-jar" depends="compile" description="Creates services JAR">
<echo>Creating services JAR for Tomcat</echo>
<jar jarfile="${build.lib}/${project.name}-services.jar" basedir="${build.classes}">
<include name="**/services/**"/>
<include name="**/client/**"/>
</jar>
</target>
<!-- =================================================================== -->
<!-- Creates a JAR library archive configured for Tomcat -->
<!-- =================================================================== -->
<target name="ws-client-jar" depends="compile" description="Creates ws-client JAR">
<echo>Creating ws-client JAR for Tomcat</echo>
<jar jarfile="${build.lib}/${project.name}-ws-client.jar" basedir="${build.classes}">
<include name="**/client/**"/>
</jar>
</target>
<!-- =================================================================== -->
<!-- Cleans everything -->
<!-- =================================================================== -->
<target name="clean" description="Delete classes and existing library">
<delete quiet="true" dir="${project.build}"/>
</target>
<target name="docs" depends="javadocs" description="Create project documentation"/>
<!-- =================================================================== -->
<!-- Creates all the API documentation -->
<!-- =================================================================== -->
<target name="javadocs" depends="setenv" description="Create Javadocs">
<echo>Creating Javadocs</echo>
<delete quiet="true" dir="${build.javadoc}"/>
<mkdir dir="${build.javadoc}"/>
<javadoc packagenames="edu.sdsc.gama.portal.portlets.*, edu.sdsc.gama.portal.services.*"
sourcepath="src"
classpathref="classpath"
destdir="${build.javadoc}"
author="true"
version="true"
splitindex="true"
use="true"
maxmemory="180m"
windowtitle="${project.title}"
doctitle="${project.api}"
bottom="Copyright © 2005 UC Regents">
<group title="GAMA Portlets "
packages="edu.sdsc.gama.portal.portlets.*"/>
<group title="GAMA Services "
packages="edu.sdsc.gama.portal.services.*"/>
</javadoc>
</target>
<!-- =================================================================== -->
<!-- Creates the WAR file -->
<!-- =================================================================== -->
<target name="war" depends="jar" description="Create project WAR">
<echo>Creating project web application WAR</echo>
<war warfile="${project.build}/${project.name}.war" update="true"
webxml="${webapp.dir}/WEB-INF/web.xml">
<fileset dir="${gswebapp.dir}">
<exclude name="WEB-INF/web.xml"/>
</fileset>
</war>
</target>
<!-- =================================================================== -->
<!-- Deploys portlets to a local server -->
<!-- =================================================================== -->
<target name="deploy" depends="jar" if="catalina.exists" description="Deploys portlet to a local server">
<echo>Deploying project to Tomcat</echo>
<!-- Copy the gridsphere web app to build directory -->
<property name="project.webapp" value="${env.CATALINA_HOME}/webapps/${project.name}"/>
<copy overwrite="true" todir="${project.webapp}">
<fileset dir="webapp"/>
</copy>
<mkdir dir="${project.webapp}/WEB-INF/lib"/>
<copy overwrite="true" todir="${project.webapp}/WEB-INF/lib">
<fileset dir="${build.lib}">
<include name="${project.name}.jar"/>
</fileset>
</copy>
<!-- Copy the gridsphere ui tags to web application -->
<copy todir="${project.webapp}/WEB-INF/lib">
<fileset dir="${gridsphere.build}/lib/">
<include name="gridsphere-ui-tags*.jar"/>
</fileset>
</copy>
<touch file="${env.CATALINA_HOME}/webapps/gridsphere/WEB-INF/CustomPortal/portlets/${project.name}"/>
<if>
<equals arg1="${use.jsr}" arg2="jsr"/>
<then>
<antcall target="copyjsr"/>
</then>
<else>
<antcall target="copygs"/>
</else>
</if>
<antcall target="configure-database"/>
</target>
<target name="copyjsr">
<copy todir="${project.webapp}/WEB-INF/lib">
<fileset dir="${build.lib}">
<include name="${project.name}-services.jar"/>
<include name="${project.name}-ws-client.jar"/>
<include name="${project.name}-test.jar"/>
</fileset>
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</copy>
</target>
<target name="copygs">
<copy todir="${env.CATALINA_HOME}/shared/lib">
<fileset dir="${build.lib}">
<include name="${project.name}-services.jar"/>
<include name="${project.name}-test.jar"/>
</fileset>
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</copy>
</target>
<target name="install">
<antcall target="license"/>
<antcall target="clean"/>
<antcall target="deploy"/>
<antcall target="create-database"/>
<antcall target="docs"/>
</target>
<!-- =================================================================== -->
<!-- Prints GridSphere license agreement -->
<!-- =================================================================== -->
<target name="license" description="Prints GAMA license">
<loadfile property="license" srcFile="LICENSE.txt"/>
<echo message="${license}"/>
<input message="Do you agree to these terms? " validargs="y,n" addProperty="agreed"/>
<condition property="do.abort">
<equals arg1="n" arg2="${agreed}"/>
</condition>
<fail if="do.abort">GAMA will not be installed</fail>
</target>
</project>