Announcement Announcement Module
Collapse
No announcement yet.
How to use @Inject with Spring? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use @Inject with Spring?

    Hi,

    I have a module that uses JSR-330 annotations, such as @PersistenceContext, EntityManager, @Inject, etc... In order to code it, I needed to include the javaee-api maven dependency.

    I thought that Spring would have an implementation of all the required methods in the javaee-api, however, when i try to launch my Spring application, I get an error in Tomcat:
    Code:
    SEVERE: Error configuring application listener of class com.sun.faces.config.ConfigureListener
    java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener
    Is there any easy way around this problem? Is there a missing Spring library that I need to include to resolve this error? I've traced it down to some jsf implementation, but not sure which Spring lib I would need to include.

    Thanks,

    Eric

  • #2
    Spring 3.0 and beyond provides support for JSR 330 annotations. I would recommend resolving your ClassNotFoundException first. Also check out this section on integrating your Spring app with JSF.
    Last edited by jzcfk9; Jul 27th, 2011, 06:44 AM.

    Comment

    Working...
    X