Allure. Unsatisfied dependency of type [interface com.atlassian.struts.TextProvider] - bamboo

We have CI Bamboo and allure plugin for it.
So, if I set allure version as 1.3.9 - all is Ok, but if version is 1.4.0+, I get error on report's publishing stage (maven step ends successfully):
org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.atlassian.struts.TextProvider] is defined: Unsatisfied dependency of type [interface com.atlassian.struts.TextProvider]: expected at least 1 matching bean
This problem starts after webDriverFactory version increasing or after moving remote agents to a new VM

Allure Bamboo Plugin is not supported well. You can generate report using Allure CLI just as usual build step. And then publish it as regular HTML report.

Related

Problems in IntelliJ since version 2022.1 / java.lang.NoClassDefFoundError

As of today, when I try to run some of my programs in IntelliJ today, this message was shown:
Executing pre-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Running 'before' tasks
Checking sources
Finished, saving caches…
Module 'Listen' production: java.lang.NoClassDefFoundError: com/intellij/DynamicBundle
Executing post-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Synchronizing output directories...
13.04.22, 14:54 - Build completed with 1 error and 0 warnings in 4 sec, 39 ms
This line is printed in red: Module 'Listen' production: java.lang.NoClassDefFoundError: com/intellij/DynamicBundle
I don't really have too much of an idea where I should look for the problem.
It seems to not have anything to do with the project itself. I already created a new Project and created a Hello World-program, which resulted in the same error.
Remarkably, yesterday my IntelliJ IDEA version was updated to version 2022.1.
Runtime version: 11.0.14.1+1-b2043.25 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
I have no idea either whether it has anything to do with the new version either.
I maintain another Project, which uses Scala language. That one is messed up even more:
Cannot process toolwindow sbt
java.lang.AbstractMethodError: Missing implementation of resolved method 'abstract com.intellij.openapi.externalSystem.settings.AbstractExternalSystemSettings getSettings(com.intellij.openapi.project.Project)' of abstract class com.intellij.openapi.externalSystem.service.task.ui.AbstractExternalSystemToolWindowFactory.
at com.intellij.openapi.externalSystem.service.task.ui.AbstractExternalSystemToolWindowFactory.shouldBeAvailable(AbstractExternalSystemToolWindowFactory.java:35)
at com.intellij.toolWindow.ToolWindowSetInitializerKt.beanToTask(ToolWindowSetInitializer.kt:262)
at com.intellij.toolWindow.ToolWindowSetInitializerKt.beanToTask(ToolWindowSetInitializer.kt:248)
at com.intellij.toolWindow.ToolWindowSetInitializerKt.access$beanToTask(ToolWindowSetInitializer.kt:1)
at com.intellij.toolWindow.ToolWindowSetInitializerKt$computeToolWindowBeans$1.accept(ToolWindowSetInitializer.kt:278)
at com.intellij.toolWindow.ToolWindowSetInitializerKt$computeToolWindowBeans$1.accept(ToolWindowSetInitializer.kt)
at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processWithPluginDescriptor(ExtensionPointImpl.java:301)
at com.intellij.toolWindow.ToolWindowSetInitializerKt.computeToolWindowBeans(ToolWindowSetInitializer.kt:274)
at com.intellij.toolWindow.ToolWindowSetInitializer$1.get(ToolWindowSetInitializer.kt:101)
at com.intellij.toolWindow.ToolWindowSetInitializer$1.get(ToolWindowSetInitializer.kt:83)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
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.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:829)
Any advice?
Best
Stapelüberläufer
I had the same problem after upgrading to Intellij 2022.1
For me, the fix came from Gen's answer. I also had an old Scala plugin, and just removed it as I'm not using it anymore.
If you are looking to upgrade it, go to File -> Settings -> Plugins. From there just hit Upgrade for the plugins you want. After that restart the IDE.
I found that Scala plugin was not updated and updating it to at least version 2022.1.13 fixed it for me.
I upgraded to Intellij 2022.1 and encountered this issue when trying to sync the old gradles projects that used to work for me :
Caused by: java.lang.NoClassDefFoundError: org/gradle/internal/impldep/com/google/common/collect/Lists
Cleaning the caches folder's content (Gradle_HOME/caches) resolved this issue for me
Make sure to also check that the SDK is correctly configured for your project (Java 17 by default) and the Gradle home is well specified in the Settings>Gradle section.
For info, I'm using Java 8 and Gradle 5.5.1 (yes I know :))
Just upgrade the Scala Plugin and its done!
visiting
scala plugin's page
and install it from there worked for me on ultimate version 2022.2.3

Exception occurred applying plugin request[id:'org.jetbrains.kotlin.jvm', version:'1.3.40-eap-40']

An exception occurred applying plugin request [id: 'org.jetbrains.kotlin.jvm', version: '1.3.40-eap-40']
> Failed to apply plugin [id 'org.jetbrains.kotlin.jvm']
> Cannot add extension with name 'kotlin', as there is an extension already registered with that name.
This error occurs in my build.gradle.kts file
Did you happen to see this error in a Kotlin Cocoapods project built from the samples provided on Kotlin/Native GitHub?
This error occurs because in the build.gradle.kts, there are conflicting plugin imports. Like seen below:
You can't have kotlin 'Jim' plugin and 'multi-platform plugin' together, so remove the kotlin("jvm") version "1.3.31" and build your gradle project.
Also, when you remove this will be accompanied by few more errors in the dependencies section. So comment out everything from dependencies and the two compile tasks below as well and build it. It should work!

EclipseLink Moxy with Java11

I asked this questions already here:
https://www.eclipse.org/forums/index.php/t/1098133/
Now, after 3 weeks, i hope to have luck to reach a response here in stackoverflow.
I have a RCP applcation using MOXy to parse complex XML, the annotated classes are generated by XJC, and the package contains a ObjectFactory and a jaxb.properties pointing to MOXy.
The problem: The application works with Java8, but starting the application with Java11, i get this exception:
java.lang.RuntimeException: javax.xml.bind.JAXBException
- with linked exception:
[Exception [EclipseLink-50000] (Eclipse Persistence Services - 2.7.4.v20190115-ad5b7c6b2a): org.eclipse.persistence.exceptions.JAXBException
Exception Description: The context path mypackage contains no ObjectFactory or jaxb.index, no external metadata was found in properties Map, and sessions.xml was found or was invalid.
Internal Exception: Exception [EclipseLink-7095] (Eclipse Persistence Services - 2.7.4.v20190115-ad5b7c6b2a): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The sessions.xml resource [sessions.xml] was not found on the resource path. Check that the resource name/path and classloader passed to the SessionManager.getSession are correct. The sessions.xml should be included in the root of the application's deployed jar, if the sessions.xml is deployed in a sub-directory in the application's jar ensure that the correct resource path using "/" not "\" is used.]
My target platform contains:
org.eclipse.persistence.moxy_2.7.4....jar
jaxb-osgi-2.3.2.jar
jakarta.activation.jar
jakarta.xml.bind-api.jar
I use Multi-Release: true to be able to handle Java8 vs. Java9+.
In the main MANIFEST.FM i require org.eclipse.persistence.moxy.
In the versions/9/OSGI-INF/MANIFEST.FM I add the import packages: com.sun.xml.bind.v2, javax.xml.bind
To start the application in the Eclipse run configuration dialog, i switch the JRE Java8 vs Java11, and in the plugins tab, i remove (J8) or add (J11) com.sun.xml.bind.jaxb-osgi (jaxb-osgi.jar) to make it startable.
Can someone help?
regards
Frank

Exception while running Seedstack Application

I have used seedstack dependecies for Hibernate and JPA to create DAO services that performs crud operations on Database.
I am trying to Launch this Seedstack application module through Java application Launcher in eclipse, by SeedMain class.
In pom.xml - dependecy for undertow is given.
<dependency>
<groupId>org.seedstack.seed</groupId>
<artifactId>seed-web-undertow</artifactId>
</dependency>
When executing the SeedMain class, I am getting the below error snakeyaml error:-
Exception in thread "main" java.lang.NoSuchMethodError: org.yaml.snakeyaml.DumperOptions.setSplitLines(Z)V
at com.fasterxml.jackson.dataformat.yaml.YAMLGenerator.buildDumperOptions(YAMLGenerator.java:259)
at com.fasterxml.jackson.dataformat.yaml.YAMLGenerator.<init>(YAMLGenerator.java:232)
at com.fasterxml.jackson.dataformat.yaml.YAMLFactory._createGenerator(YAMLFactory.java:447)
at com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createGenerator(YAMLFactory.java:397)
at org.seedstack.seed.core.internal.diagnostic.DefaultDiagnosticReporter.writeDiagnosticReport(DefaultDiagnosticReporter.java:75)
at org.seedstack.seed.core.internal.diagnostic.DefaultDiagnosticReporter.writeDiagnosticReport(DefaultDiagnosticReporter.java:67)
at org.seedstack.seed.core.internal.diagnostic.DiagnosticManagerImpl.dumpDiagnosticReport(DiagnosticManagerImpl.java:70)
at org.seedstack.seed.core.SeedMain.handleException(SeedMain.java:68)
at org.seedstack.seed.core.SeedMain.main(SeedMain.java:61)
As per my understanding the Error is due to some version inconsistency for snakeyaml, But for Seedstack as the versions for dependecies are resolved by seedstack-bom dependecy, so where exactly should I do the changes to resolve the error.
Thanks in Advance!
From reading the stacktrace, it seems that you have some error on startup which is handled by the handleException() method. This method then tries to write a YAML diagnostic report but ultimately fails due to the snakeyaml version issue you mentioned.
You should do two things:
Fix the snakeyaml dependency issue by looking into the dependency tree. This kind of problem is often caused by some library that makes Maven choose an older version. SeedStack needs at least jackson-dataformat-yaml version 2.9.4 which in turn needs at least snakeyaml 1.18.
Fix the other error by looking at the full stacktrace. When a diagnostic report cannot be written, the original exception is still printed on the console (on stderr).

Why is the XUnit plugin not working with Jenkins?

I launched the tests IDE (selenium) from jenkins and I uploaded the XUNIT plugin for having a nice report of test but at the end I obtained this message of ERROR :
Tests failed, see result file for details:
D:\FTP\stm_atos_automatisation\rapports\ff39\rapport_ff39.html ERROR: Build step failed with exception java.lang.NullPointerException: The types section is required.
at org.jenkinsci.plugins.xunit.XUnitProcessor.<init>(XUnitProcessor.java:65)
at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:111)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:381) Build step 'Publish xUnit test result report' marked build as failure Finished: FAILURE
Is there any way to solve this problem?
I was getting this error too when I first enabled the XUnit plugin.
I hadn't realized (or had forgotten) that I needed to add a report type to the XUnit build step configuration. To do so, click Add and then select the type of report you want parsed (for me it was PHPUnit-3.x). See this screenshot. You'll also have to specify the path to the XML report files that you want parsed. (I'm using Codeception, so it was tests/_log/*.xml.)