Hi all,
I am new Jchav. I have run the my build.xml file. I got the following
exceptions:
---------------------------------------------------------------------------------------------------------------------
run-jchav:
BUILD FAILED
java.lang.UnsupportedClassVersionError: com/googlecode/jchav/ant/
JChavTask (Unsu
pported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at org.apache.tools.ant.AntClassLoader.defineClassFromData
(AntClassLoade
r.java:1146)
at org.apache.tools.ant.AntClassLoader.getClassFromStream
(AntClassLoader
.java:1324)
at org.apache.tools.ant.AntClassLoader.findClassInComponents
(AntClassLoa
der.java:1388)
at org.apache.tools.ant.AntClassLoader.findClass
(AntClassLoader.java:134
1)
at org.apache.tools.ant.AntClassLoader.loadClass
(AntClassLoader.java:108
8)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.tools.ant.taskdefs.Definer.addDefinition
(Definer.java:583)
at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:
228)
at org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets
(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:
1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:
1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:
104)
---------------------------------------------------------------------------------------------------------------------------------------------
My build.xml file looks like:
--------------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<project name="jchav-example" default="default" basedir=".">
<target name="default" depends="run-jmeter,run-jchav"
description="Run Jmeter test plan and generate JChav reports" />
<target name="init">
<property file="build.properties" />
<tstamp description="Produce a build id. If using a continuous build
process inherit the build. id from that">
<format property="
build.id" pattern="dMMhhmmss" locale="en"/>
</tstamp>
<property description="The location of the install of JMeter"
name="jmeter.install.dir" value="E:/JMeter/jakarta-jmeter-2.3RC4/
jakarta-jmeter-2.3RC4" />
<property description="The directory containing the jchav jars"
name="jchav.libs.dir" value="../../" />
<property description="The JMeter test plan script we want to run"
name="jmeter.testplan" value="Cubecart_Time/cubecart.jmx" />
<property description="The location to store the per run files"
name="jmeter.result.dir" value="./Cubecart_JMeter" />
<property description="The resulting file location, make sure this
is unique for each build"
name="jmeter.result.file" value="${jmeter.result.dir}/cubecart$
{
build.id}.xml" />
<property description="The location to generate the html and charts
to. "
name="jchav.result.dir" value="./Cubecart_chart" />
<echo>
This example assumes JChav libraries exist in ${jchav.libs.dir}
If they don't first run "ant build-jar" from the etc/ folder to create
the libs.
Additionally it assumes that you have JMeter installed at $
{jmeter.install.dir}, if this is not the correct location create a
file ${
user.name}.properties in this directory overriding the location
with the line jmeter.install.dir=your path to JMeter.
</echo>
</target>
<target name="run-jmeter" depends="init"
description="Execute the JMeter test plan, recording the results to
a file.">
<taskdef
name="jmeter"
classpath="${jmeter.install.dir}/extras/ant-
jmeter.jar"
classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask"/>
<jmeter
forceBuildFailure="true"
jmeterhome="${jmeter.install.dir}"
testplan="${jmeter.testplan}"
resultlog="${jmeter.result.file}">
<property name="jmeter.save.saveservice.output_format" value="xml"/
>
</jmeter>
</target>
<target name="run-jchav" depends="init"
description="Produce JChav report from the JMeter results">
<mkdir dir="${jchav.libs.dir}/"/>
<taskdef name="jchav"
classname="com.googlecode.jchav.ant.JChavTask">
<classpath>
<fileset dir="${jchav.libs.dir}/">
<include name="**/*.jar"/>
</fileset>
</classpath>
</taskdef>
<jchav srcdir="${jmeter.result.dir}" destdir="${jchav.result.dir}"
reporttitle="Cube Cart Testing"
uniformyaxis="true" />
<echo>Now open cubecart/index.html</echo>
</target>
</project>
--------------------------------------------------------------------------------------------------------------------------------------------------
Please guid me where I am wrong. Thanks in advance.
--
Abdul