Knowledge Base
  • Introduction
  • Events and Actions
  • Action Panel
  • sending email
  • calling a SQL action from a client side js action
  • Accessing to translations form a server
  • Executing SQL statements from within an action
  • How to invoke a generic SQL statement defined through a SQL action
  • How to show a message dialog
  • checking for "undefined" values
  • How to add spaces to the right of a text
  • How to create a docx report and show it on the web browser Enterprise Edition only
  • How to get or set a value from the graphics control
  • How to invoke a generic SQL query defined through a business component
  • How to remove spaces to the left and right of a text
  • How to support multiple themes in a single application, accoding to a rule
  • How to set content to a Google Map linked to a grid or form
  • How to replace all occurences of a pattern from a text
  • Utility methods
  • Link auto login
  • Creation of a link for the first access of a new user without give the user a password and forcing
  • Forgot password
  • setting up default values from values coming from a filter panel
  • identifing the modified record after the alteration
  • enabling/disabling checkboxes in a grid
  • Filtering a Lookup
  • formatting a column
  • using checkboxes to select rows in grid
  • showing a summary row in grid
  • Disabling a toolbar button
  • Configuring grid exports
  • Adding filter conditions to a grid
  • Filtering the grid content from a tree
  • Filtering the tree content, starting from a filter panel linked to a grid
  • collapsing a panel
  • validating a lookup
  • accessing the authorizations set for a specific grid
  • How to design a web service
  • How to remotelly invoke an action or business component or perform a write operation through a Restf
  • how to feed a grid from a JS business component
  • converting a JS object to a JSON string
  • executing a query
  • passing parameters to a server side JS action
  • return value
  • scheduling and frequency
  • finding the right filter panel
  • checking out if a component has been defined
  • Deploying an application
  • Enquiring a table belonging to the Platform repository
  • Adding a where clause to a business component linked to grid
  • Integrating Mailchimp lists
  • Formatting a number as a currency value to use it inside an email template
  • sending email from a template
  • How to send an email
  • Error 'smtpHost' is empty
  • Linking two windows
  • How to open manually a window from another window
  • How to open manually a popup window
  • How to hide a panel in a window dinamically
  • How to manage folder panels
  • How to manage card panels
  • Predefined variables supported by Platform
  • Accessing the application parameters
  • Application Log
  • How to design a web service
  • How to import java classes in server
  • How to import java classes in server
  • How to dynamically set a value on a combo
  • 4WS.Platform
  • How to listen to events in a mobile HTML panel
  • Issues with HTTPS requests
  • How to manage row totals in grid
  • How to send to the UI a notification to execute code automatically
  • How to filter a chart by date interval
  • How to filter a grid by date interval
  • How to read a text or csv file and save data on the database
  • How to write text or csv files
  • Reading an xls file stored in the specified path
  • How to create a report with Jasper Report
  • How to customize the alert message content
  • Setting up a cluster
  • Uploading and downloading files
  • How to listen to user definition changes
  • How to auto-show a window from login
  • How to manage encrypted fields
  • How to change CSS settings for a grid row
  • Customizing a Tree Panel
  • How to execute complex queries on Google Datastore
  • Theme customization
  • Retrieve and send the log of a mobile app
  • Import Roles and Users
  • How to synchronize multiple Form panels in the same window
  • Anchor buttons
  • Properties of subpanels
  • Bulk import
  • How to display the data not found message in a grid
  • How to setup an LDAP based authentication
  • How to synchronize data from Datastore to BigQuery
  • How to synchronize data from Datastore to Google Spanner
  • How to synchronize data from Datastore to CloudSQL
  • Scrollable form list
  • How to setup SAML authentication
  • How to export data from BigQuery in streaming
  • Update Google Spreadsheet
  • How to setup OAuth2 authentication
Powered by GitBook
On this page
  • 1.Problems due to an unrecognized SSL certificate
  • 2. Problems due to the feature named Server Name Identification (SNI) not set or erroneously set
  • 3. Problems due to a specific TLS version required by the server

Was this helpful?

Issues with HTTPS requests

When using Platform connected to third party web services, there are sometimes problems involving the communication using HTTPS/SSL with external web services.

Basically, there can be 3 possible scenarios and for each one, a possible solution is provided.

In all these cases, the error is fired by Platform when using the server-side javascript function:

utils.getWebService(...)

This method can throw an exception according to a specific error, described as follows.

1.Problems due to an unrecognized SSL certificate

Unfortunately, when using Platform with JDK 1.7, the most recent certificate authorities could not be recognized by the JVM. Consequently, it is needed either to include additional new certificates to the JVM or inherit the certificates defined at operating system level, which usually are more updated.

An error you can come across due to a lack of certificates is

Wrapped javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: 
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: 
unable to find valid certification path to requested target

In order to fix this problem:

with Windows s.o.

  • open with a text editor the file included within the JVM installation dir: xxx\jre\lib\security\java.security

  • set the parameter "keystore.type" as follows:

#
# Default keystore type.
#

#keystore

.type=jks
keystore.type=Windows-ROOT
  • save the file and restart the Tomcat service

2. Problems due to the feature named Server Name Identification (SNI) not set or erroneously set

According to the settings of the server to connect to, it is possible that this has been configured in order to

  • require that the server name address is specified when connecting to the server

  • do not require the server name to be specified when connecting to the server

When coming accross with an error like

java.io.IOException: javax.net.ssl.SSLHandshakeException: Received fatal alert: unrecognized_name

you have to change the way the Platform's Tomcat service has been configured:

with Windows o.s.

  • go to tomcat/bin subfolder and double click configService.bat

  • go to "Java" subfolder and add the following line in the "Java Options" input box:

-Djsse.enableSNIExtension=true
  • restart the Tomcat service

with Linux o.s.

  • go to tomcat/bin subfolder and using a text editor open the catalina.sh file

  • find the JAVA_OPTS variable and append this line:

-Djsse.enableSNIExtension=true
  • save the text file and restart the Tomcat service

Important note: DO NOT set this parameter, if not needed!

If you erroneously set it and get an error such as

HTTPS hostname wrong: should be ...

it means you do not have to include the enableSNIExtension directive: remove it or set it to false.

3. Problems due to a specific TLS version required by the server

If you get connection errors, like

"connection reset"

it is likely that you have to force the use of the right TLS version when connecting to a server via SSL.

In such a scenario, you have to change the way the Platform's Tomcat service has been configured:

with Windows o.s.

  • go to tomcat/bin subfolder and double click configService.bat

  • go to "Java" subfolder and add the following line in the "Java Options" input box:

-Dhttps.protocols=TLSv1.1,TLSv1.2
  • restart the Tomcat service

with Linux o.s.

  • go to tomcat/bin subfolder and using a text editor open the catalina.sh file

  • find the CATALINA_OPT variable and append this line:

-Dhttps.protocols=TLSv1.1,TLSv1.2
  • save the text file and restart the Tomcat service

PreviousHow to listen to events in a mobile HTML panelNextHow to manage row totals in grid

Last updated 3 years ago

Was this helpful?

Note: in case you need both requests with SNI enabled (for third party web services requiring it( and without it enabled (e.g. Platform to Platform servers), you'd better pass this setting at request level (customize it for each request), through the method.

utils.getWebContentWithSettings