I just happened to get the enum cannot be resolved to a type
error, solution to which is described in this answer. But the thing is that I have source level 1.7
selected, so mentioned answer doesn't really help me:
Libraries are up-to-date as well:
Another thing is that I use Ant to build, and it builds the project without errors although whole project tree is red indicating problems:
But, after being built, the project doesn't work, I get errors such as this one:
[ERROR] 2015-10-08 04:01:56,946 org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateDAO' defined in ServletContext resource [/WEB-INF/hibernate-persistance.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [cz.techsys.web.server.services.hibernatepersistance.HibernateDAO]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
Syntax error, annotations are only available if source level is 1.5 or greater
Type mismatch: cannot convert from Object to PersistSession
Syntax error, annotations are only available if source level is 1.5 or greater
Syntax error, parameterized types are only available if source level is 1.5 or greater
Type mismatch: cannot convert from Object to History
Type mismatch: cannot convert from Object to LoginPersistance
Syntax error, parameterized types are only available if source level is 1.5 or greater
As usual with Eclipse, I didn't really change anything, it changed itself. I am not editing the project and I used IDE only to build it, I'm not project author. Until now, all builds worked.