Search code examples
javaeclipsehibernate

Eclipse the import cannot be resolved after Java update


I have class that uses hibernate, I have included all required jars to classpath and class worked before Java updated itself. But now eclipse shows that it cannot resolve some hibernate imports. What could be solution to this?

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

Solution

  • If you type (Ctrl + shift + t), or open the Type Explorer and type SessionFactory or Configuration does Eclipse find them? If not, then for sure you have some problems in the .jar files. Try to delete and replace them.

    By the way are you using a Mac or PC?