Re: jar import issues
I've compiled my code against 2.11.8 and still couldn't import via magic with the same error. Neither toree_opts worked, but the solution from here did: https://www.mail-archive.com/dev@toree.incubator.apache.org/msg01649.html --spark_opts="--jars=/usr/tmp/jars/CustomJar.jar" On Mon, May 21, 2018 at 3:50 AM, Marius van Niekerk < marius.v.niek...@gmail.com> wrote: > Making toree work under scala 2.12 will require recompiling toree as well > as probably some changes to the interpreter code. > > On Sat, May 19, 2018, 08:48 Igor Fialkowrote: > > > Thanks, I'm using toree 0.2-dev prebuilt. I'll try to compile myself > while > > keeping the scala version same across the parts and report back. > > > > Could you please confirm that I'm using the 'toree_opts' correctly, > because > > they don't seem to be parsed. (No debug-level output and no message about > > that the jar in path was loaded or not) > > > > sudo jupyter toree install --spark_home=/path/bin/spark-2.3.0 > > --toree_opts='--debug --jar-dir /path/target/scala-2.12' > > > > On Sat, May 19, 2018 at 3:32 AM, Luciano Resende > > wrote: > > > > > Current master, which is the one supporting Spark 2.x is currently > > compiled > > > with Scala 2.11. Also, if you are using Scala 2.12, you should make > sure > > > that both Spark and Toree gets compiled properly with Scala 2.12 as I > > > believe Spark still provide binaries compiled with Scala 2.11. > > > > > > On Fri, May 18, 2018 at 3:39 PM, Igor Fialko > > wrote: > > > > > > > Hello community, > > > > > > > > name is Igor and I'm working in my spare time on a trading system. So > > > far I > > > > used jupyter notebook with python kernel for visualisation/playing > > around > > > > with data. I wanted to go a step forward and reuse my existing scala > > > code, > > > > so I came up with toree as seemingly the only one still maintained > > > jupyter > > > > kernel. > > > > > > > > Therefore I've assembled a jar via sbt and tried to add it in the > > > notebook. > > > > It has failed with an exact same error as here. > > > > > > > > https://stackoverflow.com/questions/46403426/adding- > > > > dependency-to-apache-toree-fails-on-import > > > > > > > > 2018-05-18 23:43:51 WARN MagicManager:111 - Magic AddJar failed to > > > execute > > > > with error: > > > > object Predef does not have a member classOf > > > > scala.reflect.internal.FatalError: object Predef does not have a > member > > > > classOf > > > > > > > > > > > > 2018-05-18 23:43:51 ERROR OneForOneStrategy:159 - object Predef does > > not > > > > have a member classOf > > > > scala.reflect.internal.FatalError: object Predef does not have a > member > > > > classOf > > > > > > > > So I've tried to import the jar via toree_opts like > > > > > > > > sudo jupyter toree install --spark_home=/path/bin/spark-2.3.0 > > > > --toree_opts='--jar-dir /path/target/scala-2.12' > > > > > > > > which didn't make any impact unfortunately (from source code I could > > see > > > > that it should print a message that jar could not be loaded, neither > > did > > > an > > > > import work). > > > > > > > > I could assume that it's maybe a scala version issue? My project is > > > > compiled against 2.12.3, I couldn't find scala version that toree is > > > using. > > > > > > > > Did somebody face this issue? How could I debug what is wrong? > > > > > > > > Thanks > > > > Best regards, > > > > Igor > > > > > > > > > > > > > > > > -- > > > Luciano Resende > > > http://twitter.com/lresende1975 > > > http://lresende.blogspot.com/ > > > > > > -- > regards > Marius van Niekerk >
Re: jar import issues
Current master, which is the one supporting Spark 2.x is currently compiled with Scala 2.11. Also, if you are using Scala 2.12, you should make sure that both Spark and Toree gets compiled properly with Scala 2.12 as I believe Spark still provide binaries compiled with Scala 2.11. On Fri, May 18, 2018 at 3:39 PM, Igor Fialkowrote: > Hello community, > > name is Igor and I'm working in my spare time on a trading system. So far I > used jupyter notebook with python kernel for visualisation/playing around > with data. I wanted to go a step forward and reuse my existing scala code, > so I came up with toree as seemingly the only one still maintained jupyter > kernel. > > Therefore I've assembled a jar via sbt and tried to add it in the notebook. > It has failed with an exact same error as here. > > https://stackoverflow.com/questions/46403426/adding- > dependency-to-apache-toree-fails-on-import > > 2018-05-18 23:43:51 WARN MagicManager:111 - Magic AddJar failed to execute > with error: > object Predef does not have a member classOf > scala.reflect.internal.FatalError: object Predef does not have a member > classOf > > > 2018-05-18 23:43:51 ERROR OneForOneStrategy:159 - object Predef does not > have a member classOf > scala.reflect.internal.FatalError: object Predef does not have a member > classOf > > So I've tried to import the jar via toree_opts like > > sudo jupyter toree install --spark_home=/path/bin/spark-2.3.0 > --toree_opts='--jar-dir /path/target/scala-2.12' > > which didn't make any impact unfortunately (from source code I could see > that it should print a message that jar could not be loaded, neither did an > import work). > > I could assume that it's maybe a scala version issue? My project is > compiled against 2.12.3, I couldn't find scala version that toree is using. > > Did somebody face this issue? How could I debug what is wrong? > > Thanks > Best regards, > Igor > -- Luciano Resende http://twitter.com/lresende1975 http://lresende.blogspot.com/
Re: jar import issues
Toree 0.1 is compiled against scala 2.10 On Fri, May 18, 2018, 18:39 Igor Fialkowrote: > Hello community, > > name is Igor and I'm working in my spare time on a trading system. So far I > used jupyter notebook with python kernel for visualisation/playing around > with data. I wanted to go a step forward and reuse my existing scala code, > so I came up with toree as seemingly the only one still maintained jupyter > kernel. > > Therefore I've assembled a jar via sbt and tried to add it in the notebook. > It has failed with an exact same error as here. > > > https://stackoverflow.com/questions/46403426/adding-dependency-to-apache-toree-fails-on-import > > 2018-05-18 23:43:51 WARN MagicManager:111 - Magic AddJar failed to execute > with error: > object Predef does not have a member classOf > scala.reflect.internal.FatalError: object Predef does not have a member > classOf > > > 2018-05-18 23:43:51 ERROR OneForOneStrategy:159 - object Predef does not > have a member classOf > scala.reflect.internal.FatalError: object Predef does not have a member > classOf > > So I've tried to import the jar via toree_opts like > > sudo jupyter toree install --spark_home=/path/bin/spark-2.3.0 > --toree_opts='--jar-dir /path/target/scala-2.12' > > which didn't make any impact unfortunately (from source code I could see > that it should print a message that jar could not be loaded, neither did an > import work). > > I could assume that it's maybe a scala version issue? My project is > compiled against 2.12.3, I couldn't find scala version that toree is using. > > Did somebody face this issue? How could I debug what is wrong? > > Thanks > Best regards, > Igor > -- regards Marius van Niekerk
jar import issues
Hello community, name is Igor and I'm working in my spare time on a trading system. So far I used jupyter notebook with python kernel for visualisation/playing around with data. I wanted to go a step forward and reuse my existing scala code, so I came up with toree as seemingly the only one still maintained jupyter kernel. Therefore I've assembled a jar via sbt and tried to add it in the notebook. It has failed with an exact same error as here. https://stackoverflow.com/questions/46403426/adding-dependency-to-apache-toree-fails-on-import 2018-05-18 23:43:51 WARN MagicManager:111 - Magic AddJar failed to execute with error: object Predef does not have a member classOf scala.reflect.internal.FatalError: object Predef does not have a member classOf 2018-05-18 23:43:51 ERROR OneForOneStrategy:159 - object Predef does not have a member classOf scala.reflect.internal.FatalError: object Predef does not have a member classOf So I've tried to import the jar via toree_opts like sudo jupyter toree install --spark_home=/path/bin/spark-2.3.0 --toree_opts='--jar-dir /path/target/scala-2.12' which didn't make any impact unfortunately (from source code I could see that it should print a message that jar could not be loaded, neither did an import work). I could assume that it's maybe a scala version issue? My project is compiled against 2.12.3, I couldn't find scala version that toree is using. Did somebody face this issue? How could I debug what is wrong? Thanks Best regards, Igor