java.lang.NoClassDefFoundError when launching debug session

Hi guys,

I get a really strange error when I'm starting a debug session:

runnerw.exe "C:\Program Files\dev\jruby-1.6.7.2\bin\jruby.exe" --1.8 -X+O -J-Djruby.reflection=true -J-Djruby.compile.mode=OFF -J-Djruby.debug.fullTrace=true -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) "C:/Program Files/dev/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.17.beta17/bin/rdebug-ide" --port 51167 --dispatcher-port 51168 -- C:/Development/workspace/sts-e3.8/iSearch/script/rails server -b 127.0.0.1 -p 3000 -e development
java.lang.NoClassDefFoundError: Files\dev\jruby-1/6/7/2 -Djruby/script=jruby -Djruby/shell=cmd/exe -Djffi/boot/library/path=C:\Program
Caused by: java.lang.ClassNotFoundException: Files\dev\jruby-1.6.7.2 -Djruby.script=jruby -Djruby.shell=cmd.exe -Djffi.boot.library.path=C:\Program
 at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: Files\dev\jruby-1.6.7.2 -Djruby.script=jruby -Djruby.shell=cmd.exe -Djffi.boot.library.path=C:\Program.  Program will exit.
Exception in thread "main"
Process finished with exit code 1



I thought this may be related to the path, since both java and jruby installations are unde Program Files, I thought that space in the path is a problem and wrapped the paths in Windows Env with qutes

e.g. JRUBY_HOME "c:\Program Files\dev\jruby-1.6.7.2\"

but still, this didn't solve my problem.
Any suggestions?

Thanks
7 comments

What aboud installing jruby under c:\jruby?

Oleg.

0

The problem is that the security policies deployed on the dev machines don't allow to any software that is installed outside of c:\Program Files\ to make tcp connections outside of our domain. And of course, you need admin rights to install under c:\Program Files. Because of this, no gems can be downloaded/installed & stuff.

0

Hi,

It looks like a bug for me but I'm not sure if this is RM's or JRuby's bug.
Does non-debug run works for you?  Are you able to run jruby in cmd?

Regards, Oleg.

0

Hi Oleg,

yes, both, run and debug yield the same error, and yes, I'm able to run jruby from console.

C:\Program Files\dev\jruby-1.6.7.2\bin>jruby -v
jruby 1.6.7.2 (ruby-1.8.7-p357) (2012-05-01 26e08ba) (Java HotSpot(TM) Client VM 1.6.0_35) [Windows 7-x86-java]

0

Have you tried to run your app from cmd?  Does this work?

Regards, Oleg.

0

Hi Oleg,

Yes, I'm able to run the rails app from command line and it is working fine.

0

This mean it is our bug :(  Feel free to file it in our tracker (http://youtrack.jetbrains.com/issues/RUBY)

Regards, Oleg.

0

Please sign in to leave a comment.