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

[#2073] Fix DependenciesManager FileNotFoundException with some filen… #1041

Open
wants to merge 1 commit into
base: 1.4.x
Choose a base branch
from

Conversation

flybyray
Copy link
Contributor

@asolntsev
Copy link
Contributor

@flybyray Can you add a test that would reproduce the problem?

I tried to reproduce, but could not. See #1075

@asolntsev asolntsev self-assigned this Dec 29, 2016
@flybyray
Copy link
Contributor Author

flybyray commented Jan 6, 2017

@asolntsev your test runs within the play testenviroment. the dependencies manager is invoked differently. your test should be in the style of python tests from 'samples-and-tests/i-am-a-developer'.
i try to add a test there.

@flybyray
Copy link
Contributor Author

flybyray commented Jan 6, 2017

@asolntsev i added a test flybyray@1307f79

and the problem is related to system environment "LANG". If it is not set it will crash. i checked it with the print out of "declare -x". if not set it will result in:
Exception in thread "main" play.exceptions.UnexpectedException: Unexpected Error at play.libs.IO.copyDirectory(IO.java:246) at play.libs.IO.copyDirectory(IO.java:240) at play.libs.IO.copyDirectory(IO.java:240) at play.libs.IO.copyDirectory(IO.java:240) at play.deps.DependenciesManager.install(DependenciesManager.java:275) at play.deps.DependenciesManager.retrieve(DependenciesManager.java:233) at play.deps.DependenciesManager.main(DependenciesManager.java:42) Caused by: java.io.FileNotFoundException: /home/flybyray/git/play1/samples-and-tests/i-am-a-developer/i-am-testing-2073/mod2073/public/Unterlagen BBank-Reporting/Anhang Performance-Bericht_ ??bersicht ??18 Bundesbank gesetz Meldepflichten.PDF (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at play.libs.IO.copyDirectory(IO.java:244) ... 6 more

@flybyray
Copy link
Contributor Author

flybyray commented Jan 6, 2017

flybyray-pc:~/git$ export LANG="de_DE.UTF-8"
+ export LANG=de_DE.UTF-8
+ LANG=de_DE.UTF-8
flybyray-pc:~/git$ play1/play deps play1/samples-and-tests/i-am-a-developer/i-am-testing-2073/app2073 --forProd
+ play1/play deps play1/samples-and-tests/i-am-a-developer/i-am-testing-2073/app2073 --forProd
~        _            _ 
~  _ __ | | __ _ _  _| |
~ | '_ \| |/ _' | || |_|
~ |  __/|_|\____|\__ (_)
~ |_|            |__/   
~
~ play! master-9db5269, https://www.playframework.com
~
~ Resolving dependencies using /home/flybyray/git/play1/samples-and-tests/i-am-a-developer/i-am-testing-2073/app2073/conf/dependencies.yml,
~
~ 	play.test.modules->mod2073 0.1 (from playLocalTestModulesRep)
~
~ Some dynamic revisions have been resolved as following,
~
~	play.test.modules->mod2073 latest.integration will use version 0.1
~
~ Installing resolved dependencies,
~
~ 	modules/mod2073 -> /home/flybyray/git/play1/samples-and-tests/i-am-a-developer/i-am-testing-2073/mod2073
~
~ Done!
~
flybyray-pc:~/git$ unset LANG
+ unset LANG
flybyray-pc:~/git$ play1/play deps play1/samples-and-tests/i-am-a-developer/i-am-testing-2073/app2073 --forProd
+ play1/play deps play1/samples-and-tests/i-am-a-developer/i-am-testing-2073/app2073 --forProd
~        _            _ 
~  _ __ | | __ _ _  _| |
~ | '_ \| |/ _' | || |_|
~ |  __/|_|\____|\__ (_)
~ |_|            |__/   
~
~ play! master-9db5269, https://www.playframework.com
~
~ Resolving dependencies using /home/flybyray/git/play1/samples-and-tests/i-am-a-developer/i-am-testing-2073/app2073/conf/dependencies.yml,
~
~ 	play.test.modules->mod2073 0.1 (from playLocalTestModulesRep)
~
~ Some dynamic revisions have been resolved as following,
~
~	play.test.modules->mod2073 latest.integration will use version 0.1
~
~ Installing resolved dependencies,
~
~ 	Error installing /home/flybyray/git/play1/samples-and-tests/i-am-a-developer/i-am-testing-2073/mod2073
Exception in thread "main" play.exceptions.UnexpectedException: Unexpected Error
	at play.libs.IO.copyDirectory(IO.java:246)
	at play.libs.IO.copyDirectory(IO.java:240)
	at play.libs.IO.copyDirectory(IO.java:240)
	at play.libs.IO.copyDirectory(IO.java:240)
	at play.deps.DependenciesManager.install(DependenciesManager.java:275)
	at play.deps.DependenciesManager.retrieve(DependenciesManager.java:233)
	at play.deps.DependenciesManager.main(DependenciesManager.java:42)
Caused by: java.io.FileNotFoundException: /home/flybyray/git/play1/samples-and-tests/i-am-a-developer/i-am-testing-2073/mod2073/public/Unterlagen BBank-Reporting/Anhang Performance-Bericht_ ??bersicht ??18 Bundesbank gesetz Meldepflichten.PDF (No such file or directory)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at play.libs.IO.copyDirectory(IO.java:244)
	... 6 more

@flybyray
Copy link
Contributor Author

flybyray commented Jan 6, 2017

@asolntsev the interesting part is with the FIles.walkFileTree this error does not occur

https://gist.github.com/flybyray/659a1b8ad14e69a72415f869b1b91619#file-io-java-L244

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

Successfully merging this pull request may close these issues.

2 participants