grails-2.3

Grails 2.3.5 requiring “grails clean” after every code change

此生再无相见时 提交于 2019-12-25 02:16:44
问题 Every time I modify my code I have to run grails clean before running grails run-app . If I don't, I get messages like this: | Error 2014-02-13 16:33:16,774 [localhost-startStop-1] ERROR context.GrailsContextLoader - Error initializing the application: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve

grails 2.3 java.lang.NoClassDefFoundError: org/apache/batik/dom/svg/SVGOMDocument

牧云@^-^@ 提交于 2019-12-24 14:31:10
问题 When i run my grails application in tomcat i get the following error java.lang.NoClassDefFoundError: org/apache/batik/dom/svg/SVGOMDocument . But the batik-svg-dom.1.7.jar is packaged in the war and in the classpath. I don't however get this error when i am running the application in debug mode in STS. I am using Grails 2.3 and building my war using maven. I am using FOP and have excluded the "xml-apis". I have tried to place the batik-svg-dom.jar in the lib folder of tomcat, that did not

how used Grails Spring Security Plugin (Requestmap)

那年仲夏 提交于 2019-12-13 05:27:29
问题 Grails spring security fails to present the login page due to a redirect loop Where I must write this? new Requestmap(url: '/*', configAttribute: 'IS_AUTHENTICATED_ANONYMOUSLY').save(); 回答1: Information obtained from Dynamic Request Maps section on Spring.io's blog post titled "Simplified Spring Security with Grails". To enable this mechanism, add the following to Config.groovy: import grails.plugins.springsecurity.SecurityConfigType ... grails.plugins.springsecurity.securityConfigType =

Excude all the unnecessary jar from war file

点点圈 提交于 2019-12-12 18:37:14
问题 I am a grails programmer and I want to remove the unnecessary jar files that are included in the war file. There are so many unnecessary jar files included in the war file. Is there any quick solution to do so? Also can you mention the jar files which are necessary to make and run the simple grails war. 回答1: You can exclude unnecessary jar from war by adding following lines in BuildConfig.groovy. grails.war.resources = { stagingDir -> delete(file:"${stagingDir}/WEB-INF/lib/jarFileName.jar") }

Custom CSS and JS in Grails plugins

纵然是瞬间 提交于 2019-12-11 09:29:14
问题 I am building a Grails plugin ( grails-myorg.zip ) that will contain reusable code/artifacts that should be used by every Grails app in our organization. This includes custom CSS/JS files that help give our apps a consistent look-and-feel. I'm wondering what the best course of action here is: Create a grails-myorg-themes.zip plugin, which just includes the reusable CSS and JS files, and then make that a runtime plugin/dependency (using BuildConfig.groovy ) of the main grails-myorg.zip plugin;

Can't run Grails app with mongodb plugin version 3.0.3

坚强是说给别人听的谎言 提交于 2019-12-11 03:59:05
问题 I'm trying to upgrade my mongodb plugin from 2.0.1 to 3.0.3. However I keep getting the following error: java.lang.NoClassDefFoundError: com/mongodb/AggregationOptions at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2531) at java.lang.Class.getDeclaredMethods(Class.java:1855) at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:84) at java.security.AccessController.doPrivileged(Native Method) at org.codehaus

How can I exclude a plugin from grails default gsp encoding?

佐手、 提交于 2019-12-11 03:51:53
问题 I'm working in a grails application that is using default encoding of html for all gsp pages: grails { views { gsp { encoding = 'UTF-8' codecs { expression = 'html' scriptlet = 'html' taglib = 'none' staticparts = 'none' } } } } This is great and removes XSS vulnerabilities from the vast majority of the application, but some plugins in the application include HTML in grails variables which are rendered on the GSPs in the plugins. Without modifying the plugin, I can't add the raw() method

Grails 2.3 IntegrationSpec cannot be transactional false

心不动则不痛 提交于 2019-12-10 17:07:56
问题 I upgrade to Grails 2.3 recently and try to migrate all old tests to spock integration test. But it fails at cleanup because my test is non-transactional. The Grails doc says test can be non-transactional, but we need to handle it manually, but it seems not quite right here. as I am getting this error in every integration test extending IntegrationSpec java.lang.IllegalStateException: Cannot deactivate transaction synchronization - not active at grails.test.spock.IntegrationSpec.cleanup

Grails 2.3.1 not running

时光怂恿深爱的人放手 提交于 2019-12-10 12:43:30
问题 I have what looks to be exactly the same problem lamented here: Grails 2.3.0 Not Running However none of the tenetative solutions had any effect. When I attempt to run grails clean --stacktrace I get: | Environment set to development. | Error Error executing script Clean: _GrailsClasspath_groovy$_run_closure1 (NOT E: Stack trace has been filtered. Use --verbose to see entire trace.) java.lang.NoClassDefFoundError: _GrailsClasspath_groovy$_run_closure1 at _GrailsClasspath_groovy.run(

Grails 2.3.7 error when creating a new project

时光总嘲笑我的痴心妄想 提交于 2019-12-06 19:54:45
问题 I just a fresh install: I downloaded and installed JDK and GGTS. I then created a new Grails 2.3.7 project and I get the error message below. Is this a known issue or am I doing something wrong? Command terminated with an exception: java.lang.Exception (see details for partial output) Command: GrailsCommand(P/MangaReader> compile --non-interactive --refresh-dependencies) ---- System.out ---- Loading Grails 2.3.7 . |Environment set to development .......... |Compiling 79 source files .Error |