PHANTOM-Platform / Repository

PHANTOM Repository of Files with Metadata for integrated workflows
Apache License 2.0
2 stars 0 forks source link

Problem with file download #1

Closed pbourgos closed 6 years ago

pbourgos commented 6 years ago

I have uploaded an xml (cpn.xml) file with repo_put.java and tried to download it afterwards with the repo_get_file.java. It didnt seem to find the file and failed to download it. Associated json file: { "project":"phantom_tools_on_Test", "source":"user", "type":"Usercase", "name":"Test", "content":"xml_file" }

jmmontanana commented 6 years ago

I look into it now !!!

2018-04-20 18:03 GMT+02:00 pbourgos notifications@github.com:

I have uploaded an xml (cpn.xml) file with repo_put.java and tried to download it afterwards with the repo_get_file.java. It didnt seem to find the file and failed to download it. Associated json file: { "project":"phantom_tools_on_Test", "source":"user", "type":"Usercase", "name":"Test", "content":"xml_file" }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PHANTOM-Platform/Repository/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AItYX6AtPzRHmMx7klLp-HRzbLAOJ7Xrks5tqgbcgaJpZM4Tdtht .

jmmontanana commented 6 years ago

The file was successfully uploaded to the server

Now I look what happens on the repo_get_file.java

You can see the content I copy here:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<requirements name="global_requirements" set-by="USER" target="Example_Application">

<non-functional max-value="700" measurement-unit="ns" name="global_WCET" type="execution-time"/> <non-functional max-value="350" measurement-unit="milliwatt" name="global_WCPC" type="power-consumption"/>

<comm-object item-size="8" name="BF1" object-class="FIFO" size="128" type="Queue">

2018-04-20 18:04 GMT+02:00 Jose Miguel jmmontanana@gmail.com:

I look into it now !!!

2018-04-20 18:03 GMT+02:00 pbourgos notifications@github.com:

I have uploaded an xml (cpn.xml) file with repo_put.java and tried to download it afterwards with the repo_get_file.java. It didnt seem to find the file and failed to download it. Associated json file: { "project":"phantom_tools_on_Test", "source":"user", "type":"Usercase", "name":"Test", "content":"xml_file" }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PHANTOM-Platform/Repository/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AItYX6AtPzRHmMx7klLp-HRzbLAOJ7Xrks5tqgbcgaJpZM4Tdtht .

pbourgos commented 6 years ago

Yes, upload seems ok

jmmontanana commented 6 years ago

found error in the file repo_get_file.java

fixed on the attached copy, I will upload now on the GitHub

I achieve to receive the file from the repository running as:

java -classpath org.json.jar:apache-httpcomponents-httpcore.jar:. demo_phantom/repo_get_file "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJtb250YW5hQGFiYy5jb20iLCJpYXQiOjE1MjIwNjg2MTEsImV4cCI6MTUyNDY2MDYxMX0.IjXYKMQFfqU-J8O-tlicyCEr_S9q3kvJ5tusPJCpM2s" "141.58.0.8" "2777" "phantom_tools_on_Test" "user" "otherpath" "cpn.xml";

Thank you for your request

2018-04-20 18:12 GMT+02:00 pbourgos notifications@github.com:

Yes, upload seems ok

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PHANTOM-Platform/Repository/issues/1#issuecomment-383146015, or mute the thread https://github.com/notifications/unsubscribe-auth/AItYXw0nO_qhO8BBR6VnTdCDshbghfUgks5tqgjUgaJpZM4Tdtht .

jmmontanana commented 6 years ago

Detected the error in the file repo_get_file.java and fixed.

pbourgos commented 6 years ago

The problem is fixed for cpn.xml, but I cannot download the new.h file now. See sequence below.

pbourgos@pbourgos-VirtualBox:~/Projects/PHANTOM/Repository/api_java$ sudo bash demo_java_PB.sh REQUESTING A NEW TOKEN .... eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJib3VyZ29zQHdpbmdzLWljdC1zb2x1dGlvbnMuZXUiLCJpYXQiOjE1MjQ0NzMyNzIsImV4cCI6MTUyNzA2NTI3Mn0.6tCPBBKYUt7D9OfeoVeKxtXhfRCSFOxdhECkJxEi1kY

VERIFIYING THE TOKEN ... The token is valid !!!.

UPLOADING A FILE ... project=demo_hpc source=user path=mypath file=new.h (project and source defined in the json file) Project and Source are defined in the json file !!! 200 DOWNLOADING A FILE... project=demo_hpc source=user path=mypath file=new.h

GET request to Repository using the url: http://141.58.0.8:2777/download?project=demo_hpc&source=user&filepath=otherpath&filename=new.h