reference.conf: read error: invalid code lengths set

924 views
Skip to first unread message

Richard Rodseth

unread,
Feb 16, 2015, 8:46:23 PM2/16/15
to play-fr...@googlegroups.com

Hi

I just started using Play a few days ago.

I have a template which needs to refer to parameters of types defined in a library (of my own)

ie

@(serviceStatus: ServiceStatusDTO)

The library is already in the build file, and I have successfully used its classes in controllers.

However, I tried putting @import statements above the template parameters, and I also tried using the fully qualified class name in the template parameters.

In both cases, I got this error (stack crawl below)

Configuration error[reference.conf: read error: invalid code lengths set]

Any ideas?

Thanks

Richard

 @6l82ol218 - Internal server error, for (GET) [/status] ->

play.api.Configuration$$anon$1: Configuration error[reference.conf: read error: invalid code lengths set]

at play.api.Configuration$.play$api$Configuration$$configError(Configuration.scala:94) ~[play_2.10-2.3.7.jar:2.3.7]

at play.api.Configuration$.loadDev(Configuration.scala:35) ~[play_2.10-2.3.7.jar:2.3.7]

at play.api.Configuration$.load(Configuration.scala:64) ~[play_2.10-2.3.7.jar:2.3.7]

at play.api.WithDefaultConfiguration$$anonfun$initialConfiguration$1.apply(Application.scala:76) ~[play_2.10-2.3.7.jar:2.3.7]

at play.api.WithDefaultConfiguration$$anonfun$initialConfiguration$1.apply(Application.scala:76) ~[play_2.10-2.3.7.jar:2.3.7]

Caused by: com.typesafe.config.ConfigException$IO: reference.conf: read error: invalid code lengths set

at com.typesafe.config.impl.Tokenizer$TokenIterator.nextCharRaw(Tokenizer.java:147) ~[config-1.2.1.jar:na]

at com.typesafe.config.impl.Tokenizer$TokenIterator.nextCharAfterWhitespace(Tokenizer.java:200) ~[config-1.2.1.jar:na]

at com.typesafe.config.impl.Tokenizer$TokenIterator.pullNextToken(Tokenizer.java:546) ~[config-1.2.1.jar:na]

at com.typesafe.config.impl.Tokenizer$TokenIterator.queueNextToken(Tokenizer.java:627) ~[config-1.2.1.jar:na]

at com.typesafe.config.impl.Tokenizer$TokenIterator.next(Tokenizer.java:645) ~[config-1.2.1.jar:na]

Caused by: java.util.zip.ZipException: invalid code lengths set

at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164) ~[na:1.7.0_71]

at java.io.FilterInputStream.read(FilterInputStream.java:133) ~[na:1.7.0_71]

at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283) ~[na:1.7.0_71]

at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325) ~[na:1.7.0_71]

at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177) ~[na:1.7.0_71]

James Roper

unread,
Feb 16, 2015, 8:59:56 PM2/16/15
to play-framework
Hi Richard,

This error has nothing to do with your template, it means there's a corrupted jar file in your ivy cache.  Finding out which one may be difficult, if you could attach a debugger and step into the Typesafe config loading code, that would answer the question (unfortunately, typesafe config is not logging which reference.conf it was trying to load when it encountered the error).  The other solution is to nuke your ivy cache and try again - though whether this works or not will depend on how the corrupted file got in your ivy cache, if it's corrupted at the source, that won't help:

rm -rf ~/.ivy2/cache

Cheers,

James

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
James Roper
Software Engineer

Typesafe – Build reactive apps!
Twitter: @jroper

Richard Rodseth

unread,
Feb 16, 2015, 9:38:24 PM2/16/15
to play-fr...@googlegroups.com
Thank you very much. I cleared the cache, did activator run, and with the fully qualified class names my template is working.
Reply all
Reply to author
Forward
0 new messages