Argonaut Json parser causes ClassCastException #157

Closed
julien-truffaut opened this Issue Dec 29, 2014 · 8 comments

Comments

Projects
None yet
3 participants
@julien-truffaut
Contributor

julien-truffaut commented Dec 29, 2014

I wrote 2 EntityDecoder, one using ArgonautSupport.json and one using argonaut.Parse. The latter is working but the first one generates the following error: java.lang.ClassCastException: scala.Some cannot be cast to argonaut.Json

def jsonEntityDecoder[A](implicit ev: DecodeJson[A]): EntityDecoder[A] =
    ArgonautSupport.json.map(json =>
      ev.decodeJson(json).fold(
        (message, history) => sys.error(s"Could not decode json $json, error: $message, cursor: $history"),
        identity
      )
    )

  def jsonEntityDecoder2[A](implicit ev: DecodeJson[A]): EntityDecoder[A] =
    EntityDecoder.decodeBy(MediaType.`application/json`){msg =>
      org.http4s.DecodeResult.apply(EntityDecoder.decodeString(msg).map{s =>
        Parse.parse(s).fold(
          m => ParseResult.fail(s"Cannot parse string $s into json, error: $m"),
          ParseResult.success
        ).flatMap(json =>
          ev.decodeJson(json).fold(
            (m, h) => ParseResult.fail(s"Cannot parse json $json, error: $m $h"),
            ParseResult.success
          )
        )
      })
    }

I am sure we can reproduce the error without DecodeJson but I didn't have the time to do so

@julien-truffaut julien-truffaut added the bug label Dec 29, 2014

@julien-truffaut julien-truffaut changed the title from Argonaut Json parser generates ClassCastException to Argonaut Json parser causes ClassCastException Dec 29, 2014

@bryce-anderson

This comment has been minimized.

Show comment
Hide comment
@bryce-anderson

bryce-anderson Dec 29, 2014

Member

A stack trace would be useful in diagnosing this; could you post it?

Member

bryce-anderson commented Dec 29, 2014

A stack trace would be useful in diagnosing this; could you post it?

@julien-truffaut

This comment has been minimized.

Show comment
Hide comment
@julien-truffaut

julien-truffaut Dec 30, 2014

Contributor

sure

java.lang.ClassCastException: scala.Some cannot be cast to argonaut.Json
    at jawn.support.argonaut.Parser$$anon$1.jint(Parser.scala:14)
    at jawn.support.argonaut.Parser$$anon$1.jint(Parser.scala:9)
    at jawn.Parser$class.parseNum(Parser.scala:163)
    at jawn.AsyncParser.parseNum(AsyncParser.scala:60)
    at jawn.Parser$class.rparse(Parser.scala:343)
    at jawn.AsyncParser.rparse(AsyncParser.scala:60)
    at jawn.AsyncParser.churn(AsyncParser.scala:213)
    at jawn.AsyncParser.finish(AsyncParser.scala:98)
    at jawnstreamz.package$$anonfun$parseJson$1$$anonfun$apply$2.apply(package.scala:31)
    at jawnstreamz.package$$anonfun$parseJson$1$$anonfun$apply$2.apply(package.scala:31)
    at scalaz.stream.Process$$anonfun$onComplete$1.apply(Process.scala:331)
    at scalaz.stream.Process$$anonfun$onComplete$1.apply(Process.scala:331)
    at scalaz.stream.Process$$anonfun$1$$anonfun$apply$3$$anonfun$apply$4.apply(Process.scala:106)
    at scalaz.stream.Process$$anonfun$1$$anonfun$apply$3$$anonfun$apply$4.apply(Process.scala:106)
    at scalaz.stream.Util$.Try(Util.scala:42)
    at scalaz.stream.Process$$anonfun$1$$anonfun$apply$3.apply(Process.scala:106)
    at scalaz.stream.Process$$anonfun$1$$anonfun$apply$3.apply(Process.scala:106)
    at scalaz.Trampoline$$anonfun$delay$1.apply(Free.scala:234)
    at scalaz.Trampoline$$anonfun$delay$1.apply(Free.scala:234)
    at scalaz.Free$$anonfun$run$1.apply(Free.scala:172)
    at scalaz.Free$$anonfun$run$1.apply(Free.scala:172)
    at scalaz.Free.go2$1(Free.scala:119)
    at scalaz.Free.go(Free.scala:122)
    at scalaz.Free.run(Free.scala:172)
    at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:75)
    at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:75)
    at scalaz.stream.Util$.Try(Util.scala:42)
    at scalaz.stream.Process$class.go$1(Process.scala:75)
    at scalaz.stream.Process$class.step(Process.scala:88)
    at scalaz.stream.Process$Append.step(Process.scala:611)
    at scalaz.stream.Process$$anonfun$suspendStep$1.apply(Process.scala:97)
    at scalaz.stream.Process$$anonfun$suspendStep$1.apply(Process.scala:96)
    at scalaz.stream.Process$$anonfun$1$$anonfun$apply$3$$anonfun$apply$4.apply(Process.scala:106)
    at scalaz.stream.Process$$anonfun$1$$anonfun$apply$3$$anonfun$apply$4.apply(Process.scala:106)
    at scalaz.stream.Util$.Try(Util.scala:42)
    at scalaz.stream.Process$$anonfun$1$$anonfun$apply$3.apply(Process.scala:106)
    at scalaz.stream.Process$$anonfun$1$$anonfun$apply$3.apply(Process.scala:106)
    at scalaz.Trampoline$$anonfun$delay$1.apply(Free.scala:234)
    at scalaz.Trampoline$$anonfun$delay$1.apply(Free.scala:234)
    at scalaz.std.FunctionInstances$$anon$1$$anonfun$map$1.apply(Function.scala:56)
    at scalaz.Free$$anonfun$run$1.apply(Free.scala:172)
    at scalaz.Free$$anonfun$run$1.apply(Free.scala:172)
    at scalaz.Free.go2$1(Free.scala:119)
    at scalaz.Free.go(Free.scala:122)
    at scalaz.Free.run(Free.scala:172)
    at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:75)
    at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:75)
    at scalaz.stream.Util$.Try(Util.scala:42)
    at scalaz.stream.Process$class.go$1(Process.scala:75)
    at scalaz.stream.Process$class.step(Process.scala:88)
    at scalaz.stream.Process$Append.step(Process.scala:611)
    at scalaz.stream.Process$$anonfun$pipe$1.apply(Process.scala:134)
    at scalaz.stream.Process$$anonfun$pipe$1.apply(Process.scala:130)
    at scalaz.stream.Process$$anonfun$flatMap$1.apply(Process.scala:40)
    at scalaz.stream.Process$$anonfun$flatMap$1.apply(Process.scala:40)
    at scalaz.stream.Util$.Try(Util.scala:42)
    at scalaz.stream.Process$class.flatMap(Process.scala:40)
    at scalaz.stream.Process$Emit.flatMap(Process.scala:571)
    at scalaz.stream.Process$$anonfun$flatMap$4.apply(Process.scala:42)
    at scalaz.stream.Process$$anonfun$flatMap$4.apply(Process.scala:42)
    at scalaz.Free$$anonfun$map$1.apply(Free.scala:52)
    at scalaz.Free$$anonfun$map$1.apply(Free.scala:52)
    at scalaz.Free.resume(Free.scala:73)
    at scalaz.Free.go2$1(Free.scala:118)
    at scalaz.Free.go(Free.scala:122)
    at scalaz.Free.run(Free.scala:172)
    at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:75)
    at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:75)
    at scalaz.stream.Util$.Try(Util.scala:42)
    at scalaz.stream.Process$class.go$1(Process.scala:75)
    at scalaz.stream.Process$class.step(Process.scala:88)
    at scalaz.stream.Process$Append.step(Process.scala:611)
    at scalaz.stream.Process$class.go$3(Process.scala:464)
    at scalaz.stream.Process$$anonfun$go$3$3.apply(Process.scala:473)
    at scalaz.stream.Process$$anonfun$go$3$3.apply(Process.scala:472)
    at scalaz.concurrent.Task$$anonfun$flatMap$1$$anonfun$1.apply(Task.scala:36)
    at scalaz.concurrent.Task$$anonfun$flatMap$1$$anonfun$1.apply(Task.scala:36)
    at scalaz.concurrent.Task$.Try(Task.scala:379)
    at scalaz.concurrent.Task$$anonfun$flatMap$1.apply(Task.scala:36)
    at scalaz.concurrent.Task$$anonfun$flatMap$1.apply(Task.scala:34)
    at scalaz.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:59)
    at scalaz.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:59)
    at scalaz.concurrent.Future.step(Future.scala:111)
    at scalaz.concurrent.Future.listen(Future.scala:76)
    at scalaz.concurrent.Future$$anonfun$listen$1$$anonfun$apply$4.apply(Future.scala:80)
    at scalaz.concurrent.Future$$anonfun$listen$1$$anonfun$apply$4.apply(Future.scala:80)
    at scalaz.Free$$anonfun$map$1.apply(Free.scala:52)
    at scalaz.Free$$anonfun$map$1.apply(Free.scala:52)
    at scalaz.Free.resume(Free.scala:73)
    at scalaz.Free.go2$1(Free.scala:118)
    at scalaz.Free.go(Free.scala:122)
    at scalaz.Free.run(Free.scala:172)
    at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:363)
    at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:363)
    at org.http4s.blaze.Http1Stage$$anonfun$1.org$http4s$blaze$Http1Stage$class$$anonfun$$go$1(Http1Stage.scala:136)
    at org.http4s.blaze.Http1Stage$$anonfun$1.apply(Http1Stage.scala:154)
    at org.http4s.blaze.Http1Stage$$anonfun$1.apply(Http1Stage.scala:131)
    at scalaz.concurrent.Future$$anonfun$async$1.apply(Future.scala:363)
    at scalaz.concurrent.Future$$anonfun$async$1.apply(Future.scala:363)
    at scalaz.concurrent.Future.listen(Future.scala:80)
    at scalaz.concurrent.Future$$anonfun$listen$1$$anonfun$apply$4.apply(Future.scala:80)
    at scalaz.concurrent.Future$$anonfun$listen$1$$anonfun$apply$4.apply(Future.scala:80)
    at scalaz.Free$$anonfun$map$1.apply(Free.scala:52)
    at scalaz.Free$$anonfun$map$1.apply(Free.scala:52)
    at scalaz.Free.resume(Free.scala:73)
    at scalaz.Free.go2$1(Free.scala:118)
    at scalaz.Free.go(Free.scala:122)
    at scalaz.Free.run(Free.scala:172)
    at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:363)
    at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:363)
    at org.http4s.client.blaze.BlazeClient$$anonfun$prepare$1$$anonfun$org$http4s$client$blaze$BlazeClient$class$$anonfun$$tryClient$1$1.apply(BlazeClient.scala:46)
    at org.http4s.client.blaze.BlazeClient$$anonfun$prepare$1$$anonfun$org$http4s$client$blaze$BlazeClient$class$$anonfun$$tryClient$1$1.apply(BlazeClient.scala:38)
    at scalaz.concurrent.Future$$anonfun$runAsync$1.apply(Future.scala:143)
    at scalaz.concurrent.Future$$anonfun$runAsync$1.apply(Future.scala:143)
    at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:363)
    at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:363)
    at scalaz.concurrent.Future$$anonfun$runAsync$1.apply(Future.scala:143)
    at scalaz.concurrent.Future$$anonfun$runAsync$1.apply(Future.scala:143)
    at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:363)
    at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:363)
    at org.http4s.client.blaze.Http1ClientReceiver.org$http4s$client$blaze$Http1ClientReceiver$$requestLoop(Http1ClientReceiver.scala:102)
    at org.http4s.client.blaze.Http1ClientReceiver$$anonfun$readAndParse$1.apply(Http1ClientReceiver.scala:69)
    at org.http4s.client.blaze.Http1ClientReceiver$$anonfun$readAndParse$1.apply(Http1ClientReceiver.scala:68)
    at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Contributor

julien-truffaut commented Dec 30, 2014

sure

java.lang.ClassCastException: scala.Some cannot be cast to argonaut.Json
    at jawn.support.argonaut.Parser$$anon$1.jint(Parser.scala:14)
    at jawn.support.argonaut.Parser$$anon$1.jint(Parser.scala:9)
    at jawn.Parser$class.parseNum(Parser.scala:163)
    at jawn.AsyncParser.parseNum(AsyncParser.scala:60)
    at jawn.Parser$class.rparse(Parser.scala:343)
    at jawn.AsyncParser.rparse(AsyncParser.scala:60)
    at jawn.AsyncParser.churn(AsyncParser.scala:213)
    at jawn.AsyncParser.finish(AsyncParser.scala:98)
    at jawnstreamz.package$$anonfun$parseJson$1$$anonfun$apply$2.apply(package.scala:31)
    at jawnstreamz.package$$anonfun$parseJson$1$$anonfun$apply$2.apply(package.scala:31)
    at scalaz.stream.Process$$anonfun$onComplete$1.apply(Process.scala:331)
    at scalaz.stream.Process$$anonfun$onComplete$1.apply(Process.scala:331)
    at scalaz.stream.Process$$anonfun$1$$anonfun$apply$3$$anonfun$apply$4.apply(Process.scala:106)
    at scalaz.stream.Process$$anonfun$1$$anonfun$apply$3$$anonfun$apply$4.apply(Process.scala:106)
    at scalaz.stream.Util$.Try(Util.scala:42)
    at scalaz.stream.Process$$anonfun$1$$anonfun$apply$3.apply(Process.scala:106)
    at scalaz.stream.Process$$anonfun$1$$anonfun$apply$3.apply(Process.scala:106)
    at scalaz.Trampoline$$anonfun$delay$1.apply(Free.scala:234)
    at scalaz.Trampoline$$anonfun$delay$1.apply(Free.scala:234)
    at scalaz.Free$$anonfun$run$1.apply(Free.scala:172)
    at scalaz.Free$$anonfun$run$1.apply(Free.scala:172)
    at scalaz.Free.go2$1(Free.scala:119)
    at scalaz.Free.go(Free.scala:122)
    at scalaz.Free.run(Free.scala:172)
    at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:75)
    at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:75)
    at scalaz.stream.Util$.Try(Util.scala:42)
    at scalaz.stream.Process$class.go$1(Process.scala:75)
    at scalaz.stream.Process$class.step(Process.scala:88)
    at scalaz.stream.Process$Append.step(Process.scala:611)
    at scalaz.stream.Process$$anonfun$suspendStep$1.apply(Process.scala:97)
    at scalaz.stream.Process$$anonfun$suspendStep$1.apply(Process.scala:96)
    at scalaz.stream.Process$$anonfun$1$$anonfun$apply$3$$anonfun$apply$4.apply(Process.scala:106)
    at scalaz.stream.Process$$anonfun$1$$anonfun$apply$3$$anonfun$apply$4.apply(Process.scala:106)
    at scalaz.stream.Util$.Try(Util.scala:42)
    at scalaz.stream.Process$$anonfun$1$$anonfun$apply$3.apply(Process.scala:106)
    at scalaz.stream.Process$$anonfun$1$$anonfun$apply$3.apply(Process.scala:106)
    at scalaz.Trampoline$$anonfun$delay$1.apply(Free.scala:234)
    at scalaz.Trampoline$$anonfun$delay$1.apply(Free.scala:234)
    at scalaz.std.FunctionInstances$$anon$1$$anonfun$map$1.apply(Function.scala:56)
    at scalaz.Free$$anonfun$run$1.apply(Free.scala:172)
    at scalaz.Free$$anonfun$run$1.apply(Free.scala:172)
    at scalaz.Free.go2$1(Free.scala:119)
    at scalaz.Free.go(Free.scala:122)
    at scalaz.Free.run(Free.scala:172)
    at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:75)
    at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:75)
    at scalaz.stream.Util$.Try(Util.scala:42)
    at scalaz.stream.Process$class.go$1(Process.scala:75)
    at scalaz.stream.Process$class.step(Process.scala:88)
    at scalaz.stream.Process$Append.step(Process.scala:611)
    at scalaz.stream.Process$$anonfun$pipe$1.apply(Process.scala:134)
    at scalaz.stream.Process$$anonfun$pipe$1.apply(Process.scala:130)
    at scalaz.stream.Process$$anonfun$flatMap$1.apply(Process.scala:40)
    at scalaz.stream.Process$$anonfun$flatMap$1.apply(Process.scala:40)
    at scalaz.stream.Util$.Try(Util.scala:42)
    at scalaz.stream.Process$class.flatMap(Process.scala:40)
    at scalaz.stream.Process$Emit.flatMap(Process.scala:571)
    at scalaz.stream.Process$$anonfun$flatMap$4.apply(Process.scala:42)
    at scalaz.stream.Process$$anonfun$flatMap$4.apply(Process.scala:42)
    at scalaz.Free$$anonfun$map$1.apply(Free.scala:52)
    at scalaz.Free$$anonfun$map$1.apply(Free.scala:52)
    at scalaz.Free.resume(Free.scala:73)
    at scalaz.Free.go2$1(Free.scala:118)
    at scalaz.Free.go(Free.scala:122)
    at scalaz.Free.run(Free.scala:172)
    at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:75)
    at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:75)
    at scalaz.stream.Util$.Try(Util.scala:42)
    at scalaz.stream.Process$class.go$1(Process.scala:75)
    at scalaz.stream.Process$class.step(Process.scala:88)
    at scalaz.stream.Process$Append.step(Process.scala:611)
    at scalaz.stream.Process$class.go$3(Process.scala:464)
    at scalaz.stream.Process$$anonfun$go$3$3.apply(Process.scala:473)
    at scalaz.stream.Process$$anonfun$go$3$3.apply(Process.scala:472)
    at scalaz.concurrent.Task$$anonfun$flatMap$1$$anonfun$1.apply(Task.scala:36)
    at scalaz.concurrent.Task$$anonfun$flatMap$1$$anonfun$1.apply(Task.scala:36)
    at scalaz.concurrent.Task$.Try(Task.scala:379)
    at scalaz.concurrent.Task$$anonfun$flatMap$1.apply(Task.scala:36)
    at scalaz.concurrent.Task$$anonfun$flatMap$1.apply(Task.scala:34)
    at scalaz.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:59)
    at scalaz.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:59)
    at scalaz.concurrent.Future.step(Future.scala:111)
    at scalaz.concurrent.Future.listen(Future.scala:76)
    at scalaz.concurrent.Future$$anonfun$listen$1$$anonfun$apply$4.apply(Future.scala:80)
    at scalaz.concurrent.Future$$anonfun$listen$1$$anonfun$apply$4.apply(Future.scala:80)
    at scalaz.Free$$anonfun$map$1.apply(Free.scala:52)
    at scalaz.Free$$anonfun$map$1.apply(Free.scala:52)
    at scalaz.Free.resume(Free.scala:73)
    at scalaz.Free.go2$1(Free.scala:118)
    at scalaz.Free.go(Free.scala:122)
    at scalaz.Free.run(Free.scala:172)
    at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:363)
    at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:363)
    at org.http4s.blaze.Http1Stage$$anonfun$1.org$http4s$blaze$Http1Stage$class$$anonfun$$go$1(Http1Stage.scala:136)
    at org.http4s.blaze.Http1Stage$$anonfun$1.apply(Http1Stage.scala:154)
    at org.http4s.blaze.Http1Stage$$anonfun$1.apply(Http1Stage.scala:131)
    at scalaz.concurrent.Future$$anonfun$async$1.apply(Future.scala:363)
    at scalaz.concurrent.Future$$anonfun$async$1.apply(Future.scala:363)
    at scalaz.concurrent.Future.listen(Future.scala:80)
    at scalaz.concurrent.Future$$anonfun$listen$1$$anonfun$apply$4.apply(Future.scala:80)
    at scalaz.concurrent.Future$$anonfun$listen$1$$anonfun$apply$4.apply(Future.scala:80)
    at scalaz.Free$$anonfun$map$1.apply(Free.scala:52)
    at scalaz.Free$$anonfun$map$1.apply(Free.scala:52)
    at scalaz.Free.resume(Free.scala:73)
    at scalaz.Free.go2$1(Free.scala:118)
    at scalaz.Free.go(Free.scala:122)
    at scalaz.Free.run(Free.scala:172)
    at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:363)
    at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:363)
    at org.http4s.client.blaze.BlazeClient$$anonfun$prepare$1$$anonfun$org$http4s$client$blaze$BlazeClient$class$$anonfun$$tryClient$1$1.apply(BlazeClient.scala:46)
    at org.http4s.client.blaze.BlazeClient$$anonfun$prepare$1$$anonfun$org$http4s$client$blaze$BlazeClient$class$$anonfun$$tryClient$1$1.apply(BlazeClient.scala:38)
    at scalaz.concurrent.Future$$anonfun$runAsync$1.apply(Future.scala:143)
    at scalaz.concurrent.Future$$anonfun$runAsync$1.apply(Future.scala:143)
    at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:363)
    at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:363)
    at scalaz.concurrent.Future$$anonfun$runAsync$1.apply(Future.scala:143)
    at scalaz.concurrent.Future$$anonfun$runAsync$1.apply(Future.scala:143)
    at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:363)
    at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:363)
    at org.http4s.client.blaze.Http1ClientReceiver.org$http4s$client$blaze$Http1ClientReceiver$$requestLoop(Http1ClientReceiver.scala:102)
    at org.http4s.client.blaze.Http1ClientReceiver$$anonfun$readAndParse$1.apply(Http1ClientReceiver.scala:69)
    at org.http4s.client.blaze.Http1ClientReceiver$$anonfun$readAndParse$1.apply(Http1ClientReceiver.scala:68)
    at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

@bryce-anderson

This comment has been minimized.

Show comment
Hide comment
@bryce-anderson

bryce-anderson Dec 30, 2014

Member

I think we have classpath problems. We depend on argonaut 6.1-M5 and jawn depends on 6.0.4.

The stacktrace points to here which unfortunately doesn't include a full type signature, but should be of type Json. Unfortunately the type signature changed from Double => Json in argonaut 6.0.4 to Double => Option[Json] in 6.1-M5. This is probably your class cast exception.

I tried dropping our argonaut dep in the build and hoping to just pull it in with jawn, but I get other classpath related issues such as java.lang.IncompatibleClassChangeError: Found class scalaz.IndexedStoreT, but interface was expected which is almost certainly due to the migration of argonaut from scalaz 7.0.6 to 7.1.0.

So braking changes suck, but this isn't a problem we can fix in http4s; bummer. Someone could ask jawn for a new release?

Member

bryce-anderson commented Dec 30, 2014

I think we have classpath problems. We depend on argonaut 6.1-M5 and jawn depends on 6.0.4.

The stacktrace points to here which unfortunately doesn't include a full type signature, but should be of type Json. Unfortunately the type signature changed from Double => Json in argonaut 6.0.4 to Double => Option[Json] in 6.1-M5. This is probably your class cast exception.

I tried dropping our argonaut dep in the build and hoping to just pull it in with jawn, but I get other classpath related issues such as java.lang.IncompatibleClassChangeError: Found class scalaz.IndexedStoreT, but interface was expected which is almost certainly due to the migration of argonaut from scalaz 7.0.6 to 7.1.0.

So braking changes suck, but this isn't a problem we can fix in http4s; bummer. Someone could ask jawn for a new release?

@rossabaker

This comment has been minimized.

Show comment
Hide comment
@rossabaker

rossabaker Dec 30, 2014

Member

Worst case, I should be able to republish an upgraded argonaut-support against the current jawn release, but let's see what Erik wants to do on the ticket above.

Member

rossabaker commented Dec 30, 2014

Worst case, I should be able to republish an upgraded argonaut-support against the current jawn release, but let's see what Erik wants to do on the ticket above.

@rossabaker

This comment has been minimized.

Show comment
Hide comment
@rossabaker

rossabaker Dec 30, 2014

Member

After non/jawn#23 is released, we can fix this with an upgrade.

Member

rossabaker commented Dec 30, 2014

After non/jawn#23 is released, we can fix this with an upgrade.

@rossabaker

This comment has been minimized.

Show comment
Hide comment
@rossabaker

rossabaker Jan 2, 2015

Member

Fix released as v0.5.2, on its way to Maven Central.

Member

rossabaker commented Jan 2, 2015

Fix released as v0.5.2, on its way to Maven Central.

@rossabaker rossabaker closed this Jan 2, 2015

@julien-truffaut

This comment has been minimized.

Show comment
Hide comment
Contributor

julien-truffaut commented Jan 2, 2015

thanks @rossabaker

rossabaker added a commit that referenced this issue Jan 5, 2015

@rossabaker

This comment has been minimized.

Show comment
Hide comment
@rossabaker

rossabaker Jan 5, 2015

Member

Released v0.5.3 with the above commit.

Member

rossabaker commented Jan 5, 2015

Released v0.5.3 with the above commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment