Project

General

Profile

Defect #348

Null pointer exception in solutionType Login

Added by Imre Tokai over 12 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
07/28/2011
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

Description

Hi,

Not able to open non of dialogs in solutionType Login of my main solution? Anyway it works as expected in whole Main solution.
Tried to include mod_dialog as module in main solution, in login solution (module) and in both but get same error for
@globals.DIALOGS.showInfoDialog('Info dialog test', 'Did you know that....\n...you can actually use long button text?', "Really? I didn't know that.", 'Old News');
@when tried from Login solution.

Wrapped java.lang.NullPointerException
\mod_dialog\globals.js:32 (newFormBluePrint)
\mod_dialog\globals.js:55 (showDialog)

function newFormBluePrint(_sFormName, _sBaseFormName, _nWidth, _nHeight) {
if (!forms[_sFormName]) {
var _oForm = solutionModel.newForm(_sFormName, forms[_sBaseFormName].controller.getDataSource(), _sStyleSheet, false, _nWidth, _nHeight);
_oForm.extendsForm = _sBaseFormName;
} else {
application.output("Form '" + _sFormName + "' already exists.", LOGGINGLEVEL.ERROR);
}
}

Any idea?
Regards


Files

servoy_log.txt (4.45 KB) servoy_log.txt Imre Tokai, 07/29/2011 03:50 PM

History

#1

Updated by Robert Ivens over 12 years ago

  • Status changed from New to In Progress
  • Assignee set to Robert Ivens

What version of Servoy is this ?
And do you also see the error when you load the demo solution?

#2

Updated by Imre Tokai over 12 years ago

Thank you for your fast response Robert,

Servoy ver 5.2.8.;
Demo solution doesn't have a login module; Should I create it if this supposed to be possible?
Below is expert's comment:
This is a known restriction. Security on login solutions only allows you to see current form. Dialog module uses SolutionModel to make and show new forms, so that won't work in a login solution for security reasons.

#3

Updated by Rob Gansevles over 12 years ago

Imre Tokai wrote:

Thank you for your fast response Robert,

Servoy ver 5.2.8.;
Demo solution doesn't have a login module; Should I create it if this supposed to be possible?
Below is Scott's comment:
This is a known restriction. Security on login solutions only allows you to see current form. Dialog module uses SolutionModel to make and show new forms, so that won't work in a login solution for security reasons.

Imre,

The login works just as a normal solution with a restriction that there is no data access.
You can have modules and multiple forms.
Once logged in the login solution is automatically replaced with the main solution.

Can you show the stack trace from the nullpointer exception?

Rob

#4

Updated by Imre Tokai over 12 years ago

Thanks Rob,

Mentioned in Description, only erased the physical path to the solution (specific to my hard-drive):
Wrapped java.lang.NullPointerException
\mod_dialog\globals.js:32 (newFormBluePrint)
\mod_dialog\globals.js:55 (showDialog)

Null pointer exception happens in method newFormBluePrint(_sFormName, _sBaseFormName, _nWidth, _nHeight) line:
var _oForm = solutionModel.newForm(_sFormName, forms[_sBaseFormName].controller.getDataSource(), _sStyleSheet, false, _nWidth, _nHeight);

Try to reproduce the issue by invoking the dialog in any solution that has login module and explicitly add mod_dialog as referenced module (Properties->modulesNames)

#5

Updated by Rob Gansevles over 12 years ago

Imre,

I meant from the servoy_log.txt file, there is probably a java-stacktrace with the exception.

Rob

#6

Updated by Imre Tokai over 12 years ago

See attached please

#7

Updated by Rob Gansevles over 12 years ago

Imre,

I see the reason for the exception, this is currently a limitation in Servoy, you cannot use the solution model in a login solution.
Please create a case in the Servoy support system for a feature request to support solution model in login solution.

Rob

#8

Updated by Robert Ivens over 11 years ago

  • Status changed from In Progress to Closed
  • Client type set to Web client
  • In developer? set to No
  • Servoy version set to 5.2
  • Component version set to 1.1.3
  • OS version set to any
  • Java version set to 1.6

Issue should be fixed in 6.0.4 and 6.1
See https://support.servoy.com/browse/SVY-1204

Looks like this will remain a limitation in 5.2.x

Also available in: Atom PDF