Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

import javax.annotation.security cannot be resolved

 
majid nakit
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to learn spring security, I found a tutorial, when I import it in Eclipse I got an error in this import line :
import javax.annotation.security.RolesAllowed;

the error says :
The import javax.annotation.security cannot be resolved

Please your help is appreciated.
Thanks
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you put a link to the tutorial. I think it would be interesting for me and others to know about it.
Also, tell us your environment. Is it Tomcat?
It seems like the tutorial you downloaded failed to include a jar containing the missing class (or it was expecting you to run it in a Application server like Jboss or Glassfish instead of Tomcat).

I think if you got the ejb jar from somewhere, and added it to your eclipse library path, it would resolve this. ( or if you already have an application server configured in eclipse, the tutorial is missing a setting pointing out the library, you would need to add the location of that missing jar to your eclipse library setting )
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic