Issue Type: Feature Request Feature Request
Affects Versions: 1.2.0
Assignee: Bruno Oliveira
Components: authentication, authorization
Created: 16/Jul/13 3:13 AM
Description:

Testing the staged 1.2.0 offerings I am running into this situation:

09:05:45,874 INFO  [org.jboss.weld.ClassLoading] (MSC service thread 1-10) catching: org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class org.jboss.aerogear.security.web.authz.HawkAuthenticator
	at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:152) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:86) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:115) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:171) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:336) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.as.weld.services.WeldService.start(WeldService.java:76) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_09]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09]
	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09]
Caused by: java.lang.NoClassDefFoundError: Lcom/wealdtech/hawk/HawkServer;
	at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_09]
	at java.lang.Class.privateGetDeclaredFields(Class.java:2308) [rt.jar:1.7.0_09]
	at java.lang.Class.getDeclaredFields(Class.java:1760) [rt.jar:1.7.0_09]
	at org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:102) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:99) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAndWrap(SecureReflectionAccess.java:63) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.util.reflection.SecureReflections.getDeclaredFields(SecureReflections.java:99) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:153) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:118) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:49) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:40) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355)
	at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184)
	at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153)
	at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69)
	at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393)
	at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:149) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	... 11 more
Caused by: java.lang.ClassNotFoundException: com.wealdtech.hawk.HawkServer from [Module "deployment.ag-push.war:main" from Service Module Loader]
	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
	... 29 more

09:05:45,894 INFO  [org.jboss.weld.ClassLoading] (MSC service thread 1-10) WELD-000119 Not generating any bean definitions from org.jboss.aerogear.security.auth.HawkCredentialProvider because of underlying class loading error
09:05:45,895 INFO  [org.jboss.weld.ClassLoading] (MSC service thread 1-10) catching: org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class org.jboss.aerogear.security.auth.HawkCredentialProvider
	at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:152) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:86) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:115) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:171) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:336) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.as.weld.services.WeldService.start(WeldService.java:76) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_09]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09]
	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09]
Caused by: java.lang.NoClassDefFoundError: com/wealdtech/hawk/HawkCredentials
	at java.lang.Class.getDeclaredMethods0(Native Method) [rt.jar:1.7.0_09]
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2442) [rt.jar:1.7.0_09]
	at java.lang.Class.getDeclaredMethods(Class.java:1808) [rt.jar:1.7.0_09]
	at org.jboss.weld.util.reflection.SecureReflections$8.work(SecureReflections.java:172) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.util.reflection.SecureReflections$8.work(SecureReflections.java:169) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAndWrap(SecureReflectionAccess.java:63) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.util.reflection.SecureReflections.getDeclaredMethods(SecureReflections.java:169) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:233) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:118) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:49) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:40) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355)
	at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184)
	at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153)
	at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69)
	at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393)
	at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:149) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
	... 11 more
Caused by: java.lang.ClassNotFoundException: com.wealdtech.hawk.HawkCredentials from [Module "deployment.ag-push.war:main" from Service Module Loader]
	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
	... 29 more

09:05:46,117 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-10) MSC00001: Failed to start service jboss.deployment.unit."ag-push.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."ag-push.war".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [HawkAuthenticator] with qualifiers [@Default] at injection point [[field] @Inject private org.jboss.aerogear.security.web.authz.HawkAuthenticatorFilter.hawkAuthenticator]
	at org.jboss.as.weld.services.WeldService.start(WeldService.java:83)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_09]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09]
	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09]
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [HawkAuthenticator] with qualifiers [@Default] at injection point [[field] @Inject private org.jboss.aerogear.security.web.authz.HawkAuthenticatorFilter.hawkAuthenticator]
	at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:275)
	at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:244)
	at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:107)
	at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:127)
	at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:346)
	at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:331)
	at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)
	at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83)
	at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
	... 5 more

09:05:46,327 INFO  [org.jboss.as.server] (management-handler-thread - 5) JBAS015870: Deploy of deployment "ag-push.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"ag-push.war\".WeldService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"ag-push.war\".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [HawkAuthenticator] with qualifiers [@Default] at injection point [[field] @Inject private org.jboss.aerogear.security.web.authz.HawkAuthenticatorFilter.hawkAuthenticator]"}}
09:05:46,331 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) JBAS011403: Stopping Persistence Unit Service 'ag-push.war#pushee-default'
09:05:46,332 INFO  [org.jboss.as.jpa] (MSC service thread 1-14) JBAS011403: Stopping Persistence Unit Service 'ag-push.war#picketlink-default'
09:05:46,333 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-14) HHH000227: Running hbm2ddl schema export
09:05:46,341 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-14) HHH000230: Schema export complete
09:05:46,342 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-13) JBAS010409: Unbound data source [jboss/datasources/PushEEDS]
09:05:46,362 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-9) JBAS015877: Stopped deployment ag-push.war in 34ms
09:05:46,363 INFO  [org.jboss.as.controller] (management-handler-thread - 5) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.deployment.unit."ag-push.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."ag-push.war".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [HawkAuthenticator] with qualifiers [@Default] at injection point [[field] @Inject private org.jboss.aerogear.security.web.authz.HawkAuthenticatorFilter.hawkAuthenticator]

I am not explicitly using any Hawk bits, so this was not expected. In the "ag-sec" pom file, I see "provided" for the hawk bits.

After adding the following to my pom.xml file:

        <dependency>
            <groupId>com.wealdtech.hawk</groupId>
            <artifactId>hawk-core</artifactId>
            <version>1.0.0</version>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>14.0</version>
        </dependency>

I am now getting this exception:

09:11:00,021 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."ag-push.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."ag-push.war".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [HawkServer] with qualifiers [@Default] at injection point [[parameter 1] of [constructor] @Inject public org.jboss.aerogear.security.web.authz.HawkAuthenticator(HawkServer, HawkCredentialProvider)]
	at org.jboss.as.weld.services.WeldService.start(WeldService.java:83)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_09]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09]
	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09]
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [HawkServer] with qualifiers [@Default] at injection point [[parameter 1] of [constructor] @Inject public org.jboss.aerogear.security.web.authz.HawkAuthenticator(HawkServer, HawkCredentialProvider)]
	at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:275)
	at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:244)
	at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:107)
	at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:127)
	at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:346)
	at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:331)
	at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)
	at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83)
	at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
	... 5 more


Fix Versions: 1.2.0
Project: AeroGear Security
Priority: Major Major
Reporter: Matthias Wessendorf
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira