jboss-deployment-structure.xml 和 global-module wildfly 20 [英] jboss-deployment-structure.xml and global-module wildfly 20

查看:50
本文介绍了jboss-deployment-structure.xml 和 global-module wildfly 20的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找wildfly 20和jboss-deployment-structure.xml的全局模块之间的不同,我在我的服务器中定义了几个模块然后我构建了一个没有maven设置我的onw依赖项的项目,然后当我在独立文件中声明的全局项目模块都可以完美运行,但是当我在独立文件中对此进行评论并在 subdeployment jds.xml 中声明时,该项目不适用于 tag-tiles 或 struts 标签,这会抛出 org.apache.tiles.request.render.CannotRenderException: ServletException 包括路径/WEB-INF/jsp/tl/bas.jsp".

I have been looking for witch is diferrent between global modules of wildfly 20 and jboss-deployment-structure.xml, I have several module define in my server then I have builded a project without maven setting my onw dependencies, then When I declared global project's modules in standalone file all works perfectly, but when I comment this on standalone, and declare this inside of subdeployment j-d-s.xml, The project dont work with tag-tiles or struts tag, this throw org.apache.tiles.request.render.CannotRenderException: ServletException including path '/WEB-INF/jsp/tl/bas.jsp'.

jboss-deployment-structure.xml (version.1.0)

jboss-deployment-structure.xml (version.1.0)

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
    <!-- <deployment>
        <exclusions>
            <module name="org.apache.log4j" />
        </exclusions>
    </deployment> -->
    <sub-deployment name="project.war">
        <dependencies>
            <module name="own.org.apache.tiles" />
            <module name="own.org.apache.struts2" />
            <module name="own.org.apache.commons" />
            <module name="own.org.apache.logging" />
            <module name="own.freemarker" />
            <module name="own.javassist" />
            <module name="own.ognl" />
        </dependencies>
    <!-- <exclusions>
      <module name="org.apache.log4j" />
    </exclusions> -->
    </sub-deployment>
</jboss-deployment-structure>

jboss-deployment-structure.xml (version.1.1)

jboss-deployment-structure.xml (version.1.1)

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
    <deployment>
        <dependencies>
            <module name="own.org.apache.tiles" />
            <module name="own.org.apache.struts2" />
            <module name="own.org.apache.commons" />
            <module name="own.org.apache.logging" />
            <module name="own.freemarker" />
            <module name="own.javassist" />
            <module name="own.ognl" />
        </dependencies>
        <exclusions>
            <module name="org.apache.log4j" />
        </exclusions>
    </deployment> 
    <sub-deployment name="project.war">
        <dependencies>
            <module name="own.org.apache.tiles" />
            <module name="own.org.apache.struts2" />
            <module name="own.org.apache.commons" />
            <module name="own.org.apache.logging" />
            <module name="own.freemarker" />
            <module name="own.javassist" />
            <module name="own.ognl" />
        </dependencies>
        <exclusions>
            <module name="org.apache.log4j" />
        </exclusions>
    </sub-deployment>
</jboss-deployment-structure>

代码段standalone.xml

snippet code standalone.xml

<subsystem xmlns="urn:jboss:domain:ee:5.0">
            <global-modules>
                <module name="own.org.apache.struts2" slot="main"/>
                <module name="own.org.apache.commons" slot="main"/>
                <module name="own.org.apache.logging" slot="main"/>
                <module name="own.freemarker" slot="main"/>
                <module name="own.javassist" slot="main"/>
                <module name="own.ognl" slot="main"/>
                <module name="own.org.apache.tiles" slot="main"/>
            </global-modules> 
<subsystem/>

服务器日志

2020-08-12 09:25:44,414 INFO  [stdout] (default task-1) org.apache.tiles.request.render.CannotRenderException: ServletException including path '/WEB-INF/jsp/til/bf.jsp'.
...
2020-08-12 09:25:44,418 INFO  [stdout] (default task-1) Caused by: java.io.IOException: ServletException including path '/WEB-INF/jsp/til/bf.jsp'.
...
2020-08-12 09:25:44,418 INFO  [stdout] (default task-1)     at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:63) ~[tiles-request-servlet-1.0.7.jar!/:1.0.7]
...
2020-08-12 09:25:44,418 INFO  [stdout] (default task-1) Caused by: org.apache.jasper.JasperException: JBWEB004113: The absolute uri: http://tiles.apache.org/tags-tiles cannot be resolved in either web.xml or the jar files deployed with this application
...
2020-08-12 09:25:44,421 INFO  [stdout] (default task-1) 2020-08-12 09:25:44,420 DEBUG [default task-1] dispatcher.DefaultDispatcherErrorHandler (DefaultDispatcherErrorHandler.java:108) - Exception occurred during processing request: ServletException including path '/WEB-INF/jsp/til/bf.jsp'.
...
2020-08-12 09:25:44,421 INFO  [stdout] (default task-1) org.apache.tiles.request.render.CannotRenderException: ServletException including path '/WEB-INF/jsp/til/bf.jsp'.2020-08-12 09:25:44,421 INFO  [stdout] (default task-1) org.apache.tiles.request.render.CannotRenderException: ServletException including path '/WEB-INF/jsp/til/bf.jsp'.
...
2020-08-12 09:25:44,424 INFO  [stdout] (default task-1) Caused by: java.io.IOException: ServletException including path '/WEB-INF/jsp/til/bf.jsp'.

...

2020-08-12 09:25:44,424 INFO  [stdout] (default task-1) Caused by: org.apache.jasper.JasperException: JBWEB004113: The absolute uri: http://tiles.apache.org/tags-tiles cannot be resolved in either web.xml or the jar files deployed with this application

问题是,为什么 jboss-deployment-structure.xml 不能与独立中的磁贴设置和全局模块的依赖项一起使用???

The question is, Why jboss-deployment-structure.xml don't work with dependencies for the tiles setting and global-modules in standalone yes???

PD:项目正在使用 jboss-deployment-structure.xml 或 global-modules 两种设置成功部署,但磁贴标签不适用于 jboss-deployment-structure.xml 设置依赖项

PD: The projects is deploying successly with both setting, jboss-deployment-structure.xml or global-modules but tiles tags don't work with jboss-deployment-structure.xml setting dependencies

推荐答案

我的详细问题是由于某种原因,他们从模块调用的某些 jar 文件在项目部署中不可用.然后,我做了一个简单的修改 jboss-deployment-structure.xml 一切正常.

My problem in detail was for some reason some jar file that they are calling from the modules dont are avalible in the project deploy. Then, I did a simple modify jboss-deployment-structure.xml and all good.

我添加了 meta-inf="export";财产.

I added meta-inf="export" property.

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
    <!-- <deployment>
        <exclusions>
            <module name="org.apache.log4j" />
        </exclusions>
    </deployment> -->
    <sub-deployment name="project.war">
        <dependencies>
            <module name="own.org.apache.tiles" meta-inf="export" />
            <module name="own.org.apache.struts2" meta-inf="export" />
            <module name="own.org.apache.commons" meta-inf="export" />
            <module name="own.org.apache.logging" meta-inf="export" />
            <module name="own.freemarker" meta-inf="export" />
            <module name="own.javassist" meta-inf="export" />
            <module name="own.ognl" meta-inf="export" />
        </dependencies>
    <!-- <exclusions>
      <module name="org.apache.log4j" />
    </exclusions> -->
    </sub-deployment>
</jboss-deployment-structure>

这篇关于jboss-deployment-structure.xml 和 global-module wildfly 20的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆