1 Reply Latest reply on Sep 7, 2017 8:41 PM by noriyuki matsuda

    I can't import some external resources in the WAR

    noriyuki matsuda Newbie

      please help me,

       

      I am trying to import some external resources in the WAR by the attribute "meta-inf" setting "import" in the jboss-deployment-structure.xml,

      and create the JSF page containing external resource "**.xhtml". But it doesn't work, and I want to know some points.

       

      •   In the following EJB-JAR and WAR settings, are there any wrong place?
      •   I understand that the "resource-root" element of the jboss-deployment-structure.xml in the EA_Address_Ip__V-1.0-SNAPSHOT.jar  means the module deployment.EA_Address_Ip__V-1.0-SNAPSHOT.jar:main imports the folder and files as resources, is that correct?
      •   I understand that the "meta-inf" attribute of the jboss-deployment-structure.xml in the EA_Address_Ip__W-1.0-SNAPSHOT.war  means whether or not module deployment.EA_Address_Ip__W-1.0-SNAPSHOT.war:main imports the resources of  the module deployment.EA_Address_Ip__V-1.0-SNAPSHOT.jar:main, is that correct?
      •   I understand that the "Service Module Loader" resolves these dependencies, is that correct? And can I get more detail logs? I'm learning the splliting module method by following sites, however I can't understand more details, and are there any recommended sites?

      https://jboss-modules.github.io/jboss-modules/manual/

      http://www.jboss.org/schema/jbossas/jboss-deployment-structure-1_2.xsd

      https://docs.jboss.org/author/display/WFLY10/Class+Loading+in+WildFly

       

      thank you,

      noriyuki

       

      /deployments/EA_Address_Ip__V-1.0-SNAPSHOT.jar

      /META-INF/resources/ip_list.xhtml

      /META-INF/jboss.xml

      /META-INF/jboss-deployment-structure.xml

       

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
         <deployment>
      
             <resources>
                 <resource-root path="." />
                 <resource-root path="./META-INF" />
                 <resource-root path="./META-INF/resources" />
             </resources>
      
         </deployment>
      </jboss-deployment-structure>
      

       

      --- debuglog

      ...
      10:46:18,661 DEBUG [org.jboss.as.server.deployment] (MSC service thread 1-6) Adding resource "/C:/Program Files/wildfly-10.1.0.Final/standalone/deployments/EA_Address_Ip__V-1.0-SNAPSHOT.jar" to module deployment.EA_Address_Ip__V-1.0-SNAPSHOT.jar:main
      10:46:18,662 DEBUG [org.jboss.as.server.deployment] (MSC service thread 1-6) Adding resource "/C:/Program Files/wildfly-10.1.0.Final/standalone/deployments/EA_Address_Ip__V-1.0-SNAPSHOT.jar/META-INF" to module deployment.EA_Address_Ip__V-1.0-SNAPSHOT.jar:main
      10:46:18,713 DEBUG [org.jboss.as.server.deployment] (MSC service thread 1-6) Adding resource "/C:/Program Files/wildfly-10.1.0.Final/standalone/deployments/EA_Address_Ip__V-1.0-SNAPSHOT.jar/META-INF/resources" to module deployment.EA_Address_Ip__V-1.0-SNAPSHOT.jar:main
      ...
      

       

      /deployments/EA_Address_Ip__W-1.0-SNAPSHOT.war

      /WEB-INF/jboss-web.xml

      /WEB-INF/faces-config.xml

      /WEB-INF/web.xml

      /META-INF/jboss-deployment-structure.xml

       

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
         <deployment>
      
             <dependencies>
                 <module name="deployment.EA_Address_Ip__V-1.0-SNAPSHOT.jar" meta-inf="import" />
             </dependencies>
      
         </deployment>
      </jboss-deployment-structure>
      

       

      /list.xhtml

      <html xmlns="http://www.w3.org/1999/xhtml"
           xmlns:h="http://xmlns.jcp.org/jsf/html"
           xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
         <h:head>
             <title>Facelet Title</title>
         </h:head>
         <h:body>
             <ui:include src="/ip_list.xhtml" />
         </h:body>
      </html>
      

       

       

      --- debuglog

      ...
      10:48:37,141 DEBUG [org.jboss.as.server.deployment] (MSC service thread 1-7) Adding resource "/C:/Program Files/wildfly-10.1.0.Final/standalone/deployments/EA_Address_Ip__W-1.0-SNAPSHOT.war" to module deployment.EA_Address_Ip__W-1.0-SNAPSHOT.war:main
      ...
      10:48:37,784 DEBUG [org.jboss.as.server.deployment] (MSC service thread 1-7) Adding dependency ModuleDependency [identifier=deployment.EA_Address_Ip__V-1.0-SNAPSHOT.jar:main, moduleLoader=Service Module Loader, export=false, optional=false, importServices=false] to module deployment.EA_Address_Ip__W-1.0-SNAPSHOT.war:main
      ...
      
      11:13:24,110 FINE  [javax.enterprise.resource.webcontainer.jsf.facelets.tag.ui.include] (default task-19) com.sun.faces.context.FacesFileNotFoundException: /ip_list.xhtml Not Found in ExternalContext as a Resource: com.sun.faces.context.FacesFileNotFoundException: /ip_list.xhtml Not Found in ExternalContext as a Resource
      at com.sun.faces.facelets.impl.DefaultFaceletFactory.resolveURL(DefaultFaceletFactory.java:270)
      at com.sun.faces.facelets.impl.DefaultFacelet.getRelativePath(DefaultFacelet.java:283)
      at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:348)
      at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
      at com.sun.faces.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:124)
      at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
      at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:202)
      at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
      at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
      at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
      at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
      at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:161)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:1006)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:99)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
      at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
      at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:100)
      at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      at org.primefaces.showcase.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:32)
      at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
      at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
      at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
      at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
      at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
      at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
      at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
      at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
      at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
      at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
      at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
      at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
      at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
      at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
      at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
      at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
      at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
      at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
      at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:805)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      
      11:13:24,145 FINE  [javax.enterprise.resource.webcontainer.jsf.lifecycle] (default task-19) getLifecycle: DEFAULT com.sun.faces.lifecycle.LifecycleImpl@6ec9bce
      11:13:24,145 FINE  [javax.enterprise.resource.webcontainer.jsf.lifecycle] (default task-19) removePhaseListener(com.sun.faces.lifecycle.ELResolverInitPhaseListener)
      11:13:24,145 FINE  [javax.enterprise.resource.webcontainer.jsf.timing] (default task-19)  [TIMING] - [140ms] : Execution time for phase (including any PhaseListeners) -> RENDER_RESPONSE 6
      11:13:24,148 SEVERE [org.primefaces.application.exceptionhandler.PrimeExceptionHandler] (default task-19) /list.xhtml @16,44 <ui:include src="/ip_list.xhtml"> Invalid path : /ip_list.xhtml: javax.faces.view.facelets.TagAttributeException: /list.xhtml @16,44 <ui:include src="/ip_list.xhtml"> Invalid path : /ip_list.xhtml
      at com.sun.faces.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:129)
      at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
      at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:202)
      at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
      at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
      at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
      at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
      at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:161)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:1006)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:99)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
      at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
      at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:100)
      at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      at org.primefaces.showcase.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:32)
      at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
      at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
      at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
      at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
      at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
      at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
      at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
      at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
      at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
      at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
      at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
      at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
      at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
      at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
      at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
      at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
      at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
      at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
      at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:805)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)