plugins.VelocityReport NullPointerException from Eclipse

Questions and answers on developing, deploying and using plugins and JavaBeans

plugins.VelocityReport NullPointerException from Eclipse

Postby joe26 » Tue Jun 05, 2018 1:56 am

Hi!

Velocity Reports has been installed as per the servoyforge.net instructions.

The sample VelocityReport solution has been installed.

Under Problems, the only error is NullPointerException: null is indicated, but I've yet to clear the error, both in 7.4.8 and 8.2.3.

Component component_test.js
Path /VelocityReport/forms
Location Unknown
Type JavaScript Problem

Report folder is setup as well as the URL under Plugins on Developer.

How do I clear this error?

thanks!
--Joe.
joe26
 
Posts: 82
Joined: Wed Jun 19, 2013 10:30 pm

Re: plugins.VelocityReport NullPointerException from Eclipse

Postby ROCLASI » Tue Jun 05, 2018 11:52 am

Hi Joe,

joe26 wrote:Report folder is setup as well as the URL under Plugins on Developer.


And the Report folder path is correct? If that folder/path doesn't exist it can cause issues.
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5282
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: plugins.VelocityReport NullPointerException from Eclipse

Postby joe26 » Tue Jun 05, 2018 4:15 pm

The folder/path was changed a couple times.

However, commenting these two lines out removed the error.

if (useCallback == 0) {
//viewer = plugins.VelocityReport.previewToComponent(elements.bean_panel, template, getReportContext());
} else {
//viewer = plugins.VelocityReport.previewToComponent(elements.bean_panel, template, getReportContext(), viewerSaveCallback);
}

Still investigating the issue. Still have plenty of memory for Eclipse. Sitting at 150M/462M before any further memory requests. New start.

**Edit**
This line:
viewer = plugins.VelocityReport.previewToComponent(elements.bean_panel, template, getReportContext(), viewerSaveCallback);
Looks like the last argument or it isn't global... Don't know yet.
joe26
 
Posts: 82
Joined: Wed Jun 19, 2013 10:30 pm

Re: plugins.VelocityReport NullPointerException from Eclipse

Postby joe26 » Tue Jun 05, 2018 5:21 pm

When selecting the 'previewToComponent' in the component.js script editor, on its fetch of information for this function, eclipse returns 'Requesting Script AST from selection' has encountered a problem. An internal error occurred during: "Requesting Script AST from selection"

Commenting out just this last took care of the General JavaScript error:
viewer = plugins.VelocityReport.previewToComponent(elements.bean_panel, template, getReportContext(), viewerSaveCallback);

Tried a global instead of a local. It looks like eclipse isn't aware of the last parameter for callback.
joe26
 
Posts: 82
Joined: Wed Jun 19, 2013 10:30 pm

Re: plugins.VelocityReport NullPointerException from Eclipse

Postby joe26 » Fri Jun 08, 2018 3:46 pm

Posted the error to ServoyForge. Apparently the sample Application is not updated to the latest Servoy and Velocity versions.

The sample solution hasn't really been updated to latest version of Velocity and Servoy... so it's possible there are bugs or incompatible things in there. What's for sure is that the previewToComponent() method is only working in Smart Client.


My concern is that I needed to run the sample without errors for the functionality to be present in mine.

Thank You Patrick!
joe26
 
Posts: 82
Joined: Wed Jun 19, 2013 10:30 pm


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 1 guest