Search code examples
jsfprimefacesfacelets

XML Parser Error in .xhtml file


After deploying our EAR file to Glassfish 3.1.2 Build 23, I receive this error in my Firefox browser:

XML Parsing Error: no element found Location: https://localhost:8181/TranscriptTool/welcome/index.xhtml Line Number 1, Column 1:

The EAR file deployed without any errors and works fine on another server, but this server generates the above error.

I've not been successful in finding the reason for this.

This is the index.xhtml file:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition template="/template/no_menu_layout.xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core" 
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui"
    xmlns:tt="http://jsf/transcripttool">
    <ui:define name="title">
        Login
    </ui:define>
    <ui:define name="content">
    <h:form prependId="false">
        <br/>
        <p:panelGrid  style="margin: 0 auto;">
            <p:row>  
                <p:column><h:outputLabel for="username" value="Username:" /></p:column>
                <p:column><p:inputText value="#{userLoginSession.username}"   
                    id="username" required="true" label="username" /></p:column>        
            </p:row>
            <p:row>  
                <p:column><h:outputLabel for="password" value="Password:" /></p:column>
                <p:column><p:password value="#{userLoginSession.password}"   
                            id="password" label="password" /></p:column>        
            </p:row>
            <p:row>
                <p:column colspan="2" style="text-align: center;"><p:commandButton id="loginButton" value="Login"    
                     action="#{userLoginSession.login}" ajax="false"/></p:column>
            </p:row>
        </p:panelGrid>
        <div class="ui-widget" style="text-align: center;">
            <h:link outcome="passwordReset" value="Reset Password"/>
        </div>          
    </h:form>
    <div style="position: absolute;width: 100%;bottom: 70px;">
    </div>
    <tt:errPopup id="userError" isModal="true"
            errorHandle="#{userLoginSession.errorMessages}" />
    </ui:define>
</ui:composition>

Thanks Avis


Solution

  • We fixed the error by copying the whole GLASSFISH directory over from the one server that worked to the one that didn't. Naturally had to change a few entries in the domain.xml file but after doing this, the application now runs properly.