It’s been over a decade since I worked on a JEE application, and with all the spring-scanner stuff in Atlassian’s code base, I find myself struggling to resolve things. I have been tasked with fixing code of a departed developer. and I have run into this error when starting up jira from the plugin dir with atlas-run.
Error creating bean with name ‘pluginMethodValidationPostProcessor’ defined in URL …MET-INF/spring/plugin-context.xml. Invocation of inti method failed; nested exception is javax.validation.NoProviderFoundException: Unable to create a Configuration, because no Bean Validation provider could be found. Add a provider like Hibernate Validator to your classpath.
I believe the validator should be in the spring-scanner code/jar, right?
I have this defined in my plugin-context.xml file. I have
com.atlassian.plugin
atlassian-spring-scanner-annotation
3.0.2
provided
and also
com.atlassian.maven.plugins
jira-maven-plugin
${amps.version}
${jira.version}
${jira.version}
<instructions>
<Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
<!-- Add package to export here -->
<Export-Package>
com.out.jira.plugis.todolist.api,
</Export-Package>
<!-- Add package import here -->
<Import-Package>
org.springframework.osgi.*;resolution:="optional",
org.eclipse.gemini.blueprint.*;resolution:="optional",
</Import-Package>
<!-- Ensure plugin is spring powered -->
<Spring-Context>*</Spring-Context>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<executions>
<execution>
<goals>
<goal>atlassian-spring-scanner</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
<configuration>
<verbose>false</verbose>
</configuration>
</plugin>
</plugins>
I haven’t really found anything on the web. Can someone help point me in the right direction?
Thank you.