views:

108

answers:

1

Hello good people! in my long journey to learn about hibernate, i wanted to use generic DAO and came across a good article at the hibernate site and tried out the IMPLEMENTATION WITH HIBERNATE Section.I'm having an error saying :GenericDAOImpl.java:[22,16] name clash: makeTransient(T) in GenericDAOImpl and makeTransient(T) in GenericDAO have the same erasure, yet neither overrides the other.I have no idea about how to solve that?Thanks for reading

+3  A: 

Hard to say without seeing some of your code. For example, your implementing class should be defined as something like

public class GenericDAOImpl<T, ID> implements GenericDAO<T, ID>

and if you miss out the generic parameters in the GenericDAOImpl class definition, you will get this error.

Vinay Sajip
thanks dude.apparently that was what i 'm missing.Thanks
black sensei
now that i jump that part ,should i override methods from the abstract GenericDAOImpl class? i'm having an error in the implementation of the DAO saying MessageDetailsDAOImpl.java:[21,7] dao.hibernate.MessageDetailsDAOImpl is not abstract and does not override abstract method findById(java.lang.Long,boolean) in dao.GenericDAO. it's not like i can post my codes inside the comment or should i create another question for this?
black sensei
It's generally better to create another question - each question should deal with one specific issue.
Vinay Sajip