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

Gem class missing in jruby-complete 1.7.16 when running from network folder (Windows only) #2042

Closed
perlun opened this Issue Oct 13, 2014 · 11 comments

Comments

Projects
None yet
4 participants
@perlun
Copy link
Contributor

perlun commented Oct 13, 2014

When I run this on my Mac, I get this:

$ java -jar src/server/jruby/jruby-complete-1.7.16.jar -e "puts Gem"
Gem

But with the exact same JAR file on Windows (8.1, but it hardly matters):

Y:\some-path>java -jar src\server\jruby\jruby-complete-1.7.16.jar -e "puts Gem"
NameError: uninitialized constant Gem
  const_missing at org/jruby/RubyModule.java:2723
         (root) at -e:1

Why is this? The Java version is JRE 8u20 on Mac. On Windows, I've tested with both JRE 8u20 and 7u45.


I did some more testing before committing the issue. It turned out that it works if I copy the jruby-complete .jar to my local C: drive, instead of running it from my Mac home folder (which is essentially a network folder - I run my Windows in a Parallels VM).

Nonetheless, this has worked flawlessly with older JRuby (1.7.6), so it's very likely this is the same issue as some of the other open jruby-complete issues that are open at the moment.

@mkristian

This comment has been minimized.

Copy link
Member

mkristian commented Oct 13, 2014

though I do not have access to a windows but it would be helpful to see the output from
java -Djruby.debug.loadService=true -jar src\server\jruby\jruby-complete-1.7.16.jar -e "puts Gem"
or
java -Djruby.home=classpath:/META-INF/jruby.home -Djruby.debug.loadService=true -jar src\server\jruby\jruby-complete-1.7.16.jar -e "puts Gem"

@perlun

This comment has been minimized.

Copy link
Contributor Author

perlun commented Oct 14, 2014

Thanks for your input. I tried, here are the results https://gist.github.com/perlun/081e7a8a7d6933c4bbe4 (too big to be posted here inline).

@mkristian

This comment has been minimized.

Copy link
Member

mkristian commented Oct 14, 2014

thanx for the output. I am not sure if this is just an error in setting jruby.home internally or a general LoadService issue. to rule out the jruby.home I patch jruby put it here http://mojo.saumya.de/

if you have time please see if this works for you and this is also the last thing I will ask since anything more does need "hands on a windows machine"

@perlun

This comment has been minimized.

Copy link
Contributor Author

perlun commented Nov 3, 2014

Sorry for the lack of feedback on this one - have far too much to do at the moment. Here is the output; it doesn't seem to work unfortunately:

Y:\git\foo\server\download>java -jar jruby-complete-1.7.17-SNAPSHOT.jar -e "puts Gem"
NameError: uninitialized constant Gem
  const_missing at org/jruby/RubyModule.java:2723
         (root) at -e:1
@mkristian

This comment has been minimized.

Copy link
Member

mkristian commented Nov 3, 2014

no problem - anyway someone with a windows machine needs to take this over. thanx for giving the prepared a jar a trial.

@perlun

This comment has been minimized.

Copy link
Contributor Author

perlun commented Nov 3, 2014

I tested a couple of older versions as well:

  • JRuby 1.7.15: same issue.
  • JRuby 1.7.14: same issue
  • JRuby 1.7.13: works
  • JRuby 1.7.12: works
  • JRuby 1.7.10: works

So it's definitely some form of regression introduced in JRuby 1.7.14. I'd say maybe some of these issues could be the problem here: #1846 or #1852. It can of course be something else also from the changelog (http://jruby.org/2014/08/27/jruby-1-7-14.html) but these are the ones I would start digging into if I knew the JRuby codebase.

Please let me know if I can assist further - this issue is critical for us. We can use 1.7.13 for now, but I'd much more like to run 1.7.16.1 of course... 😃

@mkristian

This comment has been minimized.

Copy link
Member

mkristian commented Nov 3, 2014

OK - let's try one more thing - I mean could you produce a gist of the output of:

java -Djruby.home=classpath:/META-INF/jruby.home -Djruby.debug.loadService=true -jar src\server\jruby\jruby-complete-1.7.16.jar -e "puts Gem"

and

java -Djruby.home=uri:classloader:/META-INF/jruby.home -Djruby.debug.loadService=true -jar src\server\jruby\jruby-complete-1.7.16.jar -e "puts Gem"

@enebo enebo added this to the JRuby 1.7.17 milestone Nov 3, 2014

@sdahlbac

This comment has been minimized.

Copy link

sdahlbac commented Nov 5, 2014

I'll chime in with the info requested, it's available here (provided I managed to create the the gist correctly)

https://gist.github.com/sdahlbac/3a06d3bd516641c129ef

@mkristian

This comment has been minimized.

Copy link
Member

mkristian commented Nov 5, 2014

thanx for all those output, all of them gave me a clear idea where the problem lies. even though I do not have a windows machine I was able to produce similar results as in gists. so there is a positive probability that it is fixed now ;) but need to ask anyone of you to confirm it with the jruby-complete-1.7.17-SNAPSHOT.jar from http://mojo.saumya.de/

@sdahlbac

This comment has been minimized.

Copy link

sdahlbac commented Nov 5, 2014

@mkristian the fix seems to work. Thanks for the quick fix.

I did encounter:
ERROR: Loading command: install (LoadError)
load error: win32/registry -- java.lang.NullPointerException: null

but I guess that's due to the jruby-complete-SNAPSHOT not being a real jruby-complete ?

@mkristian

This comment has been minimized.

Copy link
Member

mkristian commented Nov 5, 2014

good to have a fix now. but the jruby-complete-snapshot is as real as it can be. could file a new issue for the registry problem, please.

@enebo if we keep the jruby.home detection with all this if-else-logic it makes sense to test all those possible cases more rigorously

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.