Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSF1091: No mime type could be found for file null. To resolve this, add a mime-type mapping to the applications web.xml. #1155

Closed
abraham1980 opened this issue Sep 26, 2020 · 9 comments
Labels

Comments

@abraham1980
Copy link

abraham1980 commented Sep 26, 2020

hi, im getting this error, on fresh proyect. I run on payara 5 and tomme 8
bootsfaces version 1.5.0

26-Sep-2020 19:13:20.173 WARNING [http-nio-8080-exec-7] com.sun.faces.context.ExternalContextImpl.getMimeType JSF1091: No mime type could be found for file null. To resolve this, add a mime-type mapping to the applications web.xml.

The page to reproduce:

    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        Hello from Facelets
        <h:form>
        <b:commandButton value="boton" update="@this"/> <br/>
        
        </h:form>
    </h:body>
</html>

is related to de update field

@stephanrauh
Copy link
Collaborator

I don't think this bug has anything to do with BootsFaces. Maybe the error message is correct. Have you registered the *.xhtml files with the FacesServlet?

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
  
   ...

    <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>*.jsf</url-pattern>
    </servlet-mapping>
</web-app>

@abraham1980
Copy link
Author

abraham1980 commented Sep 27, 2020

I did:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" 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-app_4_0.xsd">

...
<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>*.xhtml</url-pattern>
    </servlet-mapping>

anyway it dont broke anything just log

@stephanrauh
Copy link
Collaborator

Which URL are you using? If you configure your FacesServlet like so, it shows the index.xhtml when you navigate to http://localhost:8080/index.xhtml.

@klease
Copy link

klease commented Jan 27, 2021

I also have the error "com.sun.faces.context.ExternalContextImpl#798 - JSF1091: No mime type could be found for file null...."
I'm using In Mojarra 2.3.14.
It occurs in a <b:dataTable> element with an Ajax onselect handler "onselect="ajax:listBean.onSelect(entity, typeOfSelection, indexes)".
Selecting a row in the table causes a POST request to trigger the onSelect() method which works correctly.
By putting a breakpoint at the line mentioned in the message, I identified the cause.
During the rendering phase, all the resources in the viewRoot are processed in PartialViewContextImpl.renderComponentResources().
The error message appears once for each "special" bootsfaces resource, for example when the resource is a net.bootsfaces.listeners.InternalIE8CompatiblityLinks object.
It was also occurring on the dataTables-related js and css which were fetched from the CDN. By forcing those to be retrieved locally, the warning for those resources disappeared.
I agree it's just a warning if the project is in development stage, but it's rather annoying and misleading.

@macbl
Copy link

macbl commented Feb 14, 2021

Yes, it would be nice if there would be a fix for this (not using the CDN is a rather drastic measure)

@geopossachs
Copy link
Collaborator

About this PR I think the error comes from a missing type = "text / javascript" tag in InternalIE8CompatiblityLinks

#1173

geopossachs added a commit to geopossachs/BootsFaces-OSP that referenced this issue Oct 17, 2021
@geopossachs
Copy link
Collaborator

geopossachs commented Oct 18, 2021

@geopossachs
Copy link
Collaborator

I tried my approach, but it didn't help. The question is why is this message coming?

@stephanrauh
Copy link
Collaborator

I'm afraid development of BootsFaces has slowed down considerably. We'll never manage to address this issue. Let's close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants