After enabling DWR for a service and deploying to the Integrated Sandbox Environment, users may receive the following error:
java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer
This error is due to the fact that DWR needs classes in the cglib-nodep-2.1_3.jar located in the Spring 2.5 AOP Libraries classpath container, however, it is using the cglib-2.1.3 jar from the Hibernate 3.2 Core Libraries classpath container.
RESOLUTION: To fix the DWR deployment issue above, please follow these steps:
1. Go to Window > Preferences on the file menu
2. Navigate to MyEclipse > Project Capabilities > Hibernate > Hibernate 3.2 tab > Choose Hibernate 3.2 Core Libraries for the Library modules drop down
3. Highlight the cglib-2.1.3.jar entry, and click Remove
4. Click the Add JAR/Zip button, and add the cglib-nodep-2.1_3.jar found in the Spring 2.5 AOP Libraries classpath container.
5. Click OK. Refresh the project and redeploy.