René's URL Explorer Experiment


Title: NCBIQBlastService.sendAlignmentRequest | Always throws ArrayIndexOutOfBoundsException · Issue #1033 · biojava/biojava · GitHub

Open Graph Title: NCBIQBlastService.sendAlignmentRequest | Always throws ArrayIndexOutOfBoundsException · Issue #1033 · biojava/biojava

X Title: NCBIQBlastService.sendAlignmentRequest | Always throws ArrayIndexOutOfBoundsException · Issue #1033 · biojava/biojava

Description: I am using BioJava through Maven, using biojava 6.0.5 and biojava-ws 6.0.4 (because trying to use 6.0.5 produces errors): org.biojava

Open Graph Description: I am using BioJava through Maven, using biojava 6.0.5 and biojava-ws 6.0.4 (because trying to use 6.0.5 produces errors):

X Description: I am using BioJava through Maven, using biojava 6.0.5 and biojava-ws 6.0.4 (because trying to use 6.0.5 produces errors): <!-- https://mvnrepository.com/artifact/org.biojava/biojava --> <d...

Opengraph URL: https://github.com/biojava/biojava/issues/1033

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"NCBIQBlastService.sendAlignmentRequest | Always throws ArrayIndexOutOfBoundsException","articleBody":"I am using BioJava through Maven, using biojava 6.0.5 and biojava-ws 6.0.4 (because trying to use 6.0.5 produces errors):\r\n\r\n```\r\n\u003c!-- https://mvnrepository.com/artifact/org.biojava/biojava --\u003e\r\n\u003cdependency\u003e\r\n   \u003cgroupId\u003eorg.biojava\u003c/groupId\u003e\r\n   \u003cartifactId\u003ebiojava\u003c/artifactId\u003e\r\n   \u003cversion\u003e6.0.5\u003c/version\u003e\r\n   \u003ctype\u003epom\u003c/type\u003e\r\n\u003c/dependency\u003e\r\n\u003c!-- https://mvnrepository.com/artifact/org.biojava/biojava-ws --\u003e\r\n\u003cdependency\u003e\r\n   \u003cgroupId\u003eorg.biojava\u003c/groupId\u003e\r\n   \u003cartifactId\u003ebiojava-ws\u003c/artifactId\u003e\r\n   \u003cversion\u003e6.0.4\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n```\r\n\r\nI'm trying to submit blast requests to NCBI. To do this, I have largely followed this guide:\r\nhttps://biojava.org/wiki/BioJava:CookBook3:NCBIQBlastService\r\n\r\nMy relevant code is as follows:\r\n\r\n```\r\nprivate NCBIQBlastAlignmentProperties inputProperties = new NCBIQBlastAlignmentProperties();\r\nprivate NCBIQBlastService service = new NCBIQBlastService();\r\n\r\n...\r\n\r\ninputProperties.setBlastDatabase(\"swissprot\");\r\ninputProperties.setBlastExpect(Double.parseDouble(\"1e-10\"));\r\ninputProperties.setBlastProgram(BlastProgramEnum.blastp);\r\ninputProperties.setAlignmentOption(BlastAlignmentParameterEnum.ENTREZ_QUERY, \"\u003credacted\u003e\");   //Note this redaction is not in my original code.\r\n\r\n...\r\n\r\nSystem.out.println(\"Submitting \" + inputSequences.getSize() + \" requests\");\r\nfor(int i=0; i\u003cinputSequences.getSize(); i++)\r\n{\r\n   try\r\n   {\r\n      rids.add(this.service.sendAlignmentRequest(inputSequences.getSequence(i), inputProperties));\r\n   }\r\n   catch (Exception e)\r\n   {\r\n      e.printStackTrace();\r\n   }\r\n}\r\n```\r\n\r\nNote that \"rids\" is an ArrayList\u003cString\u003e for storing rid strings and inputSequences is an instance of a class which stores sequence data as String.\r\n\r\nWhen executed, the following error is thrown on each iteration of the for loop:\r\n\r\n```\r\njava.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1\r\nat org.biojava.nbio.ws.alignment.qblast.NCBIQBlastService.sendAlignmentRequest(NCBIQBlastService.java:223)\r\n```\r\n\r\nNote that this error is not being thrown by my code, but by the NCBIQBlastService module. Going to this point in the code leads to the following block in NCBIQBlastService:\r\n\r\n```\r\nBlastJob job = new BlastJob();\r\nString line;\r\nwhile ((line = reader.readLine()) != null) {\r\n   if (!line.contains(\"class=\\\"error\\\"\") \u0026\u0026 !line.contains(\"Message ID#\")) {\r\n      // if there is no error, capture RID and RTOE\r\n      if (line.contains(\"RID = \")) {\r\n         String[] arr = line.split(\"=\");\r\n         job.setId(arr[1].trim());\r\n      } else if (line.contains(\"RTOE = \")) {\r\n         String[] arr = line.split(\"=\");\r\n         job.setStartTimestamp(System.currentTimeMillis());\r\n         job.setExpectedExecutionTime(Long.parseLong(arr[1].trim()) * 1000);\r\n      }\r\n      jobs.put(job.getId(), job);\r\n   } else {\r\n      // handle QBlast error message\r\n\r\n      // Capture everything to the left of this HTML statement...\r\n      String[] tmp = line.split(\"\u003c/p\u003e\u003c/li\u003e\u003c/ul\u003e\");\r\n\r\n      // Only the error message is on the right side of this...\r\n      String[] moreTmp = tmp[0].split(\"\u003cp class=\\\"error\\\"\u003e\");\r\n      throw new Exception(\"NCBI QBlast refused this request because: \" + moreTmp[1].trim());\r\n   }\r\n\r\n}\r\n```\r\n\r\nSpecifically, the line \"**throw new Exception(\"NCBI QBlast refused this request because: \" + moreTmp[1].trim());**\" is throwing the ArrayIndexOutOfBoundsException. Evidently there is something wrong with my request, hence why I'm getting the error handler, but I can't determine what that reason is is because moreTmp[1] is out of moreTmp's bounds (according to the error message it only has one element). Consequently, the exception the code is trying to throw doesn't get thrown and the reason for the refusal of the request is lost.\r\n","author":{"url":"https://github.com/FC123321","@type":"Person","name":"FC123321"},"datePublished":"2022-06-30T23:45:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1033/biojava/issues/1033"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c27163f2-6f17-de3a-f7e7-1ecdcc0acbeb
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id94C2:2D3E98:1D6220C:25EFAD2:6974651E
html-safe-nonce502e17a509cec63870b1bbf81a4898bec06ac8cbcc12c33074c6e375e5efc3cd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NEMyOjJEM0U5ODoxRDYyMjBDOjI1RUZBRDI6Njk3NDY1MUUiLCJ2aXNpdG9yX2lkIjoiODQxMzczMjU4OTc4ODIyNjg0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac5b33bd4117f9488bfef26b03ff1f4e26684245dc0beaef749409c57620dc9014
hovercard-subject-tagissue:1290736808
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/biojava/biojava/1033/issue_layout
twitter:imagehttps://opengraph.githubassets.com/6a6faadd7c7d53985eca0b6b2bf578108359fca30e5e8088c8fad414330749d9/biojava/biojava/issues/1033
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6a6faadd7c7d53985eca0b6b2bf578108359fca30e5e8088c8fad414330749d9/biojava/biojava/issues/1033
og:image:altI am using BioJava through Maven, using biojava 6.0.5 and biojava-ws 6.0.4 (because trying to use 6.0.5 produces errors):
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameFC123321
hostnamegithub.com
expected-hostnamegithub.com
Nonee0b95d743b7672c9ac0e1032d5f117950182dc164a83434a7db86510e8f0b37c
turbo-cache-controlno-preview
go-importgithub.com/biojava/biojava git https://github.com/biojava/biojava.git
octolytics-dimension-user_id237402
octolytics-dimension-user_loginbiojava
octolytics-dimension-repository_id9199359
octolytics-dimension-repository_nwobiojava/biojava
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id9199359
octolytics-dimension-repository_network_root_nwobiojava/biojava
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release56fe7e2e8de6e57740bca50402351ea656f7a4bf
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/biojava/biojava/issues/1033#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbiojava%2Fbiojava%2Fissues%2F1033
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbiojava%2Fbiojava%2Fissues%2F1033
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=biojava%2Fbiojava
Reloadhttps://patch-diff.githubusercontent.com/biojava/biojava/issues/1033
Reloadhttps://patch-diff.githubusercontent.com/biojava/biojava/issues/1033
Reloadhttps://patch-diff.githubusercontent.com/biojava/biojava/issues/1033
biojava https://patch-diff.githubusercontent.com/biojava
biojavahttps://patch-diff.githubusercontent.com/biojava/biojava
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fbiojava%2Fbiojava
Fork 395 https://patch-diff.githubusercontent.com/login?return_to=%2Fbiojava%2Fbiojava
Star 623 https://patch-diff.githubusercontent.com/login?return_to=%2Fbiojava%2Fbiojava
Code https://patch-diff.githubusercontent.com/biojava/biojava
Issues 67 https://patch-diff.githubusercontent.com/biojava/biojava/issues
Pull requests 2 https://patch-diff.githubusercontent.com/biojava/biojava/pulls
Actions https://patch-diff.githubusercontent.com/biojava/biojava/actions
Security 0 https://patch-diff.githubusercontent.com/biojava/biojava/security
Insights https://patch-diff.githubusercontent.com/biojava/biojava/pulse
Code https://patch-diff.githubusercontent.com/biojava/biojava
Issues https://patch-diff.githubusercontent.com/biojava/biojava/issues
Pull requests https://patch-diff.githubusercontent.com/biojava/biojava/pulls
Actions https://patch-diff.githubusercontent.com/biojava/biojava/actions
Security https://patch-diff.githubusercontent.com/biojava/biojava/security
Insights https://patch-diff.githubusercontent.com/biojava/biojava/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/biojava/biojava/issues/1033
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/biojava/biojava/issues/1033
NCBIQBlastService.sendAlignmentRequest | Always throws ArrayIndexOutOfBoundsExceptionhttps://patch-diff.githubusercontent.com/biojava/biojava/issues/1033#top
https://github.com/FC123321
https://github.com/FC123321
FC123321https://github.com/FC123321
on Jun 30, 2022https://github.com/biojava/biojava/issues/1033#issue-1290736808
https://biojava.org/wiki/BioJava:CookBook3:NCBIQBlastServicehttps://biojava.org/wiki/BioJava:CookBook3:NCBIQBlastService
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.