Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] File Storage Sample fails to start - AzureStorageFileProtocolResolver not found #703

Open
3 tasks
akhan-msft opened this issue Jun 28, 2023 · 1 comment
Labels
azure-spring All azure-spring related issues

Comments

@akhan-msft
Copy link

I used GitHub codespaces to run the project as-is but also experiencing the same issue while running the project locally, the com.azure.spring.cloud.core.resource.AzureStorageFileProtocolResolver is not injected into the FileController class. The only changes I made were to setup the values in the application.yml for my Azure subscription.

Exception stack trace below...

2023-06-28 22:18:41.805 WARN 12596 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fileController' defined in file [/workspaces/azure-spring-boot-samples/storage/spring-cloud-azure-starter-storage-file-share/storage-file-sample/target/classes/com/azure/spring/sample/storage/resource/FileController.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.azure.spring.cloud.core.resource.AzureStorageFileProtocolResolver' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
2023-06-28 22:18:41.809 INFO 12596 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2023-06-28 22:18:41.847 INFO 12596 --- [ main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-06-28 22:18:41.886 ERROR 12596 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

Parameter 2 of constructor in com.azure.spring.sample.storage.resource.FileController required a bean of type 'com.azure.spring.cloud.core.resource.AzureStorageFileProtocolResolver' that could not be found.

Action:

Consider defining a bean of type 'com.azure.spring.cloud.core.resource.AzureStorageFileProtocolResolver' in your configuration.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.800 s
[INFO] Finished at: 2023-06-28T22:18:41Z
[INFO] ------------------------------------------------------------------------

To Reproduce
Run the sample app as per the readme instructions.

Setup (please complete the following information):

  • OS: Cloned the project in codespaces env
  • IDE: CodeSpaces VS Code

Additional context
I am using the project as-is, have not modified any code or introduced any new libraries or modified versions, only update the application.yml file with the correct Azure file storage values for my Azure subscription.

Information Checklist

  • Bug Description Added - Done
  • Repro Steps Added - Done
  • Setup information Added - Done
@akhan-msft akhan-msft added the azure-spring All azure-spring related issues label Jun 28, 2023
@Netyyyy
Copy link
Contributor

Netyyyy commented Jul 3, 2023

Hi @akhan-msft , I didn't reproduce the same problem, could you provide more information about that, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure-spring All azure-spring related issues
Projects
None yet
Development

No branches or pull requests

2 participants