Score:0

Java Application (Tomcat) unable to locate license file after Windows Server 2016 in-place upgrade

bd flag

Description

Hello ServerFault community,

We recently performed an in-place upgrade from Windows Server 2012 R2 to Windows Server 2016, on which Apache Tomcat 8.5 is running. After the upgrade, we encountered an issue with finding the license file for one of our applications running on Tomcat. (before the upgrade this worked fine) Whenever the license file cannot be found, a prompt is displayed in the application where we can enter the file path. After entering the correct path (we tested the output with some complete wrong paths), we see the following log messages:

Replaced some details with *******

net.padlocksoftware.padlock.validator.ValidatorException: The license did not pass validation
        at net.padlocksoftware.padlock.validator.Validator.validate(Validator.java:349)
        at net.padlocksoftware.padlock.validator.Validator.validate(Validator.java:298)
        at com.webatus.wam.bo.Impl.LicenseManagerImpl.validate(LicenseManagerImpl.java:71)
        at com.webatus.wam.bo.Impl.LicenseManagerImpl.LoadLicenseFiles(LicenseManagerImpl.java:117)
        at com.webatus.wam.controller.LicenseController.handleRequestInternal(LicenseController.java:53)
        at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [dispatcher] in context with path [/********] threw exception
    java.io.FileNotFoundException: E:\Tomcat8\temp\**********\license (Access is denied)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at org.apache.commons.fileupload.disk.DiskFileItem.write(DiskFileItem.java:426)
        at com.webatus.wam.bo.Impl.LicenseManagerImpl.saveLicenseFile(LicenseManagerImpl.java:93)
        at com.webatus.wam.controller.LicenseController.handleRequestInternal(LicenseController.java:40)
        at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

Environment Information:

Operating System: Windows Server 2016 Apache Tomcat Version: 8.5 Application: Can't disclose the name of the application. (The company that made the application is no longer in business and cannot help us with this issue)

What we have tried so far:

  • Installing different versions (Windows 2022, 2019, 2019)
  • We have checked the paths and filenames to ensure their correctness.
  • We have verified the permissions on the directories and the license file, ensuring that the appropriate users have access. We tried multiple logical combinations of permissions, including giving full control to Everyone.
  • We have tried running the tomcat service as a different user, including the local administrator account.
  • We tried running the tomcat service trough the command line as administrator.
  • We have examined the Tomcat configuration files to ensure there are no missing references to the license file.
  • We checked the directory permissions / service settings with the production server that is still running on Windows Server 2012. The setup is as far as we can see identical, but the license file is found on the production server.

Expected Outcome:

Our goal is to successfully load the license file in the application after upgrading to Windows Server 2016. We would like to know if there are any specific configuration changes we need to make in Tomcat or in the Windows Server environment to resolve the issue. Are there any typical things you should check when encountering this type of problem?

We appreciate any help and suggestions you can provide to assist us in resolving this problem.

Thank you!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.