ivaynberg / salve

Automatically exported from code.google.com/p/salve
0 stars 0 forks source link

Having the same name method in domain class and injected class causes an exception #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Unpack an attached archive
2. Add salve jars and guice jars.
3. Compile and run Main

What is the expected output? 

Program should display "foo".

What do you see instead?

Exception in thread "main" java.lang.ClassFormatError: Duplicate method
name&signature in class file pl/test/Person

What version of the product are you using? On what operating system?

Salve 0.10 (rev. 333) with Guice

Please provide any additional information below.

I believe it happens because method names in Person and PersonService are
the same. Changing one or another fixes this issue. Also changing
InstrumentationStrategy to INJECT_FIELD helps.

Original issue reported on code.google.com by Pawel.Ba...@gmail.com on 10 Sep 2008 at 8:05

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by igor.vay...@gmail.com on 10 Sep 2008 at 8:11

GoogleCodeExporter commented 9 years ago
i cannot reproduce this. btw you did not have anything that would actually 
print out
"foo" :)

i tried in eclipse 3.4 and sun java

java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)

both worked fine

i checked your code into here:
https://salve.googlecode.com/svn/sandbox/myproject

i am not sure where to go from here...you will have to help me help you in this 
case

Original comment by igor.vay...@gmail.com on 10 Sep 2008 at 8:44

GoogleCodeExporter commented 9 years ago
ok, i figured out what causes this. basically, for some reason, you have the 
same
class instrumented by the dependency instrumentor more then once. i know how to 
fix
it so stay tuned...

Original comment by igor.vay...@gmail.com on 11 Sep 2008 at 8:26

GoogleCodeExporter commented 9 years ago

Original comment by igor.vay...@gmail.com on 12 Sep 2008 at 12:50