Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run: no module defined #12

Open
robeden opened this issue Mar 31, 2015 · 3 comments
Open

Unable to run: no module defined #12

robeden opened this issue Mar 31, 2015 · 3 comments

Comments

@robeden
Copy link

robeden commented Mar 31, 2015

When I try to run benchmarks, the run fails with a "No module defined" error message.
screen shot 2015-03-31 at 12 19 51 pm

The exception in the log is:

2015-03-31 12:14:35,504 [ 193622]   INFO - tion.impl.ExecutionManagerImpl - No module defined 
com.intellij.execution.CantRunException: No module defined
        at com.intellij.execution.CantRunException.noModuleConfigured(CantRunException.java:33)
        at com.intellij.execution.util.JavaParametersUtil.getClasspathType(JavaParametersUtil.java:74)
        at ru.artyushov.jmhPlugin.configuration.BenchmarkState.createJavaParameters(BenchmarkState.java:50)
        at ru.artyushov.jmhPlugin.configuration.BenchmarkState.createCommandLine(BenchmarkState.java:70)
        at ru.artyushov.jmhPlugin.configuration.BenchmarkState.startProcess(BenchmarkState.java:66)
        at com.intellij.execution.configurations.CommandLineState.execute(CommandLineState.java:80)
        at com.intellij.execution.impl.DefaultJavaProgramRunner.doExecute(DefaultJavaProgramRunner.java:90)
        at com.intellij.execution.runners.GenericProgramRunner$1.execute(GenericProgramRunner.java:43)
        at com.intellij.execution.RunProfileStarter.execute(RunProfileStarter.java:39)
        at com.intellij.execution.impl.ExecutionManagerImpl$2.run(ExecutionManagerImpl.java:203)
        at com.intellij.openapi.project.DumbServiceImpl.runWhenSmart(DumbServiceImpl.java:144)
        at com.intellij.execution.impl.ExecutionManagerImpl$1$1.run(ExecutionManagerImpl.java:168)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
        at java.awt.EventQueue.access$400(EventQueue.java:82)
        at java.awt.EventQueue$2.run(EventQueue.java:676)
        at java.awt.EventQueue$2.run(EventQueue.java:674)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
        at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:734)
        at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:569)
        at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

I am running IDEA ultimate 14.1 under Mac 10.10.2. My project has 15 modules.

Configuration screenshots attached:
screen shot 2015-03-31 at 12 20 18 pm

@Barteks2x
Copy link

I have the same problem with idea 16. Any way to get it working?

@holograph
Copy link

This is fundamentally a bigger issue -- when creating a new JMH run configuration manually, certain critical options (such as which module is assigned to this configuration) aren't exposed to the UI.

The only workaround I could find (short of editing .idea/workspace.xml manually) is to create a JMH run configuration via the UI, by right-clicking a benchmark method or class, and edit it to suit your needs.

@Vishwaas
Copy link

@holograph not successful in generating a benchmarks.jar
Correct me if I am wrong but this is what I understood.
create benchmark project
Use benchmarks annotation to measure a methods performance
Run the created benchmarks.jar to see the performance units

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants