Closed
Description
Request Type
Bug
Problem Description
TheHive doesn't bind to 9000/tcp.
Logs stops after from org.reflections.Reflections in main - Reflections took 536 ms to scan 1 urls, producing 133 keys and 2057 values
With further investigation, an error occurs in database initialisation:
java.lang.ExceptionInInitializerError: null
at org.janusgraph.graphdb.database.management.ModifierType.<clinit>(ModifierType.java:23)
at org.janusgraph.graphdb.database.management.ManagementSystem.setConsistency(ManagementSystem.java:1268)
at org.thp.thehive.models.TheHiveSchemaDefinition.$anonfun$operations$7(TheHiveSchemaDefinition.scala:48)
Caused by: java.lang.NullPointerException: null
at org.janusgraph.graphdb.database.management.ModifierType.values(ModifierType.java:22)
at org.janusgraph.graphdb.types.TypeDefinitionCategory.<clinit>(TypeDefinitionCategory.java:84)
at org.janusgraph.graphdb.database.management.ModifierType.<clinit>(ModifierType.java:23)
at org.janusgraph.graphdb.database.management.ManagementSystem.setConsistency(ManagementSystem.java:1268)
at org.thp.thehive.models.TheHiveSchemaDefinition.$anonfun$operations$7(TheHiveSchemaDefinition.scala:48)
The class ModifierType from JanusGraph uses the class TypeDefinitionCategory (also from JanusGraph) during its class initialisation. But TypeDefinitionCategory also uses the class ModifierType during class initialisation. In some circumstances (not completely understood), this situation implies a NullPointerException.
Steps to Reproduce
The occurrence of this error depends of initialisation order.
Possible Solutions
Force initialisation of TypeDefinitionCategory before ModifierType