I am getting below error at the start of java file right at letter 'p' of package

Internal compiler error: java.lang.ClassCastException: org.eclipse.jdt.internal.compiler.lookup.MethodBinding cannot be cast to org.eclipse.jdt.internal.compiler.lookup.FieldBinding at org.eclipse.jdt.internal.compiler.ast.ASTNode.resolveAnnotations(ASTNode.java:817)

Project compiles fine from command prompt. but eclipse is showing this error.I am using jdk 8. 
any help is highly appreciated

I tried restarting eclipse, cleaning project, installing different versions of eclipse etc.