Servoy 8.4

We are pleased to announce the availability of Servoy 8.4 (releasenumber 3402)

This version is available through our download site

The update site is: http://download.servoy.com/developer/8xx_updates/

There are, compared to the 8.4rc2 a few fixes.

fixes

fixes done in 8.4rc2:
8.4RC2 fixes

fixes done in 8.4rc1:
8.4RC1 fixes

see for the changes in 8.4:

Whats new

Check the new feature out for parsing/validating javascript code that we introduced before, it is now enabled by default.

After this we will start with a different kind of release model. More information about this will be posted shortly.

Following this release, we will move to quarterly builds and yearly long-term support.
Please read more about this change here

Learn more about this release in our tech webinar series. We did a 3-part webinar mini-series back in December. Recordings are available.

Hi,
I just upgraded my developer copy for a new client solution from 8.3.x to 8.4 and you seem to have changed some functionality in the http plugin that I can’t see documented.
I am using it to access the UK Companies House API, that just required Basic authentication (in this case just passing my API key as username with a blank password
This was working with the following code

	var client = plugins.http.createNewHttpClient();
	var request = client.createGetRequest('https://api.companieshouse.gov.uk/search/companies?q=' + ch_number );
	request.usePreemptiveAuthentication(true);
	var response = request.executeRequest(myapiusername, '');
	var httpCode = response.getStatusCode();
	var content = response.getResponseBody();

but after the upgrade, this generated an error

Invalid authorization header

so after investigating, I managed to change the code to (with the svyUtils module)

	var client = plugins.http.createNewHttpClient();
	var request = client.createGetRequest('https://api.companieshouse.gov.uk/search/companies?q=' + ch_number );
	request.usePreemptiveAuthentication(true);
	var auth = scopes.svyCrypto.base64EncodeAsString(scopes.svyCrypto.string2Bytes(myapiusername + ':'));
	request.addHeader('Authorization','Basic ' + auth);
	var response = request.executeRequest();
	var httpCode = response.getStatusCode();
	var content = response.getResponseBody();

and now it works.
So it looks like you have changed something in the ‘executeRequest’ code to stop the old way of passing username/password from working [as my setup to test this in Postman did not change & still works].
If you have changed something like this, please document it somewhere.
[I hope this might help some other developer who hits this problem]
There are other things that seem to have changed that I will post separately.
[And PLEASE fix the forum login problems ASAP]

Rafi

i think that whole plugin got updated to the latest apache http client code
The thing is that usePreemtiveAuthentication should just exactly do that what you are now also doing by hand (setting that “authorization”) header

can you make a case so we can have a look?

jcompagner:
i think that whole plugin got updated to the latest apache http client code
The thing is that usePreemtiveAuthentication should just exactly do that what you are now also doing by hand (setting that “authorization”) header

It didn’t seem to…

jcompagner:
can you make a case so we can have a look?

I will try to soon.
[and when will forum issues be sorted??]
Thanks
Rafi

Some users have reported issues with the it2be plugins under 8.4 with the upgrade to log4j2.

Example: http://forum.servoy.com/viewtopic.php?f … 87#p119487

We have updated the it2be plugins in the “Beta” release to support the new logging framework.

Please let us know if you have any issues with it!

ah those where directly using log4j api?
Servoy itself on te most places doesn’t do that we all go through the SLF4J api and log4j is just a backend for that…

Yes, the plugins were logging directly using log4j.

I’ve updated them to use the slf4j that’s bundled with the Servoy install.

rafig:
Hi,
I just upgraded my developer copy for a new client solution from 8.3.x to 8.4 and you seem to have changed some functionality in the http plugin that I can’t see documented.
I am using it to access the UK Companies House API, that just required Basic authentication (in this case just passing my API key as username with a blank password
This was working with the following code

	var client = plugins.http.createNewHttpClient();
var request = client.createGetRequest('https://api.companieshouse.gov.uk/search/companies?q=' + ch_number );
request.usePreemptiveAuthentication(true);
var response = request.executeRequest(myapiusername, '');
var httpCode = response.getStatusCode();
var content = response.getResponseBody();


but after the upgrade, this generated an error


> Invalid authorization header


so after investigating, I managed to change the code to (with the svyUtils module)


var client = plugins.http.createNewHttpClient();
var request = client.createGetRequest(‘https://api.companieshouse.gov.uk/search/companies?q=’ + ch_number );
request.usePreemptiveAuthentication(true);
var auth = scopes.svyCrypto.base64EncodeAsString(scopes.svyCrypto.string2Bytes(myapiusername + ‘:’));
request.addHeader(‘Authorization’,'Basic ’ + auth);
var response = request.executeRequest();
var httpCode = response.getStatusCode();
var content = response.getResponseBody();



and now it works.
So it looks like you have changed something in the 'executeRequest' code to stop the old way of passing username/password from working [as my setup to test this in Postman did not change & still works].
If you have changed something like this, please document it somewhere.
[I hope this might help some other developer who hits this problem]
There are other things that seem to have changed that I will post separately.
[And PLEASE fix the forum login problems ASAP]

Rafi

Hi Rafi, this issue will be fixed for our next release - 2019.03 (see https://support.servoy.com/browse/SVY-13312)

I’ve updated my development environment from 8.1.4 → 8.4 successfully. I am now attempting to upgrade one of our linux (centOS) servers from 8.1.4 → 8.4 unsuccessfully. I get the error below when I run servoy_updater.jar with or without the releaserNumber option. I’ve found other posts reporting similar problems and tried the recommended versions of the servoy_updater.jar file without success.

Here is the error:

Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: http://download.servoy.com/downloads/0xx_updates/version_info.txt
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
        at java.net.URL.openStream(URL.java:1045)
        at com.servoy.updater.VersionCheck.loadVersionInfoFile(VersionCheck.java:163)

because of all the url changes i think you bumb into this what we discuss here:

viewtopic.php?f=16&t=21872

you need to have a different servoy_updater.jar

For the next release we will ship it right into the developer and the developer will also update that file…

jcompagner:
because of all the url changes i think you bumb into this what we discuss here:

viewtopic.php?f=16&t=21872

you need to have a different servoy_updater.jar

For the next release we will ship it right into the developer and the developer will also update that file…

Thanks Johan

I’ve tried replacing the servoy_updater.jar file with the one posted in that discussion but it’s still failing for me.

Here’s the output:

Could not read current Servoy version: null
java.lang.NullPointerException
        at com.servoy.updater.J2DBJarVersionReader.<init>(J2DBJarVersionReader.java:45)
        at com.servoy.updater.VersionCheck.main(VersionCheck.java:354)
Current Servoy version 0
Checking for new Servoy version
Loading version info...
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: http://download.servoy.com/downloads/0xx_updates/version_info.txt
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
        at java.net.URL.openStream(URL.java:1045)
        at com.servoy.updater.VersionCheck.loadVersionInfoFile(VersionCheck.java:163)
        at com.servoy.updater.VersionCheck.main(VersionCheck.java:372)

the weird thing is that this:

http://download.servoy.com/downloads/0x … n_info.txt

should be

http://download.servoy.com/downloads/8x … n_info.txt

so the problem is the first null pointer, that tried to load the file j2db.jar from the application_server\lib dir
then it wants to read in the manifest.mf file (in META-INF)
somehow that seems to be corrupted
So it could be that this will only work with a clean install