when i run benchmark program in com.ning.http.client.AsyncHttpClient
i can see this type of error..
**Setting up AhcGrizzlyBenchmark...
Exception in thread "main" java.lang.NoClassDefFoundError: org/glassfish/grizzly/attributes/AttributeStorage
at org.factor45.jhcb.benchmark.AhcGrizzlyBenchmark.setup(AhcGrizzlyBenchmark.java:59)
at org.factor45.jhcb.benchmark.AbstractBenchmark.doBenchmark(AbstractBenchmark.java:55)
at org.factor45.jhcb.BenchmarkRunner.runAhcGrizzlyBenchmark(BenchmarkRunner.java:35)
at org.factor45.jhcb.BenchmarkRunner.main(BenchmarkRunner.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.ClassNotFoundException: org.glassfish.grizzly.attributes.AttributeStorage
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 9 more**
what is the error?? how can i solve this problem??
尝试在CLASSPATH中添加Grizzly框架 。
NoClassDefFound indicates that something was present at compiletime, but missing at runtime. Check if something is missing on the classpath.
I had the same error and this was due to the version of Maven I was using.
By default it was the Eclipse embedded version : 3, but it seems the project will only work with Maven 2
.
Switching it in the run configuration worked for me.
Go to the folder where your eclipse available and open folder hierarchy mentioned below:
eclipse\\configuration\\org.eclipse.equinox.simpleconfigurator
only one file is avlable under this folder "bundle" Open this file and search for string "org.eclipse.m2e.maven.runtime" you will find entry like below example.
org.eclipse.m2e.maven.runtime,1.0.100.20110804-1717,../../../Program%20Files/Adobe/Adobe%20Flash%20Builder%204.7/eclipse/plugins/org.eclipse.m2e.maven.runtime_1.0.100.20110804-1717/,4,false
Delete this entry and restart your eclipse. try to build project through maven it will work this time.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.