-
Notifications
You must be signed in to change notification settings - Fork 149
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
Ch4. Wildfly start command should include TWITTER API env variables #110
Comments
@aslakknutsen Could you update the build environment to skip this test unless manually specified (which we'll do in the CI)? |
Thank you for this report, @esteveavi! |
@ALRubinger on a test level this is fixed, but not written about yet. #86 I believe this issue is about when you deploy the final build to a container, right @esteveavi ? The App require some twitter keys etc to run. I guess we could setup an Twitter Application for testing purposes and hardcode it in the source as a default.. |
So long as the user would only get the API gets and no way to mutate |
well that's the problem.. With the API keys I'm sure they could do whatever they want :) |
Yeah, then we need some other intelligent handling in the app to ignore / |
If we only WARN, the Login will simply not work. I guess we could detect that as well and present the user with 'not configured' message on login.. or setup a local login as default with Picketlink.. |
Yeah, I'd throw up a red "Login not enabled unless..." thingy if not too |
sure, except with login disabled, the app is just the front page with no data and no way to add any.. and we don't describe the process of setting up a twitter app |
Looks like we need a section to describe this Ch04 then? |
@aslakknutsen Yes. I deploy it to Wildfly 8.CR1 . You can just add the step to export env variables: Regards. |
Any advice here on what we're supposed to do? I've built your source and deployed to Wildfly as the book states in Ch4, but get the error stacktrace above ... |
Hi, I just deployed the built war file on Wildfly 8.1 and have the same problem "AUTH_API_KEY env variable must be set" any progress made on this? |
Been reading about this in all the threads I found, what is the recommendation? what can I set the AUTH_API_KEY to get it to work? Thanks |
Aslak: Recommending we alter the book to disable these tests for WildFly profile Thoughts? S, On Mon, Sep 15, 2014 at 2:07 AM, ikaz [email protected] wrote:
|
so,is there any progress have been made?I meet this problem unfortunately. |
Hi @ALRubinger & @aslakknutsen , any progress on this, I just ran into it. :( |
Hi,
If app is deployed as Ch4 stands the application won't start due to Twitter API env variables are not set:
17:38:58,006 ERROR [org.jboss.msc.service.fail](ServerService Thread Pool -- 55) 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.CR1.jar:8.0.0.CR1]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_21]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_21]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
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.CR1.jar:8.0.0.CR1]
at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:133) [wildfly-ee-8.0.0.CR1.jar:8.0.0.CR1]
at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:89) [wildfly-ee-8.0.0.CR1.jar:8.0.0.CR1]
at org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:123)
at org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:138)
at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54) [wildfly-ee-8.0.0.CR1.jar:8.0.0.CR1]
... 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.Beta4.jar:1.2.0.Beta4]
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.Beta4.jar:1.2.0.Beta4]
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.Beta4.jar:1.2.0.Beta4]
at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45) [wildfly-ee-8.0.0.CR1.jar:8.0.0.CR1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta4.jar:1.2.0.Beta4]
at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64) [jboss-invocation-1.2.0.Beta4.jar:1.2.0.Beta4]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta4.jar:1.2.0.Beta4]
at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:325) [jboss-invocation-1.2.0.Beta4.jar:1.2.0.Beta4]
at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80) [jboss-invocation-1.2.0.Beta4.jar:1.2.0.Beta4]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta4.jar:1.2.0.Beta4]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.2.0.Beta4.jar:1.2.0.Beta4]
at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:160) [wildfly-ee-8.0.0.CR1.jar:8.0.0.CR1]
... 12 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_21]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_21]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_21]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_21]
at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptor.java:96) [wildfly-ee-8.0.0.CR1.jar:8.0.0.CR1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta4.jar:1.2.0.Beta4]
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.2.0.Beta4.jar:1.2.0.Beta4]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta4.jar:1.2.0.Beta4]
at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doLifecycleInterception(Jsr299BindingsInterceptor.java:114)
at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:103)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta4.jar:1.2.0.Beta4]
at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:406) [jboss-invocation-1.2.0.Beta4.jar:1.2.0.Beta4]
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.Beta4.jar:1.2.0.Beta4]
at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:53)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta4.jar:1.2.0.Beta4]
at org.jboss.as.ee.component.AroundConstructInterceptorFactory$1.processInvocation(AroundConstructInterceptorFactory.java:28) [wildfly-ee-8.0.0.CR1.jar:8.0.0.CR1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta4.jar:1.2.0.Beta4]
at org.jboss.as.weld.injection.WeldInterceptorInjectionInterceptor.processInvocation(WeldInterceptorInjectionInterceptor.java:56)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta4.jar:1.2.0.Beta4]
at org.jboss.as.weld.ejb.Jsr299BindingsCreateInterceptor.processInvocation(Jsr299BindingsCreateInterceptor.java:94)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta4.jar:1.2.0.Beta4]
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [wildfly-ee-8.0.0.CR1.jar:8.0.0.CR1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309) [jboss-invocation-1.2.0.Beta4.jar:1.2.0.Beta4]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:273)
... 28 more
17:38:58,024 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"}}
The text was updated successfully, but these errors were encountered: