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

Error 405 on requirements provider retrieving jira issues #97

Open
eitzenbe opened this issue Jul 11, 2019 · 5 comments
Open

Error 405 on requirements provider retrieving jira issues #97

eitzenbe opened this issue Jul 11, 2019 · 5 comments

Comments

@eitzenbe
Copy link

eitzenbe commented Jul 11, 2019

when running serenity via mvn verify with JIRA configured it fails to retrieve the requirements

Any help / hint appreciated. I some where googled that some JQL features are only supported on Cloudbased Jira whereas we have a company server based installation ... fwiw

serenity.properties
jira.url=https://XXXXXXXXXXXXXX/jira03
jira.project=YYYYY
jira.username=ZZZZZZZZ
jira.password=AAAAAAAA
serenity.requirement.types=Epic,Story
serenity.public.url=http://buildserver.myorg.com/latest/serenity/report

pom deps:
net.serenity-bdd
serenity-core
2.0.55
test

        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-cucumber</artifactId>
        <version>1.9.40</version>
        <scope>test</scope>

        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-jira-requirements-provider</artifactId>
        <version>1.12.0</version>

        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-jira-plugin</artifactId>
        <version>1.12.0</version>

Stacktrace:

2019-07-11 08:54:08 WARN RequirementsTagProvider:28 - Failed to load requirements: net.serenitybdd.plugins.jira.model.JQLException: net.serenitybdd.plugins.jira.model.JQLException: JIRA query failed: error 405
java.lang.IllegalArgumentException: net.serenitybdd.plugins.jira.model.JQLException: net.serenitybdd.plugins.jira.model.JQLException: JIRA query failed: error 405
at net.serenitybdd.plugins.jira.requirements.JIRARequirementsProvider.getParentRequirementOf(JIRARequirementsProvider.java:266)
at net.thucydides.core.requirements.ParentRequirementsProvided.forOutcome(ParentRequirementsProvided.java:26)
at net.thucydides.core.requirements.BaseRequirementsService.getParentRequirementOf(BaseRequirementsService.java:138)
at net.thucydides.core.requirements.BaseRequirementsService.getParentRequirementFor(BaseRequirementsService.java:48)
at net.thucydides.core.reports.html.HtmlAcceptanceTestReporter.addParentRequirmentFieldToContext(HtmlAcceptanceTestReporter.java:168)
at net.thucydides.core.reports.html.HtmlAcceptanceTestReporter.addTestOutcomeToContext(HtmlAcceptanceTestReporter.java:162)
at net.thucydides.core.reports.html.HtmlAcceptanceTestReporter.generateReportFor(HtmlAcceptanceTestReporter.java:106)
at net.thucydides.core.reports.ReportService.generateReportFor(ReportService.java:238)
at net.thucydides.core.reports.ReportService.lambda$generateReportsFor$0(ReportService.java:175)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: net.serenitybdd.plugins.jira.model.JQLException: net.serenitybdd.plugins.jira.model.JQLException: JIRA query failed: error 405
at net.serenitybdd.plugins.jira.client.JerseyJiraClient.findByKey(JerseyJiraClient.java:239)
at net.serenitybdd.plugins.jira.requirements.JIRARequirementsProvider.getParentRequirementOf(JIRARequirementsProvider.java:255)
... 13 more
Caused by: net.serenitybdd.plugins.jira.model.JQLException: JIRA query failed: error 405
at net.serenitybdd.plugins.jira.client.JerseyJiraClient.checkValid(JerseyJiraClient.java:562)
at net.serenitybdd.plugins.jira.client.JerseyJiraClient.readFieldValues(JerseyJiraClient.java:489)
at net.serenitybdd.plugins.jira.client.JerseyJiraClient.loadByKey(JerseyJiraClient.java:245)
at net.serenitybdd.plugins.jira.client.FindByKeyLoader.load(FindByKeyLoader.java:17)
at net.serenitybdd.plugins.jira.client.FindByKeyLoader.load(FindByKeyLoader.java:8)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2156)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2046)
at com.google.common.cache.LocalCache.get(LocalCache.java:3948)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3972)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4957)
at net.serenitybdd.plugins.jira.client.JerseyJiraClient.findByKey(JerseyJiraClient.java:235)
... 14 more
2019-07-11 08:54:08 WARN RequirementsTagProvider:28 - Failed to load requirements: net.serenitybdd.plugins.jira.model.JQLException: net.serenitybdd.plugins.jira.model.JQLException: JIRA query failed: error 405
java.lang.IllegalArgumentException: net.serenitybdd.plugins.jira.model.JQLException: net.serenitybdd.plugins.jira.model.JQLException: JIRA query failed: error 405
at net.serenitybdd.plugins.jira.requirements.JIRARequirementsProvider.getParentRequirementOf(JIRARequirementsProvider.java:266)
at net.thucydides.core.requirements.ParentRequirementsProvided.forOutcome(ParentRequirementsProvided.java:26)
at net.thucydides.core.requirements.BaseRequirementsService.getParentRequirementOf(BaseRequirementsService.java:138)
at net.thucydides.core.requirements.BaseRequirementsService.getParentRequirementFor(BaseRequirementsService.java:48)
at net.thucydides.core.reports.html.HtmlAcceptanceTestReporter.addParentRequirmentFieldToContext(HtmlAcceptanceTestReporter.java:168)
at net.thucydides.core.reports.html.HtmlAcceptanceTestReporter.addTestOutcomeToContext(HtmlAcceptanceTestReporter.java:162)
at net.thucydides.core.reports.html.HtmlAcceptanceTestReporter.generateReportFor(HtmlAcceptanceTestReporter.java:106)
at net.thucydides.core.reports.ReportService.generateReportFor(ReportService.java:238)
at net.thucydides.core.reports.ReportService.lambda$generateReportsFor$0(ReportService.java:175)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: net.serenitybdd.plugins.jira.model.JQLException: net.serenitybdd.plugins.jira.model.JQLException: JIRA query failed: error 405
at net.serenitybdd.plugins.jira.client.JerseyJiraClient.findByKey(JerseyJiraClient.java:239)
at net.serenitybdd.plugins.jira.requirements.JIRARequirementsProvider.getParentRequirementOf(JIRARequirementsProvider.java:255)
... 13 more
Caused by: net.serenitybdd.plugins.jira.model.JQLException: JIRA query failed: error 405
at net.serenitybdd.plugins.jira.client.JerseyJiraClient.checkValid(JerseyJiraClient.java:562)
at net.serenitybdd.plugins.jira.client.JerseyJiraClient.readFieldValues(JerseyJiraClient.java:489)
at net.serenitybdd.plugins.jira.client.JerseyJiraClient.loadByKey(JerseyJiraClient.java:245)
at net.serenitybdd.plugins.jira.client.FindByKeyLoader.load(FindByKeyLoader.java:17)
at net.serenitybdd.plugins.jira.client.FindByKeyLoader.load(FindByKeyLoader.java:8)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2156)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2046)
at com.google.common.cache.LocalCache.get(LocalCache.java:3948)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3972)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4957)
at net.serenitybdd.plugins.jira.client.JerseyJiraClient.findByKey(JerseyJiraClient.java:235)
... 14 more
2019-07-11 08:54:10 WARN RequirementsTagProvider:28 - Failed to load requirements: net.serenitybdd.plugins.jira.model.JQLException: net.serenitybdd.plugins.jira.model.JQLException: JIRA query failed: error 405
java.lang.IllegalArgumentException: net.serenitybdd.plugins.jira.model.JQLException: net.serenitybdd.plugins.jira.model.JQLException: JIRA query failed: error 405
at net.serenitybdd.plugins.jira.requirements.JIRARequirementsProvider.getParentRequirementOf(JIRARequirementsProvider.java:266)
at net.thucydides.core.requirements.ParentRequirementsProvided.forOutcome(ParentRequirementsProvided.java:26)
at net.thucydides.core.requirements.BaseRequirementsService.getParentRequirementOf(BaseRequirementsService.java:138)
at net.thucydides.core.requirements.BaseRequirementsService.getAncestorRequirementsFor(BaseRequirementsService.java:78)
at net.thucydides.core.reports.html.HtmlAcceptanceTestReporter.addBreadcrumbs(HtmlAcceptanceTestReporter.java:198)
at net.thucydides.core.reports.html.HtmlAcceptanceTestReporter.addParentRequirmentFieldToContext(HtmlAcceptanceTestReporter.java:186)
at net.thucydides.core.reports.html.HtmlAcceptanceTestReporter.addTestOutcomeToContext(HtmlAcceptanceTestReporter.java:162)
at net.thucydides.core.reports.html.HtmlAcceptanceTestReporter.generateReportFor(HtmlAcceptanceTestReporter.java:106)
at net.thucydides.core.reports.ReportService.generateReportFor(ReportService.java:238)
at net.thucydides.core.reports.ReportService.lambda$generateReportsFor$0(ReportService.java:175)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: net.serenitybdd.plugins.jira.model.JQLException: net.serenitybdd.plugins.jira.model.JQLException: JIRA query failed: error 405
at net.serenitybdd.plugins.jira.client.JerseyJiraClient.findByKey(JerseyJiraClient.java:239)
at net.serenitybdd.plugins.jira.requirements.JIRARequirementsProvider.getParentRequirementOf(JIRARequirementsProvider.java:255)
... 14 more
Caused by: net.serenitybdd.plugins.jira.model.JQLException: JIRA query failed: error 405
at net.serenitybdd.plugins.jira.client.JerseyJiraClient.checkValid(JerseyJiraClient.java:562)
at net.serenitybdd.plugins.jira.client.JerseyJiraClient.readFieldValues(JerseyJiraClient.java:489)
at net.serenitybdd.plugins.jira.client.JerseyJiraClient.loadByKey(JerseyJiraClient.java:245)
at net.serenitybdd.plugins.jira.client.FindByKeyLoader.load(FindByKeyLoader.java:17)
at net.serenitybdd.plugins.jira.client.FindByKeyLoader.load(FindByKeyLoader.java:8)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2156)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2046)
at com.google.common.cache.LocalCache.get(LocalCache.java:3948)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3972)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4957)
at net.serenitybdd.plugins.jira.client.JerseyJiraClient.findByKey(JerseyJiraClient.java:235)
... 15 more

@lucassdelafuente
Copy link

Hi! I have the same problem.
Did you fix the problem?
@wakaleo please can you help us?

@wakaleo
Copy link
Member

wakaleo commented Oct 30, 2020

The JIRA APIs have changed so the whol library needs an upgrade.

@lucassdelafuente
Copy link

Thanks John. My problem was resolve but unfortunately, I have another problem.

The first execution everything is OK -> The comment in JIRA related to the execution is OK.
But
In the second execution I have an error in console:

[main] INFO net.serenitybdd.plugins.jira.JiraUpdater - Updating comments for issue DYM-265
[main] INFO net.serenitybdd.plugins.jira.JiraUpdater - WIKI Rendering activated: true

java.lang.NullPointerException
at net.serenitybdd.plugins.jira.domain.Author.fromJsonString(Author.java:29)
at net.serenitybdd.plugins.jira.domain.IssueComment.fromJsonString(IssueComment.java:214)
at net.serenitybdd.plugins.jira.client.JerseyJiraClient.getComments(JerseyJiraClient.java:783)
at net.serenitybdd.plugins.jira.service.JiraIssueTracker.getCommentsFor(JiraIssueTracker.java:93)
at net.serenitybdd.plugins.jira.JiraUpdater.newOrUpdatedCommentFor(JiraUpdater.java:128)
at net.serenitybdd.plugins.jira.JiraUpdater.updateIssue(JiraUpdater.java:93)
at net.serenitybdd.plugins.jira.JiraUpdater.lambda$updateIssueStatus$0(JiraUpdater.java:75)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:401)
at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:734)
at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:650)
at net.serenitybdd.plugins.jira.JiraUpdater.updateIssueStatus(JiraUpdater.java:74)
at net.serenitybdd.plugins.jira.JiraStepListener.testSuiteFinished(JiraStepListener.java:89)
at net.thucydides.core.steps.StepEventBus.testSuiteFinished(StepEventBus.java:616)
at io.cucumber.core.plugin.SerenityReporter.lambda$assureTestSuiteFinished$7(SerenityReporter.java:739)
at java.util.Optional.ifPresent(Optional.java:159)
at io.cucumber.core.plugin.SerenityReporter.assureTestSuiteFinished(SerenityReporter.java:737)
at io.cucumber.core.plugin.SerenityReporter.handleTestRunFinished(SerenityReporter.java:334)
at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:45)
at io.cucumber.core.eventbus.AbstractEventBus.send(AbstractEventBus.java:9)
at io.cucumber.junit.CucumberSerenityRunner$RunCucumber.evaluate(CucumberSerenityRunner.java:255)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)

It's very strange because the first time it works well.

@lucassdelafuente
Copy link

lucassdelafuente commented Nov 3, 2020

@wakaleo
Now only with serenity-jira-plugin / 1.12.0 the error disappears but :

The first execution everything is OK -> The comment in JIRA related to the execution is OK.
But
In the second execution (FAIL) -> The comment in JIRA isn't update
(If I delete the comment in JIRA and run the test again the comment is loaded. It's strange I think that the problem is with the plugin)

Any idea? Please, help me. Thanks!

Logs:
[main] INFO net.serenitybdd.plugins.jira.JiraUpdater - Updating comments for issue DYM-265
[main] INFO net.serenitybdd.plugins.jira.JiraUpdater - WIKI Rendering activated: true

[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 8.232 s <<< FAILURE! - in com.automation.api.acceptancetests.CucumberTestSuite

[ERROR] com.automation.api.acceptancetests.CucumberTestSuite Time elapsed: 7.218 s <<< ERROR!
java.lang.NullPointerException

[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] CucumberTestSuite » NullPointer
[INFO]
[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0

@lucassdelafuente
Copy link

Hi @wakaleo any ideas about my problem? Thanks!

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

3 participants