ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ckn...@onebox.com
Subject Classpath failure has me mystified.
Date Thu, 19 Oct 2006 13:59:13 GMT
My problem:

When running a build file, I get this error message:

     [java] Error in FetchDataAsXML.getXML(): java.lang.ClassNotFoundException:
oracle.jdbc.driver.OracleDriver

The relevant sections of the build file:

	<target name="init">
		<tstamp>
			<format property="TODAY" pattern="MMMM dd, yyyy" />
		</tstamp>
		&lt;!-- irrelevant properties omitted --&gt;
		<property name="oracle.xsu12.jar.path" value="c:/oracle/ora90JavaXDK/lib/xsu12.jar" />
		<property name="oracle.xml.parser.jar.path" value="c:/oracle/ora90JavaXDK/lib/xmlparserv2.jar"
/>
		<property name="sars.jar.path" value="../sars.jar" />
	</target>

	<java classname="com.kilonovember.alpo.sarsj.FetchDataAsXML" fork="true">
		<classpath>
			<pathelement location="${sars.jar.path}" />
			<pathelement location="${oracle.xsu12.jar.path}" />
			<pathelement location="${oracle.xml.parser.jar.path}" />
		</classpath>
		<arg value="QueryFileName=${sql.dir}/${query.file}" />
		<arg value="QueryName=${query.name}" />
		<arg value="QueryVersion=${query.version}" />
		<arg value="BindVariables=${query.bind-variables}" />
		<arg value="XMLFileName=${xml.dir}/${outfile}" />
	</java>

When I run the com.kilonovember.alpo.sarsj.FetchDataAsXML class from the command line like
this:

java -cp %CLASSPATH%;../sars.jar;c:\oracle\ora90JavaXDK\lib\xsu12.jar;c:\oracle\ora90JavaXDK\lib\xmlparserv2.jar
com.kilonovember.alpo.sarsj.FetchDataAsXML QueryFileName=../queries.xml QueryName=pending
XMLFileName=hropeod.xml bindvars=1:2006-10-13;2:2006-10-15

the program executes without fault.

I have carefully checked to see that the elements of the classpath attribute passed on the
command line match the <pathelement location="" /> values, 

<property name="oracle.xsu12.jar.path" value="c:/oracle/ora90JavaXDK/lib/xsu12.jar" />
--
c:\oracle\ora90JavaXDK\lib\xsu12.jar

<property name="oracle.xml.parser.jar.path" value="c:/oracle/ora90JavaXDK/lib/xmlparserv2.jar"
/>
--
c:\oracle\ora90JavaXDK\lib\xmlparserv2.jar

so I am stumped as to why the build file gives this error.

Any insight you can offer will be gratefully accepted.

Thanks.

-- 
Charles Knell
cknell@onebox.com - email

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message