Release Notes > ThingWorx Edge Java SDK Release Notes
  
ThingWorx Edge Java SDK Release Notes
The following sections list and describe the new features and the issues fixed in the releases of the ThingWorx Edge Java SDK in chronological order, 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.
ThingWorx Edge Java SDK v.6.1.0
The following table lists the enhancement and issue fixed in this releae:
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. See 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. See 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. See 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, see 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 thing from the internal _virtualThings map and then called the overridden unbind(String) method through a series of calls that attempted to access the thing througgh 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. See 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, samples/src/com/thingworx/sdk. The samples 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 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.