jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JRuby
  • JRUBY-5345

require 'ffi' breaks in windows jar when the path to the jar contains spaces/special chars

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.6RC1
  • Fix Version/s: JRuby 1.6RC2
  • Component/s: Java Integration
  • Labels:
    None
  • Environment:
    windows XP, French locales

Description

In a packaged jar, on windows,
require 'ffi' (not tested other jruby-standard libraries yet)
raises a LoadError if the path to the jar contains spaces or special characters.

broken trace:

D:\Documents and Settings\DiCioccioL>java -jar "D:\Documents and Settings\DiCioc
cioL\Desktop\ldc-bug.jar"
org/jruby/RubyKernel.java:1041:in `require': no such file to load -- ffi (LoadEr
ror)
        from /bootstrap.rb:2:in `(root)'
        from org/jruby/RubyKernel.java:1041:in `require'
        from /bootstrap.rb:1:in `(root)'
Exception in thread "main" org.jruby.embed.EvalFailedException: (LoadError) no s
uch file to load -- ffi
        at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java
:127)
        at org.jruby.embed.ScriptingContainer.runUnit(ScriptingContainer.java:12
22)
        at org.jruby.embed.ScriptingContainer.runScriptlet(ScriptingContainer.ja
va:1215)
        at Launcher.main(Launcher.java:7)
Caused by: org.jruby.exceptions.RaiseException: (LoadError) no such file to load
 -- ffi

OK trace:

D:\Documents and Settings\DiCioccioL>java -jar D:\ldc-bug.jar
ok

See "code" at:
https://github.com/lucasdicioccio/windows-jar-issue-with-spaces

And sample jar at:
http://cmon.lip6.fr/~dicioccio/ldc-bug.jar

Issue Links

is related to

Bug - A problem which impairs or prevents the functions of the product. JRUBY-5281 jruby-complete jar not working from directory with spaces

  • Major - Major loss of function.
  • Resolved - A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Hiro Asari added a comment - 13/Jan/11 9:01 PM

Reformat up the description.

Show
Hiro Asari added a comment - 13/Jan/11 9:01 PM Reformat up the description.
Hide
Permalink
Nick Sieger added a comment - 18/Jan/11 1:07 PM

Fixed in 3a9ab40.

Show
Nick Sieger added a comment - 18/Jan/11 1:07 PM Fixed in 3a9ab40.
Hide
Permalink
lucas dicioccio added a comment - 19/Jan/11 4:02 AM

(my last build is dd5c7e15cf58c9c5ad6dcce0b5aaa4336b03f88e , i.e., with patch 3a9ab40 applied )

The spacing-part of the issue is solved.

The accents problem is still pending (I've tested on MacOS and there is also this issue, although i've first noticed it on a French winXP with Firefox because it downloads to a directory "Mes téléchargements").

I'll update the code on the github project for making it easier to reproduce.

{noformal}

touch accentué
mv <some_jar> accentué
java -jar accentué/<some_jar>

java -jar accentué/ldc-bug.jar
org/jruby/RubyKernel.java:1041:in `require': no such file to load – ffi (LoadError)
from ./bootstrap.rb:2:in `(root)'
from org/jruby/RubyKernel.java:1041:in `require'
from ./bootstrap.rb:1:in `(root)'
Exception in thread "main" org.jruby.embed.EvalFailedException: (LoadError) no such file to load – ffi
at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:127)
at org.jruby.embed.ScriptingContainer.runUnit(ScriptingContainer.java:1223)
at org.jruby.embed.ScriptingContainer.runScriptlet(ScriptingContainer.java:1216)
at Launcher.main(Launcher.java:7)
Caused by: org.jruby.exceptions.RaiseException: (LoadError) no such file to load – ffi


Show
lucas dicioccio added a comment - 19/Jan/11 4:02 AM (my last build is dd5c7e15cf58c9c5ad6dcce0b5aaa4336b03f88e , i.e., with patch 3a9ab40 applied ) The spacing-part of the issue is solved. The accents problem is still pending (I've tested on MacOS and there is also this issue, although i've first noticed it on a French winXP with Firefox because it downloads to a directory "Mes téléchargements"). I'll update the code on the github project for making it easier to reproduce. {noformal} touch accentué mv <some_jar> accentué java -jar accentué/<some_jar> java -jar accentué/ldc-bug.jar org/jruby/RubyKernel.java:1041:in `require': no such file to load – ffi (LoadError) from ./bootstrap.rb:2:in `(root)' from org/jruby/RubyKernel.java:1041:in `require' from ./bootstrap.rb:1:in `(root)' Exception in thread "main" org.jruby.embed.EvalFailedException: (LoadError) no such file to load – ffi at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:127) at org.jruby.embed.ScriptingContainer.runUnit(ScriptingContainer.java:1223) at org.jruby.embed.ScriptingContainer.runScriptlet(ScriptingContainer.java:1216) at Launcher.main(Launcher.java:7) Caused by: org.jruby.exceptions.RaiseException: (LoadError) no such file to load – ffi

Hide
Permalink
Nick Sieger added a comment - 21/Jan/11 2:20 PM

Added some additional logic to deal with this problem in 64c3a02c.

Lucas, let's call this fixed for now. I think we have a lot of additional work to support filenames with accents. Can you add your findings for that to JRUBY-5388?

Show
Nick Sieger added a comment - 21/Jan/11 2:20 PM Added some additional logic to deal with this problem in 64c3a02c. Lucas, let's call this fixed for now. I think we have a lot of additional work to support filenames with accents. Can you add your findings for that to JRUBY-5388?

People

  • Assignee:
    Nick Sieger
    Reporter:
    lucas dicioccio
Vote (0)
Watch (0)

Dates

  • Created:
    13/Jan/11 6:20 AM
    Updated:
    21/Jan/11 2:20 PM
    Resolved:
    21/Jan/11 2:20 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.