WARNING: JSF1064: Unable to find or serve resource, core/core.js, from library,

Splash Forums PrettyFaces Users WARNING: JSF1064: Unable to find or serve resource, core/core.js, from library,

This topic contains 13 replies, has 4 voices, and was last updated by  bardu 6 years, 9 months ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #17829

    bardu
    Participant

    Hi there,

    I’m trying to use PrettyFaces 3.1.0 with PrimeFaces 2.2RC1. My setup is NB 6.9.1, GF3.01, JSF2.0 and my url mapping looks like this:

    <url-mapping id=”welcome”>

    <pattern value=”/” />

    <view-id>/yukonlive-war/yukonlive/welcome.faces</view-id>

    </url-mapping>

    <url-mapping id=”home”>

    <pattern value=”/” />

    <view-id>/yukonlive-war/yukonlive/home.faces</view-id>

    </url-mapping>

    However, I’m getting warnings such as

    WARNING: JSF1064: Unable to find or serve resource, core/core.js, from library, primefaces/.

    WARNING: JSF1064: Unable to find or serve resource, jquery/jquery.js, from library, primefaces/.

    What do I miss?

    Thanks.

    Stephan

    #20450

    Do you also get this warning if you remove PrettyFaces from the project and access the views directly? I don’t think this warning has something to do with PrettyFaces.

    #20451

    bardu
    Participant

    No, I’m working for this project for quite some time and just got this warning today when I, for the first time, tried to incorporate PrettyFaces.

    A pre-release on a production server can be fond here:

    http://www.yukonlive.ca (without PrettyFaces)

    Since GF v3 the web module name of an .ear project seems to be part of the URL and I just want to get rid of it.

    #20452

    domdorn
    Participant

    simply deploy your ear to a certain contextpath, like this

    asadmin deploy –contextpath / /path/to/your/app.ear

    #20453

    bardu
    Participant

    Thanks. It’s definitely not PrettyFaces topic but do you know how I can deploy to a certain context path using the GF v3 admin console?

    #20454

    bardu
    Participant

    Looking through asadmin online help and GF v3 Administration Guide there is no command option

    –contextpath

    #20455

    Regarding the warning you are seeing: It seems like Mojarra got a request for a resource via the JSF 2.0 resource loading mechanism but cannot find the requested resource on the classpath.

    I really don’t think this is a PrettyFaces issue. But I may be wrong.

    WARNING: JSF1064: Unable to find or serve resource, core/core.js, from library, primefaces/.

    What I think looks strange is the last / character after the library name.

    Could you please post a bit of your configuration. Do you use any rewrite rules or something?

    #20456

    bardu
    Participant

    Could you please post a bit of your configuration.

    Which configuration do you mean?

    #20457

    Your web.xml and pretty-config.xml would be interesting.

    #20458

    bardu
    Participant

    Here is the part of interest from web.xml:

    <context-param>

    <param-name>javax.faces.PROJECT_STAGE</param-name>

    <param-value>Development</param-value>

    </context-param>

    <context-param>

    <param-name>FIXED_LOCAL_TIMEZONE</param-name>

    <param-value>America/Whitehorse</param-value>

    </context-param>

    <servlet>

    <servlet-name>Faces Servlet</servlet-name>

    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

    <load-on-startup>1</load-on-startup>

    </servlet>

    <servlet-mapping>

    <servlet-name>Faces Servlet</servlet-name>

    <url-pattern>*.faces</url-pattern>

    </servlet-mapping>

    <session-config>

    <session-timeout>

    30

    </session-timeout>

    </session-config>

    <welcome-file-list>

    <welcome-file>index.jsp</welcome-file>

    </welcome-file-list>

    and from pretty-config.xml

    <rewrite trailingSlash=”append” toCase=”lowercase” />

    <rewrite match=”^/old-url/(w+)/$” substitute=”/new_url/$1/” redirect=”301″ />

    <url-mapping id=”welcome”>

    <pattern value=”/” />

    <view-id>/yukonlive-war/yukonlive/welcome.faces</view-id>

    </url-mapping>

    <url-mapping id=”home”>

    <pattern value=”/” />

    <view-id>/yukonlive-war/yukonlive/home.faces</view-id>

    </url-mapping>

    Since I’m using GF v3.01 PrimeFaces resources are automatically registered.

    #20459

    Does the warning still printed if you leave PrettyFaces in the classpath but remove the two rewrite rules from pretty-config.xml? I’m still a bit confused by the trailing slash in the library name of the warning message. You are using Mojarra? Which version? The one that ships with Glassfish 3.0l?

    #20460

    bardu
    Participant

    If I take those lines out I don’t get this warnings.

    I’m using NB 6.9.1 with GF v3.01 and it comes with Mojarra 2.0.2 if I’m not mistaken.

    #20461

    First, you probably want to delete the example rewrite rules:

    <rewrite trailingSlash="append" toCase="lowercase" />
    <rewrite match="^/old-url/(w+)/$" substitute="/new_url/$1/" redirect="301" />

    But if there is a reason you need this:

    <rewrite trailingSlash="append" toCase="lowercase" />

    Then I suggest adding a match="" attribute that restricts what the rule applies to. By default these rules apply to *every* inbound request.

    You probably want something more like this: (you’ll have to test to see what you actually need)

    <rewrite match="(/\w*)+" trailingSlash="append" toCase="lowercase" />

    You can read the docs on rewrite rules here: http://ocpsoft.com/docs/prettyfaces/snapshot/en-US/html_single/#inbound_rewriting.matching

    #20462

    bardu
    Participant

    Thanks Lincoln. Your example doesn’t cause any warnings, but also doesn’t do any URL rewriting.

    I was looking for a quick solution, but I guess I need to spend the next weekend to read through the doc, since I want to use PrettyFaces properly to get rid of the ugly URL’s.

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

You must be logged in to reply to this topic.

Comments are closed.