'Hibernate query hangs on one machine only

I have a Java application deployed on Glassfish server. During the move from one Windows 7 to another PC with Windows 10 I have encountered a very strange problem. As I launch local dev environment, connecting to the same database, with the same versions of war artifacts, on the new machine, everything seems to be working fine, but when I try to access one function, it just freezes. No error messages, the http request is never answered.

I connected to the debug port on Glassfish and tracked down exactly the line that never executes. It's the hibernate Query object .list() method. It's supposed to execute a SELECT.

I tried deploying artefacts, tried different versions, confirmed that they ARE being deployed, added logging to make sure that the code stops where I think it does, no change in the behavior.

The same artifact, copied to my old machine works without a problem. The difference between environments, aside from OS, is the fact that new machine is connecting via VPN, while the old one is on the local network, however I don't think this could matter, as obviously the connection to DB is established.

Environment:

  • Glassfish 2.1.1
  • Java 1.8
  • Hibernate version: 5.4.21
  • DB: JNDI Oracle
  • JDBC version: 19.3.0.0


Solution 1:[1]

Looking at the supported operating systems for Glassfish 2.1.1, it does not list Windows 10. I would not trust the server to behave consistently on the new system and would recommend trying to run Glassfish on a supported operating system (or upgrading to a version of Glassfish that is not 13 years old)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1