Question

I trying to use the grinder testing framework in mac, but i cant get the pass the first steps to open the console. this is what i tried: i added class path and try to run it like this from the terminal with this command

java net.grinder.Console

but i get this error :

Error running worker process (org/picocontainer/ComponentFactory)
Exception in thread "main" java.lang.NoClassDefFoundError: org/picocontainer/ComponentFactory
    at net.grinder.engine.process.GrinderProcess.run(GrinderProcess.java:309)
    at net.grinder.engine.process.WorkerProcessEntryPoint.run(WorkerProcessEntryPoint.java:86)
    at net.grinder.engine.process.WorkerProcessEntryPoint.main(WorkerProcessEntryPoint.java:58)
Caused by: java.lang.ClassNotFoundException: org.picocontainer.ComponentFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

this is the tutorial im following, anybody have some thoughts on this.

Was it helpful?

Solution

Grinder has a much longer classpath than just 'grinder.jar'. You need all the dependencies on the classpath, too. (e.g. picocontainer)

If the grinder jar has a MANIFEST.MF, it might list them, in which case those jars just have to be sitting in the same directory as the grinder jar. If not, you need to set the classpath to include them.

OTHER TIPS

The specific error message you are showing will be fixed by adding picocontainer-.jar to your classpath. But you will probably need to include everything in the grinder lib dir on your classpath to get things working properly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top