Results 1 to 3 of 3

Thread: Using Spring 3.x AnnotationConfigApplicationContext in Eclipse RCP

Hybrid View

  1. #1
    Join Date
    Nov 2011
    Posts
    2

    Question Using Spring 3.x AnnotationConfigApplicationContext in Eclipse RCP

    Hi.

    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?

    Thanks

  2. #2
    Join Date
    Jan 2009
    Location
    Huntington Beach, CA
    Posts
    718

    Default

    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.

    Mark

  3. #3
    Join Date
    Nov 2011
    Posts
    2

    Default

    I got round it by creating a bundle containing everything I needed: http://stackoverflow.com/questions/8...in-eclipse-rcp

    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.

Tags for this Thread

Posting Permissions

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