Link to home
Create AccountLog in
Avatar of Mem77
Mem77

asked on

Building with ant

I am trying to build a application.  My build.xml snippet is here.  For this portion I get the below error.
Please help.
<!-- Generates a Web Service for creating and updating proposals  -->
      <target name="build.WebService" depends="build.distribution">
            <echo message="Building the proposal web service..." />
            <delete file="cba.ear" failonerror="true" />
            <servicegen destEar="cba.ear" warName="cba.war" contextURI="proposalService">
                  <service
                        javaClassComponents="com.hp.cba.ws.service.ProposalWS"
                        targetNamespace="http://localhost:7001/webservices/ProposalService"
                        serviceName="ProposalService"
                        serviceURI="/ProposalService"
                        generateTypes="True"
                        expandMethods="True" />
                  <classpath>
                        <pathelement path="${dist.dir}\WEB-INF\classes" />
                        <pathelement path="${dist.dir}\WEB-INF\lib\spring.jar" />
                        <path refid="weblogic.classpath" />
                  </classpath>
            </servicegen>
            <mkdir dir="ear" />
            <unjar src="cba.ear" dest="ear" />
            <unwar src="ear/cba.war" dest="${dist.dir}" overwrite="true" />
            <copy file="etc/web.xml" tofile="${dist.dir}/WEB-INF/web.xml" overwrite="true" />
            <delete dir="ear" quiet="true" />
            <delete file="cba.ear" />
      </target>

Error  I get is  :

bad class file: C:\Program Files\Java\jre1.5.0_13\lib\rt.jar(java/lang/Object.class)
[servicegen] class file has wrong version 49.0, should be 48.0
[servicegen] Please remove or make sure it appears in the correct subdirectory of the classpath.
[servicegen] public final class ProposalDtoHolder .

ASKER CERTIFIED SOLUTION
Avatar of favoretti
favoretti
Flag of Netherlands image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of senthil_infotech
senthil_infotech

what is the use of this code
<target name="init">
		<property name="dirs.base" value="D:\projectLatestchoice"/>
		<property name="classDir" value="${dirs.base}/bin"/>
		
		<property name="src" value="${dirs.base}/source"/>
		<property name="configDir" value="${dirs.base}/source/config"/>
		
		<property name="jarFile" value="latestchoice.jar"/>
		<property name="jarDir" value="${dirs.base}/deployments"/>
	</target>
	
	<target name="clean" description="Cleans any directories and generated files">
		<delete dir="${classDir}"/>
		<mkdir dir="${classDir}"/>
	</target>

Open in new window

Forced accept.

Computer101
EE Admin