-
1. Re: CDI-enabled module in WF
mkouba May 31, 2016 4:44 AM (in response to nickarls)Hi Nicklas, for Seam Security you should go with http://picketlink.org/ (it's included in WildFly dist). Anyway, could you post the full stacktrace?
-
2. Re: CDI-enabled module in WF
nickarls May 31, 2016 4:54 AM (in response to mkouba)2016-05-31 10:46:30,719 WARN [org.jboss.as.weld] (MSC service thread 1-2) WFLYWELD0052: Using deployment classloader to load proxy classes for module my.module:main. Package-private access will not work. To fix this the module should declare dependencies on [org.jboss.weld.core, org.jboss.weld.spi]
2016-05-31 10:46:30,789 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."my.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."my.war".WeldStartService: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type SecurityExtension with qualifiers @Default
at injection point [BackedAnnotatedField] @Inject org.jboss.seam.security.SecurityInterceptor.extension
at org.jboss.seam.security.SecurityInterceptor.extension(SecurityInterceptor.java:0)
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:359)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)
at org.jboss.weld.bootstrap.Validator.validateInterceptor(Validator.java:556)
at org.jboss.weld.bootstrap.ConcurrentValidator$2.doWork(ConcurrentValidator.java:85)
at org.jboss.weld.bootstrap.ConcurrentValidator$2.doWork(ConcurrentValidator.java:83)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
2016-05-31 10:46:30,801 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "my.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"my.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"my.war\".WeldStartService: Failed to start service
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type SecurityExtension with qualifiers @Default
at injection point [BackedAnnotatedField] @Inject org.jboss.seam.security.SecurityInterceptor.extension
at org.jboss.seam.security.SecurityInterceptor.extension(SecurityInterceptor.java:0)
"}}
I have the picketlink modules in the module also. I haven't written the code or looked that much on how the various libraires are used - I'm just dumping the seam/picketlink jars in to a separate module and adding API-module dependencies as problems arise...
-
3. Re: CDI-enabled module in WF
mkouba May 31, 2016 5:05 AM (in response to nickarls)I have the picketlink modules in the module also. I haven't written the code or looked that much on how the various libraires are used...
Nested modules? Sorry, I don't understand. It would be great if you could provide a simple reproducer. It's pretty difficult to help with so limited info.
-
4. Re: CDI-enabled module in WF
nickarls May 31, 2016 5:10 AM (in response to mkouba)No, not nested, just flat:
<module xmlns="urn:jboss:module:1.3" name="fi.affecto.kake"> <resources> <resource-root path="picketlink-idm-api-1.5.0.Alpha02.jar"/> <resource-root path="picketlink-idm-common-1.5.0.Alpha02.jar"/> <resource-root path="picketlink-idm-core-1.5.0.Alpha02.jar"/> <resource-root path="picketlink-idm-spi-1.5.0.Alpha02.jar"/> <resource-root path="seam-faces-3.1.0.Beta4.jar"/> <resource-root path="seam-faces-api-3.1.0.Beta4.jar"/> <resource-root path="seam-international-3.1.0.Beta4.jar"/> <resource-root path="seam-international-api-3.1.0.Beta4.jar"/> <resource-root path="seam-persistence-3.1.0.Beta4.jar"/> <resource-root path="seam-persistence-api-3.1.0.Beta4.jar"/> <resource-root path="seam-security-3.1.0.Beta4.jar"/> <resource-root path="seam-security-api-3.1.0.Beta4.jar"/> <resource-root path="seam-transaction-3.1.0.Beta4.jar"/> <resource-root path="seam-transaction-api-3.1.0.Beta4.jar"/> <resource-root path="solder-api-3.1.1.Final.jar"/> <resource-root path="solder-impl-3.1.1.Final.jar"/> <resource-root path="solder-logging-3.1.1.Final.jar"/> </resources> <dependencies> <module name="javax.enterprise.api"/> <module name="javax.transaction.api"/> <module name="javax.faces.api"/> </dependencies> </module>
-
5. Re: CDI-enabled module in WF
nickarls May 31, 2016 5:14 AM (in response to nickarls)Umm, nevermind that. Somebody had left some cdi-api.jars in the deployment itself. Now it's
"{\"WFLYCTL0080: Failed services\" => {\"jboss.deployment.unit.\\\"my.war\\\".WeldStartService\" => \"org.jboss.msc.service.StartException in service jboss.deployment.unit.\\\"my.war\\\".WeldStartService: Failed to start service
Caused by: org.jboss.weld.exceptions.DeploymentException: Exception List with 4 exceptions:
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type ServletLogger with qualifiers @Default
at injection point [BackedAnnotatedField] @Inject @Category private org.jboss.solder.servlet.event.ImplicitServletObjectsHolder.log
at org.jboss.solder.servlet.event.ImplicitServletObjectsHolder.log(ImplicitServletObjectsHolder.java:0)
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:359)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:155)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:518)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type ServletExtension with qualifiers @Default
at injection point [BackedAnnotatedParameter] Parameter 2 of [BackedAnnotatedMethod] @Produces @TypedParamValue protected org.jboss.solder.servlet.http.RequestParamProducer.getTypedParamValue(InjectionPoint, ServletExtension)
at org.jboss.solder.servlet.http.RequestParamProducer.getTypedParamValue(RequestParamProducer.java:63)
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:359)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:155)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:518)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type ServletExtension with qualifiers @Default
at injection point [BackedAnnotatedParameter] Parameter 2 of [BackedAnnotatedMethod] @Produces @TypedParamValue protected org.jboss.solder.servlet.http.HeaderParamProducer.getTypedParamValue(InjectionPoint, ServletExtension)
at org.jboss.solder.servlet.http.HeaderParamProducer.getTypedParamValue(HeaderParamProducer.java:62)
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:359)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:155)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:518)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type ServletExtension with qualifiers @Default
at injection point [BackedAnnotatedParameter] Parameter 2 of [BackedAnnotatedMethod] @Produces @TypedParamValue protected org.jboss.solder.servlet.http.CookieParamProducer.getTypedParamValue(InjectionPoint, ServletExtension)
at org.jboss.solder.servlet.http.CookieParamProducer.getTypedParamValue(CookieParamProducer.java:62)
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:359)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:155)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:518)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
\"}}"
investigating...
-
6. Re: CDI-enabled module in WF
nickarls May 31, 2016 5:52 AM (in response to nickarls)Back at the original "org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type SecurityExtension with qualifiers @Default
at injection point [BackedAnnotatedField] @Inject org.jboss.seam.security.SecurityInterceptor.extension"
Extensions should be injectable, right? In the seam security impl jar META-INF\services\j.e.i.s.Extension there is
org.jboss.seam.security.contexts.AuthenticationScopedExtension
org.jboss.seam.security.SecurityExtension
org.jboss.seam.security.management.picketlink.JpaIdentityStoreConfiguration
-
7. Re: CDI-enabled module in WF
mkouba May 31, 2016 7:00 AM (in response to nickarls)Extensions should be injectable, right?
Yes, they are in a regular CDI app. And they should be in static WildFly modules, but I'm not sure how is it implemented... will have to check.
-
8. Re: CDI-enabled module in WF
mkouba May 31, 2016 7:07 AM (in response to nickarls)Is the SecurityExtension picked up? You should see a bean registered for each extension in the log (just enable debug logging - Weld: Documentation).
-
9. Re: CDI-enabled module in WF
mkouba May 31, 2016 7:10 AM (in response to nickarls)Also do you import services on the module dependency, i.e.
<module name="fi.affecto.kake" services="import"/>
? -
10. Re: CDI-enabled module in WF
nickarls May 31, 2016 7:22 AM (in response to mkouba)I didn't see the SecurityExtension in the debug log but adding services="import" gave me a
Caused by: java.lang.NoClassDefFoundError: javax/persistence/OptimisticLockException
so I'll add some more APIs and get back to you ;-)
Thanks so far.