You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Leonardo Uribe (JIRA)" <ji...@apache.org> on 2013/10/22 22:22:42 UTC

[jira] [Commented] (TOMEE-1021) Allow read JSF 2.2 faces-config.xml files

    [ https://issues.apache.org/jira/browse/TOMEE-1021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13802220#comment-13802220 ] 

Leonardo Uribe commented on TOMEE-1021:
---------------------------------------

I have found something like this:

{{
<faces-config version="2.2"
              xmlns="http://xmlns.jcp.org/xml/ns/javaee"
              xmlns:xi="http://www.w3.org/2001/XInclude"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
              xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
    
    <application>
        <el-resolver>org.apache.myfaces.example.windowScope.WindowScopeELResolver</el-resolver>
        <resource-library-contracts>
            <contract-mapping>
                <url-pattern>/blue/*</url-pattern>
                <contracts>blue</contracts>
            </contract-mapping>
        </resource-library-contracts>
    </application>
}}

Cause the same exception:

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/client-window-example]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1113)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1671)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.tomee.catalina.TomEERuntimeException: org.apache.openejb.OpenEJBException: Cannot unmarshall the faces configuration file: file:/D:/workspace/myfaces/test22/apache-tomee-webprofile-1.6.0-SNAPSHOT/webapps/client-window-example/WEB-INF/faces-config.xml: Unexpected element {http://xmlns.jcp.org/xml/ns/javaee}resource-library-contracts, expected [{http://java.sun.com/xml/ns/javaee}action-listener, {http://java.sun.com/xml/ns/javaee}default-render-kit-id, {http://java.sun.com/xml/ns/javaee}message-bundle, {http://java.sun.com/xml/ns/javaee}navigation-handler, {http://java.sun.com/xml/ns/javaee}view-handler, {http://java.sun.com/xml/ns/javaee}state-manager, {http://java.sun.com/xml/ns/javaee}el-resolver, {http://java.sun.com/xml/ns/javaee}property-resolver, {http://java.sun.com/xml/ns/javaee}variable-resolver, {http://java.sun.com/xml/ns/javaee}resource-handler, {http://java.sun.com/xml/ns/javaee}system-event-listener, {http://java.sun.com/xml/ns/javaee}locale-config, {http://java.sun.com/xml/ns/javaee}resource-bundle, {http://java.sun.com/xml/ns/javaee}application-extension, {http://java.sun.com/xml/ns/javaee}default-validators]
	at org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:2006)
	at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1054)
	at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1014)
	at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:127)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

It seems there is still things to do in this issue, it shouldn't be that hard. Could you please help me with this? or at least could you please point me to the lines this is happening, so I can check the code and provide a patch?

> Allow read JSF 2.2 faces-config.xml files
> -----------------------------------------
>
>                 Key: TOMEE-1021
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1021
>             Project: TomEE
>          Issue Type: Improvement
>            Reporter: Leonardo Uribe
>
> Hi
> I'm working on MyFaces 2.2.x, and on the way I have found that Tomee doesn't allow faces-config.xml files in JSF 2.2 format. Since the spec was out some months ago, it would be great if you guys can allow this so I can test MyFaces 2.2.x + Tomee just changing the jars. 
> Here is the exception I have:
> org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
> 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
> 	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
> 	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
> 	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
> 	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1113)
> 	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1671)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:724)
> Caused by: org.apache.tomee.catalina.TomEERuntimeException: org.apache.openejb.OpenEJBException: Cannot unmarshall the faces configuration file: Unexpected element {http://xmlns.jcp.org/xml/ns/javaee}flow-definition, expected [{http://java.sun.com/xml/ns/javaee}application, {http://java.sun.com/xml/ns/javaee}ordering, {http://java.sun.com/xml/ns/javaee}absolute-ordering, {http://java.sun.com/xml/ns/javaee}factory, {http://java.sun.com/xml/ns/javaee}component, {http://java.sun.com/xml/ns/javaee}converter, {http://java.sun.com/xml/ns/javaee}managed-bean, {http://java.sun.com/xml/ns/javaee}name, {http://java.sun.com/xml/ns/javaee}navigation-rule, {http://java.sun.com/xml/ns/javaee}referenced-bean, {http://java.sun.com/xml/ns/javaee}render-kit, {http://java.sun.com/xml/ns/javaee}lifecycle, {http://java.sun.com/xml/ns/javaee}validator, {http://java.sun.com/xml/ns/javaee}behavior, {http://java.sun.com/xml/ns/javaee}faces-config-extension]
> 	at org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:1953)
> 	at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1025)
> 	at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:985)
> 	at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:127)
> 	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> 	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> 	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
> 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> 	... 11 more
> Caused by: org.apache.openejb.OpenEJBException: Cannot unmarshall the faces configuration file: : Unexpected element {http://xmlns.jcp.org/xml/ns/javaee}flow-definition, expected [{http://java.sun.com/xml/ns/javaee}application, {http://java.sun.com/xml/ns/javaee}ordering, {http://java.sun.com/xml/ns/javaee}absolute-ordering, {http://java.sun.com/xml/ns/javaee}factory, {http://java.sun.com/xml/ns/javaee}component, {http://java.sun.com/xml/ns/javaee}converter, {http://java.sun.com/xml/ns/javaee}managed-bean, {http://java.sun.com/xml/ns/javaee}name, {http://java.sun.com/xml/ns/javaee}navigation-rule, {http://java.sun.com/xml/ns/javaee}referenced-bean, {http://java.sun.com/xml/ns/javaee}render-kit, {http://java.sun.com/xml/ns/javaee}lifecycle, {http://java.sun.com/xml/ns/javaee}validator, {http://java.sun.com/xml/ns/javaee}behavior, {http://java.sun.com/xml/ns/javaee}faces-config-extension]
> 	at org.apache.openejb.config.ReadDescriptors.readFacesConfig(ReadDescriptors.java:824)
> 	at org.apache.openejb.config.DeploymentLoader.addFacesConfigs(DeploymentLoader.java:1291)
> 	at org.apache.openejb.config.DeploymentLoader.createWebModule(DeploymentLoader.java:948)
> 	at org.apache.openejb.config.DeploymentLoader.createWebModule(DeploymentLoader.java:753)
> 	at org.apache.openejb.config.DeploymentLoader.load(DeploymentLoader.java:196)
> 	at org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:1951)
> 	... 18 more
> Caused by: javax.xml.bind.UnmarshalException: Unexpected element {http://xmlns.jcp.org/xml/ns/javaee}flow-definition, expected [{http://java.sun.com/xml/ns/javaee}application, {http://java.sun.com/xml/ns/javaee}ordering, {http://java.sun.com/xml/ns/javaee}absolute-ordering, {http://java.sun.com/xml/ns/javaee}factory, {http://java.sun.com/xml/ns/javaee}component, {http://java.sun.com/xml/ns/javaee}converter, {http://java.sun.com/xml/ns/javaee}managed-bean, {http://java.sun.com/xml/ns/javaee}name, {http://java.sun.com/xml/ns/javaee}navigation-rule, {http://java.sun.com/xml/ns/javaee}referenced-bean, {http://java.sun.com/xml/ns/javaee}render-kit, {http://java.sun.com/xml/ns/javaee}lifecycle, {http://java.sun.com/xml/ns/javaee}validator, {http://java.sun.com/xml/ns/javaee}behavior, {http://java.sun.com/xml/ns/javaee}faces-config-extension]
> 	at org.metatype.sxc.jaxb.RuntimeContext.validationError(RuntimeContext.java:390)
> 	at org.metatype.sxc.jaxb.RuntimeContext.validationError(RuntimeContext.java:379)
> 	at org.metatype.sxc.jaxb.RuntimeContext.unexpectedElement(RuntimeContext.java:225)
> 	at org.apache.openejb.jee.FacesConfig$JAXB._read(FacesConfig$JAXB.java:340)
> 	at org.apache.openejb.jee.FacesConfig$JAXB.read(FacesConfig$JAXB.java:396)
> 	at org.apache.openejb.jee.FacesConfig$JAXB.read(FacesConfig$JAXB.java:61)
> 	at org.apache.openejb.sxc.Sxc.unmarshall(Sxc.java:168)
> 	at org.apache.openejb.sxc.Sxc.unmarhsal(Sxc.java:159)
> 	at org.apache.openejb.sxc.Sxc.unmarshalJavaee(Sxc.java:144)
> 	at org.apache.openejb.sxc.FacesConfigXml.unmarshal(FacesConfigXml.java:34)
> 	at org.apache.openejb.config.ReadDescriptors.readFacesConfig(ReadDescriptors.java:820)
> 	... 23 more
> I would appreciate your help with this, specially because some new features JSF 2.2 requires CDI and Tomee comes in handy.



--
This message was sent by Atlassian JIRA
(v6.1#6144)