MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
davemeurer
Post subject: 8.6 Flex Scaffold Spring 2.5 lib conflict & workaround  PostPosted: Jun 04, 2010 - 06:50 PM



Joined: Jan 20, 2010
Posts: 191

When scaffolding Flex in MyEclipse for Spring 8.6 using Spring 2.5, you may run into library conflicts when deploying the application. The error in the console will have a root cause of:
java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
with being the first error shown.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_messageBrokerDefaultHandlerMapping'

This is due to the asm jar conflicting in the MyEclipse Project Capabilities Spring 2.5 and Hibernate Classpath containers. There are 3 workarounds::

1. Use Spring 3.0 instead of Spring 2.5. You can now choose to use Spring 3.0 in the Scaffolding wizard if you haven't initialized with Add Spring DSL Code Generation Capabilities.

2. Update the Project Capabilities:
- In Window > Preferences > MyEclipse > Project Capabilities > Hibernate > Hibernate 3.2 tab (Hibernate 3.2 Core Libraries), take note of where the asm.jar is located. You may want to find it in Windows Explorer and copy the directory structure since you will need to add this jar elsewhere.
- In Window > Preferences > MyEclipse > Project Capabilities > Spring > Spring 2.5 Tab (Spring 2.5 AOP Libraries), remove the asm-2.2.3.jar, and add the Hibernate asm.jar you located in the first step.

3. Remove the asm-2.2.3.jar in the deployed application.
- Deploy the project to Tomcat
- Right-click on the project in the Server view (Under the tomcat server), and Browse the deployment location
- go to the WEB-INF/libs folder and delete asm-2.2.3.jar
(it will be added back if you redeploy)

This is similar to the DWR issue and workaround discussed in this forum post: http://www.myeclipseide.com/PNphpBB2-viewtopic-t-25515-highlight-dwr.html

Please let us know if you have any questions,
Dave
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits