launch SBT as application inside Eclipse

48 views
Skip to first unread message

Ilyas Stéphane Türkben

unread,
Jun 4, 2011, 6:47:09 AM6/4/11
to simple-b...@googlegroups.com
Hello,

I would like to launch xsbt.boot.Boot class as an application inside eclipse.
Actually, I'm trying to reproduce the same command that my ~/bin/sbt script. Thus, i think I can debug my webapp by passing as args jetty-run command. 
Isn't it a good idea ?

I'm using sbt 0.10 but I can't avoid the following error:

java.lang.NullPointerException
at xsbt.boot.BootFilteredLoader.<init>(FilteredLoader.scala:28)
at xsbt.boot.Launch$JNAProvider.parentLoader(Launch.scala:102)
at xsbt.boot.Launch$JNAProvider.parentLoader(Launch.scala:93)
at xsbt.boot.Provider$initialize.createLoader(Provider.scala:57)
at xsbt.boot.Provider$initialize.call(Provider.scala:34)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:47)
at xsbt.boot.Locks$.apply0(Locks.scala:30)
at xsbt.boot.Locks$.apply(Locks.scala:27)
at scala.collection.Iterable$class.$init$(Proxy.scala:32)
at xsbt.boot.Launch$JNAProvider.<init>(Launch.scala:93)
at xsbt.boot.Launch.topLoader(Launch.scala:87)
at xsbt.boot.Launch$ScalaProvider.parentLoader(Launch.scala:110)
at xsbt.boot.Provider$initialize.createLoader(Provider.scala:57)
at xsbt.boot.Provider$initialize.call(Provider.scala:34)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:69)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:73)
at xsbt.boot.Using$.withResource(Using.scala:11)
at xsbt.boot.Using$.apply(Using.scala:10)
at xsbt.boot.Locks$GlobalLock.liftedTree1$1(Locks.scala:51)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:51)
at xsbt.boot.Locks$.apply0(Locks.scala:30)
at xsbt.boot.Locks$.apply(Locks.scala:27)
at scala.collection.Iterable$class.$init$(Proxy.scala:32)
at xsbt.boot.Launch$ScalaProvider.<init>(Launch.scala:107)
at xsbt.boot.Launch$$anonfun$1.apply(Launch.scala:83)
at org.apache.ivy.plugins.namespace.NamespaceRule.newEntry(Cache.scala:17)
at org.apache.ivy.plugins.namespace.NamespaceRule.apply(Cache.scala:12)
at xsbt.boot.Launch.getScala(Launch.scala:85)
at xsbt.boot.Launch$.run(Launch.scala:49)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:43)
at xsbt.boot.Launch$.launch(Launch.scala:68)
at xsbt.boot.Launch$.apply(Launch.scala:14)
at xsbt.boot.Boot$.runImpl(Boot.scala:24)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.lang.NullPointerException

Thanks for any comment

Mark Harrah

unread,
Jun 4, 2011, 9:13:43 PM6/4/11
to simple-b...@googlegroups.com
On Sat, 4 Jun 2011 12:47:09 +0200
Ilyas Stéphane Türkben <yesi...@gmail.com> wrote:

> Hello,
>
> I would like to launch xsbt.boot.Boot class as an application inside
> eclipse.
> Actually, I'm trying to reproduce the same command that my ~/bin/sbt script.
> Thus, i think I can debug my webapp by passing as args jetty-run command.
> Isn't it a good idea ?
>
> I'm using sbt 0.10 but I can't avoid the following error:

From the line numbers, it would be an odd situation because as far as I can guess, the class loader for xsbt.boot.Launch would have to be null. Is Eclipse forking or running in the same jvm? If it isn't already, I'd try forking if that is possible.

As an unrelated side note to myself, this is odd. It must be a proguard artifact (NamespaceRule has nothing to do with Cache.scala if you look at those lines).

Reply all
Reply to author
Forward
0 new messages