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

Unable to use Gitlab-scm-handler #147

Closed
Riduidel opened this issue May 2, 2022 · 0 comments
Closed

Unable to use Gitlab-scm-handler #147

Riduidel opened this issue May 2, 2022 · 0 comments
Assignees

Comments

@Riduidel
Copy link
Owner

Riduidel commented May 2, 2022

When adding gitlab-scm-handler as maven dependency, I get the following exception

org.jboss.weld.exceptions.DeploymentException: WELD-001410: The injection point has non-proxyable dependencies: [BackedAnnotatedField] @Inject org.ndx.agile.architecture.gitlab.GitLabTicketsHandler.gitlab
	at org.ndx.agile.architecture.gitlab.GitLabTicketsHandler.gitlab(GitLabTicketsHandler.java:0)
  StackTrace
	at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:399)
	at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:290)
	at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:143)
	at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:164)
	at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:526)
	at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:512)
	at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:487)
	at org.jboss.weld.bootstrap.WeldStartup.validateBeans(WeldStartup.java:496)
	at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:93)
	at org.jboss.weld.environment.se.Weld.initialize(Weld.java:804)
	at org.jboss.weld.environment.se.Weld.initialize(Weld.java:176)
	at org.ndx.agile.architecture.base.ArchitectureDocumentationBuilder.main(ArchitectureDocumentationBuilder.java:33)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001480: Bean type class org.gitlab4j.api.GitLabApi is not proxyable because it contains a final method public final org.gitlab4j.api.GitLabApi org.gitlab4j.api.GitLabApi.duplicate() - Producer Method [GitLabApi] with qualifiers [@Any @Default] declared as [[BackedAnnotatedMethod] @Produces @ApplicationScoped public org.ndx.agile.architecture.gitlab.GitLabProducer.initialize(@ConfigProperty String, @ConfigProperty String)].
	at org.jboss.weld.util.Proxies.getUnproxyableClassException(Proxies.java:223)
	at org.jboss.weld.util.Proxies.getUnproxyableTypeException(Proxies.java:178)
	at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:397)
	... 17 more

There must be something to change, no?

@Riduidel Riduidel self-assigned this May 2, 2022
Riduidel added a commit that referenced this issue May 4, 2022
Mind you, as GitlabApi has a public final method, it's impossible to use it in CDI.
As a consquence, i created a holder object allowing easy access, which replaces the previously used Producer class.
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

1 participant