PrettyFaces and Tomahawk/MyFaces – JSF2 – Error JSF1064

Splash Forums PrettyFaces Users PrettyFaces and Tomahawk/MyFaces – JSF2 – Error JSF1064

This topic contains 5 replies, has 3 voices, and was last updated by  Christian Kaltepoth 6 years ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #17947

    diovanes
    Participant

    Hi,i have the problem with PrettyFaces and Tomahawk/MyFaces.

    Error JSF1064 – Could not find or provide the resource, inputFileUpload.xhtml, the library, org.apache.myfaces.custom.

    I use “inputFileUpload” to upload files, when use the pretty-faces and Tomahawk generates error, without the pretty-face works normally.

    my pretty-config.xml

    <pretty-config xmlns=”http://ocpsoft.com/prettyfaces/3.2.0&#8243;

    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;

    xsi:schemaLocation=”http://ocpsoft.com/prettyfaces/3.2.0

    http://ocpsoft.com/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.2.0.xsd“>

    <url-mapping id=”test”>

    <pattern value=”/test” ></pattern>

    <view-id>/index.xhtml</view-id>

    </url-mapping>

    </pretty-config>

    my web.xml

    <filter>

    <filter-name>Pretty Filter</filter-name>

    <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>

    </filter>

    <filter-mapping>

    <filter-name>Pretty Filter</filter-name>

    <url-pattern>/*</url-pattern>

    </filter-mapping>

    #20996

    What server are you running on? What version of the other libraries? Thanks.

    #20997

    diovanes
    Participant

    Server JBoss 5.1

    org.apache.myfaces.tomahawk – tomahawk20 – 1.1.10

    org.apache.myfaces.core – myfaces-api – 2.0.5

    commons-logging – commons-logging – 1.1.1

    commons-beanutils – commons-beanutils – 1.8.0

    commons-digester – commons-digester – 2.0

    org.richfaces.ui – richfaces-components-ui

    org.richfaces.core – richfaces-core-impl

    com.ocpsoft – prettyfaces-jsf2 – 3.2.0

    org.richfaces – richfaces-bom – 4.0.0

    Thanks.

    #20998

    Could you please try to register the PrettyFilter exactly like shown in the documentation? It is important to use the correct dispatcher settings:

    <filter>
    <filter-name>Pretty Filter</filter-name>
    <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>Pretty Filter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
    </filter-mapping>

    Also make sure to use the same dispatcher entries when configuring the MyFaces Extensions Filter. Something like this:

    <filter>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
    </filter-mapping>
    <filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
    </filter-mapping>

    See:

    http://ocpsoft.com/docs/prettyfaces/3.2.0/en-US/html/FAQ.html

    This is important because the MyFaces filter must accept forwarded requests from PrettyFaces.

    #20999

    diovanes
    Participant

    Hi Christian

    Set up as indicated but the problem persists.

    #21000

    Hmmm. That’s very strange. We use nearly the same setup in one of our projects and inputFileUpload is working fine.

    Could you perhaps try to setup a small sample project for this issue. This could be done very quickly using my PrettyFaces archetypes:

    https://github.com/chkal/prettyfaces-archetypes/wiki

    This would help be to debug the problem. You could send it to me directly: christian (at) kaltepoth (dot) det

    BTW: I think the error message you are seeing looks a bit like it is created by Mojarra. Are you sure MyFaces is used? Mojarra is the default JSF implementation of JBoss 5.1 and is therefore bundled with the container. Or did you use org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL to overwrite this?

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Comments are closed.