Release Notes for Previous Releases of ThingWorx Edge Java SDK
Release Notes for Previous Releases of ThingWorx Edge Java SDK
The following sections list and describe the new features and the issues fixed in the releases of the ThingWorx Edge Java SDK in reverse chronological order, that is, from the current release to the oldest release.
To download the latest distribution bundle for your platform, visit the Software Downloads page of the PTC eSupport Portal, https://support.ptc.com/appserver/cs/software_update/swupdate.jsp, locate and click the THINGWORX EDGE SDK product family name. In the Software Downloads page for the ThingWorx Edge SDKs, expand the nodes as follows: Release SDKs > ThingWorx Edge SDK > Most Recent Version. Then, download the distribution bundle you require.
Security
This release of the ThingWorx Edge Java SDK includes security-related updates, as follows:
Fixed potential security issues, including items proactively identified by vulnerability scanning software or PTC Quality Assurance testing. Please upgrade as soon as possible to take advantage of these important improvements.
See this technical support article for important recommendations regarding the use and update of third-party software for ThingWorx.
Important Information
The following versions of the ThingWorx Edge Java SDK have been certified with ThingWorx Platform v.9.0.x and v.9.1.x in both single-server and ThingWorx High Availability (HA) Clustering modes:
Latest releases — v.7.0.0, v.7.0.1
Oldest supported release — v.6.2.0.220
While these versions of the Edge Java SDK have not been certified with ThingWorx Platform, v.9.2.1 or later v.9.2.x, they should work with those versions of the platform. Please contact Technical Support if you experience any issues with v.9.2.x.
It is recommended to use ThingWorx Platform v.9.1.x or v.9.0.2 or a later 9.0.x maintenance release, with the latest ThingWorx Edge Java SDK. You can also use versions 7.0.x and 6.2.x of the Edge Java SDK with ThingWorx Platform v.8.5.x.
Click the title of the release notes section for your release of the ThingWorx Edge Java SDK to display the content. Click the title again to hide the content.
ThingWorx Edge Java SDK, v.7.0.1 
For supported platforms and supported versions of ThingWorx Platform, refer to the ThingWorx Edge SDKs Support Matrix.
The following table lists specific enhancements and issues fixed in this release.
ID (SFID)
Description
Enhancements
JSDK-280
Java SDK uses the Duty Cycle thread to periodically check the ThingWorx Server certificate for validity and expiration. When the ThingWorx Server Certificate has expired, the connection with the ThingWorx platform is terminated to improve security between the platform and the Java SDK-based edge agent.
JSDK-623
Logback configuration files that reside in the same directory as the example JAR files are now supported.
Issues Fixed in This Release
JSDK-756
Logback has been upgraded to 1.2.9 to fix vulnerability in CVE-2021-4104.
JSDK-673
The Netty library used by the Edge Java SDK has been upgraded to v.4.1.68 to fix vulnerabilities in CVE-2021-37136, CVE-2021-37137.
ThingWorx Edge Java SDK, v.7.0.0 
The v.7.0.0 release of the ThingWorx Edge Java SDK adds native Edge Extensions, support for Android applications, and support for Oracle JDK 11 and OpenJDK, versions 8 and 11 in production environments. Note that Oracle requires a license for JDK 11.
The OpenJDK 8 support will continue until September 2023. No build numbers are specified for this support.
Support is also provided for Oracle JDK 11 in production. However, you must have the appropriate license from Oracle.
Oracle JDK 8 builds 212 and later are supported in production by the ThingWorx Edge Java SDK, provided you have a Java SE Subscription. The ThingWorx Edge Java SDK also supports JDK 8 builds prior to 212, without a Java SE Subscription, in development but with the subscription in production.
For information about the Oracle Java Support Roadmap and, more specifically, Oracle JDK 8 support and OpenJDK 8, refer to the following Oracle blog posts:
* 
This release of the ThingWorx Edge Java SDK deprecates a number of classes and utilities. For example, support for Java NIO in the SDK configuration API has been removed. Deprecated functionality will appear as Java compiler warnings. Be sure to check for these compiler warnings so that you are aware of what will be removed in a future release approximately a year from this release.
* 
In addition, the Password Callbacks feature requires that existing applications be upgraded to use this new feature. Secrets such as application keys and username/password combinations (proxy or SSL/TLS) must be passed to applications using the Password Callback feature. For more information, refer to Password Callbacks.
For supported platforms and supported versions of ThingWorx Platform, refer to the ThingWorx Edge SDKs Support Matrix.
The following table lists specific enhancements and issues fixed in this release.
ID (SFID)
Description
Enhancements
JSDK-363
The gradle wrapper and configuration file are included in the distribution bundle and can be used on all Java SDK projects. Use the gradle wrapper to run the SDK build.
JSDK-403
Due to security concerns over the storage of secrets in memory, how you supply application keys and username/password combinations to a Java SDK application has changed in this release. With a username/password, this is effectively storing two secrets in memory, compared to one with an application key.
* 
Management of application keys has been migrated to a callback implementation. All other ways of supplying credentials are deprecated with this release.
The Security.Claims.fromCredentials implementation no longer creates a claim with the password field, RESTAPIConstants.PARAM_PASSWORD set. This change may cause current authentication implementations to fail.
Refer to Password Callbacks for details.
* 
Previously, the Edge Java SDK allowed you to use the JDK's getSecurityClaims() method to add a username and password for authentication. However, for best security, you now must use the password callbacks for authentication, with application keys or passwords. You use the JDK's setSecurityClaims method to point to the password callback's value.
JSDK-408
Removed unused/dead code from Java SDK.
JSDK-425
The StringUtilities functions have been deprecated.
JSDK-433
The Java SDK Android examples demonstrate proxy support. Refer to Proxy Server Support for Android to learn about proxy support and to Setting Up to Run Sample Android Applications for information about running the examples.
JSDK-429
Binary messages are now logged at the TRACE level. Text versions of the messages are also logged.
JSDK-433
Added proxy support to all Java SDK examples, including the Android examples. Refer to Proxy Server Support for Android for details about proxy support for Android applications.
JSDK-491
Code that was not used by the SDK is deprecated in this release. In addition, code coverage has been improved for this release.
JSDK-508 (14140454)
Added custom client key support for Android. Keystore and truststore paths have been added to the Java SDK's ClientConfigurator class to support custom client keys. Client key configuration has also been added to the Android examples provided in the distribution bundle. Refer to Custom Client Key Support for Android for details.
JSDK-576
The following example functionality has been added to the Edge Java SDK SteamSensor example:
File transfer.
Tunneling enabled.
Request a property value from the ThingWorx Platform.
Issues Fixed in This Release
JSDK-233
The SteamThing example now uses only one call to initializeFromAnnotations.
JSDK-440 (15095431)
The TimeoutException and ConnectionException logic for updateSubscribedProperties has been improved and added back in the Edge Java SDK v.7.0.0.
Several tests were created to ensure that the exceptions are thrown correctly and at correct times.
JSDK-461
Two infoTable methods in the ValueCollection class have been deprecated: toInfoTable() and toInfoTable(String).
JSDK-469 (15073319) and JSDK-470
An issue with file transfers with compression was caused by an issue in the Netty library. Netty has fixed the issue and this release of the Edge Java SDK includes the fixed Netty library, v.4.1.48.
JSDK-470 (15073319)
The Netty library used by the Edge Java SDK has been upgraded to v.4.1.48.
JSDK-584 (15078713)
Multiple threads adding subscribed property updates simultaneously can no longer overwrite each other.
ThingWorx Edge Java SDK, v.6.2.0 
With this release, the ThingWorx Edge Java SDK has its own help center on the PTC eSupport portal. For v.6.1.0 and earlier, refer to the original ThingWorx Edge SDKs and ThingWorx WebSocket-based Edge MicroServer Help Center.
The following table lists the enhancements and issues fixed in this release:
Enhancements and Issues Fixed in v.6.2.0
ID (SFID)
Description
Enhancement
JSDK-283 (14199727)
Add named exception when authentication fails due to bad security claim.
To provide a way to easily identify when a security claim has failed, this release adds a named exception that will be thrown when any issue around the connection occurs, including failed authentication.
Issues Fixed
JSDK-297 (14675441) and JSDK-374
The addPendingPropertyUpdates in Java SDK 6.1.0.679
In releases 6.0.3, 6.0.4 and 6.1.0.679, the method, addPendingPropertyUpdates, added in v.6.0.2, was omitted. In v.6.2.0, this method has been restored, in the VirtualThing class for queueing unsent property values. In addition, replacePropertyUpdates has been removed.
ThingWorx Edge Java SDK v.6.1.0 
The following table lists the enhancement and issue fixed in this release:
Enhancements and Issues Fixed in v.6.1.0
Issue ID (SFID)
Description
Enhancements
JSDK-226
Enable WebSocket Compression in the JSDK
WebSocket compression has been added to the Edge Java SDK in this release. Compression is supported between the edge and ThingWorx Platform for WebSocket communications, including file transfers and tunneling. Refer too the ThingWorx Edge Java SDK Developer’s Guide, v.6.1.0. The zlib compression utility, version 1.2.11, is used to compress and extract files from a ZIP archive. By default compression is enabled because the client must request compression from ThingWorx Platform (or the ThingWorx Connection Server). The version of netty-all has been updated to 4.1.14 Final to support compression from the Java SDK to a ThingWorx endpoint (the platform or a ThingWorx Connection Server).
Issue Fixed
JSDK-256
File transfers failing with v.6.0.4
The FileTransferVirtualThing.getVirtualPath(String path) method was taking the virtual directory in such a way that the first character of the path was missed, resulting in the wrong directory and failure of the file transfer.
This issue is fixed in this release.
ThingWorx Edge Java SDK v.6.0.4 
Issues Fixed in v.6.0.4
Issue ID (SFID)
Description
JSDK-248
Old Java SDK does not work with ThingWorx 8.x+.
As part of JSDK-90, the maxFileSize parameter for file system services changed to use doubles instead of ints/longs. If a user attempts to transfer a file from the 6.0.2 build of the Java SDK to a ThingWorx Platform running 8.x, a casting issue will cause the transfer to be cancelled immediately. The older builds of the Java SDK can transfer files only with ThingWorx 7.x and earlier.
RESOLUTION: This issue is fixed in this release. The file transfer operation with the Java SDK now will work with ThingWorx 8.x and earlier (e.g., 7.2 and 7.3).
JSDK-253
Copy Failed with the message, java.lang.Long cannot be cast to java.lang.Double, when attempting to copy a file.
This issue occurred when connecting to ThingWorx Platform 7.3 or 7.4 for a copy operation (file transfer). It worked fine when connecting to ThingWorx Platform 8.0.
CAUSE: A change in ThingWorx Platform 8.0 caused the copy operation to succeed in 8.0 but fail in earlier versions.
RESOLUTION: This issue is fixed in this release. The copy operation now will work with ThingWorx Platform 7.2 and 7.3.
ThingWorx Edge Java SDK v. 6.0.3 
Enhancements and Issues Fixed in v.6.0.3
Issue ID (SFID)
Description
Enhancements
JSDK-75
File transfers that use identifiers
With this release, file transfers to a VirtualThing that uses an identifier (instead of a Thing name) have been thoroughly tested against the ThingWorx Platform and shown to work as expected.
JSDK-76
Move binary message hex dumps from the Android SDK to the Java SDK
The ability to print hex dumps of sent and received binary messages when the log level is set to TRACE has been moved from the Android SDK into the main Java SDK. This capability is available in both SDKs.
JSDK-90
Java SDK limits file transfers to 2GB.
With this release, the Java SDK can support the transfer of a file that is greater than MAX_INT in size.
JSDK-97
Java SDK ClientConfigurator should accept file transfer options.
With this release, you can set the block size and maximum file size for file transfers. Refer too the topic, “Configuring File Transfers” in the ThingWorx Edge SDKs and WebSocket-based Edge MicroServer Help Center or in the chapter on file transfers in the Java SDK developer’s guide, to read about the set and get methods for specifying and retrieving this information for a file transfer.
JSDK-101
Java SDK sample code for property listener features
Property listeners have been added to the Java SDK as part of the Android SDK project. With this release, sample code is provided in the Java SDK examples that show how to use property listeners.
JSDK-102
Enable persisting InfoTable configurations that contain nested InfoTables
To support complex extension configurations, the ThingWorx Edge Java SDK supports persisting and consuming of configuration files that contain nested InfoTables. Refer too the topic, Persisting Nested InfoTable Configurations, in the documentation for more information.
JSDK-112 (12873723)
Implement a Max Message Size variable in the Java/Android SDK
The ClientConfigurator now accepts a maxMessageSize option. Note that this setting refers to the maximum ThingWorx message size and not the size of an individual WebSocket message. For more details, refer to the section, ClientConfigurator Component of the documentation.
Issues Fixed in This Release
JSDK-26 (13530483)
ThingWorx client cannot reconnect to the server after network connectivity loss and subsequent change in IP address.
Issue: A PCM device can provide data connection using GSM/CDMA technology and is assigned a dynamic IP address by the customer’s TELCO provider when the modem is attached to the network. If the modem interface went down and a new IP address was assigned when it restarted, the ThingWorx client could not reconnect.
Cause: The WebSocket close frame never reached ThingWorx Platform after the WebSocket pong timeout, and the client application never closed the socket locally.
Resolution: Forcibly closing the socket allows the client application to re-establish connectivity. After the client misses a pong from ThingWorx Platform, the client’s WebSocket now times out locally after sending the close frame to ThingWorx Platform. It is important to note that it is still the responsibility of the customer to invoke BaseClient.connect to reconnect to ThingWorx Platform after a network interruption.
JSDK-40 (13508403)
ConnectivityMonitorTask thread is not stopped and fills the entire log.
Issue: The AlwaysOn connection that is created by the Java SDK is not stopped, even after the ThingWorx client is shut down. The ConnectivityMonitorTask thread reports errors in the logs, eventually filling the entire log.
Resolutiuon: The call made by this_endpointMonitorService.shutdownNow() now stops all the threads.
JSDK-42
Loopback connections with Java SDK
Issue: 16 Loopback Ports from the java.exe process were being opened when running a Java SDK, in Windows. 16 Loopback Ports from the Tomcat.exe process were being opened when running the Java SDK, in Windows.
This issue is fixed in this release.
JSDK-44 (12983882)
Java Developer documentation gives wrong location of ExampleExport.xml.
This issue was fixed in the April 11, 2017, release of the ThingWorx Edge SDKs and WebSocket-based Edge MicroServer Help Center. It is also fixed in the PDF for the Java SDK developer’s guide for version 6.0.3.
JSDK-46 (13088081)
Java SDK setReconnectInterval is ignored upon initial connection failing.
Issue: A reconnect was attempted approximately every 10 seconds instead of at the interval passed into the setReconnectInterval method (which was 500).
Cause: Seconds were being passed in as the value for the interval instead of milliseconds.
This issue is fixed in this release.
JSDK-48
The unbindThing method of the ConnectedThingClient throws a NullPointerException.
Cause: The unbindThing method in the ConnectedThingClient removed the Thingfrom the internal _virtualThings map and then called the overridden unbind(String) method through a series of calls that attempted to access the Thingthrouggh the map from which it was just deleted. The code then called setBound on the null object reference, triggering the NullPointerException.
Resolution: The removal from the map now occurs AFTER the unbind call.
JSDK-52 (12947285)
Java SDK 6.0 does not use an explicit Proxy Server
Issue: Although proxy server settings were configured for the SteamSensorClient, the request from the client went directly to ThingWorx Platform, bypassing the proxy server.
This issue is fixed in this release.
JSDK-54
Client connection remains active after Shutdown() is called.
Issue: Although the client connection was destroyed, it kept generating log data as it attempted to reconnect.
Cause: The Connection Monitor on ThingWorx Platform was not shut down properly when the subsystem shut down, affeccting all clients that depend on the shutdown() method of the BaseClient.
Resolution: The issue on ThingWorx Platform has been fixed, which also resolves this issue.
JSDK-55
DefaultValue aspect validation fails silently
Issue: If an annotation was created with a default value that failed to parse into the appropriate primitive type, an exception was generated and then silently disposed of without ever telling the user. This exception caused all remaining @ThingworxPropertyDefinition annotations to be ignored and resulted in a VirtualThing with no properties at runtime, without warning. This issue also occurred with LOCATION if it was not except 2 or 3 numbers separated by commas (e.g., 0,0,0) took down all of the other annotations.
Resolution: VirtualThing will now log the exception from AspectCollection and throw its own exception.
JSDK-56
BaseClient.waitForConnection() appears to always wait for full timeout even if thread is interrupted.
This issue is fixed in this release.
JSDK-220 (13729338)
Java SDK disconnects and then cannot reconnect to the platform.
The Java SDK now reconnects when a number of consecutive timeouts occur. You can call ClientConfigurator.setTimeoutCountReconnectionThreshold to configure the number of timeouts. Refer too the ThingWorx Edge Java SDK Developer’s Guide, the chapter on Troubleshooting, for information about configuring the consecutive timeouts.
ThingWorx Edge Java SDK v. 6.0.2 
Issue Fixed in v. 6.0.2
ID
Description
JSDK-18
The method, VirtualThing.updateSubscribedProperties, does not throw the exception, java.util.conccurrent.TimeoutException, when a timeout occurs.
This issue is fixed in this release.
Current Implementation (Before v.6.0.2):
1. As documented and/or as per method declaration, exceptions (TimeoutException, ConnectionException and Exception) are not thrown appropriately to the caller in updateSubscribedProperties(int) and updateSubscribedEvents(int) methods.
2. When, for example, a TimeoutException or similar exception is thrown, invoking the replacePropertyUpdates method in the catch block of updateSubscribedProperties(int) does not add all the pending/failed properties back to the queue.
New Implementation for v.6.0.2:
Provided in the VirtualThing.java file are the two methods that were modified to resolve this issue — updateSubscribedProperties(int) and updateSubscribedEvents(int). More specifically:
1. In the catch block of the updateSubscribedProperties(int) method, instead of invoking the replacePropertyUpdates method, the method, addPendingPropertyUpdates, is now invoked to add ALL these pending/failed properties again to the queue/map. As a result, these properties can be sent again when the updateSubscribedProperties method is invoked. Also, exceptions are thrown back as expected (to be in sync with documentation and/or method declaration).
2. In the catch block of the updateSubscribedEvents(int) method, the exceptions TimeoutException, ConnectionException, and Exception are now thrown. Consider increasing the timeout value passed as an argument to updateSubscribedProperties when a TimeoutException occurs.
ThingWorx Edge Java SDK v. 6.0.1 
Issue Fixed in v. 6.0.1
ID
Description
EDGE-2078
Java-based edge client ignores proxy settings. This issue is fixed in this release.
ThingWorx Edge Java SDK v. 6.0.0 
New in v. 6.0.0
Client applications can now connect to the ThingWorx Platform through a proxy server.
For devices that are powered by batteries or otherwise restricted in the amount of time they can be connected, duty cycle modulation is now supported.
The SDK now supports TCP tunneling.
Client applications will now validate X.509 server certificate fields that are specified using the ClientConfigurator.
A new document, the ThingWorx Java SDK Developer’s Guide, is available in PDF format with the SDK and on the PTC Support site.
Javadoc is now provided for the SDK API.
New sample code is available in the directory, examples/src/com/thingworx/sdk. The examples include a build.gradle file that will build and launch a sample application. Instructions for using the sample applications are provided in the new PDF document and the ThingWorx Edge SDKs and WS EMS Help Center (available from the PTC Support site).
The file ExampleExport.xml contains entities that you can import into the ThingWorx Platform to create the Remote Things needed when using the sample applications.
In addition, the SteamSensor example has been revised for this new version of the SDK.
The VirtualThing object now supports listeners for changes in property values.
Was this helpful?