I am using grails 2.5.2 and working on a taglib. When I execute grails run-app everything runs fine, but whenever I make a change in my taglib and save the file I get the following error
Error |
2016-02-26 16:29:30,628 [Thread-9] ERROR plugins.AbstractGrailsPluginManager - Plugin [groovyPages:2.5.2] could not reload changes to file [D:\...\BootstrapTagLib.groovy]: Ambiguous method overloading for method grails.spring.BeanBuilder#registerBeans.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[interface org.codehaus.groovy.grails.commons.spring.RuntimeSpringConfiguration]
[interface org.springframework.beans.factory.support.BeanDefinitionRegistry]
Message: Ambiguous method overloading for method grails.spring.BeanBuilder#registerBeans.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[interface org.codehaus.groovy.grails.commons.spring.RuntimeSpringConfiguration]
[interface org.springframework.beans.factory.support.BeanDefinitionRegistry]
Line | Method
->> 3241 | chooseMostSpecificParams in groovy.lang.MetaClassImpl
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 3194 | chooseMethodInternal in ''
| 3137 | chooseMethod . . . . . . . . in ''
| 1328 | getMethodWithCachingInternal in ''
| 3405 | createPogoCallSite . . . . . in ''
| 1314 | createPogoCallSite in groovy.lang.ExpandoMetaClass
| 150 | createPogoSite . . . . . . . in org.codehaus.groovy.runtime.callsite.CallSiteArray
| 164 | createCallSite in ''
| 48 | defaultCall . . . . . . . . in ''
| 113 | call in org.codehaus.groovy.runtime.callsite.AbstractCallSite
| 125 | call . . . . . . . . . . . . in ''
| 342 | doCall in org.codehaus.groovy.grails.plugins.web.GroovyPagesGrailsPlugin$_closure5
| -2 | invoke0 . . . . . . . . . . in sun.reflect.NativeMethodAccessorImpl
| 57 | invoke in ''
| 43 | invoke . . . . . . . . . . . in sun.reflect.DelegatingMethodAccessorImpl
| 606 | invoke in java.lang.reflect.Method
| 1426 | jlrMethodInvoke . . . . . . in org.springsource.loaded.ri.ReflectiveInterceptor
| 93 | invoke in org.codehaus.groovy.reflection.CachedMethod
| 325 | doMethodInvoke . . . . . . . in groovy.lang.MetaMethod
| 1210 | invokeMethod in groovy.lang.MetaClassImpl
| 1123 | invokeMethod . . . . . . . . in groovy.lang.ExpandoMetaClass
| 1019 | invokeMethod in groovy.lang.MetaClassImpl
| 426 | call . . . . . . . . . . . . in groovy.lang.Closure
| 767 | invokeOnChangeListener in org.codehaus.groovy.grails.plugins.DefaultGrailsPlugin
| 716 | notifyOfEvent . . . . . . . in ''
| 731 | notifyOfEvent in ''
| 408 | informOfClassChange . . . . in org.codehaus.groovy.grails.plugins.AbstractGrailsPluginManager
| 366 | informOfFileChange in ''
| 226 | informPluginManager . . . . in org.codehaus.groovy.grails.project.compiler.GrailsProjectWatcher
| 48 | access$400 in ''
| 152 | onNew . . . . . . . . . . . in org.codehaus.groovy.grails.project.compiler.GrailsProjectWatcher$1
| 76 | fireOnNew in org.codehaus.groovy.grails.compiler.AbstractDirectoryWatcher
| 104 | run . . . . . . . . . . . . in org.codehaus.groovy.grails.compiler.WatchServiceDirectoryWatcher
| 154 | run in org.codehaus.groovy.grails.compiler.DirectoryWatcher
^ 161 | run . . . . . . . . . . . . in org.codehaus.groovy.grails.project.compiler.GrailsProjectWatcher
I investigated a bit and found the following JIRA which says that this error was fixed since grails 2.3.3. I´ll be working extensively with taglibs, and having to restart the app every time I make a change is very time consuming.
Is there an override I could do in in resources.groovy? Is this error present in grails 2.5.3 or 2.5.1?
Good day and thanks.
I would like to create one-to-many association with the possibility of set association to null
Exemple :
class Basket {
Long id
String name
static hasMany = [
products: ProductOrdered,
menus: MenuOrdered
]
static constraints = {
products nullable: true
menus nullable: true
}
}
class Product {
Long id
String name
}
class Menu {
Long id
String name
static belongsTo = [Product]
static hasMany = [products: Product, menuOrdereds: MenuOrdered]
}
class ProductOrdered {
Long id
String name
Product product
static belongsTo = [
basket: Basket,
menu: MenuOrdered
]
static contraints = {
basket nullable: true
menu nullable: true
}
}
class MenuOrdered {
Long id
String name
static belongsTo = [
basket: Basket,
menu: Menu
]
static hasMany = [
products: ProductOrdered
]
}
In a controller
Product p1 = new Product(name: "p1")
p1.save flush: true, failOnError: true
ProductOrdered po1 = new ProductOrdered(name: "po1", product: p1)
Basket b1 = new Basket(name: "b1")
b1.addToProducts(po1)
b1.save flush: true, failOnError: true
A basket may have menus and/or products
A product can belong to menu or not
A menu has many products
The probleme there is a stackstrace when I save objects
Need your help
Exemple with a Basket with one Product and one ProductOrdered (without a menu)
GORM does not let me save if productOrdered.menu == null
In Mysql tables, ProductOrdered.menu is not nullable. Event if I change it to nullable, it's not works
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
|Loading Grails 2.4.4
|Configuring classpath
.
|Environment set to development
.................................
|Packaging Grails application
...........
|Compiling 3 source files
.........................
|Running Grails application
| Error 2015-02-18 08:40:59,750 [localhost-startStop-1] ERROR hbm2ddl.SchemaExport - HHH000389: Unsuccessful: alter table menu_ordered drop constraint FK_i4w4vjts6hwiu2g878ps0nlun if exists
| Error 2015-02-18 08:40:59,754 [localhost-startStop-1] ERROR hbm2ddl.SchemaExport - Table "MENU_ORDERED" not found; SQL statement:
alter table menu_ordered drop constraint FK_i4w4vjts6hwiu2g878ps0nlun if exists [42102-176]
| Error 2015-02-18 08:40:59,761 [localhost-startStop-1] ERROR hbm2ddl.SchemaExport - HHH000389: Unsuccessful: alter table menu_ordered drop constraint FK_e5s9ouao2g6s177von7l1q179 if exists
| Error 2015-02-18 08:40:59,761 [localhost-startStop-1] ERROR hbm2ddl.SchemaExport - Table "MENU_ORDERED" not found; SQL statement:
alter table menu_ordered drop constraint FK_e5s9ouao2g6s177von7l1q179 if exists [42102-176]
| Error 2015-02-18 08:40:59,762 [localhost-startStop-1] ERROR hbm2ddl.SchemaExport - HHH000389: Unsuccessful: alter table menu_product drop constraint FK_3x0fpyo630osfevs0ft7f1a71 if exists
| Error 2015-02-18 08:40:59,763 [localhost-startStop-1] ERROR hbm2ddl.SchemaExport - Table "MENU_PRODUCT" not found; SQL statement:
alter table menu_product drop constraint FK_3x0fpyo630osfevs0ft7f1a71 if exists [42102-176]
| Error 2015-02-18 08:40:59,763 [localhost-startStop-1] ERROR hbm2ddl.SchemaExport - HHH000389: Unsuccessful: alter table menu_product drop constraint FK_d2m4dwlin0lqvfomlddca3esn if exists
| Error 2015-02-18 08:40:59,764 [localhost-startStop-1] ERROR hbm2ddl.SchemaExport - Table "MENU_PRODUCT" not found; SQL statement:
alter table menu_product drop constraint FK_d2m4dwlin0lqvfomlddca3esn if exists [42102-176]
| Error 2015-02-18 08:40:59,764 [localhost-startStop-1] ERROR hbm2ddl.SchemaExport - HHH000389: Unsuccessful: alter table product_ordered drop constraint FK_8s3qhvlniylmc2d46db1h2yy0 if exists
| Error 2015-02-18 08:40:59,765 [localhost-startStop-1] ERROR hbm2ddl.SchemaExport - Table "PRODUCT_ORDERED" not found; SQL statement:
alter table product_ordered drop constraint FK_8s3qhvlniylmc2d46db1h2yy0 if exists [42102-176]
| Error 2015-02-18 08:40:59,765 [localhost-startStop-1] ERROR hbm2ddl.SchemaExport - HHH000389: Unsuccessful: alter table product_ordered drop constraint FK_lw8nr4nw9a30x79f1yvdq5n1i if exists
| Error 2015-02-18 08:40:59,766 [localhost-startStop-1] ERROR hbm2ddl.SchemaExport - Table "PRODUCT_ORDERED" not found; SQL statement:
alter table product_ordered drop constraint FK_lw8nr4nw9a30x79f1yvdq5n1i if exists [42102-176]
| Error 2015-02-18 08:40:59,766 [localhost-startStop-1] ERROR hbm2ddl.SchemaExport - HHH000389: Unsuccessful: alter table product_ordered drop constraint FK_kcarly7tnj0en6ro0n78ues2n if exists
| Error 2015-02-18 08:40:59,766 [localhost-startStop-1] ERROR hbm2ddl.SchemaExport - Table "PRODUCT_ORDERED" not found; SQL statement:
alter table product_ordered drop constraint FK_kcarly7tnj0en6ro0n78ues2n if exists [42102-176]
|Server running. Browse to http://localhost:8080/a
| Error 2015-02-18 08:41:22,731 [http-bio-8080-exec-4] ERROR errors.GrailsExceptionResolver - ValidationException occurred when processing request: [GET] /a/test/index
Validation Error(s) occurred during save():
- Field error in object 'order.Basket' on field 'products[0].menus': rejected value [null]; codes [order.ProductOrdered.menus.nullable.error.order.Basket.products[0].menus,order.ProductOrdered.menus.nullable.error.order.Basket.products.menus,order.ProductOrdered.menus.nullable.error.products[0].menus,order.ProductOrdered.menus.nullable.error.products.menus,order.ProductOrdered.menus.nullable.error.menus,order.ProductOrdered.menus.nullable.error.order.MenuOrdered,order.ProductOrdered.menus.nullable.error,productOrdered.menus.nullable.error.order.Basket.products[0].menus,productOrdered.menus.nullable.error.order.Basket.products.menus,productOrdered.menus.nullable.error.products[0].menus,productOrdered.menus.nullable.error.products.menus,productOrdered.menus.nullable.error.menus,productOrdered.menus.nullable.error.order.MenuOrdered,productOrdered.menus.nullable.error,order.ProductOrdered.menus.nullable.order.Basket.products[0].menus,order.ProductOrdered.menus.nullable.order.Basket.products.menus,order.ProductOrdered.menus.nullable.products[0].menus,order.ProductOrdered.menus.nullable.products.menus,order.ProductOrdered.menus.nullable.menus,order.ProductOrdered.menus.nullable.order.MenuOrdered,order.ProductOrdered.menus.nullable,productOrdered.menus.nullable.order.Basket.products[0].menus,productOrdered.menus.nullable.order.Basket.products.menus,productOrdered.menus.nullable.products[0].menus,productOrdered.menus.nullable.products.menus,productOrdered.menus.nullable.menus,productOrdered.menus.nullable.order.MenuOrdered,productOrdered.menus.nullable,nullable.order.Basket.products[0].menus,nullable.order.Basket.products.menus,nullable.products[0].menus,nullable.products.menus,nullable.menus,nullable.order.MenuOrdered,nullable]; arguments [menus,class order.ProductOrdered]; default message [Property [{0}] of class [{1}] cannot be null]
. Stacktrace follows:
Message: Validation Error(s) occurred during save():
- Field error in object 'order.Basket' on field 'products[0].menus': rejected value [null]; codes [order.ProductOrdered.menus.nullable.error.order.Basket.products[0].menus,order.ProductOrdered.menus.nullable.error.order.Basket.products.menus,order.ProductOrdered.menus.nullable.error.products[0].menus,order.ProductOrdered.menus.nullable.error.products.menus,order.ProductOrdered.menus.nullable.error.menus,order.ProductOrdered.menus.nullable.error.order.MenuOrdered,order.ProductOrdered.menus.nullable.error,productOrdered.menus.nullable.error.order.Basket.products[0].menus,productOrdered.menus.nullable.error.order.Basket.products.menus,productOrdered.menus.nullable.error.products[0].menus,productOrdered.menus.nullable.error.products.menus,productOrdered.menus.nullable.error.menus,productOrdered.menus.nullable.error.order.MenuOrdered,productOrdered.menus.nullable.error,order.ProductOrdered.menus.nullable.order.Basket.products[0].menus,order.ProductOrdered.menus.nullable.order.Basket.products.menus,order.ProductOrdered.menus.nullable.products[0].menus,order.ProductOrdered.menus.nullable.products.menus,order.ProductOrdered.menus.nullable.menus,order.ProductOrdered.menus.nullable.order.MenuOrdered,order.ProductOrdered.menus.nullable,productOrdered.menus.nullable.order.Basket.products[0].menus,productOrdered.menus.nullable.order.Basket.products.menus,productOrdered.menus.nullable.products[0].menus,productOrdered.menus.nullable.products.menus,productOrdered.menus.nullable.menus,productOrdered.menus.nullable.order.MenuOrdered,productOrdered.menus.nullable,nullable.order.Basket.products[0].menus,nullable.order.Basket.products.menus,nullable.products[0].menus,nullable.products.menus,nullable.menus,nullable.order.MenuOrdered,nullable]; arguments [menus,class order.ProductOrdered]; default message [Property [{0}] of class [{1}] cannot be null]
Line | Method
->> 190 | doInvokeInternal in org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractSavePersistentMethod
| 68 | invoke in org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod
| 195 | save . . . . . . . . . . . . . in org.codehaus.groovy.grails.orm.hibernate.HibernateGormInstanceApi
| -1 | save in order.Basket
| 45 | defaultCall . . . . . . . . . . in org.codehaus.groovy.runtime.callsite.CallSiteArray
| 108 | call in org.codehaus.groovy.runtime.callsite.AbstractCallSite
| 116 | call . . . . . . . . . . . . . in ''
| 18 | index in test.TestController
| -2 | invoke0 . . . . . . . . . . . . in sun.reflect.NativeMethodAccessorImpl
| 62 | invoke in ''
| 43 | invoke . . . . . . . . . . . . in sun.reflect.DelegatingMethodAccessorImpl
| 483 | invoke in java.lang.reflect.Method
| 1270 | jlrMethodInvoke . . . . . . . . in org.springsource.loaded.ri.ReflectiveInterceptor
| 154 | invoke in org.codehaus.groovy.grails.web.servlet.mvc.MixedGrailsControllerHelper
| 375 | handleAction . . . . . . . . . in org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper
| 252 | executeAction in ''
| 205 | handleURI . . . . . . . . . . . in ''
| 126 | handleURI in ''
| 72 | handleRequest . . . . . . . . . in org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsController
| 50 | handle in org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter
| 347 | doDispatch . . . . . . . . . . in org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet
| 870 | doService in org.springframework.web.servlet.DispatcherServlet
| 961 | processRequest . . . . . . . . in org.springframework.web.servlet.FrameworkServlet
| 852 | doGet in ''
| 620 | service . . . . . . . . . . . . in javax.servlet.http.HttpServlet
| 837 | service in org.springframework.web.servlet.FrameworkServlet
| 727 | service . . . . . . . . . . . . in javax.servlet.http.HttpServlet
| 303 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter . . . . . . . . . . . in ''
| 52 | doFilter in org.apache.tomcat.websocket.server.WsFilter
| 241 | internalDoFilter . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter in ''
| 198 | doFilter . . . . . . . . . . . in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 344 | invokeDelegate . . . . . . . . in org.springframework.web.filter.DelegatingFilterProxy
| 261 | doFilter in ''
| 241 | internalDoFilter . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter in ''
| 101 | doFilter . . . . . . . . . . . in org.springframework.web.filter.OncePerRequestFilter
| 241 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter . . . . . . . . . . . in ''
| 101 | doFilter in org.springframework.web.filter.OncePerRequestFilter
| 241 | internalDoFilter . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter in ''
| 101 | doFilter . . . . . . . . . . . in org.springframework.web.filter.OncePerRequestFilter
| 241 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter . . . . . . . . . . . in ''
| 748 | invoke in org.apache.catalina.core.ApplicationDispatcher
| 486 | processRequest . . . . . . . . in ''
| 411 | doForward in ''
| 338 | forward . . . . . . . . . . . . in ''
| 178 | forwardRequestForUrlMappingInfo in org.codehaus.groovy.grails.web.mapping.UrlMappingUtils
| 144 | forwardRequestForUrlMappingInfo in ''
| 135 | forwardRequestForUrlMappingInfo in ''
| 216 | doFilterInternal . . . . . . . in org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter
| 107 | doFilter in org.springframework.web.filter.OncePerRequestFilter
| 241 | internalDoFilter . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter in ''
| 69 | doFilterInternal . . . . . . . in org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter
| 107 | doFilter in org.springframework.web.filter.OncePerRequestFilter
| 241 | internalDoFilter . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter in ''
| 67 | doFilterInternal . . . . . . . in org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter
| 107 | doFilter in org.springframework.web.filter.OncePerRequestFilter
| 241 | internalDoFilter . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter in ''
| 88 | doFilterInternal . . . . . . . in org.springframework.web.filter.CharacterEncodingFilter
| 107 | doFilter in org.springframework.web.filter.OncePerRequestFilter
| 344 | invokeDelegate . . . . . . . . in org.springframework.web.filter.DelegatingFilterProxy
| 261 | doFilter in ''
| 241 | internalDoFilter . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter in ''
| 220 | invoke . . . . . . . . . . . . in org.apache.catalina.core.StandardWrapperValve
| 122 | invoke in org.apache.catalina.core.StandardContextValve
| 171 | invoke . . . . . . . . . . . . in org.apache.catalina.core.StandardHostValve
| 103 | invoke in org.apache.catalina.valves.ErrorReportValve
| 116 | invoke . . . . . . . . . . . . in org.apache.catalina.core.StandardEngineValve
| 408 | service in org.apache.catalina.connector.CoyoteAdapter
| 1070 | process . . . . . . . . . . . . in org.apache.coyote.http11.AbstractHttp11Processor
| 611 | process in org.apache.coyote.AbstractProtocol$AbstractConnectionHandler
| 314 | run . . . . . . . . . . . . . . in org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 617 | run . . . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
| 61 | run in org.apache.tomcat.util.threads.TaskThread$WrappingRunnable
^ 745 | run . . . . . . . . . . . . . . in java.lang.Thread
I have a simple Grails 2.3.7 application with error handling configured in UrlMappings.groovy:
class UrlMappings {
static mappings = {
"403"(controller: "error", action: "handleForbidden")
"404"(controller: "error", action: "handleNotFound")
"500"(controller: "error", action: "handleError")
}
}
This works as expected when I access forbidden url with regular request, but when I'm posting multipart request (e.g. uploading file) to forbidden url the server always returns 500 error with the following stacktrace:
ERROR errors.GrailsExceptionResolver - IllegalArgumentException occurred when processing request: [POST] /igetit/
Method name must not be null. Stacktrace follows:
Message: Method name must not be null
Line | Method
->> 112 | notNull in org.springframework.util.Assert
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 156 | findMethod in org.springframework.util.ReflectionUtils
| 41 | retrieveAction . . . . . . . . . . . in grails.plugin.cache.web.ProxyAwareMixedGrailsControllerHelper
| 226 | executeAction in org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper
| 197 | handleURI . . . . . . . . . . . . . . in ''
| 121 | handleURI in ''
| 72 | handleRequest . . . . . . . . . . . . in org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsController
| 48 | handle in org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter
| 355 | doDispatch . . . . . . . . . . . . . in org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet
| 856 | doService in org.springframework.web.servlet.DispatcherServlet
| 953 | processRequest . . . . . . . . . . . in org.springframework.web.servlet.FrameworkServlet
| 855 | doPost in ''
| 646 | service . . . . . . . . . . . . . . . in javax.servlet.http.HttpServlet
| 829 | service in org.springframework.web.servlet.FrameworkServlet
| 727 | service . . . . . . . . . . . . . . . in javax.servlet.http.HttpServlet
| 303 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter . . . . . . . . . . . . . . in ''
| 134 | doFilter in org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter
| 241 | internalDoFilter . . . . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter in ''
| 330 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 108 | invoke in org.springframework.security.web.access.intercept.FilterSecurityInterceptor
| 84 | doFilter . . . . . . . . . . . . . . in ''
| 342 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 113 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.access.ExceptionTranslationFilter
| 342 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| -1 | call . . . . . . . . . . . . . . . . in javax.servlet.FilterChain$doFilter
| 88 | processFilterChain in com.odobo.grails.plugin.springsecurity.rest.RestTokenValidationFilter
| -1 | this$3$processFilterChain . . . . . . in ''
| 56 | doFilter in ''
| 342 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 53 | doFilter in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
| 342 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 146 | doFilter in org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter
| 342 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 150 | doFilter in org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter
| 342 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| -1 | call in javax.servlet.FilterChain$doFilter
| 108 | doFilter . . . . . . . . . . . . . . in com.odobo.grails.plugin.springsecurity.rest.RestAuthenticationFilter
| 342 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 199 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
| 49 | doFilter in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
| 342 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 82 | doFilter in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 342 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| -1 | call in javax.servlet.FilterChain$doFilter
| 66 | doFilter . . . . . . . . . . . . . . in com.odobo.grails.plugin.springsecurity.rest.RestLogoutFilter
| 342 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 65 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.context.SecurityContextPersistenceFilter
| 342 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 192 | doFilterInternal . . . . . . . . . . in org.springframework.security.web.FilterChainProxy
| 166 | doFilter in ''
| 343 | invokeDelegate . . . . . . . . . . . in org.springframework.web.filter.DelegatingFilterProxy
| 260 | doFilter in ''
| 241 | internalDoFilter . . . . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter in ''
| 101 | doFilter . . . . . . . . . . . . . . in org.springframework.web.filter.OncePerRequestFilter
| 241 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter . . . . . . . . . . . . . . in ''
| 748 | invoke in org.apache.catalina.core.ApplicationDispatcher
| 488 | processRequest . . . . . . . . . . . in ''
| 411 | doForward in ''
| 338 | forward . . . . . . . . . . . . . . . in ''
| 332 | forwardRequestForUrlMappingInfo in org.codehaus.groovy.grails.web.util.WebUtils
| 297 | forwardRequestForUrlMappingInfo . . . in ''
| 152 | doDispatch in org.codehaus.groovy.grails.web.servlet.ErrorHandlingServlet
| 856 | doService . . . . . . . . . . . . . . in org.springframework.web.servlet.DispatcherServlet
| 953 | processRequest in org.springframework.web.servlet.FrameworkServlet
| 855 | doPost . . . . . . . . . . . . . . . in ''
| 646 | service in javax.servlet.http.HttpServlet
| 829 | service . . . . . . . . . . . . . . . in org.springframework.web.servlet.FrameworkServlet
| 727 | service in javax.servlet.http.HttpServlet
| 303 | internalDoFilter . . . . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter in ''
| 233 | executeFilterChainWithWrappedResponse in org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter
| 208 | obtainContent in ''
| 153 | doFilter . . . . . . . . . . . . . . in ''
| 241 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter . . . . . . . . . . . . . . in ''
| 330 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 108 | invoke . . . . . . . . . . . . . . . in org.springframework.security.web.access.intercept.FilterSecurityInterceptor
| 84 | doFilter in ''
| 342 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 113 | doFilter in org.springframework.security.web.access.ExceptionTranslationFilter
| 342 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| -1 | call in javax.servlet.FilterChain$doFilter
| 88 | processFilterChain . . . . . . . . . in com.odobo.grails.plugin.springsecurity.rest.RestTokenValidationFilter
| -1 | this$3$processFilterChain in ''
| 56 | doFilter . . . . . . . . . . . . . . in ''
| 342 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 53 | doFilter . . . . . . . . . . . . . . in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
| 342 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 139 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter
| 342 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 150 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter
| 342 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| -1 | call . . . . . . . . . . . . . . . . in javax.servlet.FilterChain$doFilter
| 108 | doFilter in com.odobo.grails.plugin.springsecurity.rest.RestAuthenticationFilter
| 342 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 199 | doFilter in org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
| 49 | doFilter . . . . . . . . . . . . . . in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
| 342 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 82 | doFilter . . . . . . . . . . . . . . in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 342 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| -1 | call . . . . . . . . . . . . . . . . in javax.servlet.FilterChain$doFilter
| 66 | doFilter in com.odobo.grails.plugin.springsecurity.rest.RestLogoutFilter
| 342 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 87 | doFilter in org.springframework.security.web.context.SecurityContextPersistenceFilter
| 342 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 192 | doFilterInternal in org.springframework.security.web.FilterChainProxy
| 160 | doFilter . . . . . . . . . . . . . . in ''
| 343 | invokeDelegate in org.springframework.web.filter.DelegatingFilterProxy
| 260 | doFilter . . . . . . . . . . . . . . in ''
| 241 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter . . . . . . . . . . . . . . in ''
| 69 | doFilterInternal in org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter
| 107 | doFilter . . . . . . . . . . . . . . in org.springframework.web.filter.OncePerRequestFilter
| 241 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter . . . . . . . . . . . . . . in ''
| 748 | invoke in org.apache.catalina.core.ApplicationDispatcher
| 488 | processRequest . . . . . . . . . . . in ''
| 411 | doForward in ''
| 338 | forward . . . . . . . . . . . . . . . in ''
| 466 | custom in org.apache.catalina.core.StandardHostValve
| 337 | status . . . . . . . . . . . . . . . in ''
| 202 | invoke in ''
| 98 | invoke . . . . . . . . . . . . . . . in org.apache.catalina.valves.ErrorReportValve
| 116 | invoke in org.apache.catalina.core.StandardEngineValve
| 408 | service . . . . . . . . . . . . . . . in org.apache.catalina.connector.CoyoteAdapter
| 1040 | process in org.apache.coyote.http11.AbstractHttp11Processor
| 607 | process . . . . . . . . . . . . . . . in org.apache.coyote.AbstractProtocol$AbstractConnectionHandler
| 313 | run in org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor
| 1145 | runWorker . . . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor
| 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 724 | run . . . . . . . . . . . . . . . . . in java.lang.Thread
Can I handle 403 error for multipart requests with such declarative syntax or there is another way to handle them?
I use Grails 2.3.11 and Hibernate with MySQL.
I get this strange error:
Message
Executing action [handle] of controller [org.grails.jaxrs.JaxrsController] in plugin [jaxrs] caused exception: Runtime error executing action
Caused by
Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
Trace
Line | Method
->> 159 | invoke in org.codehaus.groovy.grails.web.servlet.mvc.MixedGrailsControllerHelper
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 354 | handleAction in org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper
| 231 | executeAction . . . . . . . . . . . . in ''
| 197 | handleURI in ''
| 121 | handleURI . . . . . . . . . . . . . . in ''
| 72 | handleRequest in org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsController
| 48 | handle . . . . . . . . . . . . . . . in org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter
| 355 | doDispatch in org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet
| 851 | doService . . . . . . . . . . . . . . in org.springframework.web.servlet.DispatcherServlet
| 953 | processRequest in org.springframework.web.servlet.FrameworkServlet
| 855 | doPost . . . . . . . . . . . . . . . in ''
| 646 | service in javax.servlet.http.HttpServlet
| 829 | service . . . . . . . . . . . . . . . in org.springframework.web.servlet.FrameworkServlet
| 727 | service in javax.servlet.http.HttpServlet
| 303 | internalDoFilter . . . . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter in ''
| 52 | doFilter . . . . . . . . . . . . . . in org.apache.tomcat.websocket.server.WsFilter
| 241 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter . . . . . . . . . . . . . . in ''
| 198 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter . . . . . . . . . . . . . . in grails.plugin.cache.web.filter.AbstractFilter
| 343 | invokeDelegate in org.springframework.web.filter.DelegatingFilterProxy
| 260 | doFilter . . . . . . . . . . . . . . in ''
| 241 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter . . . . . . . . . . . . . . in ''
| 100 | doFilter in org.springframework.web.filter.OncePerRequestFilter
| 241 | internalDoFilter . . . . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter in ''
| 100 | doFilter . . . . . . . . . . . . . . in org.springframework.web.filter.OncePerRequestFilter
| 241 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter . . . . . . . . . . . . . . in ''
| 100 | doFilter in org.springframework.web.filter.OncePerRequestFilter
| 241 | internalDoFilter . . . . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter in ''
| 100 | doFilter . . . . . . . . . . . . . . in org.springframework.web.filter.OncePerRequestFilter
| 241 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter . . . . . . . . . . . . . . in ''
| 748 | invoke in org.apache.catalina.core.ApplicationDispatcher
| 486 | processRequest . . . . . . . . . . . in ''
| 411 | doForward in ''
| 338 | forward . . . . . . . . . . . . . . . in ''
| 332 | forwardRequestForUrlMappingInfo in org.codehaus.groovy.grails.web.util.WebUtils
| 297 | forwardRequestForUrlMappingInfo . . . in ''
| 288 | forwardRequestForUrlMappingInfo in ''
| 217 | doFilterInternal . . . . . . . . . . in org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter
| 106 | doFilter in org.springframework.web.filter.OncePerRequestFilter
| 241 | internalDoFilter . . . . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter in ''
| 233 | executeFilterChainWithWrappedResponse in org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter
| 208 | obtainContent in ''
| 153 | doFilter . . . . . . . . . . . . . . in ''
| 241 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter . . . . . . . . . . . . . . in ''
| 369 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 109 | invoke . . . . . . . . . . . . . . . in org.springframework.security.web.access.intercept.FilterSecurityInterceptor
| 83 | doFilter in ''
| 381 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 97 | doFilter in org.springframework.security.web.access.ExceptionTranslationFilter
| 381 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 78 | doFilter in org.springframework.security.web.authentication.AnonymousAuthenticationFilter
| 381 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 112 | doFilter in org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter
| 381 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 54 | doFilter in org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter
| 381 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 187 | doFilter in org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
| 40 | doFilter . . . . . . . . . . . . . . in org.codehaus.groovy.grails.plugins.springsecurity.RequestHolderAuthenticationFilter
| 381 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 79 | doFilter . . . . . . . . . . . . . . in org.codehaus.groovy.grails.plugins.springsecurity.MutableLogoutFilter
| 381 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 79 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.context.SecurityContextPersistenceFilter
| 381 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 168 | doFilter . . . . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy
| 343 | invokeDelegate in org.springframework.web.filter.DelegatingFilterProxy
| 260 | doFilter . . . . . . . . . . . . . . in ''
| 241 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter . . . . . . . . . . . . . . in ''
| 69 | doFilterInternal in org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter
| 106 | doFilter . . . . . . . . . . . . . . in org.springframework.web.filter.OncePerRequestFilter
| 241 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter . . . . . . . . . . . . . . in ''
| 67 | doFilterInternal in org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter
| 106 | doFilter . . . . . . . . . . . . . . in org.springframework.web.filter.OncePerRequestFilter
| 241 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter . . . . . . . . . . . . . . in ''
| 46 | doFilterInternal in org.grails.jaxrs.web.JaxrsFilter
| 106 | doFilter . . . . . . . . . . . . . . in org.springframework.web.filter.OncePerRequestFilter
| 241 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter . . . . . . . . . . . . . . in ''
| 65 | doFilter in com.github.greengerong.PreRenderSEOFilter
| 241 | internalDoFilter . . . . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter in ''
| 88 | doFilterInternal . . . . . . . . . . in org.springframework.web.filter.CharacterEncodingFilter
| 106 | doFilter in org.springframework.web.filter.OncePerRequestFilter
| 343 | invokeDelegate . . . . . . . . . . . in org.springframework.web.filter.DelegatingFilterProxy
| 260 | doFilter in ''
| 241 | internalDoFilter . . . . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 208 | doFilter in ''
| 220 | invoke . . . . . . . . . . . . . . . in org.apache.catalina.core.StandardWrapperValve
| 122 | invoke in org.apache.catalina.core.StandardContextValve
| 170 | invoke . . . . . . . . . . . . . . . in org.apache.catalina.core.StandardHostValve
| 98 | invoke in org.apache.catalina.valves.ErrorReportValve
| 950 | invoke . . . . . . . . . . . . . . . in org.apache.catalina.valves.AccessLogValve
| 116 | invoke in org.apache.catalina.core.StandardEngineValve
| 408 | service . . . . . . . . . . . . . . . in org.apache.catalina.connector.CoyoteAdapter
| 1040 | process in org.apache.coyote.http11.AbstractHttp11Processor
| 607 | process . . . . . . . . . . . . . . . in org.apache.coyote.AbstractProtocol$AbstractConnectionHandler
| 1721 | doRun in org.apache.tomcat.util.net.NioEndpoint$SocketProcessor
| 1679 | run . . . . . . . . . . . . . . . . . in ''
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
What does this error mean and how can I prevent it?
| Running Grails application
| Error 2013-05-15 22:37:49,943 [localhost-startStop-1] ERROR plugins.DefaultGrailsPluginManager - Error configuring dynamic methods for plugin [resources:1.1.6]: String index out of range: 39
Message: String index out of range: 39
Line | Method
->> 1907 | substring in java.lang.String
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 412 | relativeTo in org.grails.plugin.resource.ResourceMeta
| 352 | relativeToWithQueryParams . . in ''
| 57 | doCall in org.grails.plugin.resource.CSSRewriterResourceMapper$_map_closure1
| 60 | doCall . . . . . . . . . . . in org.grails.plugin.resource.CSSLinkProcessor$_process_closure1
| 55 | process in org.grails.plugin.resource.CSSLinkProcessor
| 36 | map . . . . . . . . . . . . . in org.grails.plugin.resource.CSSRewriterResourceMapper
| 139 | invoke in org.grails.plugin.resource.mapper.ResourceMapper
| 128 | invokeIfNotExcluded . . . . . in ''
| 587 | applyMappers in org.grails.plugin.resource.ResourceProcessor
| 533 | prepareResource . . . . . . . in ''
| 602 | doCall in org.grails.plugin.resource.ResourceProcessor$_prepareSingleDeclaredResource_closure12
| 29 | addDeclaredResource . . . . . in org.grails.plugin.resource.util.ResourceMetaStore
| 600 | prepareSingleDeclaredResource in org.grails.plugin.resource.ResourceProcessor
| 649 | prepareResourceBatch . . . . in ''
| 804 | resourcesChanged in ''
| 800 | loadModules . . . . . . . . . in ''
| 1056 | reloadAll in ''
| 172 | doCall . . . . . . . . . . . in ResourcesGrailsPlugin$_closure3
| 334 | innerRun in java.util.concurrent.FutureTask$Sync
| 166 | run . . . . . . . . . . . . . in java.util.concurrent.FutureTask
| 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 603 | run . . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run in java.lang.Thread
| Server running. Browse to ......../MyApp