-
Nov 23rd, 2011, 11:27 AM
#1
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
-
Nov 23rd, 2011, 09:51 PM
#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.
Mark
-
Nov 30th, 2011, 10:03 AM
#3
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
-
Forum Rules