In Intellij, How to open groovy console in terminal?
Answered
I want to open groovy console in the terminal of Intellij. Does somebody know what command should I key in?
Please sign in to leave a comment.
Use Tools | Groovy Console. Copy/paste the command line into Terminal.
Thanks, Sege. Good!
Another problem when I key in the "grails console" in the terminal and run the command, Intellij will appear the error message as below:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
| Error Command [console] error: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-3.4.1-bin.zip'. (Use --stacktrace to see the full trace)
Does somebody know how to solve this problem? Or I should give more information?
Does it work outside of IntelliJ IDEA?
I run the command of "grails console" in the cmd.exe. It appears the same error message as below:
The complete error message:
| Running console...
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Configuring Spring Security ACL ...
... finished configuring Spring Security ACL
2018-07-20 11:25:03.041 ERROR org.springframework.flex.core.MessageBrokerFactoryBean - Error thrown during MessageBroker initialization
java.lang.IllegalArgumentException: Flex configuration file does not exist at path: /WEB-INF/flex/services-config.xml
at org.springframework.util.Assert.isTrue(Assert.java:92)
at org.springframework.flex.config.FlexConfigurationManager$ResourceResolverAdapter.getConfigurationFile(FlexConfigurationManager.java:223)
at flex.messaging.config.AbstractConfigurationParser.parse(AbstractConfigurationParser.java:70)
at org.springframework.flex.config.FlexConfigurationManager.getMessagingConfiguration(FlexConfigurationManager.java:121)
at org.springframework.flex.core.MessageBrokerFactoryBean.afterPropertiesSet(MessageBrokerFactoryBean.java:141)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:742)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:372)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
at grails.boot.GrailsApp.run(GrailsApp.groovy:83)
at grails.ui.console.GrailsSwingConsole.main(GrailsSwingConsole.groovy:90)
2018-07-20 11:25:03.180 ERROR org.springframework.boot.SpringApplication - Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_messageBroker': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanInitializationException: MessageBroker initialization failed; nested exception is java.lang.IllegalArgumentException: Flex configuration file does not exist at path: /WEB-INF/flex/services-config.xml
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:742)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:372)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
at grails.boot.GrailsApp.run(GrailsApp.groovy:83)
at grails.ui.console.GrailsSwingConsole.main(GrailsSwingConsole.groovy:90)
Caused by: org.springframework.beans.factory.BeanInitializationException: MessageBroker initialization failed; nested exception is java.lang.IllegalArgumentException: Flex configuration file does not exist at path: /WEB-INF/flex/services-config.xml
at org.springframework.flex.core.MessageBrokerFactoryBean.afterPropertiesSet(MessageBrokerFactoryBean.java:207)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624)
... 14 common frames omitted
Caused by: java.lang.IllegalArgumentException: Flex configuration file does not exist at path: /WEB-INF/flex/services-config.xml
at org.springframework.util.Assert.isTrue(Assert.java:92)
at org.springframework.flex.config.FlexConfigurationManager$ResourceResolverAdapter.getConfigurationFile(FlexConfigurationManager.java:223)
at flex.messaging.config.AbstractConfigurationParser.parse(AbstractConfigurationParser.java:70)
at org.springframework.flex.config.FlexConfigurationManager.getMessagingConfiguration(FlexConfigurationManager.java:121)
at org.springframework.flex.core.MessageBrokerFactoryBean.afterPropertiesSet(MessageBrokerFactoryBean.java:141)
... 16 common frames omitted
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':console'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_152\bin\java.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
| Error Command [console] error: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-3.4.1-bin.zip'. (Use --stacktrace to see the full trace)
You can ask for help at http://stackoverflow.com/ since it's not specific to IntelliJ IDEA.