Re: [Jython-users] JythonScriptExecutionException: No module named
Hrishikesh P <[email protected]> Thu, 2 Jul 2015 15:20:30 -0500
| Newsgroups | gmane.comp.java.grinder.user |
|---|---|
| Message-ID | <CABbqrYmC=+OL8=paup4yNGd=uWnYOn8zSdZU1HYjZ4Z+0t2Q1Q@mail.gmail.com> |
Thanks, Curtis. I was actually able to resolve the class path issue using the maven dependency plugin. Now the error I'm running into is related to the instrumenter. I get a NotInstrumentableTypeException when trying to record a java method. The logs show that the 'Java VM does not support instrumentation', but according to the troubleshooting-instrumentation <http://grinder.sourceforge.net/g3/instrumentation.html#troubleshooting-instrumentation> the java version should be 1.6 which is what I'm using and also seen in the logs. INFO MAC-USER-0 : The Grinder version 3.11 INFO MAC-USER-0 : Java(TM) SE Runtime Environment 1.6.0_65-b14-466.1-11M4716: Java HotSpot(TM) 64-Bit Server VM (20.65-b04-466.1, mixed mode) on Mac OS X x86_64 10.10.4 INFO MAC-USER-0 : Java VM does not support instrumentation, DCR unavailable INFO MAC-USER-0 : worker process 0 MAC-USER-0 : instrumentation agents: NO INSTRUMENTER COULD BE LOADED INFO MAC-USER-0 : running "grinder.py" using Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:54:35) [Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] On Thu, Jul 2, 2015 at 2:21 PM, Curtis Rueden <[email protected]> wrote: > Hi Hrishi, > > > now I am having to specify each and every jar that my JUnit test class > > uses in the class path. Isn't there a simpler way that involves not > > having to search and specify all required jars? > > https://code.google.com/p/grinder-maven-plugin/ ? > > But I know literally nothing about Grinder. Just a shot in the dark! > > Regards, > Curtis > > On Thu, Jul 2, 2015 at 12:54 PM, Hrishikesh P <[email protected]> > wrote: > >> Never mind, I was specifying the test-sources jar instead of the tests >> jar. Once I corrected this, this error was gone. >> >> But, now I am having to specify each and every jar that my JUnit test >> class uses in the class path. Isn't there a simpler way that involves not >> having to search and specify all required jars? >> >> >> On Thu, Jul 2, 2015 at 11:45 AM, Hrishikesh P <[email protected]> >> wrote: >> >>> Hello, >>> >>> I am running into a Jython module import issue while starting the >>> grinder agent. This is a JUnit test class that I'm trying to import. >>> >>> The command that I'm invoking is: >>> >>> >>> java -cp >>> ~/grinder-3.11/lib/grinder.jar:~/test/target/myapp-1.0.0-SNAPSHOT-test-sources.jar >>> net.grinder.Grinder >>> >>> >>> >>> and this is my complete output: >>> >>> >>> >>> 2015-07-01 10:55:14,948 INFO agent: The Grinder 3.11 >>> >>> 2015-07-01 10:55:14,967 WARN agent: Failed to connect to 'localhost/ >>> 127.0.0.1:6372', proceeding without the console; set >>> grinder.useConsole=false to disable this warning. >>> >>> 2015-07-01 10:55:14,974 INFO agent: Worker process command line: java >>> '-javaagent:/Users/user/grinder-3.11/lib/grinder-dcr-agent-3.11.jar' >>> -classpath >>> '/Users/user/grinder-3.11/lib/grinder.jar:/Users/user/test/target/myapp-1.0.0-SNAPSHOT-test-sources.jar' >>> net.grinder.engine.process.WorkerProcessEntryPoint >>> >>> 2015-07-01 10:55:15,045 INFO agent: worker MAC-USER-0 started >>> >>> ['.', '.', '/Users/user/grinder-3.11/lib/Lib', >>> '/Users/user/grinder-3.11/lib/jython-standalone-2.5.3.jar/Lib', >>> '__classpath__', '__pyclasspath__/', >>> '/Users/user/test/target/myapp-1.0.0-SNAPSHOT-test-sources.jar'] >>> >>> 2015-07-01 10:55:16,774 ERROR MAC-USER-0: aborting process - Jython >>> exception, <type 'exceptions.ImportError'>: No module named mytest >>> [initialising test script] >>> >>> net.grinder.scriptengine.jython.JythonScriptExecutionException: <type >>> 'exceptions.ImportError'>: No module named mytest >>> >>> from mytest import BaseTest >>> >>> File "./grinder.py", line 9, in <module> >>> >>> 2015-07-01 10:55:16,787 INFO agent: finished >>> >>> >>> >>> Any pointers will be appreciated. >>> >>> >>> I'm new to Grinder and have little to no experience with Jython (but a >>> bit more experienced in Python). >>> >>> >>> Thanks much in advance! >>> >> >> >> >> ------------------------------------------------------------------------------ >> Don't Limit Your Business. Reach for the Cloud. >> GigeNET's Cloud Solutions provide you with the tools and support that >> you need to offload your IT needs and focus on growing your business. >> Configured For All Businesses. Start Your Cloud Today. >> https://www.gigenetcloud.com/ >> >> _______________________________________________ >> Jython-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/jython-users >> >> > ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ grinder-use mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/grinder-use