Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An Implementation is missing at runtime #38

Closed
mathieuleclaire opened this issue Oct 29, 2014 · 7 comments
Closed

An Implementation is missing at runtime #38

mathieuleclaire opened this issue Oct 29, 2014 · 7 comments

Comments

@mathieuleclaire
Copy link

Hi,
I use upickle through autowire in a scalatra client/server application.
My server depends on JVM stuff (for autowire, upickle, ...) and my client one on JS stuff (for autowire, upickle, ...).

Everything compiles and runs fine, except when I do a request through autowire, I get a weird exeception when upickle reads the JSON data. Is some lib or something is missing ?
Thanks

scala.NotImplementedError: an implementation is missing
    at scala.Predef$.$qmark$qmark$qmark(Predef.scala:225)
    at scala.scalajs.js.JSON$.parse$default$2(JSON.scala:33)
    at upickle.json.package$.read(package.scala:20)
    at upickle.Types$class.read(Types.scala:135)
    at upickle.package$.read(package.scala:10)
    at org.openmole.gui.server.core.GUIServlet$$anonfun$2.apply(GUIServlet.scala:69)
    at org.openmole.gui.server.core.GUIServlet$$anonfun$2.apply(GUIServlet.scala:65)
@lihaoyi
Copy link
Member

lihaoyi commented Oct 29, 2014

Youre using the js version of upickle on the jvm
On Oct 29, 2014 9:03 AM, "Mathieu" notifications@github.com wrote:

Hi,
I use upickle through autowire in a scalatra client/server application.
My server depends on JVM stuff (for autowire, upickle, ...) and my client
one on JS stuff (for autowire, upickle, ...).

Everything compiles and runs fine, except when I do a request through
autowire, I get a weird exeception when upickle reads the JSON data. Is
some lib or something is missing ?
Thanks

scala.NotImplementedError: an implementation is missing
at scala.Predef$.$qmark$qmark$qmark(Predef.scala:225)
at scala.scalajs.js.JSON$.parse$default$2(JSON.scala:33)
at upickle.json.package$.read(package.scala:20)
at upickle.Types$class.read(Types.scala:135)
at upickle.package$.read(package.scala:10)
at org.openmole.gui.server.core.GUIServlet$$anonfun$2.apply(GUIServlet.scala:69)
at org.openmole.gui.server.core.GUIServlet$$anonfun$2.apply(GUIServlet.scala:65)


Reply to this email directly or view it on GitHub
#38.

@mathieuleclaire
Copy link
Author

No, I do use upickle JVM for my server and upickle JS for my client !
It is the only explanation that can causes this kind of error according to you ?

@lihaoyi
Copy link
Member

lihaoyi commented Oct 29, 2014

Yeah, can't think of anything else. The stack trace is definitely showing
upickle-JS methods I. A JVM stacktrace
On Oct 29, 2014 9:28 AM, "Mathieu" notifications@github.com wrote:

No, I do use upickle JVM for my server and upickle JS for my client !
It is the only explanation that can causes this kind of error according to
you ?


Reply to this email directly or view it on GitHub
#38 (comment).

@mathieuleclaire
Copy link
Author

Well, from the stacktrace, we have:

at upickle.package$.read(package.scala:10) //it is in jvm: jvm/src/main/scala/upickle/json/package.scala, then
at upickle.Types$class.read(Types.scala:135) //it is in shared/main/scala/upickle/Types.scala and then
at upickle.json.package$.read(package.scala:20) //it is in js/src/main/scala/upickle/json/package.scala !!

So my first call is well to the jvm lib, and then after 2 calls in upickle, we are in js part ... is this behaviour normal !?

@lihaoyi
Copy link
Member

lihaoyi commented Oct 30, 2014

Can you come up with a minimal example without your funky servlet container? I bet when you do the problem will become self evident.

@lihaoyi
Copy link
Member

lihaoyi commented Nov 14, 2014

Closing due to inactivity

@lihaoyi lihaoyi closed this as completed Nov 14, 2014
@shengc
Copy link

shengc commented Jul 13, 2015

I had similar issue - turns out it is because jvm depends on js, which brings in all dependencies of js to jvm which includes js version of upickle. You can use projectDependencies to explicitly exclude js upickle from the classpath of jvm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants