You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by A S Praj <as...@gmail.com> on 2006/03/19 06:53:03 UTC

java.lang.NoSuchMethodException - org.apache.maven.surefire.Runner

 Hi Team,

       Am very new to Build as well as Maven. I managed to compile a source
using mvn compile.      When I try to do test i.e mvn test am getting the
following Error

RUN ABORTED
java.lang.NoSuchMethodException
org.apache.maven.surefire.Runner
An exception or error caused a run to abort.
org.apache.commons.beanutils.TestBeanPackageSubclass.<init>()

what could be the problem.

If any one can help me out in this that will be great help for me to Explore
more things

Regards


A.S.P. Raj

Re: java.lang.NoSuchMethodException - org.apache.maven.surefire.Runner

Posted by A S Praj <as...@gmail.com>.
Hi Wayne,
      As I said earlier am new Maven 2, as well as Build and Packaging java
files, am exploring Maven 2 directly and downloading some Opensource files
from net and trying to build it. In that way, I have taken some Source and
trying to build it. With that Opensource there where some build.xml and
Project.xml, in that way I understand that they are Ant/Maven 1 build files.

     I will try to modify the Testcases and try, and let you know about the
result.
Regards

A.S.P Raj


On 3/19/06, Wayne Fay <wa...@gmail.com> wrote:
>
> Try modifying one test file to fit the terms I've outlined and see if
> it resolves your error. I think it will. If this works, then yes I
> think you will generally need to rewrite your cases to run in
> Surefire.
>
> Alternatively you could perhaps find a way to configure the Surefire
> plugin to allow you to continue using your current test cases. But I
> don't know anything about this, so for me, the easiest method is to
> just write Junit-compatible test cases that will run in Surefire.
>
> What testing tool were you using before that did not require
> xxxTest.java and public void testXXX() method naming?
>
> Wayne
>
>
> On 3/19/06, A S Praj <as...@gmail.com> wrote:
> > Hi Wayne,
> >           Thanks for your early reply.
> >
> > 1.As you said there are no such files named XXXTest.java and there are
> files
> > name XXXXTestCase.java
> >
> > 2. and those test files (XXXXTestCase) also doesnot have test method
> > signatures like public void testXXX() {}
> >
> > Should I have to rewrite such test cases and the functions to test in
> Maven
> > 2
> >
> > Regards
> >
> >
> > A.S.P. Raj
> >
> > On 3/19/06, Wayne Fay <wa...@gmail.com> wrote:
> > >
> > > Run mvn -X -e test to hopefully reveal more details about the error.
> > >
> > > Also confirm for us that you have:
> > > 1. java junit test files named XXXTest.java in your src/test/java
> folders
> > > 2. those test files have test method signatures like public void
> testXXX()
> > > {}
> > >
> > > Just a few days ago, someone else posted with a Surefire problem that
> > > was related to not having a single test method in their test file(s).
> > >
> > > So please make sure your test files are proper Junit test files...
> > >
> > > Wayne
> > >
> > >
> > > On 3/18/06, A S Praj <as...@gmail.com> wrote:
> > > >  Hi Team,
> > > >
> > > >       Am very new to Build as well as Maven. I managed to compile a
> > > source
> > > > using mvn compile.      When I try to do test i.e mvn test am
> getting
> > > the
> > > > following Error
> > > >
> > > > RUN ABORTED
> > > > java.lang.NoSuchMethodException
> > > > org.apache.maven.surefire.Runner
> > > > An exception or error caused a run to abort.
> > > > org.apache.commons.beanutils.TestBeanPackageSubclass.<init>()
> > > >
> > > > what could be the problem.
> > > >
> > > > If any one can help me out in this that will be great help for me to
> > > Explore
> > > > more things
> > > >
> > > > Regards
> > > >
> > > >
> > > > A.S.P. Raj
> > > >
> > > >
> > >
> >
> >
>

Re: java.lang.NoSuchMethodException - org.apache.maven.surefire.Runner

Posted by Wayne Fay <wa...@gmail.com>.
Try modifying one test file to fit the terms I've outlined and see if
it resolves your error. I think it will. If this works, then yes I
think you will generally need to rewrite your cases to run in
Surefire.

Alternatively you could perhaps find a way to configure the Surefire
plugin to allow you to continue using your current test cases. But I
don't know anything about this, so for me, the easiest method is to
just write Junit-compatible test cases that will run in Surefire.

What testing tool were you using before that did not require
xxxTest.java and public void testXXX() method naming?

Wayne


On 3/19/06, A S Praj <as...@gmail.com> wrote:
> Hi Wayne,
>           Thanks for your early reply.
>
> 1.As you said there are no such files named XXXTest.java and there are files
> name XXXXTestCase.java
>
> 2. and those test files (XXXXTestCase) also doesnot have test method
> signatures like public void testXXX() {}
>
> Should I have to rewrite such test cases and the functions to test in Maven
> 2
>
> Regards
>
>
> A.S.P. Raj
>
> On 3/19/06, Wayne Fay <wa...@gmail.com> wrote:
> >
> > Run mvn -X -e test to hopefully reveal more details about the error.
> >
> > Also confirm for us that you have:
> > 1. java junit test files named XXXTest.java in your src/test/java folders
> > 2. those test files have test method signatures like public void testXXX()
> > {}
> >
> > Just a few days ago, someone else posted with a Surefire problem that
> > was related to not having a single test method in their test file(s).
> >
> > So please make sure your test files are proper Junit test files...
> >
> > Wayne
> >
> >
> > On 3/18/06, A S Praj <as...@gmail.com> wrote:
> > >  Hi Team,
> > >
> > >       Am very new to Build as well as Maven. I managed to compile a
> > source
> > > using mvn compile.      When I try to do test i.e mvn test am getting
> > the
> > > following Error
> > >
> > > RUN ABORTED
> > > java.lang.NoSuchMethodException
> > > org.apache.maven.surefire.Runner
> > > An exception or error caused a run to abort.
> > > org.apache.commons.beanutils.TestBeanPackageSubclass.<init>()
> > >
> > > what could be the problem.
> > >
> > > If any one can help me out in this that will be great help for me to
> > Explore
> > > more things
> > >
> > > Regards
> > >
> > >
> > > A.S.P. Raj
> > >
> > >
> >
>
>

Re: java.lang.NoSuchMethodException - org.apache.maven.surefire.Runner

Posted by A S Praj <as...@gmail.com>.
Hi Wayne,
           Thanks for your early reply.

1.As you said there are no such files named XXXTest.java and there are files
name XXXXTestCase.java

2. and those test files (XXXXTestCase) also doesnot have test method
signatures like public void testXXX() {}

Should I have to rewrite such test cases and the functions to test in Maven
2

Regards


A.S.P. Raj

On 3/19/06, Wayne Fay <wa...@gmail.com> wrote:
>
> Run mvn -X -e test to hopefully reveal more details about the error.
>
> Also confirm for us that you have:
> 1. java junit test files named XXXTest.java in your src/test/java folders
> 2. those test files have test method signatures like public void testXXX()
> {}
>
> Just a few days ago, someone else posted with a Surefire problem that
> was related to not having a single test method in their test file(s).
>
> So please make sure your test files are proper Junit test files...
>
> Wayne
>
>
> On 3/18/06, A S Praj <as...@gmail.com> wrote:
> >  Hi Team,
> >
> >       Am very new to Build as well as Maven. I managed to compile a
> source
> > using mvn compile.      When I try to do test i.e mvn test am getting
> the
> > following Error
> >
> > RUN ABORTED
> > java.lang.NoSuchMethodException
> > org.apache.maven.surefire.Runner
> > An exception or error caused a run to abort.
> > org.apache.commons.beanutils.TestBeanPackageSubclass.<init>()
> >
> > what could be the problem.
> >
> > If any one can help me out in this that will be great help for me to
> Explore
> > more things
> >
> > Regards
> >
> >
> > A.S.P. Raj
> >
> >
>

Re: java.lang.NoSuchMethodException - org.apache.maven.surefire.Runner

Posted by Wayne Fay <wa...@gmail.com>.
Run mvn -X -e test to hopefully reveal more details about the error.

Also confirm for us that you have:
1. java junit test files named XXXTest.java in your src/test/java folders
2. those test files have test method signatures like public void testXXX() {}

Just a few days ago, someone else posted with a Surefire problem that
was related to not having a single test method in their test file(s).

So please make sure your test files are proper Junit test files...

Wayne


On 3/18/06, A S Praj <as...@gmail.com> wrote:
>  Hi Team,
>
>       Am very new to Build as well as Maven. I managed to compile a source
> using mvn compile.      When I try to do test i.e mvn test am getting the
> following Error
>
> RUN ABORTED
> java.lang.NoSuchMethodException
> org.apache.maven.surefire.Runner
> An exception or error caused a run to abort.
> org.apache.commons.beanutils.TestBeanPackageSubclass.<init>()
>
> what could be the problem.
>
> If any one can help me out in this that will be great help for me to Explore
> more things
>
> Regards
>
>
> A.S.P. Raj
>
>