How to configure JSF1.2 with EAP7

Latest response

We are moving our applications from IBM Websphere to EAP 7.0.4GA version. Application is built with JSF-1.2 ( as of now upgrading to JSF2.2 is not an option). Current Development environment - Windows/EAP 7.0.4GA.
I followed steps mentioned https://access.redhat.com/solutions/2773121. (except to default to JSF1.2) The appropriate folders and module.xml's are created under module folder ( instead of regular module/systems/layers/base). Added below context-param in web.xml

org.jboss.jbossfaces.JSF_CONFIG_NAME
mojarra-1.2

On startup of the server "WFLYJSF0007: Activated the following JSF Implementations: [mojarra-1.2, main]" is logged. But when I deploy the application below exception is thrown.
Caused by: org.jboss.modules.ModuleLoadException: Error loading module from C:\devstudio\runtimes\jboss-eap\modules\org\jboss\as\jsf-injection\mojarra-1.2\module.xml
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:228)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:204)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:170)
at org.jboss.modules.LocalModuleFinder.lambda$findModule$0(LocalModuleFinder.java:149)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.modules.LocalModuleFinder.findModule(LocalModuleFinder.java:144)
at org.jboss.modules.ModuleLoader.findModule(ModuleLoader.java:439)
at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:342)
at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:289)
at org.jboss.modules.Module.addPaths(Module.java:1078)
at org.jboss.modules.Module.link(Module.java:1448)
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1476)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:225)
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:68)
... 5 more
Caused by: org.jboss.modules.xml.XmlPullParserException: Invalid/mismatched module name (expected org.jboss.as.jsf-injection:mojarra-1.2) (position: START_TAG seen ...le xmlns="urn:jboss:module:1.3" name="org.jboss.as.jsf-injection">... @3:72)
at org.jboss.modules.xml.ModuleXmlParser.invalidModuleName(ModuleXmlParser.java:265)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleContents(ModuleXmlParser.java:505)
at org.jboss.modules.xml.ModuleXmlParser.parseDocument(ModuleXmlParser.java:340)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:226)

Have also tried, using jboss-deployement-structure.xml.

Any help is appreciated.
Raj

Responses

Used a combination of https://access.redhat.com/solutions/2773121 (except to default to JSF1.2 and org.jboss.jbossfaces.JSF_CONFIG_NAME setting) and jboss-deployment-structure.xml and now the application is deploying

<?xml version="1.0" encoding="UTF-8"?>

Have another question ... https://access.redhat.com/discussions/3024681

Thanks Raj

Hi Raj Uchil,

could you please provide your jboss-deployment-structure.xml? It would be very helpfull for me.

Thanks a lot! Günther

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
    <deployment>
        <exclude-subsystems>
            <subsystem name="resteasy" />
        </exclude-subsystems>
        <exclusions>
            <module name="javax.faces.api" slot="main" />
            <module name="com.sun.jsf-impl" slot="main" />
            <module name="org.jboss.as.jsf-injection" slot="main" />
        </exclusions>
        <dependencies>
            <module name="com.oracle.ojdbc6" />
            <module name="javax.faces.api" export="true" slot="mojarra-1.2" />
            <module name="com.sun.jsf-impl" export="true" slot="mojarra-1.2" />
        </dependencies>
    </deployment>
    <sub-deployment name="EasyWeb.war">
        <exclude-subsystems>
            <subsystem name="resteasy" />
        </exclude-subsystems>
        <exclusions>
            <module name="javax.faces.api" slot="main" />
            <module name="com.sun.jsf-impl" slot="main" />
            <module name="org.jboss.as.jsf-injection" slot="main" />

        </exclusions>
        <dependencies>
            <module name="javax.annotation.api" export="true"/>
            <module name="com.oracle.ojdbc6" />
            <module name="org.eclipse.persistence" slot="main" export="true"/>

            <module name="org.apache.cxf" slot="main" export="true"/>
            <module name="org.apache.cxf.impl" slot="main" export="true"/>
            <module name="org.apache.ws.security" slot="main" export="true"/>
            <module name="com.apachecxf" slot="main" export="true"/>
            <module name="javax.faces.api" slot="mojarra-1.2" export="true" />
            <module name="com.sun.jsf-impl" slot="mojarra-1.2" export="true" />

        </dependencies>
    </sub-deployment>
</jboss-deployment-structure>

Raj,

I am have a similar problem as yours. Done the following :

Followed : https://access.redhat.com/solutions/2773121

Added the following in web.xml


org.jboss.jbossfaces.JSF_CONFIG_NAME
mojarra-1.2

add jboss-deployment-structure.xml but still no luck. Any help will be highly appreciated.

Thanks