Get exceptions from com.googlecode.jchav.ant.JChavTask

11 vues
Accéder directement au premier message non lu

think...@googlemail.com

non lue,
11 févr. 2009, 04:35:5211/02/2009
à jchav
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

goul

non lue,
11 févr. 2009, 05:24:2111/02/2009
à jchav
Hi Abdul,

It looks to me like you are trying to run with a version of the jdk
pre version 5. The release version of JChav is compiled under JDK5,
and I'm afraid the source does use JDK5 features.
Let uss know how you get on.

Regards,
Paul.

On 11 Feb, 09:35, "thinktom...@googlemail.com"

noF

non lue,
11 févr. 2009, 06:11:2711/02/2009
à jc...@googlegroups.com
Hi Paul,
 
Yes, i am using the following versions of jdk and jchav:
 
JRE: j2re1.4.2_19
JChav: jchav-1.1.1
JMeter: jakarta-jmeter-2.3RC4
Ant: apache-ant-1.7.1
Now what I have to do is to change the version of jdk? or somewhere else I have to change, please guide me. Thanks for your reply.

--
mahoon

Richard Dallaway

non lue,
11 févr. 2009, 06:47:0311/02/2009
à jchav
On Feb 11, 11:11 am, noF <thinktom...@googlemail.com> wrote:
> Yes,* *i am using the following versions of jdk and jchav:
>
> JRE: j2re1.4.2_19
> [...]

You can download a 1.5 version of the JDK from http://java.com/ -- or
http://java.sun.com/products/archive/j2se/5.0_16/index.html if you
prefer.

JChav should work with Java 1.6, but I've not personally tested that.

It looks like you're using Windows, and from memory installing a new
JDK makes it the default version on your machine. That may or may not
be the thing you want to do depending on how much you rely on having a
specific version of Java.

Hope that helps
Richard

noF

non lue,
11 févr. 2009, 06:38:3711/02/2009
à jc...@googlegroups.com
Hi Paul,
 
Waoooooo..... I have installed jre 6. It works. Thanks alot Paul.
 
I have one question. Have you go through with CruiseControl? What is this? Is this a tool in which we can can run our test plans with time frame or something else. Actually I am not a tester, but I have to go through with JMeter and gererate reports. I am also not a JAVA developer thats why I dont understand the difference of jre 4 and jre 6. Please guide me an easy way to use CruiseControl. Thanks alot for your help.
 
--
Abdul

--
mahoon

noF

non lue,
11 févr. 2009, 06:53:2911/02/2009
à jc...@googlegroups.com
Hi Richard
 
Thanks for your detail help.  It works for in jre 1.6 also.

noF

non lue,
11 févr. 2009, 07:12:1511/02/2009
à jc...@googlegroups.com
Hi all,
 
I have generated the report using jchav but dont understand the report. It shows on x-axis Build and y-axis RT. Whats that mean. Do we change the legend or add number of threads(users)? Please guide me. Thanks in advance.


mahoon

Richard Dallaway

non lue,
11 févr. 2009, 08:25:2411/02/2009
à jchav
On 11 Feb, 11:38, noF <thinktom...@googlemail.com> wrote:
> I have one question. Have you go through with CruiseControl? What is this?

CruiseControl is a build automation tool: http://cruisecontrol.sourceforge.net/

It can execute Ant tasks for you at certain times or at a given
frequency. So if you have a build.xml file with your commands it it
for running JMeter, JChav etc, then CruiseControl can probably kick
those off you you.

Regards
Richard

Richard Dallaway

non lue,
11 févr. 2009, 08:31:1011/02/2009
à jchav
RT stands for "response time", and it is the amount of time it took
for the web page to return.

Build is the build number (the result of constructing your code, and
running JChav, so you know what build of sotware produced the
results).

The labels are fixed in the code, at the moment. Sorry about that.

There's no capability to add the number of threads to the chart. By
that I mean, JChav doesn't produce graphs of performance under
increasing load. It's intended to show you change in performance of
your software over time, where each run is under the same conditions.

Regards
Richard

On 11 Feb, 12:12, noF <thinktom...@googlemail.com> wrote:
> Hi all,
>
> I have generated the report using jchav but dont understand the report. It
> shows on x-axis Build and y-axis RT. Whats that mean. Do we change the
> legend or add number of threads(users)? Please guide me. Thanks in advance.
>
>
>
> On Wed, Feb 11, 2009 at 4:53 PM, noF <thinktom...@googlemail.com> wrote:
> > Hi Richard
>
> > Thanks for your detail help.  It works for in jre 1.6 also.
>
> >   On Wed, Feb 11, 2009 at 4:47 PM, Richard Dallaway <dalla...@gmail.com>wrote:
>
> >> On Feb 11, 11:11 am, noF <thinktom...@googlemail.com> wrote:
> >> > Yes,* *i am using the following versions of jdk and jchav:
>
> >> > JRE: j2re1.4.2_19
> >> > [...]
>
> >> You can download a 1.5 version of the JDK fromhttp://java.com/ -- or
> >>http://java.sun.com/products/archive/j2se/5.0_16/index.htmlif you
> >> prefer.
>
> >> JChav should work with Java 1.6, but I've not personally tested that.
>
> >> It looks like you're using Windows, and from memory installing a new
> >> JDK makes it the default version on your machine.  That may or may not
> >> be the thing you want to do depending on how much you rely on having a
> >> specific version of Java.
>
> >> Hope that helps
> >> Richard
>
> > --
> > mahoon
>
> --
> mahoon

noF

non lue,
12 févr. 2009, 01:39:0212/02/2009
à jc...@googlegroups.com
Thanks alot Richard, its a great help.
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message