The most common causes of startup problems are missing or faulty license files, native library errors, or hardware identification problems. This article lists common error messages in the application console, along with their solutions. It also offers a few Tips for dealing with license and iButton problems.

License error messages

Can’t read LuciadFusion development/deployment license.

The application can’t find the required license file. Make sure that the license jar, typically development.jar or deployment.jar, is listed in the class path of your application. Note that this is a jar file, not the zip file that you typically receive from Hexagon and that contains the jar file.

Your LuciadFusion license has expired, sorry.

Your license contains an expiry date that has passed. Please contact us for an extension or for a new license.

Your LuciadFusion license is not valid for this host, sorry (IP = …​)

Your license file was created for an IP address that does not match the IP address of the computer. Make sure that you are working with the correct license file on the correct host. Note that only regular ethernet addresses are accepted and wireless interfaces are not supported.

You can use the following program to print out all IP addresses taken into account by the license checking code:

Program: Printing IP addresses
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.util.Enumeration;

public class PrintNetworkInterfaces {

  public static void main(String[] args) throws SocketException {
    // Loop over all network interfaces.
    Enumeration interfaces = NetworkInterface.getNetworkInterfaces();
    while (interfaces.hasMoreElements()) {
      NetworkInterface network_interface = (NetworkInterface)interfaces.nextElement();
      System.out.println("Interface: " + network_interface.getName());
      // Loop over all IP addresses of this interface.
      Enumeration<InetAddress> addresses = network_interface.getInetAddresses();
      while (addresses.hasMoreElements()) {
        InetAddress inetAddress = addresses.nextElement();
        System.out.println("  " + inetAddress.getHostAddress() + " (Length: " + inetAddress.getAddress().length  + ")");
      }
    }
  }
}

Your LuciadFusion license is not valid for this host, sorry (MAC = …​)

Your license file was created for a MAC address that does not match the MAC address of the computer.
Make sure that you are working with the correct license file on the correct host computer.

If multiple MAC addresses are present on your system, there are specific use cases in which the application may not be able to find the correct MAC address:

  • A JDK older than 1.6 is used.
    Upgrade to at least JDK 1.8.

  • On a Windows machine, the ethernet card for which the MAC address is registered, is not connected to the network.
    Connect the ethernet card to the network.

Other potential solutions are:

  • Upgrading your LuciadFusion release to the latest version - the license handling code of the new release may have improved, solving the problems.

  • Removing the hardware and software that owns the other MAC address.

Contact us if you want to receive a new LuciadFusion, or if none of the above suggestions solve the issue.

Can’t get floating LuciadFusion license for this module, sorry (…​)

The application can’t contact the license server. There can be several reasons for this, for instance:

  • The license server is not running.
    Make sure the license server executable is started, on the computer with the IP address specified as the licenseserver in the license file. See How to install and start the license server for floating licenses for the details.

  • The license server cannot be reached.
    You can test whether the server is reachable by executing the following command on the client: ping <license server IP address>.
    A license server may be unreachable if a firewall blocks UDP traffic on the securityPort specified in the license file. Contact your network administrators to allow UDP traffic on that port.

Your number of floating LuciadFusion licenses has been exceeded, sorry

You typically run into this error when too many Luciad applications are running concurrently, and using all available floating licenses. For your convenience, the application lists the IP addresses of hosts with other running copies.

Keep in mind that each running application counts. That includes a server using LuciadLightspeed, for example, or two LuciadFusion processes running on the same machine.

A running application holds on to the license until it is shut down, even if the Luciad component is no longer visible, or if it is no longer being used in the application. Java processes sometimes continue to run even if their visible GUIs have been closed. You may want to check for rogue processes in the IDE that launched them, or in a task manager or process list.

Other possible causes are:

  • An incorrect license file still present from another development project, or an expired license file still present in the same project.
    Keep in mind that you must install new license files on both the server and client. It is not sufficient to install it on the server only.

  • Conflicting licenses: two licenses have accidentally been configured to use the same license server IP address.

To track which computers or applications are currently holding a license, you can activate the license server log: start the license server with the -log <logfile> option to generate a log file with a list of IP addresses of computers that requested a license.

The version of the license file doesn’t match the version of LuciadFusion (code = …​)

Your class path contains a license file for a different version of the product than the version that is actually running. Make sure that you have installed a license jar that matches the version of the product jars. The application prints out the location of the license file that it reads; you should double-check that this is not an old copy that was left from a previous installation.

Your LuciadFusion license is not valid for this component, sorry (…​)

Your application accesses a component that is not included in the license. Make sure that you are using the correct license file.

License server: Error 10048

The license server fails to start with error message 10048.

Error number 10048 indicates that the license server could not open the socket at the designated port (30323), because the port is already in use.
It is possible that an old license server is still running, possibly in the background. If that is not the case, check whether any other process is using that port.

Version mismatch: Invalid LuciadFusion license: (xxx,yyy)

A license file for the product with serial number yyy is being used with a product with serial number xxx. This typically happens when the product is updated and the license is not, or the other way around. When one is updated, the other needs to be updated as well.

Native library error messages

Can’t load native library. Please make sure you have the proper permissions.

Make sure that your Java application has the necessary permissions to execute native code. The Java environment provides the permissions.

Can’t find native library [LcdUtil2]. Please check your shared library path.

LuciadFusion uses the native library in this error message to connect to a license hardware key. You can find some general information in Installing the license hardware key.

The message indicates one of these problems:

  • The native library path of your application is set incorrectly.

  • One or more native jars are missing from the class path.

  • You are using an incorrect version of the native library.

Make sure that all native jars for your platform are present on the class path, specifically lcdutil-*-native.*.jar. Verify that java.library.path is set to the 'empty string'. Note that this is different from not setting it, which will cause the JVM to assign it a platform-dependent default value.

You can test the license file by placing it in the directory licenses and then running a sample such as the decoder sample.

Can’t find native method. Please check if the native method names haven’t changed.

If you obfuscated your application for deployment, make sure that you haven’t obfuscated native method names. Refer to the documentation of your obfuscation tool, or to the sample configuration files in the LuciadFusion distribution.

iButton error messages

Can’t connect to LuciadFusion iButton key.

Make sure that:

  1. The hardware key is properly plugged in.

  2. LuciadFusion can find the iButton.

If the suggestions in the license support articles fail, check for hardware problems:

  • Try a different computer.

  • Check for a bad iButton contact: the key consists of a black or blue adapter, containing a round, battery-like cell. The cell is the actual iButton.
    Make sure that the iButton does not have a bad contact inside the black or blue adapter.

  • Malfunctioning iButton: if the hardware key is not detected on different ports and different computers, it is probably broken. Static electricity is a likely cause. iButtons are very sturdy, so it is typically the adapter that is at fault.
    For a quick solution, contact Luciad customer services to ask for a replacement adapter in which you can insert the original iButton yourself. Your license files remain valid for the replacement adapter.

You don’t seem to have the proper LuciadFusion iButton key, sorry (code = …​)

The application can connect to the hardware key, but the hardware key does not match the license file. The license file specifies the matching hardware key, but the application finds a different key, identified by the code in the error message. Make sure that you are working with the hardware key that matches your license file.
If you want to keep using this hardware key, please contact us to request a new license file that matches the hardware key.

Other messages

Can’t find MAC address of this host

This typically indicates that the MAC address discovery using the lcdutil native library fails on your platform. You can resolve this by disabling the use of this native library for MAC address discovery using the Java system property luciad.license.nativeMacAddressDiscovery=false.

Please package your LuciadFusion application in a jar before deploying it

You are using a deployment license which requires your application to be packaged in one or more jar files. Please adjust your build script so that your application is packaged in one or more jar files.

Impossible time. Please check your system clock (code = …​)

The system clock of the host computer is not set correctly.

  • If the clock is incorrect, set it correctly. If the clock has been set back a couple of hours, the message should go away in due course.

  • The problem may also occur if the project has been compiled on a system other than the target system, with a distinct clock setting.
    Synchronize the clocks of both systems, or rebuild the project on the target system.

Tips for dealing with license and iButton problems

How to check whether a license is available

You can use this sample code to check if a license is available:

Program: License check
try {
  // Access the application a first time.
  TLcdCopyright.setCopyright("Test");

  System.out.println("Got a license.");
} catch (TLcdLicenseError ex) {
  System.out.println("Couldn't get a license.");
}

The license check works with checks on expiry date, IP address, iButton, and so on. It behaves the same for development licenses and for deployment licenses.

This code works with floating licenses (note that it will claim a license if one’s available):

Program: Floating license check
try {
  // Access the application a first time.
  TLcdCopyright.setCopyright("Test");

  // Wait a second, to know for sure if we have received
  // a floating license.
  try {
    System.out.println("Waiting for a floating license...");
    Thread.sleep(1000L);
  } catch (InterruptedException e) {}

  // Access the application a second time.
  TLcdOutOfBoundsException.getSharedInstance();

  System.out.println("Got a license.");
} catch (TLcdLicenseError ex) {
  System.out.println("Couldn't get a license.");
}

The floating license code is slightly more complicated, because a floating license is sent across a network. LuciadFusion does not wait for it, but checks it in the background. This may mean that the lack of available licenses is only discovered after some time, when the application has already started. The code in Program: Floating license check waits for 1 second before proceeding. On slow networks, this might be insufficient.

You cannot use this technique to check if an optional product component is available. For instance, you might be tempted to instantiate a class of the optional component, and disable optional functionality if a LicenseError is thrown. That won’t work. The fact that a LicenseError is thrown causes all other functionality of the Luciad product to stop working as well.

The application hangs when starting up with an iButton

It is possible that an unknown device on the serial port is confusing the driver.
To resolve the confusion, explicitly specify the type of key with the Java system property luciadmap.ibutton, using the value serial or usb, for example:
java -Dluciadmap.ibutton=usb.