Handle Error: InetAddress.getLocalHost().getHostName() UnknownHostException results in NoClassDefFoundError

Description

If the linux network is not correct configured then (see http://mytechrantings.blogspot.de/2013/05/how-to-resolve-javanetunknownhostexcept.html) InetAddress.getLocalHost().getHostName() throws an UnknownHostException which results in a NoClassDefFoundError (!!!) in the static initializer, the first is not catched and converted here https://github.com/liquibase/liquibase/blob/6d61d03b775add9e2300b70912c5b906577bd0c1/liquibase-core/src/main/java/liquibase/sqlgenerator/core/LockDatabaseChangeLogGenerator.java#L28.

A potential other issue can be found in https://github.com/liquibase/liquibase/blob/d45597968c62a008f32c8eed1a39adbfd6cd2a42/liquibase-core/src/main/java/liquibase/integration/servlet/LiquibaseServletListener.java.

Solution: check if the full qualified hostname is really needed or a better default can be used (UUID/Hostip).

Environment

Linux, Java 1.6

Reporter

BI

Components

Fix versions

Affects versions

Priority

Major
Configure