You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the method YamlConfigurationLoader.loadConfig() is not able to parse the YAML config file, it throws a ConfigurationException. For example:
org.apache.cassandra.exceptions.ConfigurationException: Invalid yaml: file:/Users/taataar2/workspace/ines-spark-services/ines-spark-apps/target/scala_2.12/cassandra_embedded_db/cu-cassandra-rndport.yaml
Error: Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=java.lang.reflect.InvocationTargetException
in 'reader', line 10, column 1:
cluster_name: 'Test Cluster'
^
This error message is misleading - a user may think, that the YAML config file is malformed. In my case, the real cause was an incompatible version of Guava library in the classpath:
Instead the constructor with the cause argument should be used. Then we could see the underlying exception, that caused the failure.
thrownewConfigurationException(msg, cause)
The text was updated successfully, but these errors were encountered:
tashoyan
changed the title
Misleading error message in YamlConfigurationLoader.loadConfig(): Invalid yaml
Misleading error message in YamlConfigurationLoader.loadConfig(): "Invalid yaml"
Feb 15, 2022
If the method
YamlConfigurationLoader.loadConfig()
is not able to parse the YAML config file, it throws aConfigurationException
. For example:This error message is misleading - a user may think, that the YAML config file is malformed. In my case, the real cause was an incompatible version of Guava library in the classpath:
The problem is, that the
ConfigurationException
misses the cause:Instead the constructor with the
cause
argument should be used. Then we could see the underlying exception, that caused the failure.The text was updated successfully, but these errors were encountered: