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

ClassNotFoundException in etlas repl after etlas build #812

Closed
jneira opened this issue Jul 13, 2018 · 3 comments · Fixed by #949
Closed

ClassNotFoundException in etlas repl after etlas build #812

jneira opened this issue Jul 13, 2018 · 3 comments · Fixed by #949
Labels
bug compiler priority:high repl Issues related to the REPL

Comments

@jneira
Copy link
Collaborator

jneira commented Jul 13, 2018

  • If you do a etlas clean && etlas build && etlas repl and then try to evaluate a function from some package module it throws an error. F.e. with wai-servlet-handler-jetty:
Prelude Network.Wai.Servlet.Examples Network.Wai.Servlet.Handler.Jetty> run 3000 appSimple
*** Exception: java.lang.RuntimeException: Failed during evalStmt of Eta REPL expression
        at eta.serv.REPLClassLoader.evalStmt(REPLClassLoader.java:253)
        at eta.serv.Utils.evalStmt(Utils.java:32)
        at eta_serv.eta.serv.Run$sat$21.applyV(Run.hs)
        at eta.runtime.exception.Exception.catch_(Exception.java:131)
        at eta_serv.eta.serv.Run$sat$20.applyV(Run.hs)
        at eta_serv.eta.serv.Run.$La4$1(Run.hs)
        at eta_serv.eta.serv.Run$sat$23.applyV(Run.hs)
        at eta.runtime.exception.Exception.unmaskAsyncExceptions(Exception.java:93)
        at eta_serv.eta.serv.Run$sat$19.applyV(Run.hs)
        at eta.runtime.exception.Exception.catch_(Exception.java:131)
        at eta_serv.eta.serv.Run$sat$18.applyV(Run.hs)
        at eta.runtime.stg.Closures$EvalLazyIO.enter(Closures.java:108)
        at eta.runtime.stg.Capability.schedule(Capability.java:183)
        at eta.runtime.concurrent.WorkerThread.run(WorkerThread.java:16)
Caused by: java.lang.RuntimeException: Failed during evalIOInternal of Eta REPL expression
        at eta.serv.REPLClassLoader.evalIOInternal(REPLClassLoader.java:381)
        at eta.serv.REPLClassLoader.evalStmt(REPLClassLoader.java:246)
        ... 13 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at eta.serv.REPLClassLoader.evalIOInternal(REPLClassLoader.java:379)
        ... 14 more
Caused by: java.lang.NoClassDefFoundError: wai_servlet_handler_jetty/network/wai/servlet/handler/Jetty
        at interactive.EtaRepl1_3$sat$3.thunkEnter(Interactive.hs)
        at eta.runtime.thunk.UpdatableThunk.evaluate(UpdatableThunk.java:19)
        at base.ghc.Base.id(Base.hs:964)
        at base.ghc.Base$id.apply1(Base.hs:964)
        at interactive.EtaRepl1_3$sat$2.thunkEnter(Interactive.hs)
        at eta.runtime.thunk.UpdatableThunk.evaluate(UpdatableThunk.java:19)
        at eta.runtime.thunk.Thunk.applyV(Thunk.java:120)
        at base.ghc.Base.bindIO1(Base.hs)
        at base.ghc.Base.bindIO(Base.hs:1067)
        at base.ghc.Base$bindIO.apply2V(Base.hs:1067)
        at eta.runtime.apply.PAPSlow.apply(PAPSlow.java:64)
        at eta.runtime.apply.PAPSlow.applyV(PAPSlow.java:112)
        at eta.runtime.thunk.Thunk.applyV(Thunk.java:120)
        at eta.runtime.exception.Exception.unmaskAsyncExceptions(Exception.java:93)
        at base.control.exception.Base$sat$25.applyV(Base.hs)
        at eta.runtime.exception.Exception.catch_(Exception.java:131)
        at base.control.exception.Base$sat$22.applyV(Base.hs:262)
        at eta.runtime.exception.Exception.maskAsyncExceptions(Exception.java:44)
        at base.control.exception.Base.bracket1(Base.hs:264)
        at base.system.Environment.withArgs1(Environment.hs)
        at base.system.Environment.withArgs(Environment.hs:150)
        at base.system.Environment$withArgs.apply2V(Environment.hs:150)
        at eta.runtime.apply.PAPSlow.apply(PAPSlow.java:64)
        at eta.runtime.apply.PAPSlow.applyV(PAPSlow.java:112)
        at eta.runtime.stg.Closures$EvalIO.enter(Closures.java:133)
        at eta.runtime.stg.Capability.schedule(Capability.java:183)
        at eta.runtime.stg.Capability.scheduleClosure(Capability.java:123)
        at eta.runtime.Runtime.evalIO(Runtime.java:358)
        ... 19 more
Caused by: java.lang.ClassNotFoundException: wai_servlet_handler_jetty.network.wai.servlet.handler.Jetty
        at java.net.URLClassLoader.findClass(Unknown Source)
        at eta.serv.REPLClassLoader$ChildREPLClassLoader.loadClass(REPLClassLoader.java:69)
        ... 47 more
  • If you do etlas clean && etlas repl the error is not thrown
@jneira
Copy link
Collaborator Author

jneira commented Feb 4, 2019

@rahulmutt has suggested that it could be a issue involving the compiler (i.e eta) and not (or not only) etlas

@jneira jneira added compiler and removed etlas labels Feb 5, 2019
@jneira
Copy link
Collaborator Author

jneira commented Mar 12, 2019

Maybe related with #805. Anyway they could be resolved in one shot

@rahulmutt
Copy link
Member

#805 is slightly different since that involves figuring out how to maintain a folder containing compiled class files and reloading them when there are changes to source .java files.

@jneira jneira pinned this issue Mar 12, 2019
@jneira jneira unpinned this issue Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug compiler priority:high repl Issues related to the REPL
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants