Grails 3 schemaExport 包含查找 sitemesh.xml 的 FileNotFoundException 警告

2024-02-09

When 模式导出使用 Grails 3.3 应用程序的 Gradle 执行,但日志中存在以下警告ddl.sql被建造。根据 Grails 3 文档,sitemesh.xml 已被删除,因此该文件自然不可用。我错过了什么吗?

工具和版本:Grails 3.3.0、Gradle 3.3、Hibnerate 5、Sybase ASE 15.7

2017-09-13 12:50:45.264  WARN --- [           main] o.s.mock.web.MockServletContext          : Couldn't determine real path of resource class path resource [src/main/webapp/WEB-INF/sitemesh.xml]

java.io.FileNotFoundException: class path resource [src/main/webapp/WEB-INF/sitemesh.xml] cannot be resolved to URL because it does not exist
        at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:187)
        at org.springframework.core.io.AbstractFileResolvingResource.getFile(AbstractFileResolvingResource.java:49)
        at org.springframework.mock.web.MockServletContext.getRealPath(MockServletContext.java:458)
        at org.grails.web.sitemesh.Grails5535Factory.<init>(Grails5535Factory.java:78)
        at org.grails.web.servlet.view.SitemeshLayoutViewResolver.loadSitemeshConfig(SitemeshLayoutViewResolver.java:105)
        at org.grails.web.servlet.view.SitemeshLayoutViewResolver.init(SitemeshLayoutViewResolver.java:67)
        at org.grails.web.servlet.view.SitemeshLayoutViewResolver.onApplicationEvent(SitemeshLayoutViewResolver.java:146)
        at org.grails.web.servlet.view.SitemeshLayoutViewResolver.onApplicationEvent(SitemeshLayoutViewResolver.java:42)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:883)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
        at grails.boot.GrailsApp.run(GrailsApp.groovy:83)
        at grails.ui.command.GrailsApplicationContextCommandRunner.run(GrailsApplicationContextCommandRunner.groovy:55)
        at grails.ui.command.GrailsApplicationContextCommandRunner.main(GrailsApplicationContextCommandRunner.groovy:102)

这只是一条警告消息。底层的 spring 类正在寻找它,但只是说它不存在。默认日志级别不显示此输出。

您可以安全地忽略该消息或调整记录器以不显示它。

https://github.com/spring-projects/spring-framework/blob/master/spring-test/src/main/java/org/springframework/mock/web/MockServletContext.java#L460 https://github.com/spring-projects/spring-framework/blob/master/spring-test/src/main/java/org/springframework/mock/web/MockServletContext.java#L460

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Grails 3 schemaExport 包含查找 sitemesh.xml 的 FileNotFoundException 警告 的相关文章

  • Grails 与 MongoDB、对象 id 和脚手架

    我使用集成测试和 Grails 脚手架将数据写入 mongoDB 数据库时遇到问题 当尝试从 列表 类型页面中选择域实例时 我收到错误 未找到 id null 的 域名 我确信这是因为 Grails url controller actio
  • Javassist 增强部署失败

    我遇到了底部堆栈跟踪中指定的错误this https stackoverflow com questions 26220232 hibernate lazy loading proxy gorm static apis instanceof
  • Grails 2.3 IntegrationSpec 不能为事务性 false

    我最近升级到 Grails 2 3 并尝试将所有旧测试迁移到 spock 集成测试 但它在清理时失败了 因为我的测试是非事务性的 Grails 文档说测试可以是非事务性的 但我们需要手动处理它 但在这里似乎不太正确 因为我在扩展 Integ
  • Grails - 错误分叉 Grails VM 因错误退出

    首先 我想说 我是 Grails 的初学者 在尝试遵循一些示例时 我不断收到无法解决的错误 如果问题很愚蠢 那么很抱歉 我通过命令行创建了一个虚拟应用程序 并尝试以相同的方式运行它 run app 但出现以下错误 运行 Grails 应用程
  • grails postgres 消息:错误:列 this_.id 不存在

    grails 和 postgres 用于用户域 Message ERROR column this id does not exist 明白问题了 对于用户域 我将 postgres 表设置为 用户 因此 默认情况下 当它尝试查询用户表时
  • 在 Grails 下如何防止异常导致事务回滚?

    我的 Grails 服务遇到一个问题 即与事务无关的吞没异常会导致事务回滚 即使它与域对象的持久性无关 在我的服务中 我有一些类似的东西 updateSomething domainObj def oldFilename domainObj
  • Grails 操作被调用两次。帮助!

    我正在编写一个 grails 应用程序并遇到一个奇怪的问题 单击页面上的提交按钮时 关联的操作会快速连续调用两次 这会导致一切都严重破坏 以前有其他人见过这个问题吗 下面是我的代码 从普惠制页面
  • 构建战争时如何包含额外文件?

    我正在尝试添加一个目录 garils app store 对我的战争就像这样BuildConfig groovy grails war resources stagingDir args gt copy file grails app st
  • withTransaction 和 withNewTransaction 有什么区别?

    以下动作有什么区别 def someAction User withTransaction and def someAction User withNewTransaction 我什么时候用什么 当 grails 操作仅包含 Transac
  • Grails Asset-pipeline 不加载角度部分模板

    我将 angular ui bootstrap 与 Grails 2 3 x asset pipeline 1 6 1 插件一起使用 其中一个组件 alert js 正在尝试加载 template alert alert html 但这会解
  • grails/mysql 时区更改

    完成更改应用程序时区的最佳方法是什么 在我看来 必须发生以下情况 服务器 TZ 已被系统管理员更改 mysql必须重新启动 数据库中每个基于时间的列都必须使用convert tz 或等效方法更新所有值 因此 要么必须编写一个 mysql 脚
  • 在另一个插件中覆盖插件 GSP 和控制器

    我的项目中有一个相当复杂的 grails 插件依赖结构 并且在覆盖安全插件中的类时遇到问题 我的结构有点像这样 Web App Audit Plugin Spring Security Core Plugin Security Wrappe
  • Groovy 元编程 - 将静态方法添加到 Object.metaClass

    我遇到了无法解决的 Groovy 元编程问题 将静态方法 foo 添加到类 FooBar 时 FooBar foo 按预期工作 FooBar metaClass static foo println hello FooBar foo 但是
  • 每个组织的 Spring Security 用户角色

    在我的应用程序中 我有一个名为组织的顶级实体 用户和组织之间的关系是多对多的 因此 我可能会遇到以下情况 用户拥有组织的角色 ROLE ADMIN 用户拥有组织的角色 ROLE USER 我需要确保当用户 A 访问 Organization
  • 模拟 Spock 中的超类

    如何对 Spock 中具有超类的类进行单元测试 该超类调用来自其超类的方法调用 或者如何模拟 Spock 中的超类 Ex class Bar def method1 parm1 Method actions class Foo extend
  • Grails、Spring Security Core - 从应用程序中删除 /login/auth

    我在 Grails 应用程序中安装了 Spring Security Core 并使用s2 quickstart 我想要 来处理登录和注销操作 对我来说 这意味着未登录的用户只能访问根页面 而不能访问其他页面 实际上 对于没有角色 ROLE
  • Grails - 在 Criteria API 中加入关联两次

    可以在标准中加入两次协会吗 def criteria User createCriteria def results criteria list childObject1 eq childObjProp childObjProp1 chil
  • 更新到 IntelliJ IDEA Ultimate 2016.2 后找不到 Grails 应用程序

    我已将我的 IntelliJ IDEA Ultimate 更新到 2016 2 版本 我有一个 Grails 3 项目 现在当我打开 IDE 时尝试运行我的项目时出现以下错误 Error running Grails My Project
  • Grails/GGTS 2.4.2 没有将插件放在类路径上?

    我正在尝试将旧的 1 3 Grails 项目更新到最新的 Grails Groovy etc 所以我下载了 Grails 2 4 2 Groovy 2 3 和 Java 1 7 0 65 然后我通过 Import gt Grails 导入了
  • Spock模拟inputStream导致无限循环

    我有一个代码 gridFSFile inputStream bytes 当我尝试这样测试时 given def inputStream Mock InputStream def gridFSDBFile Mock GridFSDBFile

随机推荐