grails-cors icon indicating copy to clipboard operation
grails-cors copied to clipboard

Values to cors.url.pattern cause catalina to fail

Open ghost opened this issue 12 years ago • 2 comments
trafficstars

In the Config.groovy, when I set the cors.url.pattern = '/rest/profile/ it causes Catalina to fail when restarting. However if I change it from /rest/* to the new value without restarting everything seems to work.

| Loading Grails 2.1.1 | Configuring classpath | Configuring classpath. | Environment set to development | Environment set to development. | Environment set to development.. | Environment set to development... | Environment set to development.... | Environment set to development..... | Packaging Grails application | Packaging Grails application. | Packaging Grails application.. | Packaging Grails application... | Packaging Grails application.... | Packaging Grails application..... | Compiling 1 source files | Compiling 1 source files. | Compiling 1 source files.. | Compiling 1 source files.. | Compiling 1 source files... | Compiling 1 source files... | Compiling 1 source files... | Compiling 1 source files.... | Compiling 1 source files.... | Compiling 1 source files.... | Compiling 1 source files..... | Running Grails application | Error 2013-02-18 23:05:24,184 [Tomcat-startStop-1] ERROR core.ContainerBase - A child container failed during start Message: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/untitled]] Line | Method ->> 222 | innerGet in java.util.concurrent.FutureTask$Sync


| 83 | get in java.util.concurrent.FutureTask | 303 | innerRun in java.util.concurrent.FutureTask$Sync | 138 | run in java.util.concurrent.FutureTask | 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker | 908 | run in '' ^ 680 | run . . in java.lang.Thread

Caused by LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/untitled]] ->> 303 | innerRun in java.util.concurrent.FutureTask$Sync


| 138 | run in java.util.concurrent.FutureTask | 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker | 908 | run in '' ^ 680 | run . . in java.lang.Thread

Caused by IllegalArgumentException: Invalid /rest/profile/ in filter mapping ->> 303 | innerRun in java.util.concurrent.FutureTask$Sync


| 138 | run in java.util.concurrent.FutureTask | 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker | 908 | run in '' ^ 680 | run . . in java.lang.Thread | Error 2013-02-18 23:05:24,214 [main] ERROR core.ContainerBase - A child container failed during start Message: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]] Line | Method ->> 222 | innerGet in java.util.concurrent.FutureTask$Sync


| 83 | get in java.util.concurrent.FutureTask | 137 | doStart . in org.grails.plugins.tomcat.InlineExplodedTomcatServer | 102 | start in org.grails.plugins.tomcat.TomcatServer | 176 | doCall . in _GrailsRun_groovy$_run_closure5_closure12 | 153 | doCall in _GrailsRun_groovy$_run_closure5 | 121 | runInline in _GrailsRun_groovy | 67 | doCall in _GrailsRun_groovy$_run_closure1 | 33 | doCall . in RunApp$_run_closure1 ^ 120 | main in com.intellij.rt.execution.application.AppMain

Caused by LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]] ->> 303 | innerRun in java.util.concurrent.FutureTask$Sync


| 138 | run in java.util.concurrent.FutureTask | 886 | runTask . in java.util.concurrent.ThreadPoolExecutor$Worker | 908 | run in '' ^ 680 | run . . . in java.lang.Thread

Caused by LifecycleException: A child container failed during start ->> 303 | innerRun in java.util.concurrent.FutureTask$Sync


| 138 | run in java.util.concurrent.FutureTask | 886 | runTask . in java.util.concurrent.ThreadPoolExecutor$Worker | 908 | run in '' ^ 680 | run . . . in java.lang.Thread | Error Failed to start component [StandardServer[-1]](NOTE: Stack trace has been filtered. Use --verbose to see entire trace.) org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]] at org.grails.plugins.tomcat.InlineExplodedTomcatServer.doStart(InlineExplodedTomcatServer.groovy:137) at org.grails.plugins.tomcat.TomcatServer.start(TomcatServer.groovy:102) at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:176) at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:153) at _GrailsRun_groovy.runInline(_GrailsRun_groovy:121) at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:67) at RunApp$_run_closure1.doCall(RunApp:33) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Tomcat]] ... 8 more Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat]] ... 8 more Caused by: org.apache.catalina.LifecycleException: A child container failed during start ... 8 more | Error Server failed to start: org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]]

Process finished with exit code 1

ghost avatar Feb 19 '13 07:02 ghost

I have been a bit snowed under with work .. I will try to have a look at this tm.

davidtinker avatar Feb 27 '13 18:02 davidtinker

I can confirm this is still an issue; removing the cors.url.pattern from config.groovy allows the grails server to run.

keithnickas avatar Nov 18 '15 17:11 keithnickas