You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Adam Hardy <ad...@cyberspaceroad.com> on 2009/04/02 15:26:32 UTC

strange error with hopefully easy solution?

My search results showed nothing in google or anything relevant in the archives, 
but I have an intractable error in my test batchrun, which seems to be a 
compilation problem.

The test is fine when executed in isolation.

This is what happens when I run all my test with "mvn clean test":


Tests in error:
   initializationError0(org.permacode.patternrepo.basic.TestRunManagerTest$1)

The actual test file 'TestRunManagerTest' is all OK, I think. The $1 suffix is 
incriminating evidence. These are the files that appear in my directory tree:

adam@gondor:~/projects/pattern-repo$ find . -name TestRunManager* -exec ls -la {} \;
-rw-r--r-- 1 adam adam 534 2009-02-24 10:00 
./src/main/java/org/permacode/patternrepo/domain/TestRunManager.java
-rw-r--r-- 1 adam adam 8276 2009-03-03 14:36 
./src/test/java/org/permacode/patternrepo/basic/TestRunManagerTest.java
-rw-r--r-- 1 adam adam 808 2009-04-02 14:09 
./target/classes/org/permacode/patternrepo/domain/TestRunManager.class
-rw-r--r-- 1 adam adam 2305 2009-04-02 14:09 
./target/test-classes/org/permacode/patternrepo/basic/TestRunManagerTest$1.class
-rw-r--r-- 1 adam adam 7665 2009-04-02 14:09 
./target/test-classes/org/permacode/patternrepo/basic/TestRunManagerTest.class
-rw-r--r-- 1 adam adam 808 2009-04-02 14:08 
./build/classes/org/permacode/patternrepo/domain/TestRunManager.class
-rw-r--r-- 1 adam adam 2289 2009-04-02 14:08 
./build/classes/org/permacode/patternrepo/basic/TestRunManagerTest$1.class
-rw-r--r-- 1 adam adam 7699 2009-04-02 14:08 
./build/classes/org/permacode/patternrepo/basic/TestRunManagerTest.class


So you can see that maven and eclipse both compile the normal test class file, 
but also create a TestRunManagerTest$1.class file. This one causes the build to 
file with this output:

initializationError0(org.permacode.patternrepo.basic.TestRunManagerTest$1)  Time 
elapsed: 0.061 sec  <<< ERROR!
java.lang.Exception: Test class should have public zero-argument constructor
         at 
org.junit.internal.runners.MethodValidator.validateNoArgConstructor(MethodValidator.java:54)


so the TestRunManagerTest$1 is obviously the result of jdk1.6.0_12 messing up 
the compilation, right?

Does anyone know what I can do about it? And perhaps what I did that caused it?

Thanks
Adam


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: strange error with hopefully easy solution?

Posted by Adam Hardy <ad...@cyberspaceroad.com>.
Wayne Fay on 02/04/09 17:10, wrote:
>> so the TestRunManagerTest$1 is obviously the result of jdk1.6.0_12 messing
>> up the compilation, right?
> 
> Run that $1 class thru JAD and see what the source code looks like.
> You do know where $1 files usually come from, right (anonymous inner
> classes) so this is not necessarily an error. But it may be an error
> that Surefire is trying to run JUnit against those $1 files.

jad is refusing to run on my linux box, I'll have to solve that one first.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: strange error with hopefully easy solution?

Posted by Wayne Fay <wa...@gmail.com>.
> so the TestRunManagerTest$1 is obviously the result of jdk1.6.0_12 messing
> up the compilation, right?

Run that $1 class thru JAD and see what the source code looks like.
You do know where $1 files usually come from, right (anonymous inner
classes) so this is not necessarily an error. But it may be an error
that Surefire is trying to run JUnit against those $1 files.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: strange error with hopefully easy solution?

Posted by Martin Gainty <mg...@hotmail.com>.
As long as that penny does'nt wind up in my afternoon Tea..

Congratulations Watson..you have solved the mystery!

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
This message is confidential and may be privileged. If you are not the intended recipient, we kindly ask you to  please inform the sender. Any unauthorised dissemination or copying hereof is prohibited. This message serves for information purposes only and shall not have any legally binding effect. Given that e-mails can easily be subject to manipulation, we can not accept any liability for the content provided.






> Date: Thu, 2 Apr 2009 18:09:30 +0100
> From: adam.maven@cyberspaceroad.com
> To: users@maven.apache.org
> Subject: Re: strange error with hopefully easy solution?
> 
> Ah, the penny has finally dropped!
> 
> The TestRunManagerTest.class does have an inner class, despite my previous 
> complete conviction that there was no way I had put an inner class in my junit 
> test class.
> 
> It's actually inline which is why I didn't recognise it.
> 
> In case you think I'm nuts, it's an EasyMock Answer class to examine parameters 
> passed to mocked classes.
> 
> This has just come out of the woodwork now despite being present for the last 
> year. I see mvn just downloaded a surefire update surefire-junit4-2.4.3.jar this 
> afternoon so maybe that's the culprit.
> 
> However I have these EasyMock inner classes dotted all over my code.
> 
> Anyway the problem is that it's an anonymous inner class. I suppose I could make 
> it a normal inner class, but if I don't, I can't give it a constructor.
> 
> 
> 
> 
> Bryan Loofbourrow on 02/04/09 17:19, wrote:
> > Adam,
> > 
> > I think the easy solution is to add the public no-args constructor to
> > your inner class, as it's telling you to do.
> > 
> > I've run into this before, surefire trying to instantiate all my
> > classes, including inner classes.
> > 
> > -- Bryan
> > 
> > -----Original Message-----
> > From: Adam Hardy [mailto:adam.maven@cyberspaceroad.com] 
> > Sent: Thursday, April 02, 2009 9:10 AM
> > To: Maven Users List
> > Subject: Re: strange error with hopefully easy solution?
> > 
> > Hi Martin,
> > 
> > you had me worried there for a moment, thought I'd emailed the wrong
> > list!
> > 
> > But anyway, I'll be surprised if you can reproduce it unless I send you
> > my whole 
> > project.
> > 
> > Actually perhaps I should try recreating the eclipse project.
> > 
> > however here is the pom.xml - unless the mailing list strips off the
> > attachment.
> > 
> > There are no batchrun plug-ins, and in case the name of the class is
> > confusing, 
> > the TestRunManager has nothing to do with the maven test run, except of
> > course 
> > that it gets tested like all the other classes.
> > 
> > Just surefire, war and maven-openjpa (which affects the entity beans,
> > not the 
> > Manager classes).
> > 
> > In case you wonder, I have no other classes in any of my dependent
> > projects 
> > (atomic, testdatarepo, parent project) called TestRunManager - unless
> > it's hiding.
> > 
> > Thanks
> > Adam
> > 
> > Martin Gainty on 02/04/09 16:22, wrote:
> >> experiencing a bit of difficulty reproducing this error
> >> can you supply
> >>
> >> pom.xml?
> >> any plugins (junit-test-gen/batchrun) you may be using ?
> >> empty org.permacode.patternrepo.basic.TestRunManagerTest Java class?
> >>
> >>> Date: Thu, 2 Apr 2009 14:26:32 +0100
> >>> From: adam.maven@cyberspaceroad.com
> >>> To: users@maven.apache.org
> >>> Subject: strange error with hopefully easy solution?
> >>>
> >>> My search results showed nothing in google or anything relevant in
> > the archives, 
> >>> but I have an intractable error in my test batchrun, which seems to
> > be a 
> >>> compilation problem.
> >>>
> >>> The test is fine when executed in isolation.
> >>>
> >>> This is what happens when I run all my test with "mvn clean test":
> >>>
> >>>
> >>> Tests in error:
> >>>
> > initializationError0(org.permacode.patternrepo.basic.TestRunManagerTest$
> > 1)
> >>> The actual test file 'TestRunManagerTest' is all OK, I think. The $1
> > suffix is 
> >>> incriminating evidence. These are the files that appear in my
> > directory tree:
> >>> adam@gondor:~/projects/pattern-repo$ find . -name TestRunManager*
> > -exec ls -la {} \;
> >>> -rw-r--r-- 1 adam adam 534 2009-02-24 10:00 
> >>> ./src/main/java/org/permacode/patternrepo/domain/TestRunManager.java
> >>> -rw-r--r-- 1 adam adam 8276 2009-03-03 14:36 
> >>>
> > ./src/test/java/org/permacode/patternrepo/basic/TestRunManagerTest.java
> >>> -rw-r--r-- 1 adam adam 808 2009-04-02 14:09 
> >>>
> > ./target/classes/org/permacode/patternrepo/domain/TestRunManager.class
> >>> -rw-r--r-- 1 adam adam 2305 2009-04-02 14:09 
> >>>
> > ./target/test-classes/org/permacode/patternrepo/basic/TestRunManagerTest
> > $1.class
> >>> -rw-r--r-- 1 adam adam 7665 2009-04-02 14:09 
> >>>
> > ./target/test-classes/org/permacode/patternrepo/basic/TestRunManagerTest
> > .class
> >>> -rw-r--r-- 1 adam adam 808 2009-04-02 14:08 
> >>> ./build/classes/org/permacode/patternrepo/domain/TestRunManager.class
> >>> -rw-r--r-- 1 adam adam 2289 2009-04-02 14:08 
> >>>
> > ./build/classes/org/permacode/patternrepo/basic/TestRunManagerTest$1.cla
> > ss
> >>> -rw-r--r-- 1 adam adam 7699 2009-04-02 14:08 
> >>>
> > ./build/classes/org/permacode/patternrepo/basic/TestRunManagerTest.class
> >>>
> >>> So you can see that maven and eclipse both compile the normal test
> > class file, 
> >>> but also create a TestRunManagerTest$1.class file. This one causes
> > the build to 
> >>> file with this output:
> >>>
> >>>
> > initializationError0(org.permacode.patternrepo.basic.TestRunManagerTest$
> > 1)  Time 
> >>> elapsed: 0.061 sec  <<< ERROR!
> >>> java.lang.Exception: Test class should have public zero-argument
> > constructor
> >>>          at 
> >>>
> > org.junit.internal.runners.MethodValidator.validateNoArgConstructor(Meth
> > odValidator.java:54)
> >>>
> >>> so the TestRunManagerTest$1 is obviously the result of jdk1.6.0_12
> > messing up 
> >>> the compilation, right?
> >>>
> >>> Does anyone know what I can do about it? And perhaps what I did that
> > caused it?
> > 
> > 
> > This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
> > you may review at http://www.amdocs.com/email_disclaimer.asp
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

_________________________________________________________________
Rediscover HotmailĀ®: Get e-mail storage that grows with you. 
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009

Re: strange error with hopefully easy solution?

Posted by Adam Hardy <ad...@cyberspaceroad.com>.
Just to be clearer, I have inner classes in several unit tests but this is the 
only one which is causing the problem.


Adam Hardy on 02/04/09 18:09, wrote:
> Ah, the penny has finally dropped!
> 
> The TestRunManagerTest.class does have an inner class, despite my 
> previous complete conviction that there was no way I had put an inner 
> class in my junit test class.
> 
> It's actually inline which is why I didn't recognise it.
> 
> In case you think I'm nuts, it's an EasyMock Answer class to examine 
> parameters passed to mocked classes.
> 
> This has just come out of the woodwork now despite being present for the 
> last year. I see mvn just downloaded a surefire update 
> surefire-junit4-2.4.3.jar this afternoon so maybe that's the culprit.
> 
> However I have these EasyMock inner classes dotted all over my code.
> 
> Anyway the problem is that it's an anonymous inner class. I suppose I 
> could make it a normal inner class, but if I don't, I can't give it a 
> constructor.
> 
> 
> 
> 
> Bryan Loofbourrow on 02/04/09 17:19, wrote:
>> Adam,
>>
>> I think the easy solution is to add the public no-args constructor to
>> your inner class, as it's telling you to do.
>>
>> I've run into this before, surefire trying to instantiate all my
>> classes, including inner classes.
>>
>> -- Bryan
>>
>> -----Original Message-----
>> From: Adam Hardy [mailto:adam.maven@cyberspaceroad.com] Sent: 
>> Thursday, April 02, 2009 9:10 AM
>> To: Maven Users List
>> Subject: Re: strange error with hopefully easy solution?
>>
>> Hi Martin,
>>
>> you had me worried there for a moment, thought I'd emailed the wrong
>> list!
>>
>> But anyway, I'll be surprised if you can reproduce it unless I send you
>> my whole project.
>>
>> Actually perhaps I should try recreating the eclipse project.
>>
>> however here is the pom.xml - unless the mailing list strips off the
>> attachment.
>>
>> There are no batchrun plug-ins, and in case the name of the class is
>> confusing, the TestRunManager has nothing to do with the maven test 
>> run, except of
>> course that it gets tested like all the other classes.
>>
>> Just surefire, war and maven-openjpa (which affects the entity beans,
>> not the Manager classes).
>>
>> In case you wonder, I have no other classes in any of my dependent
>> projects (atomic, testdatarepo, parent project) called TestRunManager 
>> - unless
>> it's hiding.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: strange error with hopefully easy solution?

Posted by Adam Hardy <ad...@cyberspaceroad.com>.
Ah, the penny has finally dropped!

The TestRunManagerTest.class does have an inner class, despite my previous 
complete conviction that there was no way I had put an inner class in my junit 
test class.

It's actually inline which is why I didn't recognise it.

In case you think I'm nuts, it's an EasyMock Answer class to examine parameters 
passed to mocked classes.

This has just come out of the woodwork now despite being present for the last 
year. I see mvn just downloaded a surefire update surefire-junit4-2.4.3.jar this 
afternoon so maybe that's the culprit.

However I have these EasyMock inner classes dotted all over my code.

Anyway the problem is that it's an anonymous inner class. I suppose I could make 
it a normal inner class, but if I don't, I can't give it a constructor.




Bryan Loofbourrow on 02/04/09 17:19, wrote:
> Adam,
> 
> I think the easy solution is to add the public no-args constructor to
> your inner class, as it's telling you to do.
> 
> I've run into this before, surefire trying to instantiate all my
> classes, including inner classes.
> 
> -- Bryan
> 
> -----Original Message-----
> From: Adam Hardy [mailto:adam.maven@cyberspaceroad.com] 
> Sent: Thursday, April 02, 2009 9:10 AM
> To: Maven Users List
> Subject: Re: strange error with hopefully easy solution?
> 
> Hi Martin,
> 
> you had me worried there for a moment, thought I'd emailed the wrong
> list!
> 
> But anyway, I'll be surprised if you can reproduce it unless I send you
> my whole 
> project.
> 
> Actually perhaps I should try recreating the eclipse project.
> 
> however here is the pom.xml - unless the mailing list strips off the
> attachment.
> 
> There are no batchrun plug-ins, and in case the name of the class is
> confusing, 
> the TestRunManager has nothing to do with the maven test run, except of
> course 
> that it gets tested like all the other classes.
> 
> Just surefire, war and maven-openjpa (which affects the entity beans,
> not the 
> Manager classes).
> 
> In case you wonder, I have no other classes in any of my dependent
> projects 
> (atomic, testdatarepo, parent project) called TestRunManager - unless
> it's hiding.
> 
> Thanks
> Adam
> 
> Martin Gainty on 02/04/09 16:22, wrote:
>> experiencing a bit of difficulty reproducing this error
>> can you supply
>>
>> pom.xml?
>> any plugins (junit-test-gen/batchrun) you may be using ?
>> empty org.permacode.patternrepo.basic.TestRunManagerTest Java class?
>>
>>> Date: Thu, 2 Apr 2009 14:26:32 +0100
>>> From: adam.maven@cyberspaceroad.com
>>> To: users@maven.apache.org
>>> Subject: strange error with hopefully easy solution?
>>>
>>> My search results showed nothing in google or anything relevant in
> the archives, 
>>> but I have an intractable error in my test batchrun, which seems to
> be a 
>>> compilation problem.
>>>
>>> The test is fine when executed in isolation.
>>>
>>> This is what happens when I run all my test with "mvn clean test":
>>>
>>>
>>> Tests in error:
>>>
> initializationError0(org.permacode.patternrepo.basic.TestRunManagerTest$
> 1)
>>> The actual test file 'TestRunManagerTest' is all OK, I think. The $1
> suffix is 
>>> incriminating evidence. These are the files that appear in my
> directory tree:
>>> adam@gondor:~/projects/pattern-repo$ find . -name TestRunManager*
> -exec ls -la {} \;
>>> -rw-r--r-- 1 adam adam 534 2009-02-24 10:00 
>>> ./src/main/java/org/permacode/patternrepo/domain/TestRunManager.java
>>> -rw-r--r-- 1 adam adam 8276 2009-03-03 14:36 
>>>
> ./src/test/java/org/permacode/patternrepo/basic/TestRunManagerTest.java
>>> -rw-r--r-- 1 adam adam 808 2009-04-02 14:09 
>>>
> ./target/classes/org/permacode/patternrepo/domain/TestRunManager.class
>>> -rw-r--r-- 1 adam adam 2305 2009-04-02 14:09 
>>>
> ./target/test-classes/org/permacode/patternrepo/basic/TestRunManagerTest
> $1.class
>>> -rw-r--r-- 1 adam adam 7665 2009-04-02 14:09 
>>>
> ./target/test-classes/org/permacode/patternrepo/basic/TestRunManagerTest
> .class
>>> -rw-r--r-- 1 adam adam 808 2009-04-02 14:08 
>>> ./build/classes/org/permacode/patternrepo/domain/TestRunManager.class
>>> -rw-r--r-- 1 adam adam 2289 2009-04-02 14:08 
>>>
> ./build/classes/org/permacode/patternrepo/basic/TestRunManagerTest$1.cla
> ss
>>> -rw-r--r-- 1 adam adam 7699 2009-04-02 14:08 
>>>
> ./build/classes/org/permacode/patternrepo/basic/TestRunManagerTest.class
>>>
>>> So you can see that maven and eclipse both compile the normal test
> class file, 
>>> but also create a TestRunManagerTest$1.class file. This one causes
> the build to 
>>> file with this output:
>>>
>>>
> initializationError0(org.permacode.patternrepo.basic.TestRunManagerTest$
> 1)  Time 
>>> elapsed: 0.061 sec  <<< ERROR!
>>> java.lang.Exception: Test class should have public zero-argument
> constructor
>>>          at 
>>>
> org.junit.internal.runners.MethodValidator.validateNoArgConstructor(Meth
> odValidator.java:54)
>>>
>>> so the TestRunManagerTest$1 is obviously the result of jdk1.6.0_12
> messing up 
>>> the compilation, right?
>>>
>>> Does anyone know what I can do about it? And perhaps what I did that
> caused it?
> 
> 
> This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
> you may review at http://www.amdocs.com/email_disclaimer.asp
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: strange error with hopefully easy solution?

Posted by Bryan Loofbourrow <br...@amdocs.com>.
Adam,

I think the easy solution is to add the public no-args constructor to
your inner class, as it's telling you to do.

I've run into this before, surefire trying to instantiate all my
classes, including inner classes.

-- Bryan

-----Original Message-----
From: Adam Hardy [mailto:adam.maven@cyberspaceroad.com] 
Sent: Thursday, April 02, 2009 9:10 AM
To: Maven Users List
Subject: Re: strange error with hopefully easy solution?

Hi Martin,

you had me worried there for a moment, thought I'd emailed the wrong
list!

But anyway, I'll be surprised if you can reproduce it unless I send you
my whole 
project.

Actually perhaps I should try recreating the eclipse project.

however here is the pom.xml - unless the mailing list strips off the
attachment.

There are no batchrun plug-ins, and in case the name of the class is
confusing, 
the TestRunManager has nothing to do with the maven test run, except of
course 
that it gets tested like all the other classes.

Just surefire, war and maven-openjpa (which affects the entity beans,
not the 
Manager classes).

In case you wonder, I have no other classes in any of my dependent
projects 
(atomic, testdatarepo, parent project) called TestRunManager - unless
it's hiding.

Thanks
Adam

Martin Gainty on 02/04/09 16:22, wrote:
> experiencing a bit of difficulty reproducing this error
> can you supply
> 
> pom.xml?
> any plugins (junit-test-gen/batchrun) you may be using ?
> empty org.permacode.patternrepo.basic.TestRunManagerTest Java class?
> 
>> Date: Thu, 2 Apr 2009 14:26:32 +0100
>> From: adam.maven@cyberspaceroad.com
>> To: users@maven.apache.org
>> Subject: strange error with hopefully easy solution?
>>
>> My search results showed nothing in google or anything relevant in
the archives, 
>> but I have an intractable error in my test batchrun, which seems to
be a 
>> compilation problem.
>>
>> The test is fine when executed in isolation.
>>
>> This is what happens when I run all my test with "mvn clean test":
>>
>>
>> Tests in error:
>>
initializationError0(org.permacode.patternrepo.basic.TestRunManagerTest$
1)
>>
>> The actual test file 'TestRunManagerTest' is all OK, I think. The $1
suffix is 
>> incriminating evidence. These are the files that appear in my
directory tree:
>>
>> adam@gondor:~/projects/pattern-repo$ find . -name TestRunManager*
-exec ls -la {} \;
>> -rw-r--r-- 1 adam adam 534 2009-02-24 10:00 
>> ./src/main/java/org/permacode/patternrepo/domain/TestRunManager.java
>> -rw-r--r-- 1 adam adam 8276 2009-03-03 14:36 
>>
./src/test/java/org/permacode/patternrepo/basic/TestRunManagerTest.java
>> -rw-r--r-- 1 adam adam 808 2009-04-02 14:09 
>>
./target/classes/org/permacode/patternrepo/domain/TestRunManager.class
>> -rw-r--r-- 1 adam adam 2305 2009-04-02 14:09 
>>
./target/test-classes/org/permacode/patternrepo/basic/TestRunManagerTest
$1.class
>> -rw-r--r-- 1 adam adam 7665 2009-04-02 14:09 
>>
./target/test-classes/org/permacode/patternrepo/basic/TestRunManagerTest
.class
>> -rw-r--r-- 1 adam adam 808 2009-04-02 14:08 
>> ./build/classes/org/permacode/patternrepo/domain/TestRunManager.class
>> -rw-r--r-- 1 adam adam 2289 2009-04-02 14:08 
>>
./build/classes/org/permacode/patternrepo/basic/TestRunManagerTest$1.cla
ss
>> -rw-r--r-- 1 adam adam 7699 2009-04-02 14:08 
>>
./build/classes/org/permacode/patternrepo/basic/TestRunManagerTest.class
>>
>>
>> So you can see that maven and eclipse both compile the normal test
class file, 
>> but also create a TestRunManagerTest$1.class file. This one causes
the build to 
>> file with this output:
>>
>>
initializationError0(org.permacode.patternrepo.basic.TestRunManagerTest$
1)  Time 
>> elapsed: 0.061 sec  <<< ERROR!
>> java.lang.Exception: Test class should have public zero-argument
constructor
>>          at 
>>
org.junit.internal.runners.MethodValidator.validateNoArgConstructor(Meth
odValidator.java:54)
>>
>>
>> so the TestRunManagerTest$1 is obviously the result of jdk1.6.0_12
messing up 
>> the compilation, right?
>>
>> Does anyone know what I can do about it? And perhaps what I did that
caused it?


This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: strange error with hopefully easy solution?

Posted by Adam Hardy <ad...@cyberspaceroad.com>.
Hi Martin,

you had me worried there for a moment, thought I'd emailed the wrong list!

But anyway, I'll be surprised if you can reproduce it unless I send you my whole 
project.

Actually perhaps I should try recreating the eclipse project.

however here is the pom.xml - unless the mailing list strips off the attachment.

There are no batchrun plug-ins, and in case the name of the class is confusing, 
the TestRunManager has nothing to do with the maven test run, except of course 
that it gets tested like all the other classes.

Just surefire, war and maven-openjpa (which affects the entity beans, not the 
Manager classes).

In case you wonder, I have no other classes in any of my dependent projects 
(atomic, testdatarepo, parent project) called TestRunManager - unless it's hiding.

Thanks
Adam

Martin Gainty on 02/04/09 16:22, wrote:
> experiencing a bit of difficulty reproducing this error
> can you supply
> 
> pom.xml?
> any plugins (junit-test-gen/batchrun) you may be using ?
> empty org.permacode.patternrepo.basic.TestRunManagerTest Java class?
> 
>> Date: Thu, 2 Apr 2009 14:26:32 +0100
>> From: adam.maven@cyberspaceroad.com
>> To: users@maven.apache.org
>> Subject: strange error with hopefully easy solution?
>>
>> My search results showed nothing in google or anything relevant in the archives, 
>> but I have an intractable error in my test batchrun, which seems to be a 
>> compilation problem.
>>
>> The test is fine when executed in isolation.
>>
>> This is what happens when I run all my test with "mvn clean test":
>>
>>
>> Tests in error:
>>    initializationError0(org.permacode.patternrepo.basic.TestRunManagerTest$1)
>>
>> The actual test file 'TestRunManagerTest' is all OK, I think. The $1 suffix is 
>> incriminating evidence. These are the files that appear in my directory tree:
>>
>> adam@gondor:~/projects/pattern-repo$ find . -name TestRunManager* -exec ls -la {} \;
>> -rw-r--r-- 1 adam adam 534 2009-02-24 10:00 
>> ./src/main/java/org/permacode/patternrepo/domain/TestRunManager.java
>> -rw-r--r-- 1 adam adam 8276 2009-03-03 14:36 
>> ./src/test/java/org/permacode/patternrepo/basic/TestRunManagerTest.java
>> -rw-r--r-- 1 adam adam 808 2009-04-02 14:09 
>> ./target/classes/org/permacode/patternrepo/domain/TestRunManager.class
>> -rw-r--r-- 1 adam adam 2305 2009-04-02 14:09 
>> ./target/test-classes/org/permacode/patternrepo/basic/TestRunManagerTest$1.class
>> -rw-r--r-- 1 adam adam 7665 2009-04-02 14:09 
>> ./target/test-classes/org/permacode/patternrepo/basic/TestRunManagerTest.class
>> -rw-r--r-- 1 adam adam 808 2009-04-02 14:08 
>> ./build/classes/org/permacode/patternrepo/domain/TestRunManager.class
>> -rw-r--r-- 1 adam adam 2289 2009-04-02 14:08 
>> ./build/classes/org/permacode/patternrepo/basic/TestRunManagerTest$1.class
>> -rw-r--r-- 1 adam adam 7699 2009-04-02 14:08 
>> ./build/classes/org/permacode/patternrepo/basic/TestRunManagerTest.class
>>
>>
>> So you can see that maven and eclipse both compile the normal test class file, 
>> but also create a TestRunManagerTest$1.class file. This one causes the build to 
>> file with this output:
>>
>> initializationError0(org.permacode.patternrepo.basic.TestRunManagerTest$1)  Time 
>> elapsed: 0.061 sec  <<< ERROR!
>> java.lang.Exception: Test class should have public zero-argument constructor
>>          at 
>> org.junit.internal.runners.MethodValidator.validateNoArgConstructor(MethodValidator.java:54)
>>
>>
>> so the TestRunManagerTest$1 is obviously the result of jdk1.6.0_12 messing up 
>> the compilation, right?
>>
>> Does anyone know what I can do about it? And perhaps what I did that caused it?


RE: strange error with hopefully easy solution?

Posted by Martin Gainty <mg...@hotmail.com>.
experiencing a bit of difficulty reproducing this error
can you supply

pom.xml?
any plugins (junit-test-gen/batchrun) you may be using ?
empty org.permacode.patternrepo.basic.TestRunManagerTest Java class?

Thanks,
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
This message is confidential and may be privileged. If you are not the intended recipient, we kindly ask you to  please inform the sender. Any unauthorised dissemination or copying hereof is prohibited. This message serves for information purposes only and shall not have any legally binding effect. Given that e-mails can easily be subject to manipulation, we can not accept any liability for the content provided.






> Date: Thu, 2 Apr 2009 14:26:32 +0100
> From: adam.maven@cyberspaceroad.com
> To: users@maven.apache.org
> Subject: strange error with hopefully easy solution?
> 
> My search results showed nothing in google or anything relevant in the archives, 
> but I have an intractable error in my test batchrun, which seems to be a 
> compilation problem.
> 
> The test is fine when executed in isolation.
> 
> This is what happens when I run all my test with "mvn clean test":
> 
> 
> Tests in error:
>    initializationError0(org.permacode.patternrepo.basic.TestRunManagerTest$1)
> 
> The actual test file 'TestRunManagerTest' is all OK, I think. The $1 suffix is 
> incriminating evidence. These are the files that appear in my directory tree:
> 
> adam@gondor:~/projects/pattern-repo$ find . -name TestRunManager* -exec ls -la {} \;
> -rw-r--r-- 1 adam adam 534 2009-02-24 10:00 
> ./src/main/java/org/permacode/patternrepo/domain/TestRunManager.java
> -rw-r--r-- 1 adam adam 8276 2009-03-03 14:36 
> ./src/test/java/org/permacode/patternrepo/basic/TestRunManagerTest.java
> -rw-r--r-- 1 adam adam 808 2009-04-02 14:09 
> ./target/classes/org/permacode/patternrepo/domain/TestRunManager.class
> -rw-r--r-- 1 adam adam 2305 2009-04-02 14:09 
> ./target/test-classes/org/permacode/patternrepo/basic/TestRunManagerTest$1.class
> -rw-r--r-- 1 adam adam 7665 2009-04-02 14:09 
> ./target/test-classes/org/permacode/patternrepo/basic/TestRunManagerTest.class
> -rw-r--r-- 1 adam adam 808 2009-04-02 14:08 
> ./build/classes/org/permacode/patternrepo/domain/TestRunManager.class
> -rw-r--r-- 1 adam adam 2289 2009-04-02 14:08 
> ./build/classes/org/permacode/patternrepo/basic/TestRunManagerTest$1.class
> -rw-r--r-- 1 adam adam 7699 2009-04-02 14:08 
> ./build/classes/org/permacode/patternrepo/basic/TestRunManagerTest.class
> 
> 
> So you can see that maven and eclipse both compile the normal test class file, 
> but also create a TestRunManagerTest$1.class file. This one causes the build to 
> file with this output:
> 
> initializationError0(org.permacode.patternrepo.basic.TestRunManagerTest$1)  Time 
> elapsed: 0.061 sec  <<< ERROR!
> java.lang.Exception: Test class should have public zero-argument constructor
>          at 
> org.junit.internal.runners.MethodValidator.validateNoArgConstructor(MethodValidator.java:54)
> 
> 
> so the TestRunManagerTest$1 is obviously the result of jdk1.6.0_12 messing up 
> the compilation, right?
> 
> Does anyone know what I can do about it? And perhaps what I did that caused it?
> 
> Thanks
> Adam
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

_________________________________________________________________
Rediscover HotmailĀ®: Get quick friend updates right in your inbox. 
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Updates1_042009