arquillian / continuous-enterprise-development

Testable Solutions for Modern Applications
http://continuousdev.org/
116 stars 150 forks source link

Build Requires API Auth Key #98

Closed ALRubinger closed 10 years ago

ALRubinger commented 10 years ago

Hi Andrew,

as mentioned yesterday @ JBoss Party, I got the following error, after building and deploying the latest version of geekseek. I just did a "mvn package" and the build was successfull :

15:09:39,409 ERROR [org.jboss.msc.service.fail](ServerService Thread Pool -- 52) MSC000001: Failed to start service jboss.deployment.unit."geekseek-1.0.0-alpha-1-SNAPSHOT.war".component.SettingsProducer.START: org.jboss.msc.service.StartException in service jboss.deployment.unit."geekseek-1.0.0-alpha-1-SNAPSHOT.war".component.SettingsProducer.START: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance

at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:57) [wildfly-ee-8.0.0.Alpha4.jar:8.0.0.Alpha4]

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_25]

at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_25]

at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_25]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]

at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]

at org.jboss.threads.JBossThread.run(JBossThread.java:122)

Caused by: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance

at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:162) [wildfly-ee-8.0.0.Alpha4.jar:8.0.0.Alpha4]

at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:84) [wildfly-ee-8.0.0.Alpha4.jar:8.0.0.Alpha4]

at org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:126)

at org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:141)

at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54) [wildfly-ee-8.0.0.Alpha4.jar:8.0.0.Alpha4]

... 7 more

Caused by: javax.ejb.EJBException: java.lang.IllegalStateException: AUTH_API_KEY env variable must be set

at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:190)

at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)

at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:369)

at org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:66)

at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.as.weld.injection.WeldInjectionContextInterceptor.processInvocation(WeldInjectionContextInterceptor.java:43)

at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:55) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:325) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_25]

at org.jboss.invocation.PrivilegedInterceptor.processInvocation(PrivilegedInterceptor.java:75) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:160) [wildfly-ee-8.0.0.Alpha4.jar:8.0.0.Alpha4]

... 11 more

Caused by: java.lang.IllegalStateException: AUTH_API_KEY env variable must be set

at org.cedj.geekseek.service.security.oauth.SettingsProducer.validateEnvironment(SettingsProducer.java:44)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_25]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_25]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_25]

at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_25]

at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130) [wildfly-ee-8.0.0.Alpha4.jar:8.0.0.Alpha4]

at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doLifecycleInterception(Jsr299BindingsInterceptor.java:165)

at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:148)

at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:406) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:55)

at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:84)

at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:56)

at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.as.ee.component.AroundConstructInterceptorFactory$1.processInvocation(AroundConstructInterceptorFactory.java:28) [wildfly-ee-8.0.0.Alpha4.jar:8.0.0.Alpha4]

at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.as.weld.injection.WeldInterceptorInjectionInterceptor.processInvocation(WeldInterceptorInjectionInterceptor.java:62)

at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [wildfly-ee-8.0.0.Alpha4.jar:8.0.0.Alpha4]

at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta2.jar:1.2.0.Beta2]

at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:273)

... 26 more

15:09:39,419 ERROR [org.jboss.as.controller.management-operation](Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "geekseek-1.0.0-alpha-1-SNAPSHOT.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"geekseek-1.0.0-alpha-1-SNAPSHOT.war\".component.SettingsProducer.START" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"geekseek-1.0.0-alpha-1-SNAPSHOT.war\".component.SettingsProducer.START: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance

Caused by: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance

Caused by: javax.ejb.EJBException: java.lang.IllegalStateException: AUTH_API_KEY env variable must be set

Caused by: java.lang.IllegalStateException: AUTH_API_KEY env variable must be set"}}
aslakknutsen commented 10 years ago

There are multiple different ways of running the test suite.

https://github.com/arquillian/continuous-enterprise-development/issues/86#issuecomment-24631708

It's setup in 3 stages; unit, integration and functional

By default it will run the integration and wildfly-managed profiles which should not require any special setup.

If you want to run with a different container you'd need to define which level you want to test; integration or functional. (unit is also possible, but the container choice is not applicable in this case)

mvn clean install -Parq-jbosseap-6,integration should work (as long as the eap artifacts are in the local repo)

if on the other hand only the -Parq-jbosseap-6 profile is activated, all tests are added (unit, integration, functional). The functional level require auth keys to e.g. twitter.

The final deployment also require auth keys if the Security Module is included in the deployment.