Results 1 to 3 of 3

Thread: java.lang.NoClassDefFoundError: javax.annotation.PostConstruct

  1. #1
    Join Date
    Sep 2004
    Posts
    602

    Default java.lang.NoClassDefFoundError: javax.annotation.PostConstruct

    I am looking at using annotations in Spring 2.5 and I am getting java.lang.NoClassDefFoundError: javax.annotation.PostConstruct when I try and run unit tests with @Autowired annotations.

    I am using the 1.5 JDK that comes with IBM's RAD 7, i.e. a Websphere 6.1 JDK/server runtime in my classpath.

    Anyone know where I can find that class ?

  2. #2
    Join Date
    Aug 2005
    Location
    Sussex, UK
    Posts
    92

    Default

    If not using 1.6 JRE, you need an additional JAR file (common-annotations.jar)

  3. #3
    Join Date
    Sep 2004
    Posts
    602

    Default

    Quote Originally Posted by baronludwig View Post
    If not using 1.6 JRE, you need an additional JAR file (common-annotations.jar)
    Ah ha, thank you Baron, much appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •