jetty run error for websockets project

2019-05-10 17:40发布

问题:

I'm trying to get websockets working with jetty. I'm on eclipse. When I try to run it, following error appears on console. java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor

I even tried with test.war that is provided with jetty. But error remains same.

回答1:

Are you using the Jetty WTP Eclipse plugin to run the server? If so, then try this: http://pipecuts.wordpress.com/2011/01/30/classnotfoundexception-org-objectweb-asm-classvisitor/

It worked for me.