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

File name too long error #3932

Closed
adam-phillips opened this issue May 26, 2016 · 4 comments
Closed

File name too long error #3932

adam-phillips opened this issue May 26, 2016 · 4 comments

Comments

@adam-phillips
Copy link

I have an app for processing XML files. I have to pick them up from an inbound directory, parse the XML (using Nokogiri) and make web service calls based on that info. The files are a a collection of orders. After moving the file from the inbound directory, I'm seeing the following error before I can even start parsing the file:

"Unhandled Java exception: java.lang.RuntimeException: Unhandled IOException: java.io.IOException: unhandled errno: File name too long"

In this case, the file name is CD_112350_677686.XML, and I have other JRuby apps that handle files named like this without problem.

Environment

  • JRuby version: jruby 1.7.19 (1.9.3p551) 2015-01-29 20786bd on Java HotSpot(TM) 64-Bit Server VM 1.8.0_66-b17 +jit [darwin-x86_64](I've also replicated this on 9.0.4.0)
  • OS: Darwin pbdal-whlp2.main.pbd.com 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
  • Gems: json 1.8.3, rest_client 1.7.3, jdbc-mysql 5.1.38, netrc 0.7.9, nokogiri 1.6.7.2, bundler 1.12.5
  • This is a standalone app that once working I plan to compile to a JAR using warbler

Expected Behavior

The file is moved correctly, but I would expect to be able to parse the file and assign each order within to a SalesOrder object. Here's the method where the failure is occurring:
def process_orders_from_file(file_name)
@logger.info("Processing file #{file_name}")
SalesOrders.new(@properties['files']['inbound'] + file_name)
end

Actual Behavior

The call fails immediately after the log entry, with no new SalesOrder objects created.

I have a couple gists with the stack trace - the first was from walking through the code in jirb:
https://gist.github.com/aadam21/1f2f35360e12e7b0865adaaa64644be7

This gist is from when the method is called from within the app actually running:
https://gist.github.com/aadam21/53cc51c8b0820b4e5b12b9609bbc079d

@adam-phillips
Copy link
Author

One other thing I forgot to mention - the @properties['files']['inbound'] is just set to a files/inbound/ directory from the app root for testing. It's being moved there from another temp location at the same place named files/temp/

@kares
Copy link
Member

kares commented Jun 12, 2018

any chance knowing if this is still relevant? the gist are gone -> would be great to have a simple reproducer.

@kares kares added this to the Invalid or Duplicate milestone Jun 12, 2018
@headius
Copy link
Member

headius commented Jun 12, 2018

@kares Yeah if we can't access the gists anymore it's up to @aadam21 to let us know if this is still a problem. It's a pretty old JRuby...we can probably just close this and just reopen if we hear back that it's still a problem.

@adam-phillips
Copy link
Author

@kares @headius Sorry - I don't have the gists any longer and haven't worked on that app in a while now. If memory serves I updated to jRuby 9.0.0.0 on release and didn't have any more problems. This is definitely closable - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants