[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Messages posted by: dkhanzhyiev  XML
Profile for dkhanzhyiev -> Messages posted by dkhanzhyiev [10]
Author Message
Stack trace:


2016:04:29 11:07:39:822 | 56 | SEVERE | .......... org.eclnt.client.page.Page>getJSessionId
.......... Stacktrace Info ..........
java.lang.NullPointerException
at org.eclnt.client.page.Page.getJSessionId(Page.java:1348
at org.eclnt.client.page.Page.loadImageIcon(Page.java:658
at org.eclnt.client.elements.impl.IMAGEElement.applyComponentData(IMAGEElement.java:84)
at org.eclnt.client.elements.PageParserInit.endElement(PageParserInit.java:135)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1536)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
 



There is no need of session id for local resource.
Please,
add additional check in getSessionId.

I see some old topics about subject.
It was said that problem with changing component ids was solved. But now I see ids are changed on every request.

It also looks like Jmeter was recommended tool for tests, but now it is not. There are no posts about it for last 3 years. So which tool is used now?
Thanks! Next Monday is Ok.
But it still looks like it will not work.

In our case m_webappBaseUrl is not null and still is not normalized(or is it?) so this code will not work in our case.
UP!
It looks like the issue was not resolved completely.
There are still complains about high CPU load in that hidden window with timer, when this window is initially hidden. When the window is shown then hidden back - CPU load drops to normal (after it is shown).
Yes!
Thanks.
Hi
when there is active timer on page and window with this pages is hidden (in our case whole client is hidden with system tray), the timer heart beat listener calls
Page.callServerWhenPossible - which checks for
getOwningDialog().isShowing() is false
and postpones the call to event queue, on next queue loop nothing is changesd so the call is again added to queue and so on

This leads to unnecessary high CPU load.

UPDATE: We actually need this timer to run while window is hidden. So there is no need to delay roundtrips until window is shown.
baseurl attribute does not solve our problem.

Again here is problematic code:

Code:
  class HTMLImageCache extends Hashtable<URL,Image> 
     {
         @Override
         public synchronized Image get(Object key) 
         {
             if (key instanceof URL) 
             {
                 URL url = (URL)key;
                 String urlString = url.toExternalForm();
                 if (m_webappBaseUrl != null)
                 {
                     if (urlString.startsWith(m_webappBaseUrl))
                     {
                         urlString = urlString.substring(m_webappBaseUrl.length());
                         if (urlString.startsWith("/") == false)
                             urlString = "/" + urlString;
                         ImageIcon icon = getPage().loadImageIcon(urlString);
                         return icon.getImage();
                     }
                 }
             }
             return super.get(key);
         }
     }    
 


when
m_webappBaseUrl llooks like: "http://host.com/some1/../some2/"
key is URL constructed from base "http://host.com/some1/../some2" and "img/someImg.gif" - it is normalized by URL class and then

Code:
 String urlString = url.toExternalForm(); // ="http://host.com/some2/img/someImg.gif"
 


So line
Code:
   if (urlString.startsWith(m_webappBaseUrl)) {...
 

fails. And image is not displayed while URL is correct.
Why not just correctly check URL in
TEXTPANEElement.HTMLImageCache.get()

something like this
Code:
 ...
 68: String str = localURL.toExternalForm();
 69:  if (m_baseUrl != null)
       {
           String normalized = (new URI(m_baseUrl )).normalize().toString();
 71:      if(str.startsWith(normalized)) {
 ...


but str probably should also be normalized.
To illustrate the problem here is small sample:
http://pastebin.com/t8kSSijA
 
Profile for dkhanzhyiev -> Messages posted by dkhanzhyiev [10]
Go to:   
Powered by JForum 2.1.6 © JForum Team