Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ServiceServerImpl java class does not compile.

 
Tripti Ag
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following two interfaces and a java class. The problem i am getting is that i have implemented all the methods of an interface which my code is implementing, but still compiler complains that i havnt overridden getService method in my class, though i have. I have highlighted the method overridden using . Please tell me, how to solve this problem.Thanks in advance.

Service.java




ServiceServer.java




ServiceServerImpl.java



 
Rohit Garg
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tried it out myself and appeared to work just fine.

I would say that you should check for any classes within some other jar files in your classpath with same name and package. It happens a lot that a preferred classloader in the chain has loaded the some other class (with same package and name) and it just returns that one instead of the one you are thinking about.
 
Tripti Ag
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rohit. It ran successfully. I didnt made any changes but the code compiled without any error. But why i was getting that error is still uncleared.
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tripti Ag wrote:

Please check your private messages for an important administrative matter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic