Error rendering the page null.

Forum to discuss the Web client version of Servoy.

Error rendering the page null.

Postby AlanBourke » Wed Oct 30, 2013 2:14 pm

I have a webclient only solution deployed on a server. It has various HTML Areas which download files when clicked on. This downloading works perfectly on my dev systems, it works perfectly accessed on the webserver via localhost, or on the customer's LAN, but across the internet clicking on those links produces this in the server log. Can anyone shed any light?

Code: Select all
2013-10-30 12:01    http-8080-9    ERROR    com.servoy.j2db.util.Debug    Error rendering the page null        
java.lang.NullPointerException
     at com.servoy.j2db.server.headlessclient.WebClientSession.getResourceState(WebClientSession.java:276)
     at com.servoy.j2db.server.headlessclient.ServeResources.getResourceState(ServeResources.java:42)
     at org.apache.wicket.markup.html.DynamicWebResource$1.checkLoadData(DynamicWebResource.java:267)
     at org.apache.wicket.markup.html.DynamicWebResource$1.getContentType(DynamicWebResource.java:209)
     at org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.configure(ResourceStreamRequestTarget.java:207)
     at org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.java:150)
     at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
     at com.servoy.j2db.server.headlessclient.WebClientsApplication$7.respond(WebClientsApplication.java:559)
     at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1296)
     at org.apache.wicket.RequestCycle.step(RequestCycle.java:1363)
     at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1465)
     at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
     at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
     at com.servoy.j2db.server.servlets.Zt.doGet(Zt.java:11)
     at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
     at java.lang.Thread.run(Unknown Source)

-------------------------------------------------------------------------------------------
Servoy SAN Developer
User avatar
AlanBourke
 
Posts: 198
Joined: Tue Aug 02, 2011 3:32 pm
Location: Dublin, Ireland

Re: Error rendering the page null.

Postby grahamg » Wed Oct 30, 2013 4:19 pm

Alan

Are you using SV 7.3?

I've just had similar error message when using PrintPreview - code was working OK on 7.0 & 7.1. In Developer the Preview PDF works fine but does not work on live Server - have tried several browsers.


2013-10-30 15:12 http-8083-2 ERROR com.servoy.j2db.util.Debug Error rendering the page null
java.lang.NullPointerException
at com.servoy.j2db.server.headlessclient.WebClientSession.getResourceState(WebClientSession.java:279)
at com.servoy.j2db.server.headlessclient.ServeResources.getResourceState(ServeResources.java:42)
at org.apache.wicket.markup.html.DynamicWebResource$1.checkLoadData(DynamicWebResource.java:267)
at org.apache.wicket.markup.html.DynamicWebResource$1.getContentType(DynamicWebResource.java:209)
at org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.configure(ResourceStreamRequestTarget.java:207)
at org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.java:150)
at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
at com.servoy.j2db.server.headlessclient.WebClientsApplication$7.respond(WebClientsApplication.java:567)
at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1296)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1363)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1465)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
at com.servoy.j2db.server.servlets.Zt.doGet(Zt.java:3)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Graham Greensall
Worxinfo Ltd
www.worxinfo.com
grahamg
 
Posts: 752
Joined: Fri Oct 03, 2003 3:15 pm
Location: Midlands UK

Re: Error rendering the page null.

Postby grahamg » Wed Oct 30, 2013 4:26 pm

Have just noticed that each time I click [Print Preview] - Servoy opens another Client.

Logged in and Idle times are identical and they are not closing.

Screen%20Shot%202013-10-30%20at%2014.24.08.png


Is this a 'feature' to sell more licences :)
You do not have the required permissions to view the files attached to this post.
Graham Greensall
Worxinfo Ltd
www.worxinfo.com
grahamg
 
Posts: 752
Joined: Fri Oct 03, 2003 3:15 pm
Location: Midlands UK

Re: Error rendering the page null.

Postby AlanBourke » Wed Oct 30, 2013 7:22 pm

grahamg wrote:Alan

Are you using SV 7.3?


No - I was, then I rolled it back to whatever the last 6.x release was. Again - it works fine here, it works fine there as long as you're on their LAN and not coming in via the internet.
-------------------------------------------------------------------------------------------
Servoy SAN Developer
User avatar
AlanBourke
 
Posts: 198
Joined: Tue Aug 02, 2011 3:32 pm
Location: Dublin, Ireland

Re: Error rendering the page null.

Postby Harjo » Wed Oct 30, 2013 9:55 pm

Alan, what are you doing or setting in those HTML-AREAS?

are you maybe using internal (intranet) links? which are only accessible from there LAN?
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Error rendering the page null.

Postby AlanBourke » Thu Oct 31, 2013 4:02 pm

As an example, I'm doing this in the OnAction():

Code: Select all

function onActionHTMLArea(event)
{
   var attachmentFile = plugins.file.convertToJSFile(attachmentpath);
   
   if (attachmentFile.exists())
   {
      var fbytes = plugins.file.readFile(attachmentpath);
      var nothing = plugins.file.writeFile(utils.stringTrim(reference1) + '.pdf', fbytes, 'application/pdf');   
   }
}
-------------------------------------------------------------------------------------------
Servoy SAN Developer
User avatar
AlanBourke
 
Posts: 198
Joined: Tue Aug 02, 2011 3:32 pm
Location: Dublin, Ireland

Re: Error rendering the page null.

Postby Harjo » Fri Nov 01, 2013 12:11 am

what is the value of:

attachmentpath
and
utils.stringTrim(reference1)
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Error rendering the page null.

Postby AlanBourke » Fri Nov 01, 2013 5:19 pm

Harjo

An example of those field contents would be:

Reference 1: INV046044
Attachmentpath: D:\\Statement\\pdf\\a\\2013\\10\\PA_3X00V4V4O.PDF

Again, can't see those items being an issue if it works via localhost.
-------------------------------------------------------------------------------------------
Servoy SAN Developer
User avatar
AlanBourke
 
Posts: 198
Joined: Tue Aug 02, 2011 3:32 pm
Location: Dublin, Ireland

Re: Error rendering the page null.

Postby AlanBourke » Mon Nov 11, 2013 1:22 pm

Okay, examining this in Chrome running locally and accessing the live application server hosted remotely, when I click on any link that should download something (like the one described above) it's producing a HTTP 500:

Image

Inspecting that it looks like it is trying to access the resources via http://192.168.6.7, but that IP is the remote server's address on the remote LAN. It can only be resolved from my location when I have a VPN connected to the remote site. Is it just me, or is that IP wrong in that context?

Image
-------------------------------------------------------------------------------------------
Servoy SAN Developer
User avatar
AlanBourke
 
Posts: 198
Joined: Tue Aug 02, 2011 3:32 pm
Location: Dublin, Ireland

Re: Error rendering the page null.

Postby AlanBourke » Tue Nov 12, 2013 12:04 pm

In other words, in this example all the items above resolve correctly but for some reason it is trying to do a HTTP GET from a local IP address, even when you are accessing via the internet.

Image
-------------------------------------------------------------------------------------------
Servoy SAN Developer
User avatar
AlanBourke
 
Posts: 198
Joined: Tue Aug 02, 2011 3:32 pm
Location: Dublin, Ireland

Re: Error rendering the page null.

Postby Harjo » Tue Nov 12, 2013 7:46 pm

I tested this in my solution, and it just works here...

You say you do this in a HTML-AREA? What happens if you attach the method just to a button?
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Error rendering the page null.

Postby AlanBourke » Wed Nov 13, 2013 11:18 am

Yeah I use a HTML-AREA because it was the only way I could get it to conditionally display an image if there was a PDF file available to download (the little PDF icon on the graphic). All the HTML does is handle if the image is displayed or not. The click action is just the normal click event code.

I do have other static 'Label\Button' items on the page (the three at the bottom), which should download files and where no HTML AREA is used, they exhibit the same behaviour. So it's not particular to it being a HTML AREA.

Image
-------------------------------------------------------------------------------------------
Servoy SAN Developer
User avatar
AlanBourke
 
Posts: 198
Joined: Tue Aug 02, 2011 3:32 pm
Location: Dublin, Ireland

Re: Error rendering the page null.

Postby AlanBourke » Wed Nov 13, 2013 7:10 pm

Am currently investigating whether it is a Wicket/Tomcat issue encodeURL broken on Tomcat 7.0.28 : https://issues.apache.org/jira/browse/WICKET-4645
-------------------------------------------------------------------------------------------
Servoy SAN Developer
User avatar
AlanBourke
 
Posts: 198
Joined: Tue Aug 02, 2011 3:32 pm
Location: Dublin, Ireland

Re: Error rendering the page null.

Postby AlanBourke » Thu Nov 14, 2013 7:00 pm

Intractable (by me, anyway) problem it seems with no obvious resolution.

Cannot understand WTF is going on here.
-------------------------------------------------------------------------------------------
Servoy SAN Developer
User avatar
AlanBourke
 
Posts: 198
Joined: Tue Aug 02, 2011 3:32 pm
Location: Dublin, Ireland


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 5 guests