11 Şubat 2010 Perşembe

java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.(Z)V when deploying to glassfish

i have recently downloaded glassfish v2.1.1 and got the following error while trying to deploy my app:

javax.persistence.PersistenceException: No Persistence provider for EntityManager named CleanerPU: Provider named org.hibernate.ejb.HibernatePersistence threw unexpected exception at create EntityManagerFactory:
java.lang.NoSuchMethodError
java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.(Z)V
at net.sf.cglib.core.DebuggingClassWriter.(DebuggingClassWriter.java:47)
...

i googled for a while and found: http://tai-dev.blog.co.uk/2010/01/21/nosuchmethoderror-org-objectweb-asm-classwriter-when-deploying-your-app-to-a-new-instance-of-glassfish-v2-1-1-it-looks-like-the-upgraded-fins-are-7849068/
according to the link this is due to lib differences between glassfish v2.1.0 and v2.1.1
and the solution is manually deleting the asm-3.1.jar file in the glassfish-install-dir/lib/directory and copy an old version of asm-.jar in its place. i replaced with the asm.jar coming with netbeans 6.5.1 ide and it worked!

Hiç yorum yok:

Yorum Gönder