I am using Spring boot 2.1.1.RELEASE and castor 1.2. It starts fine, works as expected for few hours and then suddenly it starts getting the below error -
o.c.c.u.Configuration : Failed to load configuration from classpath: /org/castor/core/castor.core.properties
java.util.zip.ZipException: invalid code lengths set
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)
at org.springframework.boot.loader.jar.ZipInflaterInputStream.read(ZipInflaterInputStream.java:52)
at java.io.FilterInputStream.read(FilterInputStream.java:107)
at java.util.Properties$LineReader.readLine(Properties.java:435)
at java.util.Properties.load0(Properties.java:353)
at java.util.Properties.load(Properties.java:341)
at org.castor.core.util.Configuration.loadFromClassPath(Configuration.java:187)
at org.castor.core.util.Configuration.loadDefaultProperties(Configuration.java:136)
at org.castor.core.CoreConfiguration.<init>(CoreConfiguration.java:49)
at org.castor.xml.XMLConfiguration.newInstance(XMLConfiguration.java:58)
at org.castor.xml.AbstractInternalContext.<init>(AbstractInternalContext.java:121)
at org.castor.xml.BackwardCompatibilityContext.<init>(BackwardCompatibilityContext.java:45)
at org.exolab.castor.xml.Unmarshaller.<init>(Unmarshaller.java:206)
The jar is present inside BOOT-INF\lib\castor-1.2.jar\
Do we need to place /org/castor/core/castor.core.properties somewhere in the classpath to resolve this issue? Please suggest
Normally there should be a default properties file. As the manual says on https://castor-data-binding.github.io/castor/reference-guide/reference/xml/xml-properties.html you can provide that file in the classpath.