[TOBAGO] tag error

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[TOBAGO] tag error

jfrm.maurel@gmail.com

Hi,

Using Tobago 4.3.0, I see the below error when I use the following xhtml
page. I tried to make this page as small as possible to reproduce the error.
If I remove one of the <dt></dt><dd></dd> group the error is removed.
I work on windows 10 and both firefox or opera have the same behaviour.

Could you please advice or correct me ?

Regards

xhtml page:
---------------
<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:f="http://java.sun.com/jsf/core" xmlns="http://www.w3.org/1999/xhtml"
  xmlns:tc="http://myfaces.apache.org/tobago/component"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
 >
  <tc:page label="test" id="page">
   <dl>
    <dt>
     <math xmlns="http://www.w3.org/1998/Math/MathML" >
                   <mi>N</mi>
                </math>
    </dt>
    <dd>nombre</dd>
    <dt>
     <math xmlns="http://www.w3.org/1998/Math/MathML">
                   <mi>C</mi>
                </math>
    </dt>
    <dd>constante</dd>
    <dt>
     <math xmlns="http://www.w3.org/1998/Math/MathML">
                      <mi>σ</mi>
                </math>
    </dt>
    <dd>étendue</dd>
   </dl>
  </tc:page>
</ui:composition>

ERROR:
---------

janv. 25, 2019 5:50:57 PM
org.apache.myfaces.tobago.internal.webapp.DebugResponseWriterWrapper
endElement
GRAVE: Element end with name='HTML' doesn't match with top element on
the stack='BODY'.
java.lang.IllegalArgumentException
     at
org.apache.myfaces.tobago.internal.webapp.DebugResponseWriterWrapper.endElement(DebugResponseWriterWrapper.java:226)
     at
org.apache.myfaces.tobago.internal.renderkit.renderer.PageRenderer.encodeEnd(PageRenderer.java:366)
     at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:675)
     at
javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:555)
     at
javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:551)
     at
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1897)
     at
org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:315)
     at
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:73)
     at
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:117)
     at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:266)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:206)
     at
org.apache.tomee.myfaces.TomEEWorkaroundFacesServlet.service(TomEEWorkaroundFacesServlet.java:47)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
     at
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
     at org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
     at
org.apache.myfaces.tobago.facelets.FixCharacterEncodingFilter.doFilter(FixCharacterEncodingFilter.java:54)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
     at
org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)
     at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
     at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
     at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
     at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
     at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
     at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607)
     at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
     at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
     at
org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97)
     at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
     at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
     at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
     at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
     at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)
     at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
     at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
     at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
     at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
     at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
     at java.lang.Thread.run(Thread.java:748)


--
Jean-François MAUREL
PIMECA
http://www.pimeca.com

Reply | Threaded
Open this post in threaded view
|

Re: [TOBAGO] tag error

Udo Schnurpfeil-4
Hi,

that's weird. When I turn debugging on for the debug writer like this

<logger
name="org.apache.myfaces.tobago.internal.webapp.DebugResponseWriterWrapper"
level="debug"/>

in the logback.xml you can see all start and ent-tags:

start element: 'dl' start element: 'dt' start element: 'math' start
element: 'mi' end element: 'mi' end element: 'math' *1 start element:
'dd' end element: 'dd' start element: 'dt' start element: 'math' start
element: 'mi' end element: 'mi' end element: 'math' start element: 'dd'
end element: 'dd' *2 start element: 'dt' start element: 'math' start
element: 'mi' end element: 'mi' end element: 'math' start element: 'dd'
end element: 'dd' end element: 'dt' end element: 'dt' *3 end element:
'dt' *4

Here you can see the problem. At position *1 and *2 the end tag "dt" is
missing, it will be called later at the end *3 and *4.

The DebugResponseWriterWrapper class is only for debugging, it turns out
something went wrong. It's very strict, so we find problems that we
wouldn't. You can turn it off, with enabling the production mode. But
that is not a solution, of course.

Anyway, the problem can be seen in the Source-View of e.g. Firefox. The
HTML is not valid, and the wrong tags a marked red.

I've tested with MyFaces and Mojarra and both has the same result.

I've tested with Jetty and TomEE and found the problem in Jetty, also
with a newer version.

The problem occurred to me, while Jetty is reading/parsing the Facelet.

The same happens, when replacing <dt><dd><dl> with <b><i><em>. There is
no problem without the namespaces.


Which App-Server you are using?


Regards,

Udo

Am 26.01.19 um 09:16 schrieb [hidden email]:

>
> Hi,
>
> Using Tobago 4.3.0, I see the below error when I use the following
> xhtml page. I tried to make this page as small as possible to
> reproduce the error.
> If I remove one of the <dt></dt><dd></dd> group the error is removed.
> I work on windows 10 and both firefox or opera have the same behaviour.
>
> Could you please advice or correct me ?
>
> Regards
>
> xhtml page:
> ---------------
> <?xml version="1.0" encoding="UTF-8"?>
> <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns="http://www.w3.org/1999/xhtml"
>  xmlns:tc="http://myfaces.apache.org/tobago/component"
> xmlns:xhtml="http://www.w3.org/1999/xhtml"
> >
>  <tc:page label="test" id="page">
>   <dl>
>    <dt>
>     <math xmlns="http://www.w3.org/1998/Math/MathML" >
>                   <mi>N</mi>
>                </math>
>    </dt>
>    <dd>nombre</dd>
>    <dt>
>     <math xmlns="http://www.w3.org/1998/Math/MathML">
>                   <mi>C</mi>
>                </math>
>    </dt>
>    <dd>constante</dd>
>    <dt>
>     <math xmlns="http://www.w3.org/1998/Math/MathML">
>                      <mi>σ</mi>
>                </math>
>    </dt>
>    <dd>étendue</dd>
>   </dl>
>  </tc:page>
> </ui:composition>
>
> ERROR:
> ---------
>
> janv. 25, 2019 5:50:57 PM
> org.apache.myfaces.tobago.internal.webapp.DebugResponseWriterWrapper
> endElement
> GRAVE: Element end with name='HTML' doesn't match with top element on
> the stack='BODY'.
> java.lang.IllegalArgumentException
>     at
> org.apache.myfaces.tobago.internal.webapp.DebugResponseWriterWrapper.endElement(DebugResponseWriterWrapper.java:226)
>     at
> org.apache.myfaces.tobago.internal.renderkit.renderer.PageRenderer.encodeEnd(PageRenderer.java:366)
>     at
> javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:675)
>     at
> javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:555)
>     at
> javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:551)
>     at
> org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1897)
>     at
> org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:315)
>     at
> javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:73)
>     at
> org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:117)
>     at
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:266)
>     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:206)
>     at
> org.apache.tomee.myfaces.TomEEWorkaroundFacesServlet.service(TomEEWorkaroundFacesServlet.java:47)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>     at
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>     at
> org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>     at
> org.apache.myfaces.tobago.facelets.FixCharacterEncodingFilter.doFilter(FixCharacterEncodingFilter.java:54)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>     at
> org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>     at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
>     at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
>     at
> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>     at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607)
>     at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
>     at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
>     at
> org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97)
>     at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
>     at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
>     at
> org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
>     at
> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
>     at
> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)
>     at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
>     at
> org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
>     at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>     at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>     at java.lang.Thread.run(Thread.java:748)
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [TOBAGO] tag error

jfrm.maurel@gmail.com

Hi,

Thank you for taking time for this.

Le 26/01/2019 à 11:31, Udo Schnurpfeil a écrit :
> Which App-Server you are using?

I use tomEE webprofile 8.0.0-M1.

I also saw the mixing of tag in html source. I suspected a namespace
mismatch but I was not able to identify the cause playing with the xhtml
source and debug as I don't know much about tobago sources.

Regards

--
Jean-François MAUREL
PIMECA
http://www.pimeca.com

Reply | Threaded
Open this post in threaded view
|

Re: [TOBAGO] tag error

Udo Schnurpfeil-4
Hello Jean-Francois,

I've just tested the fragment in an MyFaces setup without Tobago. The
problem still occurs.

So, please file an issue at
https://issues.apache.org/jira/projects/MYFACES (you will need a login
(for free)).

It seems to be a problem with Facelets.

Regards,

Udo

Am 26.01.19 um 17:54 schrieb [hidden email]:

>
> Hi,
>
> Thank you for taking time for this.
>
> Le 26/01/2019 à 11:31, Udo Schnurpfeil a écrit :
>> Which App-Server you are using?
>
> I use tomEE webprofile 8.0.0-M1.
>
> I also saw the mixing of tag in html source. I suspected a namespace
> mismatch but I was not able to identify the cause playing with the
> xhtml source and debug as I don't know much about tobago sources.
>
> Regards
>
Reply | Threaded
Open this post in threaded view
|

Re: [TOBAGO] tag error

jfrm.maurel@gmail.com

Hi,

Thank you for your time.

Le 06/02/2019 à 14:15, Udo Schnurpfeil a écrit :
> So, please file an issue at
this is done:

https://issues.apache.org/jira/browse/MYFACES-4281

Regards

--
Jean-François MAUREL
PIMECA
http://www.pimeca.com