<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Am 30.06.11 09:57, schrieb basZero:
<blockquote
cite="mid:BANLkTimtSAEzB=ni+FwJchk6SHWmzw8TOA@mail.gmail.com"
type="cite">Hi Michael,
<div>I am still confused why this can happen...</div>
<div>During my further analysis I found a code section which is
NOT null pointer save (but this is not related to the scenario
below, must should get fixed!!):</div>
<div><br>
</div>
<div>See TranslationResource.java:</div>
<div>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1038.36">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco}
span.s1 {text-decoration: line-through}
span.s2 {color: #3834ff}
</style>
<p class="p1"> String userAgent = <span
class="s1">getRequest</span>().getHeader(<span class="s2">"User-Agent"</span>);</p>
<p class="p1"> String os = getOS(userAgent);</p>
</div>
</blockquote>
<br>
this shouls also be improved now:<br>
<br>
Sending
src/resources/translation/src/java/org/wyona/yanel/impl/resources/TranslationResource.java<br>
Transmitting file data .<br>
Committed revision 59046.<br>
<br>
Thanks<br>
<br>
Michael<br>
<blockquote
cite="mid:BANLkTimtSAEzB=ni+FwJchk6SHWmzw8TOA@mail.gmail.com"
type="cite">
<div>
<div><br>
</div>
<div>I would recommend to fix the method getOS() itself so that
it first checks whether the argument is NULL.</div>
<div>If it does not get checked in the method itself, the code
using that method must be aware of that hidden weakness
(checking whether it is not null).</div>
<div><br>
</div>
<div>Shall I send a patch for the getOS() method? I guess it is
clear what I mean...</div>
<div><br>
</div>
<div>Cheers</div>
<div>Balz</div>
<br>
<div class="gmail_quote">On Thu, Jun 30, 2011 at 9:45 AM,
basZero <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:baszero@gmail.com">baszero@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">Hi Michi,
<div><br>
</div>
<div>we just had a little incident where for a certain
unknown reason the header section of the page (Navigation)
could not be rendered.</div>
<div><br>
</div>
<div>In the log, I see this Nullpointer:</div>
<div>
<div>
<div>65195001 2011-06-30 09:27:28,215 [http-80-103]
ERROR
org.wyona.yanel.impl.resources.navigation.NavigationResource.getView():220
- java.lang.NullPointerException (/de/header.yanel,
Name: Zwischengas, ID: zwischengas, Mount-Point: /, No
reverse proxy set)</div>
<div>java.lang.NullPointerException</div>
<div><span style="white-space: pre-wrap;"> </span>at
org.wyona.yanel.impl.resources.navigation.NavigationResource.getOS(NavigationResource.java:374)</div>
<div><span style="white-space: pre-wrap;"> </span>at
org.wyona.yanel.impl.resources.navigation.NavigationResource.getView(NavigationResource.java:173)</div>
<div><span style="white-space: pre-wrap;"> </span>at
org.wyona.yanel.impl.resources.navigation.NavigationResource.getView(NavigationResource.java:98)</div>
<div><span style="white-space: pre-wrap;"> </span>at
org.wyona.yanel.core.source.ResourceResolver.resolve(ResourceResolver.java:75)</div>
<div><span style="white-space: pre-wrap;"> </span>at
org.wyona.yanel.core.source.SourceResolver.resolve(SourceResolver.java:67)</div>
<div><span style="white-space: pre-wrap;"> </span>at
org.wyona.yanel.core.transformation.XIncludeTransformer.startElement(XIncludeTransformer.java:67)</div>
<div><span style="white-space: pre-wrap;"> </span>at
org.apache.xml.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:204)</div>
<div><span style="white-space: pre-wrap;"> </span>at
org.apache.xml.serializer.ToSAXHandler.flushPending(ToSAXHandler.java:277)</div>
<div><span style="white-space: pre-wrap;"> </span>at
org.apache.xml.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:243)</div>
<div><span style="white-space: pre-wrap;"> </span>at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1399)</div>
<div><span style="white-space: pre-wrap;"> </span>at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)</div>
<div><span style="white-space: pre-wrap;"> </span>at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)</div>
<div><span style="white-space: pre-wrap;"> </span>at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)</div>
<div><span style="white-space: pre-wrap;"> </span>at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)</div>
<div><span style="white-space: pre-wrap;"> </span>at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)</div>
<div><span style="white-space: pre-wrap;"> </span>at
org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:392)</div>
</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>My opinion is: there can't be a Nullpointer Exception
at that location when the getOS() method is called from
the getView() method, because getView() makes sure that no
null is passed into getOS(). </div>
<div><br>
</div>
<div>How do you explain this? Any idea?</div>
<div><br>
</div>
<div>However, the system gets halted due to this error for
some seconds (in the case today for 10 seconds), recovers
and continues to work fine.</div>
<div><br>
</div>
<div>Cheers</div>
<div>Balz</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>