edulify / play-geolocation-module.edulify.com

This is a geolocation plugin for Playframework
https://edulify.github.io/play-geolocation-module.edulify.com/
Apache License 2.0
22 stars 11 forks source link

Can't get it running with play 2.4 #10

Closed shanness closed 8 years ago

shanness commented 8 years ago

Hi, I've been trying to get geolocation up and running with play 2.4 using the branch in your repo. I've had a few minor issues — I had to add the @Inject annotation to the plugin constructor (I tried using the Module instead of the Plugin but it doesnt seem ready yet). Once I did that I get this error:

Caused by: com.typesafe.config.ConfigException$IO: application: application.conf @ jar:file:/Volumes/ElCapitan/Users/joseph/.ivy2/local/com.edulify/geolocation_2.11/2.0.0/jars/geolocation_2.11.jar!/application.conf: read error: invalid block type, application.json: java.io.IOException: resource not found on classpath: application.json, application.properties: java.io.IOException: resource not found on classpath: application.properties
    at com.typesafe.config.impl.SimpleIncluder.fromBasename(SimpleIncluder.java:236) ~[config-1.3.0.jar:na]
    at com.typesafe.config.impl.ConfigImpl.parseResourcesAnySyntax(ConfigImpl.java:132) ~[config-1.3.0.jar:na]
    at com.typesafe.config.ConfigFactory.parseResourcesAnySyntax(ConfigFactory.java:1024) ~[config-1.3.0.jar:na]
    at com.typesafe.config.ConfigFactory.parseApplicationConfig(ConfigFactory.java:238) ~[config-1.3.0.jar:na]
    at com.typesafe.config.ConfigFactory.defaultApplication(ConfigFactory.java:519) ~[config-1.3.0.jar:na]
    at play.api.Configuration$$anonfun$3.apply(Configuration.scala:75) ~[play_2.11-2.4.4.jar:2.4.4]
    at play.api.Configuration$$anonfun$3.apply(Configuration.scala:71) ~[play_2.11-2.4.4.jar:2.4.4]
    at scala.Option.getOrElse(Option.scala:121) ~[scala-library-2.11.7.jar:na]
    at play.api.Configuration$.load(Configuration.scala:71) ~[play_2.11-2.4.4.jar:2.4.4]
    at play.api.Configuration$.load(Configuration.scala:133) ~[play_2.11-2.4.4.jar:2.4.4]
Caused by: com.typesafe.config.ConfigException$IO: application.conf @ jar:file:/Volumes/ElCapitan/Users/joseph/.ivy2/local/com.edulify/geolocation_2.11/2.0.0/jars/geolocation_2.11.jar!/application.conf: read error: invalid block type
    at com.typesafe.config.impl.Tokenizer$TokenIterator.nextCharRaw(Tokenizer.java:159) ~[config-1.3.0.jar:na]
    at com.typesafe.config.impl.Tokenizer$TokenIterator.nextCharAfterWhitespace(Tokenizer.java:211) ~[config-1.3.0.jar:na]
    at com.typesafe.config.impl.Tokenizer$TokenIterator.pullNextToken(Tokenizer.java:579) ~[config-1.3.0.jar:na]
    at com.typesafe.config.impl.Tokenizer$TokenIterator.queueNextToken(Tokenizer.java:660) ~[config-1.3.0.jar:na]
    at com.typesafe.config.impl.Tokenizer$TokenIterator.next(Tokenizer.java:678) ~[config-1.3.0.jar:na]
    at com.typesafe.config.impl.Tokenizer$TokenIterator.next(Tokenizer.java:63) ~[config-1.3.0.jar:na]
    at com.typesafe.config.impl.ConfigDocumentParser$ParseContext.popToken(ConfigDocumentParser.java:45) ~[config-1.3.0.jar:na]
    at com.typesafe.config.impl.ConfigDocumentParser$ParseContext.nextToken(ConfigDocumentParser.java:51) ~[config-1.3.0.jar:na]
    at com.typesafe.config.impl.ConfigDocumentParser$ParseContext.parse(ConfigDocumentParser.java:568) ~[config-1.3.0.jar:na]
    at com.typesafe.config.impl.ConfigDocumentParser.parse(ConfigDocumentParser.java:14) ~[config-1.3.0.jar:na]
Caused by: java.util.zip.ZipException: invalid block type
    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164) ~[na:1.8.0_60]
    at java.io.FilterInputStream.read(FilterInputStream.java:133) ~[na:1.8.0_60]
    at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284) ~[na:1.8.0_60]
    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326) ~[na:1.8.0_60]

This doesnt make a lot of sense to me. The jar file is fine… i can extract it myself and read application.conf successfully

sovaalexandr commented 8 years ago

@shanness Which part is not enough for the Module? Why it doesn't seem ready yet? Can you suggest how to improve it?

sovaalexandr commented 8 years ago

@shanness May be example will help you? When you using Module you should supply a provider with Guice by your application's root/main module

marcospereira commented 8 years ago

@shanness version 2.0.0 of the module was fully migrated to support Play 2.4.x. :-)

But I prefer to close this issue after you can give me some feedback if the new version works for you. Please, see the new docs (at the README.md) about how to use the module with Play 2.4.x.

marcospereira commented 8 years ago

BTW, @sovaalexandr thank you for the work that made this new release possible.

sovaalexandr commented 8 years ago

@marcoscardoso Welcome)