problem while trying the example

370 views
Skip to first unread message

yx

unread,
Nov 24, 2011, 8:17:24 AM11/24/11
to The Junto Label Propagation Toolkit Open Discussion
after typing "junto build update compile", the junto code has
successfully been compiled.


when i typed "junto build update compile", it returned as follow:


Exception in thread "main" java.lang.NoClassDefFoundError: upenn/junto/
app/JuntoConfigRunner
Caused by: java.lang.ClassNotFoundException:
upenn.junto.app.JuntoConfigRunner
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: upenn.junto.app.JuntoConfigRunner.
Program will exit.

when i tried to type "junto run", it worked.

Partha Pratim Talukdar

unread,
Nov 24, 2011, 3:46:59 PM11/24/11
to junto...@googlegroups.com
On Thu, Nov 24, 2011 at 8:17 AM, yx <yin...@gmail.com> wrote:
> after typing "junto build update compile", the junto code has
> successfully been compiled.
>
> when i typed "junto build update compile", it returned as follow:

Which version are you working with? I just downloaded junto-1.2.2-src
and it compiled fine for me.

~Partha

yx

unread,
Nov 25, 2011, 3:25:51 AM11/25/11
to The Junto Label Propagation Toolkit Open Discussion
the version is junto-1.2.2-src.

i was sorry, i made a mistake.
compiling had no problem. but when typing "junto config
simple_config", it returned a NoClassDefFoundError .
i didn't find that there was no /target/classes folder. did i make
some mistake when compiling?

thank you

On 11月25日, 上午4时46分, Partha Pratim Talukdar
<partha.taluk...@cs.cmu.edu> wrote:

Partha Pratim Talukdar

unread,
Nov 26, 2011, 12:36:50 PM11/26/11
to junto...@googlegroups.com
2011/11/25 yx <yin...@gmail.com>:

> the version is junto-1.2.2-src.
>
> i was sorry, i made a mistake.
> compiling had no problem. but when typing "junto config
> simple_config", it returned a NoClassDefFoundError .
> i didn't find that there was no /target/classes folder.  did i make
> some mistake when compiling?

I couldn't reproduce your issue. Did you set JUNTO_DIR to the
installation directory for junto-1.2.2-src?

~Partha

azalea...@gmail.com

unread,
Jul 18, 2012, 11:13:41 PM7/18/12
to junto...@googlegroups.com
Hi

I also encountered this problem. 
Error: Could not find or load main class upenn.junto.app.JuntoConfigRunner
when running the "$ junto config simple_config".

Have you resolved this problem?
Thanks.

Partha Pratim Talukdar

unread,
Jul 19, 2012, 8:57:50 AM7/19/12
to azalea...@gmail.com, junto...@googlegroups.com
Hi,

On Thu, Jul 19, 2012 at 12:13 PM, <azalea...@gmail.com> wrote:
>
> I also encountered this problem.
> Error: Could not find or load main class upenn.junto.app.JuntoConfigRunner
> when running the "$ junto config simple_config".
>
> Have you resolved this problem?

As I had mentioned previously, I couldn't reproduce your issue. Did
you set JUNTO_DIR to the installation directory for junto-1.2.2-src?

~Partha

azalea...@gmail.com

unread,
Jul 19, 2012, 10:49:36 PM7/19/12
to junto...@googlegroups.com, azalea...@gmail.com, partha....@cs.cmu.edu
Thanks for your reply. I've found the problem. The reason why this class is not found is that the system os is windows, and I use the tool cygwin to run these scripts. In windows, the separator character for the class-path is ";" while in linux it is ":", and in cygwin, the file path should add the prefix "cygwin...". Anyway, when I turn to Linux, it succeed.  Thanks and hope this will be helpful to the followers. 

Partha Pratim Talukdar

unread,
Jul 19, 2012, 10:52:11 PM7/19/12
to junto...@googlegroups.com, azalea...@gmail.com
On Fri, Jul 20, 2012 at 11:49 AM, <azalea...@gmail.com> wrote:
> Thanks for your reply. I've found the problem. The reason why this class is
> not found is that the system os is windows, and I use the tool cygwin to run
> these scripts. In windows, the separator character for the class-path is ";"
> while in linux it is ":", and in cygwin, the file path should add the prefix
> "cygwin...". Anyway, when I turn to Linux, it succeed. Thanks and hope this
> will be helpful to the followers.

Thanks for sharing your fix, I am glad it is resolved.

~Partha

mukherje...@gmail.com

unread,
Sep 2, 2012, 4:57:53 AM9/2/12
to junto...@googlegroups.com, partha....@cs.cmu.edu
Partha,
          I seem to now have the same problem as the above user. While trying the example as provided in the  README for simple example while running junto config simple_config
it says
Error: Could not find or load main class upenn.junto.app.JuntoConfigRunner
As mentioned above, my seperator path in class path was seperated by ':'. 
I am running this in Linux.

Regards
Tanmoy

Jason Baldridge

unread,
Sep 2, 2012, 11:08:18 AM9/2/12
to junto...@googlegroups.com, partha....@cs.cmu.edu
It looks like you did not successfully compile Junto. What do you get when you run "bin/build update compile" (from JUNTO_DIR)?
--
Jason Baldridge
Associate Professor, Department of Linguistics
The University of Texas at Austin
http://www.jasonbaldridge.com
http://twitter.com/jasonbaldridge


mukherje...@gmail.com

unread,
Sep 3, 2012, 12:57:10 AM9/3/12
to junto...@googlegroups.com, partha....@cs.cmu.edu, jasonba...@gmail.com
Jason,
          Here is what i get when i run bin/build update compile
[info] Resolving org.scala-lang#scala-library;2.9.2 ...
[info] Resolving com.typesafe.akka#akka-actor;2.0.3 ...
[info] Resolving com.typesafe#config;0.3.1 ...
[info] Resolving org.clapper#argot_2.9.2;0.4 ...
[info] Resolving org.clapper#grizzled-scala_2.9.2;1.0.13 ...
[info] Resolving jline#jline;2.6 ...
[info] Resolving net.sf.trove4j#trove4j;3.0.3 ...
[info] Resolving commons-logging#commons-logging;1.1.1 ...
[info] Resolving log4j#log4j;1.2.16 ...
[info] Done updating.
[success] Total time: 2 s, completed 3 Sep, 2012 10:26:08 AM
[success] Total time: 1 s, completed 3 Sep, 2012 10:26:09 AM

I guess the issues could be in the classpath as pointed previously but i checked that twice...

Tanmoy

Tanmoy Mukherjee

unread,
Sep 4, 2012, 12:02:35 PM9/4/12
to junto...@googlegroups.com, partha....@cs.cmu.edu, jasonba...@gmail.com
Jason,
          I seem to be getting this when i run bin/build update compile

Jason,
          Here is what i get when i run bin/build update compile
[info] Resolving org.scala-lang#scala-library;2.9.2 ...
[info] Resolving com.typesafe.akka#akka-actor;2.0.3 ...
[info] Resolving com.typesafe#config;0.3.1 ...
[info] Resolving org.clapper#argot_2.9.2;0.4 ...
[info] Resolving org.clapper#grizzled-scala_2.9.2;1.0.13 ...
[info] Resolving jline#jline;2.6 ...
[info] Resolving net.sf.trove4j#trove4j;3.0.3 ...
[info] Resolving commons-logging#commons-logging;1.1.1 ...
[info] Resolving log4j#log4j;1.2.16 ...
[info] Done updating.
[success] Total time: 2 s, completed 3 Sep, 2012 10:26:08 AM
[success] Total time: 1 s, completed 3 Sep, 2012 10:26:09 AM

I think this seems fine....anything else i might be doing a mistake ??

Tanmoy

On Sunday, September 2, 2012 8:38:19 PM UTC+5:30, Jason Baldridge wrote:

Jason Baldridge

unread,
Sep 4, 2012, 1:50:23 PM9/4/12
to Tanmoy Mukherjee, junto...@googlegroups.com, partha....@cs.cmu.edu
Two things to try:

$ bin/build clean update compile

(You should see it actually compiling things now.)

If that succeeds but things still don't work, check that JUNTO_DIR is set correctly, etc. (Go through the readme line by line and make sure you've set things up the way described there.) Also, make sure you have the most recent version of the code from Github.

https://github.com/parthatalukdar/junto

Another thing: try it on another machine?

Tanmoy Mukherjee

unread,
Sep 4, 2012, 2:04:34 PM9/4/12
to junto...@googlegroups.com, Tanmoy Mukherjee, partha....@cs.cmu.edu, jasonba...@gmail.com
Hi Jason,
               Well you were right... After the clean step it threw a error and i needed to add a line "ulimit -c unlimited". It seems to compile fine through there were couple of warnings.
[info] Loading project definition from /home/tanmoy/Desktop/research/code/Graph_SSL/junto/project
[info] Set current project to junto (in build file:/home/tanmoy/Desktop/research/code/Graph_SSL/junto/)
[success] Total time: 0 s, completed 4 Sep, 2012 11:28:15 PM
[info] Updating {file:/home/tanmoy/Desktop/research/code/Graph_SSL/junto/}default-7cdfa3...

[info] Resolving org.scala-lang#scala-library;2.9.2 ...
[info] Resolving com.typesafe.akka#akka-actor;2.0.3 ...
[info] Resolving com.typesafe#config;0.3.1 ...
[info] Resolving org.clapper#argot_2.9.2;0.4 ...
[info] Resolving org.clapper#grizzled-scala_2.9.2;1.0.13 ...
[info] Resolving jline#jline;2.6 ...
[info] Resolving net.sf.trove4j#trove4j;3.0.3 ...
[info] Resolving commons-logging#commons-logging;1.1.1 ...
[info] Resolving log4j#log4j;1.2.16 ...
[info] Done updating.
[success] Total time: 2 s, completed 4 Sep, 2012 11:28:17 PM
[info] Updating {file:/home/tanmoy/Desktop/research/code/Graph_SSL/junto/}default-7cdfa3...

[info] Resolving org.scala-lang#scala-library;2.9.2 ...
[info] Resolving com.typesafe.akka#akka-actor;2.0.3 ...
[info] Resolving com.typesafe#config;0.3.1 ...
[info] Resolving org.clapper#argot_2.9.2;0.4 ...
[info] Resolving org.clapper#grizzled-scala_2.9.2;1.0.13 ...
[info] Resolving jline#jline;2.6 ...
[info] Resolving net.sf.trove4j#trove4j;3.0.3 ...
[info] Resolving commons-logging#commons-logging;1.1.1 ...
[info] Resolving log4j#log4j;1.2.16 ...
[info] Done updating.
[info] Compiling 11 Scala sources and 20 Java sources to /home/tanmoy/Desktop/research/code/Graph_SSL/junto/target/classes...
[warn] there were 5 deprecation warnings; re-run with -deprecation for details
[warn] one warning found
[warn] Note: Some input files use unchecked or unsafe operations.
[warn] Note: Recompile with -Xlint:unchecked for details.
[success] Total time: 33 s, completed 4 Sep, 2012 11:28:49 PM

the classpath is correct....i checked it twice....i didnt add $JUNTO_DIR/bin to the path but i have done that too now....i still get the same error.....
I seem to have the latest version....maybe ill get a fresh copy and try it again....

Regards
Tanmoy

Jason Baldridge

unread,
Sep 4, 2012, 4:32:12 PM9/4/12
to Tanmoy Mukherjee, junto...@googlegroups.com, partha....@cs.cmu.edu
I found one thing that might be causing a problem with bin/junto, which is that it still asks for scala 2.9.1 rather than 2.9.2. Change it so that you have this:

SCALA_LIB="$HOME/.sbt/boot/scala-2.9.2/lib/scala-library.jar"

And then try again? (Note: I've pushed the change to the repo, so you'll get it with an update.)

Also, check whether you've got the class file for JuntoConfigRunner:

$ ls $JUNTO_DIR/target/classes/upenn/junto/app/JuntoConfigRunner.class

Tanmoy Mukherjee

unread,
Sep 4, 2012, 11:56:51 PM9/4/12
to junto...@googlegroups.com, Tanmoy Mukherjee, partha....@cs.cmu.edu, jasonba...@gmail.com
Hi,
    So i changed as mentioned in bin/junto and it still couldnt find....infact i got a fresh copy from the source and it still throws error.....i also have the copy of JuntoConfigRunner as mentioned at $JUNTO_DIR/classes/upenn/junto/app...

Apologies for bothering with this again and again....i never had an issues with the previous copy of junto with ant build but this is really something which is driving me crazy...

Tanmoy

Jason Baldridge

unread,
Sep 5, 2012, 12:23:42 AM9/5/12
to Tanmoy Mukherjee, junto...@googlegroups.com, partha....@cs.cmu.edu
This should have nothing to do with ant vs sbt. It seems that the bin/junto script isn't working for you. You should try running the class directly in sbt, e.g.:

$ cd $JUNTO_DIR
$ bin/build
   <you'll see lots of SBT [info] lines>
> clean
> compile
> run-main upenn.junto.app.JuntoConfigRunner examples/simple/simple_config

This will produce an error because the files for that config are in the wrong relative location, but at least it will test whether the classes have compiled.

FWIW, I've tested everything on two linux boxes and a mac laptop (which was a fresh checkout) and everything works like a charm. If you can try another machine, that might be useful.

Tanmoy

unread,
Sep 5, 2012, 12:30:30 AM9/5/12
to jasonba...@gmail.com, junto...@googlegroups.com, partha....@cs.cmu.edu
i am sending the o/p for the run-,main part as everything else runs fine..

[info] Running upenn.junto.app.JuntoConfigRunner examples/simple/simple_config
[error] (run-main) java.lang.ClassNotFoundException: upenn.junto.app.JuntoConfigRunner
java.lang.ClassNotFoundException: upenn.junto.app.JuntoConfigRunner
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
[trace] Stack trace suppressed: run last compile:run-main for the full output.
java.lang.RuntimeException: Nonzero exit code: 1
    at scala.sys.package$.error(package.scala:27)
[trace] Stack trace suppressed: run last compile:run-main for the full output.
[error] (compile:run-main) Nonzero exit code: 1
[error] Total time: 0 s, completed 5 Sep, 2012 9:57:44 AM

throws class not found exception error...

Yes ill try in a different machine and update the news...

Tanmoy 
--
Tanmoy Mukherjee

Tanmoy

unread,
Sep 5, 2012, 12:38:58 AM9/5/12
to jasonba...@gmail.com, junto...@googlegroups.com, partha....@cs.cmu.edu
Ok Jason i realised my mistake....somehow i kept  the junto home path as JUNTO_HOME and not JUNTO_DIR....while going through bin/junto i realised you have kept it as JUNTO_DIR and not the one i had kept....it compiles fine now.....thanks for the help....Hope this helps someone :)

Tanmoy
--
Tanmoy Mukherjee

Jason Baldridge

unread,
Sep 5, 2012, 1:55:21 PM9/5/12
to Tanmoy, junto...@googlegroups.com, partha....@cs.cmu.edu
Great!

Jason Baldridge 

kimq...@gmail.com

unread,
Oct 16, 2012, 11:54:23 PM10/16/12
to junto...@googlegroups.com, yin...@gmail.com
Hi there, I've already read through post. But I can't solve this error. My case is similar to Jason's except one thing that I did set JUNTO_DIR, PATH right.
Big thank for your help!

Vào 21:17:24 UTC+8 Thứ năm, ngày 24 tháng mười một năm 2011, yx đã viết:

jaan...@gmail.com

unread,
Jan 29, 2013, 2:41:04 PM1/29/13
to junto...@googlegroups.com, yin...@gmail.com

Hi, I solved the problem, first I want to clarify that I am Colombian and I'm not good with English, sorry about that.

The problem in some bullrings is different from Tanmoy Mukherjee. As in the README says you must compile with: $ bin/build compile update. Then one compiled into the "/ bin", which is a mistake. It must build from the root directory, ie the folder where the files: bin, examples, lib, project, src ... etc.

Thanks Partha and Jason.

shubhams...@gmail.com

unread,
May 12, 2016, 9:18:15 AM5/12/16
to The Junto Label Propagation Toolkit Open Discussion, azalea...@gmail.com, partha....@cs.cmu.edu
I have done exactly as given in readme file also on running bin/build update compile i get this

[info] Loading project definition from /home/shubham/.sbt/0.13/staging/3230037296f221ea5606/junto_dir/project
[info] Set current project to junto (in build file:/JUNTO_DIR/)
[info] Updating {file:/JUNTO_DIR/}junto_dir...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[success] Total time: 1 s, completed 12 May, 2016 6:45:29 PM
[success] Total time: 1 s, completed 12 May, 2016 6:45:29 PM

but when i run junto config simple_config
i still get ERROR Could not find or load main class upenn.junto.app.JuntoConfigRunner

also i am not able to see any /target folder in JUNTO_DIR

am i doing anything wrong?
Reply all
Reply to author
Forward
0 new messages