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

Cannot retrieve URI through frontend #594

Closed
jakebeal opened this issue Mar 5, 2018 · 10 comments
Closed

Cannot retrieve URI through frontend #594

jakebeal opened this issue Mar 5, 2018 · 10 comments

Comments

@jakebeal
Copy link

jakebeal commented Mar 5, 2018

SynBioHubFrontend.getSBOL([URI]) is failing for me even though browsing to [URI] works.
Login appears to be working correctly, as no errors are signaled before I get to the point in my code where I call getSBOL.

This was working for me a few days ago - has something changed in the interface or is something down on the backend? The instance that I am using is synbiohub.org, and I am retrieving a private URI.

The error that I get is:

 org.synbiohub.frontend.SynBioHubException: Error connecting to SynBioHub endpoint
	at org.synbiohub.frontend.SynBioHubFrontend.fetchFromSynBioHub(SynBioHubFrontend.java:982)
	at org.synbiohub.frontend.SynBioHubFrontend.getSBOL(SynBioHubFrontend.java:129)
	at com.bbn.FACETS.DefinitionImporter.importModuleDefinition(DefinitionImporter.java:93)
        [snip - rest is my code]
Caused by: org.synbiohub.frontend.NotFoundException
	at org.synbiohub.frontend.SynBioHubFrontend.checkResponseCode(SynBioHubFrontend.java:1155)
	at org.synbiohub.frontend.SynBioHubFrontend.fetchContentAsInputStream(SynBioHubFrontend.java:1108)
	at org.synbiohub.frontend.SynBioHubFrontend.fetchFromSynBioHub(SynBioHubFrontend.java:978)
	... 27 more
@cjmyers
Copy link
Collaborator

cjmyers commented Mar 5, 2018 via email

@cjmyers
Copy link
Collaborator

cjmyers commented Mar 5, 2018

Hmm, this is strange. It works fine from SBOLDesigner but not my little test program...

@cjmyers
Copy link
Collaborator

cjmyers commented Mar 5, 2018

Ok, figured out my issue. My test program was using Java 1.7. Once I shifted to 1.8, it works fine. Here is my test:

	SynBioHubFrontend sbh = new SynBioHubFrontend("https://synbiohub.org");
	sbh.login("myers@ece.utah.edu", <password>);
	SBOLDocument doc = sbh.getSBOL(URI.create("https://synbiohub.org/user/myers/test/test/1"));
	doc.write(System.out);

Are you sure you are using the latest 1.8 version? Also, make sure you are not using 1.9. If you have upgraded to 1.9, then this could be your problem. There is a known issue with libSBOLj and Java 9 that we are aware of and trying to fix.

@cjmyers
Copy link
Collaborator

cjmyers commented Mar 5, 2018

Ah, actually, I'm pretty positive that given your symptoms that you likely updated to Java 9. The Java 9 bug manifests as being unable to read SBOL files. There is a bug in the sbol-data library, which I've asked Goksel to try to sort out.

@jakebeal
Copy link
Author

jakebeal commented Mar 5, 2018

I am definitely not on Java 9:

$ java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

@cjmyers
Copy link
Collaborator

cjmyers commented Mar 5, 2018

Strange. Ok, can you confirm a few things.

  1. Is this only happening on synbiohub.org? Do you have this issue with synbiohub.utah.edu?
  2. Does this happen for all parts or only a particular part?
  3. Do you get any kind of error message or stack trace?
  4. Can you email me separately a share link to the part that you are trying to fetch?

@jakebeal
Copy link
Author

jakebeal commented Mar 5, 2018

  1. My private parts aren't on synbiohub.utah.edu, so I don't know.
  2. Public parts on synbiohub.org do seem to work: it is only my private parts that do not (just validated this)
  3. The error message and stack trace are in my initial comment.
  4. Done.

@cjmyers
Copy link
Collaborator

cjmyers commented Mar 5, 2018

Ah, did not see stack trace as did not show up in the email. This is a not found exception which leads me to believe there is perhaps a typo in the URI that you are using to fetch with. I can fetch your part just fine with this code:

SynBioHubFrontend sbh = new SynBioHubFrontend("https://synbiohub.org");
SBOLDocument doc = sbh.getSBOL(URI.create(""));
doc.write(System.out);

Can you try this code with your "sharelink"? Also, can you double check that your URI is correct. Be sure you have "https" at the start, no extra slashes, etc.

I'm at a loss as to what else it might be, since we have not updated synbiohub.org in awhile, and you said this was working.

@jakebeal
Copy link
Author

jakebeal commented Mar 5, 2018

No typos, no URI issues: the exact same URI pulls up the part when entered into a browser, and I have not touched this code since it was working, a few days ago. I will try the sharelink.

@jakebeal
Copy link
Author

jakebeal commented Mar 5, 2018

Swapping the "share" link for the private link works, I don't know why.

@cjmyers cjmyers closed this as completed Mar 13, 2018
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

No branches or pull requests

2 participants