|
Hi,
I just installed the new Grails and gave the H2 web console a first try. It's basically working but it's missing various resources and so isn't working properly. For example these resources are missing (at least for me): ERROR resource.ResourceMeta - Resource not found: /dbconsole/stylesheet.css ERROR resource.ResourceMeta - Resource not found: /dbconsole/tree.js ERROR resource.ResourceMeta - Resource not found: /dbconsole/table.js Does anyone else experience this behavior too? (I already tried upgrading a 1.3.7 app and create a fresh 1.4 app ... both times with the same result). br kl4n4 |
|
Hi,
IMHO the cause is that the resources plugin tries to care about stuff inside the dbconsole-Servlet (which is a complete black box to Grails). In some Grails 1.3.7 I've worked around this by adding grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*'] to grails-app/conf/Config.groovy. Regards, Stefan Am Mittwoch, den 25.05.2011, 06:50 -0700 schrieb kl4n4: > Hi, > > I just installed the new Grails and gave the H2 web console a first try. > It's basically working but it's missing various resources and so isn't > working properly. For example these resources are missing (at least for me): > > ERROR resource.ResourceMeta - Resource not found: /dbconsole/stylesheet.css > ERROR resource.ResourceMeta - Resource not found: /dbconsole/tree.js > ERROR resource.ResourceMeta - Resource not found: /dbconsole/table.js > > Does anyone else experience this behavior too? (I already tried upgrading a > 1.3.7 app and create a fresh 1.4 app ... both times with the same result). > > br kl4n4 > > -- > View this message in context: http://grails.1312388.n4.nabble.com/Grails-1-4-H2-DbConsole-not-fully-working-tp3549738p3549738.html > Sent from the Grails - user mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Thx Stefan! :-)
adding: grails.resources.adhoc.patterns = ['/dbconsole/images/*', '/dbconsole/css/*', '/dbconsole/js/*'] to the Config did it. Maybe this should be added to the grails docs (http://grails.org/doc/1.4.0.M1/guide/single.html#3.3.5%20Database%20Console) |
|
In reply to this post by Stefan Armbruster
On 25 May 2011, at 14:57, Stefan Armbruster wrote: > Hi, > > IMHO the cause is that the resources plugin tries to care about stuff > inside the dbconsole-Servlet (which is a complete black box to Grails). > In some Grails 1.3.7 I've worked around this by adding > > grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*'] > > to grails-app/conf/Config.groovy. Note that with 1.0 you don't need to do that. You can exclude paths in addition to the high level filter setting (which cannot exclude): > grails.resources.adhoc.excludes = ['/dbconsole/**'] Marc --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
In reply to this post by kl4n4
On 25 May 2011, at 15:08, kl4n4 wrote: > Thx Stefan! :-) > > adding: > > grails.resources.adhoc.patterns = ['/dbconsole/images/*', > '/dbconsole/css/*', '/dbconsole/js/*'] > > to the Config did it. Maybe this should be added to the grails docs > (http://grails.org/doc/1.4.0.M1/guide/single.html#3.3.5%20Database%20Console) I think the root cause needs to be established. We are using a standard servlet filter. It seems like the dbconsole is not serving its resources the way a web application normally should. Your above fix does not seem to make sense to me. I think you've just managed to turn off all normal adhoc resource handling, which will affect your own code if you use ad hoc resources (i.e. img links or images linked from CSS). See my previous mail about the excludes. Anybody fancy investigating how dbconsole exposes its resources to find out what is going wrong? It sounds like the files are not resources as far as the servlet container understands them, presumably it is serving them itself from a filter or servlet - which is pretty whack... Thanks Marc --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
The files are served by the H2 WebServlet: https://code.google.com/p/h2database/source/browse/trunk/h2/src/main/org/h2/server/web/WebServlet.java
We should configure these to be excluded by default using the same logic that org.codehaus.groovy.grails.plugins.datasource.DataSourceGrailsPlugin uses when configuring the console in web.xml. If the console is disabled and the user wants to explicitly enable it then they can handle the excludes themselves. Burt On Wed, May 25, 2011 at 10:46 AM, Marc Palmer <[hidden email]> wrote:
|
|
I am running a project with 2.0.0.M2 that was upgraded probably from 1.3.2 when it first started and it has a few plugins including springsecurity-core and ui. I am facing the same issue mentioned above. Adding the line
> grails.resources.adhoc.patterns = ['/dbconsole/images/*', '/dbconsole/css/*', '/dbconsole/js/*'] did not help. Any hints on what I can do to get dbconsole running correctly ? (dbconsole/tree.js and dbconsole/stylesheet.css) (I tested ofcourse a brand new project and everything is dandy) |
|
On 9 Sep 2011, at 06:05, fiallega wrote: > I am running a project with 2.0.0.M2 that was upgraded probably from 1.3.2 > when it first started and it has a few plugins including springsecurity-core > and ui. I am facing the same issue mentioned above. Adding the line >> grails.resources.adhoc.patterns = ['/dbconsole/images/*', >> '/dbconsole/css/*', '/dbconsole/js/*'] > did not help. > Any hints on what I can do to get dbconsole running correctly ? > (dbconsole/tree.js and dbconsole/stylesheet.css) > (I tested ofcourse a brand new project and everything is dandy) Hi, That is not the correct configuration. What that is doing is telling resources *only* to handle ad hoc resources on those paths. You want to exclude. Leave grails.resources.adhoc.patterns with the default. Add: grails.resources.adhoc.excludes = ['/dbconsole/**/*.*'] That should work fine. Marc ~ ~ ~ Marc Palmer Freelancer (Grails/Groovy/Java) Founder @ http://noticelocal.com | Developer @ http://weceem.org Member @ http://spottymushroom.com | Contributor @ http://grails.org Twitter: http://twitter.com/wangjammer5 | Resumé: http://www.anyware.co.uk/marc/ Blog: http://www.anyware.co.uk | Grails Rocks: http://www.grailsrocks.com --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Powered by Nabble | Edit this page |
