Announcement Announcement Module
No announcement yet.
Using Spring 3.x AnnotationConfigApplicationContext in Eclipse RCP Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Spring 3.x AnnotationConfigApplicationContext in Eclipse RCP


    I have a server based component wired up using Spring. I have a client interface that also uses Spring to connect to the server. I need to connect to the server from an Eclipse RCP application.

    I have included the required spring libraries in my target platform.

    However, when I try to create the Spring context, I get a ClassNotFoundException on "net.sf.cglib.proxy.Enhancer" which results in an IllegalStateException being thrown.

    I have manually wrapped cglib 2.2 in a plugin and added that to my target platform, but it still throws the same error.

    How do I ensure the Spring modules have access to CGLib?


  • #2
    Have the CGLib jar in your application's classpath.

    Also, are you using CGLib because you aren't coding to interfaces?

    CGLib is being used to create Proxies when your classes aren't written to interfaces. If they had interfaces Spring can create the proxies using the JDKs Dynamic Proxy classes.



    • #3
      I got round it by creating a bundle containing everything I needed:

      I'm coding to interfaces within my application, but I'm also creating beans for classes of frameworks I'm using. I'm presuming it's these that require GClib.