Git Product home page Git Product logo

azure-docs-sdk-java's Introduction

☕️ Azure SDK for Java API documentation

Microsoft Open Source Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

How to Update the YAML content in the repo

  1. Clone the Azure sdk for Java
  2. Create a code2yaml.json config file to specify your input folder, output folder, exclude paths. you can refer to the template config file
  3. Run Code2Yaml.exe to generate YAML files.

Or you can run powershell Scripts/build.ps1, it would update the YAML files in api folder.

azure-docs-sdk-java's People

Contributors

allclark avatar alzimmermsft avatar ansyral avatar azure-sdk avatar bradygaster avatar brunoborges avatar chenrujun avatar danieljurek avatar dend avatar edisonda avatar gapra-msft avatar jasonwhowell avatar jimsuplizio avatar openpublishbuild avatar pacort avatar pauljewellmsft avatar rloutlaw avatar rmcmurray avatar samvaity avatar sankethka avatar scbedd avatar sima-zhu avatar srnagar avatar taojunshen avatar v-alje avatar v-anpasi avatar vcolin7 avatar vsc-service-account avatar weidongxu-microsoft avatar yiliuto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-docs-sdk-java's Issues

Links to explore APIs not working

Links for exploration are not working, lateral menu is fine, but buttons doesn't work.

working: https://docs.microsoft.com/en-us/java/api/keyvault/management?view=azure-java-stable
not working: https://docs.microsoft.com/en-us/java/api/overview/azure/keyvault/management


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Step 10 typo

in step 10 code snippet, the annotation @Autowired should be removed


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Install CLI should be before everything

Yah


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

I keep getting forwarded to the login page again and again

I followed this tutorial here: https://docs.microsoft.com/en-us/java/azure/spring-framework/configure-spring-boot-starter-java-app-with-azure-active-directory?view=azure-java-stable

when I go to localhost:8080, I get forwarded to the login page. After I enter the credintials correctly, I keep getting forwarded to https://login.microsoftonline.com/login.srf over and over. Any know solution?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Configure your Spring Boot app to use your Azure Cosmos DB

In the current version of Spring Boot, this example for CosmosDB does not appear to work, can someone help us with adjusting the dependencies in a way that makes this code compile and run. Currently it is not compiling. Spring Boot version 2.0.2 tried


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Message: the API version in the data (apps/v1beta1) does not match the expected API version (extensions/v1beta1)

I am getting the following error when I execute Maven command to apply the resource list file to kubernetes cluster(FYI,i am using AKS not ACS)

$ mvn fabric8:apply
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building demo-eureka-service 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- fabric8-maven-plugin:3.5.30:apply (default-cli) @ demo-eureka-service ---
[INFO] F8: Using Kubernetes at https://aksxkcwghf5rmuqw-148bd6e3.hcp.eastus.azmk8s.io:443/ in namespace default with manifest /home/azureuser/AKSspringcloudCICDwtMavenPlugin/demo-eureka-service/target/classes/META-INF/fabric8/kubernetes.yml
[INFO] Using namespace: default
[INFO] Using namespace: default
[INFO] Secret has not changed so not doing anything
[INFO] Updating a Service from kubernetes.yml
[INFO] Updated Service: target/fabric8/applyJson/default/service-eurekaservice-7.json
[INFO] Using namespace: default
[INFO] Creating a Deployment from kubernetes.yml namespace default name eurekaservice
[ERROR] Failed to create Deployment from kubernetes.yml. io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://aksxkcwghf5rmuqw-148bd6e3.hcp.eastus.azmk8s.io/apis/extensions/v1beta1/namespaces/default/deployments. Message: the API version in the data (apps/v1beta1) does not match the expected API version (extensions/v1beta1). Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=the API version in the data (apps/v1beta1) does not match the expected API version (extensions/v1beta1), metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=BadRequest, status=Failure, additionalProperties={}).. Deployment(apiVersion=apps/v1beta1, kind=Deployment, metadata=ObjectMeta(annotations={fabric8.io/git-commit=dda6a7a0e722997c479103e55ab00dd266395e01, fabric8.io/iconUrl=img/icons/spring-boot.svg, fabric8.io/git-branch=master, fabric8.io/metrics-path=dashboard/file/kubernetes-pods.json/?var-project=demo-eureka-service&var-version=0.0.1-SNAPSHOT, fabric8.io/scm-tag=HEAD, fabric8.io/scm-url=https://github.com/spring-projects/spring-boot/spring-boot-starter-parent/demo-eureka-service}, clusterName=null, creationTimestamp=null, deletionGracePeriodSeconds=null, deletionTimestamp=null, finalizers=[], generateName=null, generation=null, labels={app=demo-eureka-service, provider=fabric8, version=0.0.1-SNAPSHOT, group=com.example}, name=eurekaservice, namespace=null, ownerReferences=[], resourceVersion=null, selfLink=null, uid=null, additionalProperties={}), spec=DeploymentSpec(minReadySeconds=null, paused=null, progressDeadlineSeconds=null, replicas=1, revisionHistoryLimit=2, rollbackTo=null, selector=LabelSelector(matchExpressions=[], matchLabels={app=demo-eureka-service, provider=fabric8, group=com.example}, additionalProperties={}), strategy=null, template=PodTemplateSpec(metadata=ObjectMeta(annotations={fabric8.io/git-commit=dda6a7a0e722997c479103e55ab00dd266395e01, fabric8.io/metrics-path=dashboard/file/kubernetes-pods.json/?var-project=demo-eureka-service&var-version=0.0.1-SNAPSHOT, fabric8.io/scm-url=https://github.com/spring-projects/spring-boot/spring-boot-starter-parent/demo-eureka-service, fabric8.io/iconUrl=img/icons/spring-boot.svg, fabric8.io/git-branch=master, fabric8.io/scm-tag=HEAD}, clusterName=null, creationTimestamp=null, deletionGracePeriodSeconds=null, deletionTimestamp=null, finalizers=[], generateName=null, generation=null, labels={app=eurekaservice, provider=fabric8, version=0.0.1-SNAPSHOT, group=com.example}, name=null, namespace=null, ownerReferences=[], resourceVersion=null, selfLink=null, uid=null, additionalProperties={}), spec=PodSpec(activeDeadlineSeconds=null, containers=[Container(args=[], command=[], env=[EnvVar(name=KUBERNETES_NAMESPACE, value=null, valueFrom=EnvVarSource(configMapKeyRef=null, fieldRef=ObjectFieldSelector(apiVersion=null, fieldPath=metadata.namespace, additionalProperties={}), resourceFieldRef=null, secretKeyRef=null, additionalProperties={}), additionalProperties={})], image=aksdocreg.azurecr.io/demo-eureka-service, imagePullPolicy=IfNotPresent, lifecycle=null, livenessProbe=Probe(exec=null, failureThreshold=null, httpGet=HTTPGetAction(host=null, httpHeaders=[], path=/health, port=IntOrString(IntVal=8761, Kind=null, StrVal=null, additionalProperties={}), scheme=HTTP, additionalProperties={}), initialDelaySeconds=180, periodSeconds=null, successThreshold=null, tcpSocket=null, timeoutSeconds=null, additionalProperties={}), name=eurekaservice, ports=[ContainerPort(containerPort=8761, hostIP=null, hostPort=null, name=null, protocol=null, additionalProperties={}), ContainerPort(containerPort=8080, hostIP=null, hostPort=null, name=http, protocol=TCP, additionalProperties={}), ContainerPort(containerPort=9779, hostIP=null, hostPort=null, name=prometheus, protocol=TCP, additionalProperties={}), ContainerPort(containerPort=8778, hostIP=null, hostPort=null, name=jolokia, protocol=TCP, additionalProperties={})], readinessProbe=Probe(exec=null, failureThreshold=null, httpGet=HTTPGetAction(host=null, httpHeaders=[], path=/health, port=IntOrString(IntVal=8761, Kind=null, StrVal=null, additionalProperties={}), scheme=HTTP, additionalProperties={}), initialDelaySeconds=10, periodSeconds=null, successThreshold=null, tcpSocket=null, timeoutSeconds=null, additionalProperties={}), resources=null, securityContext=SecurityContext(capabilities=null, privileged=false, readOnlyRootFilesystem=null, runAsNonRoot=null, runAsUser=null, seLinuxOptions=null, additionalProperties={}), stdin=null, stdinOnce=null, terminationMessagePath=null, tty=null, volumeMounts=[], workingDir=null, additionalProperties={})], dnsPolicy=null, hostIPC=null, hostNetwork=null, hostPID=null, hostname=null, imagePullSecrets=[], nodeName=null, nodeSelector=null, restartPolicy=null, securityContext=null, serviceAccount=null, serviceAccountName=null, subdomain=null, terminationGracePeriodSeconds=null, volumes=[], additionalProperties={}), additionalProperties={}), additionalProperties={}), status=null, additionalProperties={})
io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://aksxkcwghf5rmuqw-148bd6e3.hcp.eastus.azmk8s.io/apis/extensions/v1beta1/namespaces/default/deployments. Message: the API version in the data (apps/v1beta1) does not match the expected API version (extensions/v1beta1). Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=the API version in the data (apps/v1beta1) does not match the expected API version (extensions/v1beta1), metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=BadRequest, status=Failure, additionalProperties={}).
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.requestFailure(OperationSupport.java:470)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.assertResponseCode(OperationSupport.java:409)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:379)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:343)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleCreate(OperationSupport.java:226)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.handleCreate(BaseOperation.java:769)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.create(BaseOperation.java:356)
at io.fabric8.kubernetes.api.Controller.doCreateResource(Controller.java:1082)
at io.fabric8.kubernetes.api.Controller.applyResource(Controller.java:1071)
at io.fabric8.kubernetes.api.Controller.applyEntity(Controller.java:282)
at io.fabric8.kubernetes.api.Controller.apply(Controller.java:227)
at io.fabric8.maven.plugin.mojo.build.ApplyMojo.applyEntities(ApplyMojo.java:414)
at io.fabric8.maven.plugin.mojo.build.ApplyMojo.executeInternal(ApplyMojo.java:390)
at io.fabric8.maven.plugin.mojo.AbstractFabric8Mojo.execute(AbstractFabric8Mojo.java:74)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.085 s
[INFO] Finished at: 2018-04-04T15:42:14+00:00
[INFO] Final Memory: 46M/422M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.fabric8:fabric8-maven-plugin:3.5.30:apply (default-cli) on project demo-eureka-service: Failed to create Deployment from kubernetes.yml. io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://aksxkcwghf5rmuqw-148bd6e3.hcp.eastus.azmk8s.io/apis/extensions/v1beta1/namespaces/default/deployments. Message: the API version in the data (apps/v1beta1) does not match the expected API version (extensions/v1beta1). Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=the API version in the data (apps/v1beta1) does not match the expected API version (extensions/v1beta1), metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=BadRequest, status=Failure, additionalProperties={}).. Deployment(apiVersion=apps/v1beta1, kind=Deployment, metadata=ObjectMeta(annotations={fabric8.io/git-commit=dda6a7a0e722997c479103e55ab00dd266395e01, fabric8.io/iconUrl=img/icons/spring-boot.svg, fabric8.io/git-branch=master, fabric8.io/metrics-path=dashboard/file/kubernetes-pods.json/?var-project=demo-eureka-service&var-version=0.0.1-SNAPSHOT, fabric8.io/scm-tag=HEAD, fabric8.io/scm-url=https://github.com/spring-projects/spring-boot/spring-boot-starter-parent/demo-eureka-service}, clusterName=null, creationTimestamp=null, deletionGracePeriodSeconds=null, deletionTimestamp=null, finalizers=[], generateName=null, generation=null, labels={app=demo-eureka-service, provider=fabric8, version=0.0.1-SNAPSHOT, group=com.example}, name=eurekaservice, namespace=null, ownerReferences=[], resourceVersion=null, selfLink=null, uid=null, additionalProperties={}), spec=DeploymentSpec(minReadySeconds=null, paused=null, progressDeadlineSeconds=null, replicas=1, revisionHistoryLimit=2, rollbackTo=null, selector=LabelSelector(matchExpressions=[], matchLabels={app=demo-eureka-service, provider=fabric8, group=com.example}, additionalProperties={}), strategy=null, template=PodTemplateSpec(metadata=ObjectMeta(annotations={fabric8.io/git-commit=dda6a7a0e722997c479103e55ab00dd266395e01, fabric8.io/metrics-path=dashboard/file/kubernetes-pods.json/?var-project=demo-eureka-service&var-version=0.0.1-SNAPSHOT, fabric8.io/scm-url=https://github.com/spring-projects/spring-boot/spring-boot-starter-parent/demo-eureka-service, fabric8.io/iconUrl=img/icons/spring-boot.svg, fabric8.io/git-branch=master, fabric8.io/scm-tag=HEAD}, clusterName=null, creationTimestamp=null, deletionGracePeriodSeconds=null, deletionTimestamp=null, finalizers=[], generateName=null, generation=null, labels={app=eurekaservice, provider=fabric8, version=0.0.1-SNAPSHOT, group=com.example}, name=null, namespace=null, ownerReferences=[], resourceVersion=null, selfLink=null, uid=null, additionalProperties={}), spec=PodSpec(activeDeadlineSeconds=null, containers=[Container(args=[], command=[], env=[EnvVar(name=KUBERNETES_NAMESPACE, value=null, valueFrom=EnvVarSource(configMapKeyRef=null, fieldRef=ObjectFieldSelector(apiVersion=null, fieldPath=metadata.namespace, additionalProperties={}), resourceFieldRef=null, secretKeyRef=null, additionalProperties={}), additionalProperties={})], image=aksdocreg.azurecr.io/demo-eureka-service, imagePullPolicy=IfNotPresent, lifecycle=null, livenessProbe=Probe(exec=null, failureThreshold=null, httpGet=HTTPGetAction(host=null, httpHeaders=[], path=/health, port=IntOrString(IntVal=8761, Kind=null, StrVal=null, additionalProperties={}), scheme=HTTP, additionalProperties={}), initialDelaySeconds=180, periodSeconds=null, successThreshold=null, tcpSocket=null, timeoutSeconds=null, additionalProperties={}), name=eurekaservice, ports=[ContainerPort(containerPort=8761, hostIP=null, hostPort=null, name=null, protocol=null, additionalProperties={}), ContainerPort(containerPort=8080, hostIP=null, hostPort=null, name=http, protocol=TCP, additionalProperties={}), ContainerPort(containerPort=9779, hostIP=null, hostPort=null, name=prometheus, protocol=TCP, additionalProperties={}), ContainerPort(containerPort=8778, hostIP=null, hostPort=null, name=jolokia, protocol=TCP, additionalProperties={})], readinessProbe=Probe(exec=null, failureThreshold=null, httpGet=HTTPGetAction(host=null, httpHeaders=[], path=/health, port=IntOrString(IntVal=8761, Kind=null, StrVal=null, additionalProperties={}), scheme=HTTP, additionalProperties={}), initialDelaySeconds=10, periodSeconds=null, successThreshold=null, tcpSocket=null, timeoutSeconds=null, additionalProperties={}), resources=null, securityContext=SecurityContext(capabilities=null, privileged=false, readOnlyRootFilesystem=null, runAsNonRoot=null, runAsUser=null, seLinuxOptions=null, additionalProperties={}), stdin=null, stdinOnce=null, terminationMessagePath=null, tty=null, volumeMounts=[], workingDir=null, additionalProperties={})], dnsPolicy=null, hostIPC=null, hostNetwork=null, hostPID=null, hostname=null, imagePullSecrets=[], nodeName=null, nodeSelector=null, restartPolicy=null, securityContext=null, serviceAccount=null, serviceAccountName=null, subdomain=null, terminationGracePeriodSeconds=null, volumes=[], additionalProperties={}), additionalProperties={}), additionalProperties={}), status=null, additionalProperties={}) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Credential file path not found - Even when file is present in the mentioned location

I am trying to follow the steps mentioned in the below document
https://docs.microsoft.com/en-gb/java/azure/spring-framework/configure-spring-cloud-stream-binder-java-app-azure-event-hub?view=azure-java-stable

Entry in property file
spring.cloud.azure.credential-file-path=/Users/raharida/Documents/GitHub/azure-event-hub-poc/src/main/resources/my.azureauth

I get the below exception on starting the spring boot server.

[main] ERROR com.microsoft.azure.spring.cloud.context.core.impl.DefaultCredentialsProvider - Credential file path not found.
java.io.FileNotFoundException: class path resource [Users/raharida/Documents/GitHub/azure-event-hub-poc/src/main/resources/my.azureauth] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180)
at com.microsoft.azure.spring.cloud.context.core.impl.DefaultCredentialsProvider.initCredentials(DefaultCredentialsProvider.java:54)
at com.microsoft.azure.spring.cloud.context.core.impl.DefaultCredentialsProvider.(DefaultCredentialsProvider.java:39)
at com.microsoft.azure.spring.cloud.autoconfigure.context.AzureContextAutoConfiguration.azure(AzureContextAutoConfiguration.java:56)
at com.microsoft.azure.spring.cloud.autoconfigure.context.AzureContextAutoConfiguration$$EnhancerBySpringCGLIB$$29be5156.CGLIB$azure$1()
at com.microsoft.azure.spring.cloud.autoconfigure.context.AzureContextAutoConfiguration$$EnhancerBySpringCGLIB$$29be5156$$FastClassBySpringCGLIB$$1ba469d.invoke()
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361)
at com.microsoft.azure.spring.cloud.autoconfigure.context.AzureContextAutoConfiguration$$EnhancerBySpringCGLIB$$29be5156.azure()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1247)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1096)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1135)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:818)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:724)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:474)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1247)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1096)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:330)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1258)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246)
at com.company.azure.poceventhub.UserManagementApplication.main(UserManagementApplication.java:11)
[main] WARN org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'azureAdmin' defined in class path resource [com/microsoft/azure/spring/cloud/autoconfigure/context/AzureContextAutoConfiguration.class]: Unsatisfied dependency expressed through method 'azureAdmin' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'azure' defined in class path resource [com/microsoft/azure/spring/cloud/autoconfigure/context/AzureContextAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.microsoft.azure.management.Azure]: Factory method 'azure' threw exception; nested exception is java.lang.IllegalArgumentException: Credential file path not found
[main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler - Shutting down ExecutorService 'taskScheduler'
Nov 20, 2018 12:25:45 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service [Tomcat]
[main] INFO org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener -

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
[main] ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'azureAdmin' defined in class path resource [com/microsoft/azure/spring/cloud/autoconfigure/context/AzureContextAutoConfiguration.class]: Unsatisfied dependency expressed through method 'azureAdmin' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'azure' defined in class path resource [com/microsoft/azure/spring/cloud/autoconfigure/context/AzureContextAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.microsoft.azure.management.Azure]: Factory method 'azure' threw exception; nested exception is java.lang.IllegalArgumentException: Credential file path not found
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:732)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:474)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1247)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1096)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:330)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1258)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246)
at com.company.azure.poceventhub.UserManagementApplication.main(UserManagementApplication.java:11)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'azure' defined in class path resource [com/microsoft/azure/spring/cloud/autoconfigure/context/AzureContextAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.microsoft.azure.management.Azure]: Factory method 'azure' threw exception; nested exception is java.lang.IllegalArgumentException: Credential file path not found
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:590)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1247)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1096)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1135)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:818)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:724)
... 19 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.microsoft.azure.management.Azure]: Factory method 'azure' threw exception; nested exception is java.lang.IllegalArgumentException: Credential file path not found
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:582)
... 32 more
Caused by: java.lang.IllegalArgumentException: Credential file path not found
at com.microsoft.azure.spring.cloud.context.core.impl.DefaultCredentialsProvider.initCredentials(DefaultCredentialsProvider.java:60)
at com.microsoft.azure.spring.cloud.context.core.impl.DefaultCredentialsProvider.(DefaultCredentialsProvider.java:39)
at com.microsoft.azure.spring.cloud.autoconfigure.context.AzureContextAutoConfiguration.azure(AzureContextAutoConfiguration.java:56)
at com.microsoft.azure.spring.cloud.autoconfigure.context.AzureContextAutoConfiguration$$EnhancerBySpringCGLIB$$29be5156.CGLIB$azure$1()
at com.microsoft.azure.spring.cloud.autoconfigure.context.AzureContextAutoConfiguration$$EnhancerBySpringCGLIB$$29be5156$$FastClassBySpringCGLIB$$1ba469d.invoke()
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361)
at com.microsoft.azure.spring.cloud.autoconfigure.context.AzureContextAutoConfiguration$$EnhancerBySpringCGLIB$$29be5156.azure()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
... 33 more
Caused by: java.io.FileNotFoundException: class path resource [Users/raharida/Documents/GitHub/azure-event-hub-poc/src/main/resources/my.azureauth] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180)
at com.microsoft.azure.spring.cloud.context.core.impl.DefaultCredentialsProvider.initCredentials(DefaultCredentialsProvider.java:54)
... 45 more

I am getting issue : Could not resolve placeholder

I am getting error

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'stockmanagementApplication': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentExce
ption: Could not resolve placeholder 'stockmysqlpassword' in value "${stockmysqlpassword}"


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

new function delete the old function in the same function app

Lets say I have function app name MyFunctionApp now I want to deploy to function in that lets say funcA and FuncB

I define in the pom.xml. in both the functions

<functionAppName>MyFunctionApp</functionAppName>
<functionResourceGroup>MyResourceGroup</functionResourceGroup>

when I deploy the function with mvn azure-functions:deploy "funcA" then I see function app (MyFuncApp) and the function "funcA"

now I deploy the function funcB then the funcA is gone and I see the function app (MyFuncApp) and "FuncB".
I dont know how can I deploy both the function in the same app with the maven command

Any suggestion?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Samples do not function for multiple reasons

  1. Version is required on Maven <dependency> snippets

  2. @EnableOAuth2Sso is missing (now requires new Maven dependency):

    			<groupId>org.springframework.security.oauth.boot</groupId>
    			<artifactId>spring-security-oauth2-autoconfigure</artifactId>
    			<version>2.0.0.RELEASE</version>
    		</dependency>
    
  3. Attempting to access a protected URL results in exception org.springframework.security.oauth2.client.resource.UserRedirectRequiredException: A redirect is required to get the users approval

    Debugging info:

    ...
    2018-04-03 12:16:05.274  INFO 41754 --- [           main] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher@1, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@1706a5c9, org.springframework.security.web.context.SecurityContextPersistenceFilter@31da3d60, org.springframework.security.web.header.HeaderWriterFilter@468be356, org.springframework.security.web.csrf.CsrfFilter@6a0cbc6f, org.springframework.security.web.authentication.logout.LogoutFilter@4b869331, org.springframework.security.oauth2.client.filter.OAuth2ClientAuthenticationProcessingFilter@64412d34, com.microsoft.azure.spring.autoconfigure.aad.AADAuthenticationFilter@221ca7c, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@65ec8b24, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@5e8c34a0, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@4d178d55, org.springframework.security.web.session.SessionManagementFilter@4df39a88, org.springframework.security.web.access.ExceptionTranslationFilter@58e85c6f, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@35178483]
    ...
    org.springframework.security.oauth2.client.resource.UserRedirectRequiredException: A redirect is required to get the users approval
    	at org.springframework.security.oauth2.client.token.grant.code.AuthorizationCodeAccessTokenProvider.getRedirectForAuthorization(AuthorizationCodeAccessTokenProvider.java:359) ~[spring-security-oauth2-2.2.1.RELEASE.jar:na]
    	at org.springframework.security.oauth2.client.token.grant.code.AuthorizationCodeAccessTokenProvider.obtainAccessToken(AuthorizationCodeAccessTokenProvider.java:205) ~[spring-security-oauth2-2.2.1.RELEASE.jar:na]
    	at org.springframework.security.oauth2.client.OAuth2RestTemplate.acquireAccessToken(OAuth2RestTemplate.java:221) ~[spring-security-oauth2-2.2.1.RELEASE.jar:na]
    	at org.springframework.security.oauth2.client.OAuth2RestTemplate.getAccessToken(OAuth2RestTemplate.java:173) ~[spring-security-oauth2-2.2.1.RELEASE.jar:na]
    	at org.springframework.security.oauth2.client.filter.OAuth2ClientAuthenticationProcessingFilter.attemptAuthentication(OAuth2ClientAuthenticationProcessingFilter.java:105) ~[spring-security-oauth2-2.2.1.RELEASE.jar:na]
    	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:212) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) ~[spring-security-web-5.0.3.RELEASE.jar:5.0.3.RELEASE]
    ...
    

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Missing documentation for Azure B2C

A document explaining how to integrate with the B2C version with a regular Spring MVC application. No JavaScript frameworks. Just Spring MVC.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

com.microsoft.windowsazure.Configuration is not present in dependency above azure-servicebus 0.9.7.

com.microsoft.windowsazure.Configuration is not present in dependency above azure-servicebus. Yet you have azure-servicebus 1.16 or something in pom.xml. Kindly show us how to manage queues and topic with version 1.16. Or new API.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

SubscriptionClient with Sessions issue: java.lang.UnsupportedOperationException

Created a Topic aaaa and Subscription zzzsubscription - session aware.

Using the below code to send messages to Topic with Session IDs:

String senderString="Endpoint=sb://xxxx.servicebus.windows.net/;SharedAccessKeyName=sampler-sender-only-policy;SharedAccessKey=mmmm;EntityPath=aaaa";
ConnectionStringBuilder connectionStringBuilder = new ConnectionStringBuilder(senderString,
                "aaaa");
TopicClient client=new TopicClient(connectionStringBuilder);
for(int session =1 ;session<=10;session++){
        for(int message =1 ;message<=10;message++){
                Message sendMessage=new Message("message "+message);
                sendMessage.setMessageId(UUID.randomUUID().toString());
                sendMessage.setSessionId("Session "+session );
                client.sendAsync(sendMessage);
        }
}

Using the below code to read messages from subscription:

String listenerString = "Endpoint=sb://xxxx.servicebus.windows.net/;SharedAccessKeyName=sample-listen-only-policy;SharedAccessKey=yyyy;EntityPath=aaaa";
ConnectionStringBuilder connectionStringBuilderListen = new ConnectionStringBuilder(listenerString,
                "aaaa/subscriptions/zzzsubscription");
SubscriptionClient subscriptionClient = new SubscriptionClient(connectionStringBuilderListen, ReceiveMode.PEEKLOCK);

subscriptionClient.registerSessionHandler(new ISessionHandler() {
        @Override
        public CompletableFuture<Void> onMessageAsync(IMessageSession session, IMessage message) {
                System.out.println(message.getSessionId()+" - "+ new String(message.getBody()));
                return subscriptionClient.completeAsync(message.getLockToken());
        }
        @Override
         public void notifyException(Throwable throwable, ExceptionPhase exceptionPhase) {
                System.out.printf(exceptionPhase + "-" + throwable.getMessage());
            }
        @Override
        public CompletableFuture<Void> OnCloseSessionAsync(IMessageSession session) {
                return subscriptionClient.closeAsync();
        }
});

Getting the below exception at return subscriptionClient.completeAsync(message.getLockToken());:

java.lang.UnsupportedOperationException: Receiver not created. Registering a MessageHandler creates a receiver.
	at com.microsoft.azure.servicebus.MessageAndSessionPump.checkInnerReceiveCreated(MessageAndSessionPump.java:712)
	at com.microsoft.azure.servicebus.MessageAndSessionPump.completeAsync(MessageAndSessionPump.java:636)
	at com.microsoft.azure.servicebus.SubscriptionClient.completeAsync(SubscriptionClient.java:208)
	at com.microsoft.azure.servicebus.samples.topicsgettingstarted.TopicsGettingStarted$1.onMessageAsync(TopicsGettingStarted.java:31)

Broken link on 'Azure Storage libraries for Java' page

On this page https://docs.microsoft.com/en-us/java/api/overview/docs-ref-conceptual/java-sdk-manage-storage-accounts?view=azure-java-stable , the link under
Samples > Manage Azure Storage accounts is broken (https://docs.microsoft.com/en-us/java/api/overview/docs-ref-conceptual/java-sdk-manage-storage-accounts?view=azure-java-stable) shows a 404 page


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Broken links under "Samples"

Under "Samples" following the "Manage groups, users, and roles" link gives a 404 response.
Following the "Call the Active AD Graph API from your Java web app" link goes to an archived repo.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Question about Azure spring boot starter for AD usage

Hi,

I just finished running through the example here: https://docs.microsoft.com/en-us/java/azure/spring-framework/configure-spring-boot-starter-java-app-with-azure-active-directory, and I have a couple of questions.

First, my expectation was that upon initial navigation to http://localhost:8080 the redirect would be to the Microsoft login page (i.e. https://login.microsoftonline.com...). However, instead the redirect was to http://localhost:8080/login, and the user must click an "Azure" link to navigate to the Microsoft login page.

It looks like this is the default behavior provided by the HttpSecurity.oauth2Login() operation. Do you have any guidance on how to configure this so that it defaults to azure as the provider - eliminating the need for the default, generated login page?

Second, the example in the article appears to be specific to Spring Boot 2.0.x. Are there any examples for Spring Boot 1.5.x available?

Thanks

Step 7 Push your app to the container registry mvn command typo

Step 7 should read:

    mvn package dockerfile:build -DpushImage

The change is "dockerfile" as opposed to "docker". This is referenced in the github issue of gs-spring-boot-docker
spring-guides/gs-spring-boot-docker#43 (comment)


Document details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test

Hello,

Having problem with : azure-docs-sdk-java/docs-ref-conceptual/spring-framework/deploy-spring-boot-java-app-on-kubernetes.md

Trying to run it on both windows and bash for windows and having same issue:

C:\Temp\gs-spring-boot-docker\complete [master ≡]> mvn package spring-boot:run
[INFO] Scanning for projects...pache.org/confluence/display/MAVEN/PluginExecutionException
[INFO] \gs-spring-boot-docker\complete [master ≡]>
[INFO] -------------< org.springframework:gs-spring-boot-docker >--------------
[INFO] Building Spring Boot Docker 0.1.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ gs-spring-boot-docker ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ gs-spring-boot-docker ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) @ gs-spring-boot-docker ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Temp\gs-spring-boot-docker\complete\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ gs-spring-boot-docker ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.20.1:test (default-test) @ gs-spring-boot-docker ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.166 s
[INFO] Finished at: 2018-03-24T16:09:11Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test) on project gs-spring-boot-docker: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.: NullPointerException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Single logout

[Enter feedback here]

Can some point out how does single logout work.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

SpringApplicationBuilder method override also requires the import org.springframework.boot.builder.SpringApplicationBuilder;

The SpringApplicationBuilder method override also requires the import org.springframework.boot.builder.SpringApplicationBuilder;
Please add that instruction


Document details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

No release notes

The link in section "Reference and release notes" doesn't point to release notes.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Command needs minor correction

There is a missing space in this command (after wingtiptoys-kubernetes):
az acr create --admin-enabled --resource-group wingtiptoys-kubernetes--location eastus
--name wingtiptoysregistry --sku Basic

It should be :
az acr create --admin-enabled --resource-group wingtiptoys-kubernetes --location eastus
--name wingtiptoysregistry --sku Basic


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Setting the configuration property 'appServicePlanName' does not have any effect ..

Setting the configuration property 'appServicePlanName' does not have any effect ..
Is this configuration property really supported?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Step 2 - Create New Web App pricing tier not clear

It was quite difficult as a new user to Azure to understand the pricing tier when deploying to Azure. I was given the options for creating a VM on the Azure CLI, website and with the Azure Toolkit for IntelliJ.
With a free tier, it was ambigious as to what server is free for 12 months or the free trial as the website states the payments per hour/day and not clearly what was the free trial. Needs clearer descriptions


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Sample is not working due to "AADSTS900144: The request body must contain the following parameter: 'client_id'."

I followed the instructions, but once I run the application for the first time in a fresh browser window I am redirected to the login on https://login.microsoftonline.com - after authentication I get into a redirect loop

This exception is thrown for each redirection:


org.springframework.http.converter.HttpMessageNotReadableException: An error occurred reading the OAuth 2.0 Error: JSON parse error: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token
 at [Source: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream); line: 1, column: 287] (through reference chain: java.util.LinkedHashMap["error_codes"]); nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token
 at [Source: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream); line: 1, column: 287] (through reference chain: java.util.LinkedHashMap["error_codes"])
	at org.springframework.security.oauth2.core.http.converter.OAuth2ErrorHttpMessageConverter.readInternal(OAuth2ErrorHttpMessageConverter.java:79) ~[spring-security-oauth2-core-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.security.oauth2.core.http.converter.OAuth2ErrorHttpMessageConverter.readInternal(OAuth2ErrorHttpMessageConverter.java:47) ~[spring-security-oauth2-core-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.http.converter.AbstractHttpMessageConverter.read(AbstractHttpMessageConverter.java:199) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.security.oauth2.client.http.OAuth2ErrorResponseErrorHandler.handleError(OAuth2ErrorResponseErrorHandler.java:59) ~[spring-security-oauth2-client-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:777) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:735) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:636) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.security.oauth2.client.endpoint.DefaultAuthorizationCodeTokenResponseClient.getTokenResponse(DefaultAuthorizationCodeTokenResponseClient.java:75) ~[spring-security-oauth2-client-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.security.oauth2.client.endpoint.DefaultAuthorizationCodeTokenResponseClient.getTokenResponse(DefaultAuthorizationCodeTokenResponseClient.java:52) ~[spring-security-oauth2-client-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.security.oauth2.client.oidc.authentication.OidcAuthorizationCodeAuthenticationProvider.authenticate(OidcAuthorizationCodeAuthenticationProvider.java:137) ~[spring-security-oauth2-client-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:174) ~[spring-security-core-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter.attemptAuthentication(OAuth2LoginAuthenticationFilter.java:186) ~[spring-security-oauth2-client-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:212) ~[spring-security-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter.doFilterInternal(OAuth2AuthorizationRequestRedirectFilter.java:160) ~[spring-security-oauth2-client-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) ~[spring-security-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:100) ~[spring-security-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:74) ~[spring-security-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) ~[spring-security-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) ~[spring-security-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215) ~[spring-security-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) ~[spring-security-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) [tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) [tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:791) [tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417) [tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.13.jar:9.0.13]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_191]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_191]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.13.jar:9.0.13]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_191]
Caused by: org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token
 at [Source: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream); line: 1, column: 287] (through reference chain: java.util.LinkedHashMap["error_codes"])
	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:245) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.read(AbstractJackson2HttpMessageConverter.java:227) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.security.oauth2.core.http.converter.OAuth2ErrorHttpMessageConverter.readInternal(OAuth2ErrorHttpMessageConverter.java:74) ~[spring-security-oauth2-core-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	... 68 common frames omitted
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token
 at [Source: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream); line: 1, column: 287] (through reference chain: java.util.LinkedHashMap["error_codes"])
	at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:63) ~[jackson-databind-2.9.7.jar:2.9.7]
	at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1343) ~[jackson-databind-2.9.7.jar:2.9.7]
	at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1139) ~[jackson-databind-2.9.7.jar:2.9.7]
	at com.fasterxml.jackson.databind.deser.std.StdDeserializer._deserializeFromArray(StdDeserializer.java:675) ~[jackson-databind-2.9.7.jar:2.9.7]
	at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:40) ~[jackson-databind-2.9.7.jar:2.9.7]
	at com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:10) ~[jackson-databind-2.9.7.jar:2.9.7]
	at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:527) ~[jackson-databind-2.9.7.jar:2.9.7]
	at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:364) ~[jackson-databind-2.9.7.jar:2.9.7]
	at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:29) ~[jackson-databind-2.9.7.jar:2.9.7]
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4013) ~[jackson-databind-2.9.7.jar:2.9.7]
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3084) ~[jackson-databind-2.9.7.jar:2.9.7]
	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:239) ~[spring-web-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	... 70 common frames omitted

If I add a breakpoint in ObjectMapper.java:3084 and execute com.microsoft.applicationinsights.core.dependencies.apachecommons.io.IOUtils.toString(new InputStreamReader(src)) - I can see the reason for the objectmapper error is that it is not the expected response - but an error that is returned from azure:

{"error":"invalid_request","error_description":"AADSTS900144: The request body must contain the following parameter: 'client_id'.\r\nTrace ID: b213ff3a-e431-49de-9922-31361ad50e00\r\nCorrelation ID: a15eac5e-b75b-4d82-a7ff-47398e37583f\r\nTimestamp: 2018-12-12 08:28:11Z","error_codes":[900144],"timestamp":"2018-12-12 08:28:11Z","trace_id":"b213ff3a-e431-49de-9922-31361ad50e00","correlation_id":"a15eac5e-b75b-4d82-a7ff-47398e37583f"}

At the very least I would suggest that you when handle the error and log it / show it.

The culprit of the error is that
org.springframework.security.oauth2.client.endpoint.DefaultAuthorizationCodeTokenResponseClient#getTokenResponse does this:

try {
			response = this.restOperations.exchange(request, OAuth2AccessTokenResponse.class);
		} catch (RestClientException ex) {
			OAuth2Error oauth2Error = new OAuth2Error(INVALID_TOKEN_RESPONSE_ERROR_CODE,
					"An error occurred while attempting to retrieve the OAuth 2.0 Access Token Response: " + ex.getMessage(), null);
			throw new OAuth2AuthorizationException(oauth2Error, ex);
}

The exception thrown when objectmapper fails to map to an OAuth2AccessTokenResponse is not a RestClientException - so the OAuth2AuthorizationException is not thrown.

If I change from DefaultAuthorizationCodeTokenResponseClient to using the deprecated NimbusAuthorizationCodeTokenResponseClient I get the actual error message from the endpoint instead of a jackson START_ARRAY error.

I realize that this code is part of the Spring framework - but since you are providing a sample it would be nice if the sample worked - or at least told you the error instead of hiding it as is the state currently.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Link to Event Hub Client API is outdated

[Enter feedback here]
"Explore the Client API" link is outdated:
https://docs.microsoft.com/en-us/java/api/overview/azure/eventhub/client
And for the dependency I think there is a version 1.0.1 which changes Interfaces and can't be used as descripted.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Inaccurate IllegalEntityException

My customer uses Azure Web Job to send message to Event Hub. Between June 12th 0:15am to 0:40am UTC, there were 159 exceptions when sending messages to Event Hub.

Example of exception:

The session channel '4' cannot be found in connection 'node-connection191180043'., errorContext[NS: jb2-internal.servicebus.windows.net, PATH: transmission, REFERENCE_ID: 6561456cef6e4fa5b47972c5650652ac_G1, LINK_CREDIT: 265]         
com.microsoft.azure.eventhubs.IllegalEntityException
com.microsoft.azure.eventhubs.ExceptionUtil.toException

com.microsoft.azure.eventhubs.IllegalEntityException:
   at com.microsoft.azure.eventhubs.ExceptionUtil.toException (ExceptionUtil.java31)
   at com.microsoft.azure.eventhubs.MessageSender.onSendComplete (MessageSender.java480)
   at com.microsoft.azure.eventhubs.amqp.SendLinkHandler.onDelivery (SendLinkHandler.java68)
   at org.apache.qpid.proton.engine.BaseHandler.handle (BaseHandler.java185)
   at org.apache.qpid.proton.engine.impl.EventImpl.dispatch (EventImpl.java108)
   at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch (ReactorImpl.java309)
   at org.apache.qpid.proton.reactor.impl.ReactorImpl.process (ReactorImpl.java276)
   at com.microsoft.azure.eventhubs.MessagingFactory$RunReactor.run (MessagingFactory.java382)
   at java.lang.Thread.run (Thread.java748)

However in backend logs we only see AMQP timeout exception.

<Event xmlns='http://schemas.microsoft.com/win/2004/08/events/event'>
<System>
<Provider Name='Microsoft.ServiceBus'/>
<EventID Qualifiers='0'>30311</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime='2018-06-13T00:19:00.420376900Z'/>
<EventRecordID>249426</EventRecordID>
<Channel>Application</Channel>
<Computer>RD00155D90644E</Computer>
<Security/>
</System>
<EventData><Data>&lt;Trc Id="30311" Ch="Operational" Lvl="Error" Kw="4000000000001100" UTC="2018-06-13T00:19:00.420Z" Msg="in-connection186786383(jb2-internal):session191149479:client-link191149488 Create internal link failed (info: 0:address:1-&amp;amp;gt;0:resolve(57711):1-&amp;amp;gt;0:authz(cbs):1-&amp;amp;gt;0:node://sbseh.28:1-&amp;amp;gt;0:node-connection190406197:1-&amp;amp;gt;59919:broker-link191149489:0, error: ExceptionId: 64ba54b5-f387-49b4-8f5d-74ed123bf20c-Microsoft.ServiceBus.Messaging.Amqp.AmqpException: The operation did not complete within the allocated time 00:01:00 for object attach. For more information on exception types and proper exception handling, please refer to http://go.microsoft.com/fwlink/?LinkId=761101 TrackingId:6561456cef6e4fa5b47972c5650652ac_G1, SystemTracker:gateway7, Timestamp:6/13/2018 12:19:00 AM)." /&gt;</Data></EventData>
</Event>

There is a backend service upgrade happened in the time range and is likely the cause of the timeout exceptions.
6/12/2018 4:12:11 PM | 6/13/2018 1:26:37 AM | SB-1.-1.0_Appfabric_WindowsFabric_Upgrade_Production_PROD-KW1-001

We didn't expect the exception to surface on the client side as IllegalEntityException since that is only if the entity does not exist or is disabled - https://docs.microsoft.com/en-us/java/api/com.microsoft.azure.eventhubs._illegal_entity_exception.

More accurate exception would be EventHubException which customer can handle, backoff and retry the operation. We suspect that client SDK is not returning the correct type of exception.

Please kindly investigate.

Broken Link

Explore Client APIs link is broken - gives 404 - Page not found error


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Consider updating this example to use dockerfile-maven

The maintainers of docker-maven-plugin now recommend using dockerfile-maven instead (see https://github.com/spotify/docker-maven-plugin/blob/master/README.md). It'd be nice to see this example revised.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Dependency tracking for CosmosDB and RabbitMQ

Hi
Step 5 under heading:Configure your downloaded Spring Boot Application to use Application Insights
shows: telemetryClient.trackDependency("SQL", "Insert", new Duration(0, 0, 1, 1, 1), true);
how to track SQL dependency

we have dependency on Azure CosmosDB and RabbitMQ.are these 2 dependency supported? and what would be exact syntax to add those dependency?

[Enter feedback here]


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Missing Library when following the tutorial step by step

When following the tutorial step by step building fails as th security-config package is missing.

This can be fixed by adding

implementation('org.springframework.security:spring-security-config') for gradle

or in maven:

<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-config</artifactId>
    <version>3.2.4.RELEASE</version>
</dependency>

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Authorizing an API to access

Hello Thanks for this tutorial, it was very simple and useful. In this case, if i launch a URL i am being validated against the USER.

I have a scenario where in I have an API which accesses this resource. How should this be handled ?, I do understand that the API should be configured in Azure, but how would that get authenticated ?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

gradle build hangs when using azure application insights appender in logback.xml

I am using azure application insights for logging in my application, It is a spring boot application with gradle. I am using application insights as an appender in my logback.xml The application works fine and logging works fine. But when I try to build my application using "gradle build" the build gets stuck and runs forever.

capture

The application builds fine if the application insights appender is removed from logback.xml file. I tried adding ApplicationInsights.xml and still the issue exists

My build.gradle is as below.

buildscript {    
    repositories {    
        mavenCentral()    
        jcenter()    
        maven { url "http://repo.spring.io/plugins-release" }    
        maven { url "http://plugins.gradle.org/m2/" }    
    }    
    dependencies {    
        classpath "org.springframework.boot:spring-boot-gradle-plugin:${spring_boot_version}"    
        classpath "io.spring.gradle:propdeps-plugin:${propdeps_plugin_version}"    
        classpath "gradle.plugin.org.detoeuf:swagger-codegen-plugin:${swagger_codegen_version}"    
        classpath "net.ltgt.gradle:gradle-apt-plugin:${net_ltgt_version}"    
        classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:${sonar_version}"    
    }    
}    
    
// Apply the java-library plugin to add support for Java Library    
apply plugin: 'java'    
apply plugin: 'java-library'    
apply plugin: 'maven'    
apply plugin: 'eclipse'    
apply plugin: 'org.springframework.boot'    
apply plugin: 'io.spring.dependency-management'    
apply plugin: 'net.ltgt.apt'    
apply plugin: 'org.sonarqube'    
apply plugin: 'jacoco'    
    
group = 'com.test.project'    
version = '0.0.1-SNAPSHOT'    
sourceCompatibility = 1.8     
    
repositories {    
    mavenCentral()    
    jcenter()    
    maven { url "https://repo.spring.io/milestone" }    
    mavenLocal()    
    flatDir {    
       dirs 'libs'    
    }    
}    
    
dependencies {

api "org.springframework.boot:spring-boot-starter-web"
api "org.springframework.boot:spring-boot-starter-actuator"
api "org.springframework.boot:spring-boot-starter-jetty"
api "org.springframework.boot:spring-boot-starter-data-jpa"
api "org.springframework.boot:spring-boot-starter-security"
api "org.springframework.security.oauth:spring-security-oauth2"
api "org.springframework.cloud:spring-cloud-starter-config"
api "org.springframework.cloud:spring-cloud-security:${spring_cloud_security_version}"
api "io.springfox:springfox-swagger2:${swagger_version}"
api "io.springfox:springfox-swagger-ui:${swagger_version}"
api ("net.sf.dozer:dozer:${dozer_version}") {
    exclude group: "org.slf4j", module: "slf4j-log4j12"
}
api "com.zaxxer:HikariCP:${hikari_version}"
api "org.postgresql:postgresql:${postgres_version}"
api "org.hibernate:hibernate-java8"
api "io.jsonwebtoken:jjwt:0.9.0"
api "org.springframework.boot:spring-boot-starter-quartz"
api "org.quartz-scheduler:quartz:2.2.3"
api "org.quartz-scheduler:quartz-jobs:2.2.3"
api "org.springframework:spring-jdbc:4.2.4.RELEASE"

api "com.microsoft.azure:applicationinsights-spring-boot-starter:1.0.0-BETA"
api "com.microsoft.azure:applicationinsights-logging-logback:2.0.+"

compileOnly "org.projectlombok:lombok:${lombok_version}"
annotationProcessor "org.projectlombok:lombok:${lombok_version}"

// Use JUnit test framework
testImplementation "junit:junit:${junit_version}"
testImplementation "org.springframework.boot:spring-boot-starter-test"
testImplementation "javax.servlet:javax.servlet-api:${javax_servlet_version}"
testImplementation "io.rest-assured:rest-assured:${rest_assured_version}"
testImplementation "io.rest-assured:spring-mock-mvc:${rest_assured_version}"
testImplementation "com.h2database:h2"
testImplementation "org.hsqldb:hsqldb"
testImplementation "com.github.tomakehurst:wiremock:2.6.0"
testImplementation "org.powermock:powermock-module-junit4:2.0.0-beta.5"
testImplementation "org.powermock:powermock-api-mockito2:2.0.0-beta.5"
}

dependencyManagement {
    imports {
        mavenBom "com.microsoft.azure:azure-spring-boot-bom:${spring_azure_version}"
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:${spring_cloud_version}"
    }
}

My logback.xml is

 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>

<property name="LOG_FILE" value="logs/project_name" />
<property name="LOG_PATTERN"
    value="%d{yyyy-MM-dd HH:mm:ss} %-5level %logger{36} - %msg%n" />

<appender name="CONSOLE"
    class="ch.qos.logback.core.ConsoleAppender">
    <layout class="ch.qos.logback.classic.PatternLayout">
        <pattern>${LOG_PATTERN}</pattern>
    </layout>
</appender>

<appender name="ROLLINGFILE"
    class="ch.qos.logback.core.rolling.RollingFileAppender">
    <encoder
        class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
        <pattern>${LOG_PATTERN}</pattern>
    </encoder>

    <rollingPolicy
        class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">

        <!-- daily rollover -->
        <fileNamePattern>${LOG_FILE}.%d{yyyy-MM-dd-HH}.%i.log</fileNamePattern>
        <maxHistory>10</maxHistory>
        <timeBasedFileNamingAndTriggeringPolicy
            class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
            <maxFileSize>100MB</maxFileSize>
        </timeBasedFileNamingAndTriggeringPolicy>
    </rollingPolicy>
</appender>

<appender name="aiAppender" 
    class="com.microsoft.applicationinsights.logback.ApplicationInsightsAppender"> 
</appender> 

<root level="ERROR">
    <appender-ref ref="CONSOLE" />
    <appender-ref ref="ROLLINGFILE" />
    <appender-ref ref="aiAppender" /> 
</root>

<logger name="org.springframework" level="ERROR" />
<logger name="org.hibernate.engine" level="ERROR" />

</configuration>

My application.yml properties are

project:
    artifactId: project-artifact
    name: Project name
    version: 0.0.1-SNAPSHOT
    description: Project desc

server:
  port: 8080
  servlet:
     contextPath: /api

azure:
   application-insights:
      instrumentation-key: instrumentation-key
      enabled: true
      web:
         enabled: true

I tried adding ApplicationInsights.xml as below but still the build hangs

Please suggest if I am missing anything

pom.xml does not have latest plugin version and it's keep failing during deployment.

<plugin>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-webapp-maven-plugin</artifactId>
<version>1.4..1</version>
<configuration>
<authentication>
<serverId>azure-auth</serverId>
</authentication>
<resourceGroup>maven-plugin</resourceGroup>
<appName>maven-linux-app-${maven.build.timestamp}</appName>
<region>westus</region>
<containerSettings>
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
</containerSettings>
<appSettings>
<property>
<name>PORT</name>
<value>8080</value>
</property>
</appSettings>
</configuration>
</plugin>

It should be 1.4.1 as the deployment works with latest pom version.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Non-CLI

Please give a tutorial of this using the website interface


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Problem getting password to "Push your app to the container registry"

Statement az acr credential show --name wingtiptoysregistry --query passwords[0] didn't return anything until I added the name of the resource I configured earlier ie
az acr credential show --name wingtiptoysregistry --query passwords[0] --resource-group myresourcegroup


Document details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

How to connect to Government cloud using IntelliJ Idea

How to connect to Azure Government Cloud (MAG) using IntelliJ Idea with Azure toolkit for IntelliJ?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Login problem

When i try to login to the Eclipse Azure service i get the Error: Null refresh token in auth result.

I cannot find anything online that can help me with this error so if anyone knows how to fix this please help.


Documentdetails

Dit gedeelte niet bewerken. Het is vereist om problemen te koppelen tussen docs.microsoft.com en GitHub.

pom dependences

That copy-paste pom.xml will not work, as it will throw the errors:
java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonGenerator.writeStartObject......

the issue is that maven will show the older Jackson-core-2.6.0.jar, as dependency hierarchy says: Jackson-core: 2.9.4 (omitted for conflict with 2.6.0)
Jackson-databind-2.9.4
Jackson-datatype-joda-2.9.4
Jackson-annotations-2.9.0

after forcing 2.9.4 for core, everything went fine.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

how to verify that deployment was successful ?

I'm assuming that when I browse the app after deploying to azure, I get the HelloController page but instead I get this message from Azure "This Java based web application has been successfully created
There's nothing here yet" does that mean that the deployment wasn't successful ?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

I really do not understand the pricing appServicePlanName property

HI Team, I would like to create the function with app service plan what are these attribute B1 B2 B3 . if I choose one of them then how do I calcuate the cost for it . Okay I can go the more information page and see the cost but then I go the cost calculator of the function then I do not have option to choose these B1 B2 B3 service plan https://azure.microsoft.com/en-us/pricing/calculator/?service=functions. I really do not understand the whole connection between the cost and the calculator of azure function cost.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Solution does not work

I followed the same steps and nothing happens. Neither record gets saved, nor it errors out. Can someone take a look at what’s going on here?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Click on "Explore the Management APIs" goes to 400 page

[Enter feedback here]

  1. Click on the "Explore the Management APIs" goes to 400 pages

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Exception: A required class was missing

d
d
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< org.springframework:gs-spring-boot >-----------------
[INFO] Building gs-spring-boot 0.1.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- azure-webapp-maven-plugin:1.4.0:deploy (default-cli) @ gs-spring-boot ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.502 s
[INFO] Finished at: 2019-01-05T14:51:08-08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.microsoft.azure:azure-webapp-maven-plugin:1.4.0:deploy (default-cli) on project gs-spring-boot: Execution default-cli of goal com.microsoft.azure:azure-webapp-maven-plug
in:1.4.0:deploy failed: A required class was missing while executing com.microsoft.azure:azure-webapp-maven-plugin:1.4.0:deploy: javax/xml/bind/JAXBException
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.microsoft.azure:azure-webapp-maven-plugin:1.4.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

Received the above exception while following this tutorial. Also tried using the latest version (1.5.1), same error


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Connection credentials

I've successfully run the example here, but am wondering how I would use this in conjunction with App Service managed service identity to access an Azure SQL Database? I'm looking for a way to combine App Service, AAD, Key Vault and Azure SQL so that I don't need to expose connection credentials in source code or application configuration. Is this possible?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.