Invalid bean definition with name 'offlineTokenServices' defined in ServletContext resource...





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







2















Thank you for supporting to run the approuter package in locally.



Now Getting below exception while running firstapp in locally.



I add xs.appname xs.uaa.clientid xs.uaa.identityzone xs.uaa.verificationkey , but getting same issue only.



Please suggest me which values have to set with Environment variable VCAP_SERVICES



[localhost-startStop-1] ERROR com.sap.xs2.security.commons.SAPVcapServicesParser - Environment variable VCAP_SERVICES not set
[localhost-startStop-1] WARN org.springframework.web.context.support.XmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'offlineTokenServices' defined in ServletContext resource [/WEB-INF/spring-security.xml]: Environment variable VCAP_SERVICES not set; nested exception is java.lang.IllegalStateException: Environment variable VCAP_SERVICES not set
[localhost-startStop-1] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'offlineTokenServices' defined in ServletContext resource [/WEB-INF/spring-security.xml]: Environment variable VCAP_SERVICES not set; nested exception is java.lang.IllegalStateException: Environment variable VCAP_SERVICES not set
at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:228)
at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:225)
at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:86)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:286)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:166)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:693)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:530)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1572)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Environment variable VCAP_SERVICES not set
at com.sap.xs2.security.commons.SAPVcapServicesParser.getAttribute(SAPVcapServicesParser.java:34)
at com.sap.xs2.security.commons.SAPPropertyPlaceholderConfigurer.parseVcapServices(SAPPropertyPlaceholderConfigurer.java:44)
at com.sap.xs2.security.commons.SAPPropertyPlaceholderConfigurer.readVcapServices(SAPPropertyPlaceholderConfigurer.java:67)
at com.sap.xs2.security.commons.SAPPropertyPlaceholderConfigurer.resolvePlaceholder(SAPPropertyPlaceholderConfigurer.java:94)
at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.resolvePlaceholder(PropertyPlaceholderConfigurer.java:163)
at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PropertyPlaceholderConfigurerResolver.resolvePlaceholder(PropertyPlaceholderConfigurer.java:264)
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:145)
at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:124)
at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver.resolveStringValue(PropertyPlaceholderConfigurer.java:244)
at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveStringValue(BeanDefinitionVisitor.java:296)
at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:217)
at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitPropertyValues(BeanDefinitionVisitor.java:147)
at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition(BeanDefinitionVisitor.java:85)
at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:225)
... 18 common frames omitted









share|improve this question





























    2















    Thank you for supporting to run the approuter package in locally.



    Now Getting below exception while running firstapp in locally.



    I add xs.appname xs.uaa.clientid xs.uaa.identityzone xs.uaa.verificationkey , but getting same issue only.



    Please suggest me which values have to set with Environment variable VCAP_SERVICES



    [localhost-startStop-1] ERROR com.sap.xs2.security.commons.SAPVcapServicesParser - Environment variable VCAP_SERVICES not set
    [localhost-startStop-1] WARN org.springframework.web.context.support.XmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'offlineTokenServices' defined in ServletContext resource [/WEB-INF/spring-security.xml]: Environment variable VCAP_SERVICES not set; nested exception is java.lang.IllegalStateException: Environment variable VCAP_SERVICES not set
    [localhost-startStop-1] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'offlineTokenServices' defined in ServletContext resource [/WEB-INF/spring-security.xml]: Environment variable VCAP_SERVICES not set; nested exception is java.lang.IllegalStateException: Environment variable VCAP_SERVICES not set
    at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:228)
    at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:225)
    at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:86)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:286)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:166)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:693)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:530)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1572)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.IllegalStateException: Environment variable VCAP_SERVICES not set
    at com.sap.xs2.security.commons.SAPVcapServicesParser.getAttribute(SAPVcapServicesParser.java:34)
    at com.sap.xs2.security.commons.SAPPropertyPlaceholderConfigurer.parseVcapServices(SAPPropertyPlaceholderConfigurer.java:44)
    at com.sap.xs2.security.commons.SAPPropertyPlaceholderConfigurer.readVcapServices(SAPPropertyPlaceholderConfigurer.java:67)
    at com.sap.xs2.security.commons.SAPPropertyPlaceholderConfigurer.resolvePlaceholder(SAPPropertyPlaceholderConfigurer.java:94)
    at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.resolvePlaceholder(PropertyPlaceholderConfigurer.java:163)
    at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PropertyPlaceholderConfigurerResolver.resolvePlaceholder(PropertyPlaceholderConfigurer.java:264)
    at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:145)
    at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:124)
    at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver.resolveStringValue(PropertyPlaceholderConfigurer.java:244)
    at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveStringValue(BeanDefinitionVisitor.java:296)
    at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:217)
    at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitPropertyValues(BeanDefinitionVisitor.java:147)
    at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition(BeanDefinitionVisitor.java:85)
    at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:225)
    ... 18 common frames omitted









    share|improve this question

























      2












      2








      2








      Thank you for supporting to run the approuter package in locally.



      Now Getting below exception while running firstapp in locally.



      I add xs.appname xs.uaa.clientid xs.uaa.identityzone xs.uaa.verificationkey , but getting same issue only.



      Please suggest me which values have to set with Environment variable VCAP_SERVICES



      [localhost-startStop-1] ERROR com.sap.xs2.security.commons.SAPVcapServicesParser - Environment variable VCAP_SERVICES not set
      [localhost-startStop-1] WARN org.springframework.web.context.support.XmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'offlineTokenServices' defined in ServletContext resource [/WEB-INF/spring-security.xml]: Environment variable VCAP_SERVICES not set; nested exception is java.lang.IllegalStateException: Environment variable VCAP_SERVICES not set
      [localhost-startStop-1] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
      org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'offlineTokenServices' defined in ServletContext resource [/WEB-INF/spring-security.xml]: Environment variable VCAP_SERVICES not set; nested exception is java.lang.IllegalStateException: Environment variable VCAP_SERVICES not set
      at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:228)
      at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:225)
      at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:86)
      at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:286)
      at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:166)
      at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:693)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:530)
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1572)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.IllegalStateException: Environment variable VCAP_SERVICES not set
      at com.sap.xs2.security.commons.SAPVcapServicesParser.getAttribute(SAPVcapServicesParser.java:34)
      at com.sap.xs2.security.commons.SAPPropertyPlaceholderConfigurer.parseVcapServices(SAPPropertyPlaceholderConfigurer.java:44)
      at com.sap.xs2.security.commons.SAPPropertyPlaceholderConfigurer.readVcapServices(SAPPropertyPlaceholderConfigurer.java:67)
      at com.sap.xs2.security.commons.SAPPropertyPlaceholderConfigurer.resolvePlaceholder(SAPPropertyPlaceholderConfigurer.java:94)
      at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.resolvePlaceholder(PropertyPlaceholderConfigurer.java:163)
      at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PropertyPlaceholderConfigurerResolver.resolvePlaceholder(PropertyPlaceholderConfigurer.java:264)
      at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:145)
      at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:124)
      at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver.resolveStringValue(PropertyPlaceholderConfigurer.java:244)
      at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveStringValue(BeanDefinitionVisitor.java:296)
      at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:217)
      at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitPropertyValues(BeanDefinitionVisitor.java:147)
      at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition(BeanDefinitionVisitor.java:85)
      at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:225)
      ... 18 common frames omitted









      share|improve this question














      Thank you for supporting to run the approuter package in locally.



      Now Getting below exception while running firstapp in locally.



      I add xs.appname xs.uaa.clientid xs.uaa.identityzone xs.uaa.verificationkey , but getting same issue only.



      Please suggest me which values have to set with Environment variable VCAP_SERVICES



      [localhost-startStop-1] ERROR com.sap.xs2.security.commons.SAPVcapServicesParser - Environment variable VCAP_SERVICES not set
      [localhost-startStop-1] WARN org.springframework.web.context.support.XmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'offlineTokenServices' defined in ServletContext resource [/WEB-INF/spring-security.xml]: Environment variable VCAP_SERVICES not set; nested exception is java.lang.IllegalStateException: Environment variable VCAP_SERVICES not set
      [localhost-startStop-1] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
      org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'offlineTokenServices' defined in ServletContext resource [/WEB-INF/spring-security.xml]: Environment variable VCAP_SERVICES not set; nested exception is java.lang.IllegalStateException: Environment variable VCAP_SERVICES not set
      at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:228)
      at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:225)
      at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:86)
      at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:286)
      at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:166)
      at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:693)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:530)
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1572)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.IllegalStateException: Environment variable VCAP_SERVICES not set
      at com.sap.xs2.security.commons.SAPVcapServicesParser.getAttribute(SAPVcapServicesParser.java:34)
      at com.sap.xs2.security.commons.SAPPropertyPlaceholderConfigurer.parseVcapServices(SAPPropertyPlaceholderConfigurer.java:44)
      at com.sap.xs2.security.commons.SAPPropertyPlaceholderConfigurer.readVcapServices(SAPPropertyPlaceholderConfigurer.java:67)
      at com.sap.xs2.security.commons.SAPPropertyPlaceholderConfigurer.resolvePlaceholder(SAPPropertyPlaceholderConfigurer.java:94)
      at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.resolvePlaceholder(PropertyPlaceholderConfigurer.java:163)
      at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PropertyPlaceholderConfigurerResolver.resolvePlaceholder(PropertyPlaceholderConfigurer.java:264)
      at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:145)
      at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:124)
      at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver.resolveStringValue(PropertyPlaceholderConfigurer.java:244)
      at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveStringValue(BeanDefinitionVisitor.java:296)
      at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:217)
      at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitPropertyValues(BeanDefinitionVisitor.java:147)
      at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition(BeanDefinitionVisitor.java:85)
      at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:225)
      ... 18 common frames omitted






      java s4sdk






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 16 '18 at 18:34









      Dama RameshDama Ramesh

      696




      696
























          1 Answer
          1






          active

          oldest

          votes


















          5














          You need to provide VCAP_SERVICES as an environment variable to your local container as indicated by the error message Caused by: java.lang.IllegalStateException: Environment variable VCAP_SERVICES not set. To do so please provide the environment variable with the corresponding parameters like they are when binding a real XSUAA instance to your CloudFoundry microservice. For local deployments your VCAP_SERVICES has to have at least the following parameters where the verificationkey property needs to match the signature of your JWT. Furthermore, the tags attribute is crucial.




          For Mac/Unix




          export VCAP_SERVICES='{
          "xsuaa":[
          {
          "credentials": {
          "clientid":"testClient",
          "clientsecret":"dummy-clientsecret",
          "identityzone":"uaa",
          "url":"dummy-url",
          "verificationkey":"-----BEGIN PUBLIC KEY-----MIIBI...QIDAQAB-----END PUBLIC KEY-----"
          },
          "tags":["xsuaa"]
          }]
          }'


          If you provide the environment variable correctly, you should see the following message in your local environment log output:



          INFO: Got from VCAP_SERVICES: identityzone=uaa






          share|improve this answer


























          • Philipp, I did set VCAP_SERVICES in my enviroment variables, But not working. Please suggest me what I missed. My local environment is windows 10.

            – Dama Ramesh
            Nov 19 '18 at 5:12











          • Thanks Philipp, It's working with answer

            – Dama Ramesh
            Nov 19 '18 at 9:16












          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53343556%2finvalid-bean-definition-with-name-offlinetokenservices-defined-in-servletconte%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          5














          You need to provide VCAP_SERVICES as an environment variable to your local container as indicated by the error message Caused by: java.lang.IllegalStateException: Environment variable VCAP_SERVICES not set. To do so please provide the environment variable with the corresponding parameters like they are when binding a real XSUAA instance to your CloudFoundry microservice. For local deployments your VCAP_SERVICES has to have at least the following parameters where the verificationkey property needs to match the signature of your JWT. Furthermore, the tags attribute is crucial.




          For Mac/Unix




          export VCAP_SERVICES='{
          "xsuaa":[
          {
          "credentials": {
          "clientid":"testClient",
          "clientsecret":"dummy-clientsecret",
          "identityzone":"uaa",
          "url":"dummy-url",
          "verificationkey":"-----BEGIN PUBLIC KEY-----MIIBI...QIDAQAB-----END PUBLIC KEY-----"
          },
          "tags":["xsuaa"]
          }]
          }'


          If you provide the environment variable correctly, you should see the following message in your local environment log output:



          INFO: Got from VCAP_SERVICES: identityzone=uaa






          share|improve this answer


























          • Philipp, I did set VCAP_SERVICES in my enviroment variables, But not working. Please suggest me what I missed. My local environment is windows 10.

            – Dama Ramesh
            Nov 19 '18 at 5:12











          • Thanks Philipp, It's working with answer

            – Dama Ramesh
            Nov 19 '18 at 9:16
















          5














          You need to provide VCAP_SERVICES as an environment variable to your local container as indicated by the error message Caused by: java.lang.IllegalStateException: Environment variable VCAP_SERVICES not set. To do so please provide the environment variable with the corresponding parameters like they are when binding a real XSUAA instance to your CloudFoundry microservice. For local deployments your VCAP_SERVICES has to have at least the following parameters where the verificationkey property needs to match the signature of your JWT. Furthermore, the tags attribute is crucial.




          For Mac/Unix




          export VCAP_SERVICES='{
          "xsuaa":[
          {
          "credentials": {
          "clientid":"testClient",
          "clientsecret":"dummy-clientsecret",
          "identityzone":"uaa",
          "url":"dummy-url",
          "verificationkey":"-----BEGIN PUBLIC KEY-----MIIBI...QIDAQAB-----END PUBLIC KEY-----"
          },
          "tags":["xsuaa"]
          }]
          }'


          If you provide the environment variable correctly, you should see the following message in your local environment log output:



          INFO: Got from VCAP_SERVICES: identityzone=uaa






          share|improve this answer


























          • Philipp, I did set VCAP_SERVICES in my enviroment variables, But not working. Please suggest me what I missed. My local environment is windows 10.

            – Dama Ramesh
            Nov 19 '18 at 5:12











          • Thanks Philipp, It's working with answer

            – Dama Ramesh
            Nov 19 '18 at 9:16














          5












          5








          5







          You need to provide VCAP_SERVICES as an environment variable to your local container as indicated by the error message Caused by: java.lang.IllegalStateException: Environment variable VCAP_SERVICES not set. To do so please provide the environment variable with the corresponding parameters like they are when binding a real XSUAA instance to your CloudFoundry microservice. For local deployments your VCAP_SERVICES has to have at least the following parameters where the verificationkey property needs to match the signature of your JWT. Furthermore, the tags attribute is crucial.




          For Mac/Unix




          export VCAP_SERVICES='{
          "xsuaa":[
          {
          "credentials": {
          "clientid":"testClient",
          "clientsecret":"dummy-clientsecret",
          "identityzone":"uaa",
          "url":"dummy-url",
          "verificationkey":"-----BEGIN PUBLIC KEY-----MIIBI...QIDAQAB-----END PUBLIC KEY-----"
          },
          "tags":["xsuaa"]
          }]
          }'


          If you provide the environment variable correctly, you should see the following message in your local environment log output:



          INFO: Got from VCAP_SERVICES: identityzone=uaa






          share|improve this answer















          You need to provide VCAP_SERVICES as an environment variable to your local container as indicated by the error message Caused by: java.lang.IllegalStateException: Environment variable VCAP_SERVICES not set. To do so please provide the environment variable with the corresponding parameters like they are when binding a real XSUAA instance to your CloudFoundry microservice. For local deployments your VCAP_SERVICES has to have at least the following parameters where the verificationkey property needs to match the signature of your JWT. Furthermore, the tags attribute is crucial.




          For Mac/Unix




          export VCAP_SERVICES='{
          "xsuaa":[
          {
          "credentials": {
          "clientid":"testClient",
          "clientsecret":"dummy-clientsecret",
          "identityzone":"uaa",
          "url":"dummy-url",
          "verificationkey":"-----BEGIN PUBLIC KEY-----MIIBI...QIDAQAB-----END PUBLIC KEY-----"
          },
          "tags":["xsuaa"]
          }]
          }'


          If you provide the environment variable correctly, you should see the following message in your local environment log output:



          INFO: Got from VCAP_SERVICES: identityzone=uaa







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 16 '18 at 19:52

























          answered Nov 16 '18 at 19:45









          Philipp HerzigPhilipp Herzig

          79549




          79549













          • Philipp, I did set VCAP_SERVICES in my enviroment variables, But not working. Please suggest me what I missed. My local environment is windows 10.

            – Dama Ramesh
            Nov 19 '18 at 5:12











          • Thanks Philipp, It's working with answer

            – Dama Ramesh
            Nov 19 '18 at 9:16



















          • Philipp, I did set VCAP_SERVICES in my enviroment variables, But not working. Please suggest me what I missed. My local environment is windows 10.

            – Dama Ramesh
            Nov 19 '18 at 5:12











          • Thanks Philipp, It's working with answer

            – Dama Ramesh
            Nov 19 '18 at 9:16

















          Philipp, I did set VCAP_SERVICES in my enviroment variables, But not working. Please suggest me what I missed. My local environment is windows 10.

          – Dama Ramesh
          Nov 19 '18 at 5:12





          Philipp, I did set VCAP_SERVICES in my enviroment variables, But not working. Please suggest me what I missed. My local environment is windows 10.

          – Dama Ramesh
          Nov 19 '18 at 5:12













          Thanks Philipp, It's working with answer

          – Dama Ramesh
          Nov 19 '18 at 9:16





          Thanks Philipp, It's working with answer

          – Dama Ramesh
          Nov 19 '18 at 9:16




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53343556%2finvalid-bean-definition-with-name-offlinetokenservices-defined-in-servletconte%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Xamarin.iOS Cant Deploy on Iphone

          Glorious Revolution

          Dulmage-Mendelsohn matrix decomposition in Python