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] java.lang.NoClassDefFoundError: reactor/util/context/ContextView #20392

Closed
3 tasks done
bvenkatbm opened this issue Apr 6, 2021 · 3 comments
Closed
3 tasks done
Assignees
Labels
azure-spring All azure-spring related issues azure-spring-dependency Spring dependency related issues. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Event Hubs
Milestone

Comments

@bvenkatbm
Copy link

Describe the bug
Migrating from azure-messaging-eventhubs from azure-eventhubs and azure-eventhubs-eph as the libraries are deprecated. Following the migration guide, https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/azure-messaging-eventhubs/migration-guide.md facing the following issue. It is seen that updated libraries use https://projectreactor.io/.

Exception or Stack Trace

at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:322)
	at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:190)
	at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:153)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:404)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:361)
	at org.springframework.boot.context.event.EventPublishingRunListener.running(EventPublishingRunListener.java:108)
	at org.springframework.boot.SpringApplicationRunListeners.running(SpringApplicationRunListeners.java:77)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:330)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
	at com.toshiba.hub4.IngestionService.main(IngestionService.java:58)
Caused by: java.lang.NoClassDefFoundError: reactor/util/context/ContextView
	at com.azure.storage.blob.implementation.ServicesImpl.<init>(ServicesImpl.java:62)
	at com.azure.storage.blob.implementation.AzureBlobStorageImpl.<init>(AzureBlobStorageImpl.java:216)
	at com.azure.storage.blob.implementation.AzureBlobStorageBuilder.build(AzureBlobStorageBuilder.java:93)
	at com.azure.storage.blob.BlobContainerAsyncClient.<init>(BlobContainerAsyncClient.java:130)
	at com.azure.storage.blob.BlobContainerClientBuilder.buildAsyncClient(BlobContainerClientBuilder.java:132)
	at com.toshiba.hub4.azure.EPHConfig.startIngestionEventProcessorClient(EPHConfig.java:105)
	at com.toshiba.hub4.azure.EPHConfig.run(EPHConfig.java:92)
	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.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:305)
	... 13 common frames omitted
Caused by: java.lang.ClassNotFoundException: reactor.util.context.ContextView
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	... 25 common frames omitted

To Reproduce
Using

  1. spring-boot: 2.3.4.RELEASE
  2. spring-cloud: Hoxton.SR8

Code Snippet
On trying to initialize Async blob client

BlobContainerAsyncClient blobContainerAsyncClient = new BlobContainerClientBuilder()
					.connectionString(storageConnectionString)
					.containerName(storageContainerName)
					.buildAsyncClient();

Expected behavior
Blob client should be initialized.

Setup (please complete the following information):

  • OS: Windows
  • IDE : IntelliJ
  • Version: azure-messaging-eventhubs: 5.6.0, azure-messaging-eventhubs-checkpointstore-blob: 1.5.1

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added
@bvenkatbm
Copy link
Author

probably an duplicate of #20391

@chenrujun
Copy link

spring-boot: 2.3.4.RELEASE managed reactor-core version: 3.3.10.
Refs:

  1. https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-dependencies/2.3.4.RELEASE/spring-boot-dependencies-2.3.4.RELEASE.pom
  2. https://repo1.maven.org/maven2/io/projectreactor/reactor-bom/Dysprosium-SR12/reactor-bom-Dysprosium-SR12.pom

azure-messaging-eventhubs required reactor-core version: 3.4.3.
Refs:

  1. https://github.com/Azure/azure-sdk-for-java/blob/azure-messaging-eventhubs_5.6.0/eng/versioning/external_dependencies.txt#L62

My suggestion:
Add following content in pom.xml:

    <dependency>
      <groupId>io.projectreactor</groupId>
      <artifactId>reactor-core</artifactId>
      <version>3.4.3</version>
    </dependency>

If problem still exists after you added the content, please share your pom.xml.

@chenrujun chenrujun self-assigned this Apr 8, 2021
@chenrujun chenrujun added azure-spring All azure-spring related issues Client This issue points to a problem in the data-plane of the library. labels Apr 8, 2021
@chenrujun chenrujun added this to the [2021] May milestone Apr 20, 2021
@chenrujun
Copy link

Closing this issue because there is not response for a long time.

@saragluna saragluna added the azure-spring-dependency Spring dependency related issues. label Apr 26, 2021
@chenrujun chenrujun added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Apr 27, 2021
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-java that referenced this issue Sep 13, 2022
Review request for Microsoft.ContainerService to add version 2022-08-02-preview (Azure#20487)

* Adds base for updating Microsoft.ContainerService from version preview/2022-07-02-preview to version 2022-08-02-preview

* Updates readme

* Updates API version in new specs and examples

* sync changes from PR#19592 & PR#20145 (Azure#20402)

* update readme & remove fleets (Azure#20388)

* AKS agent pool properties add AgentPoolWindowsProfile and DisableOutboundNAT (Azure#20407)

* AKS agent pool properties add AgentPoolWindowsProfile and DisableOutboundNAT

* Change disableOutboundNAT to disableOutboundNat because of ARM format; Improve description.

* Improve description

* Added guardrails profile to specs (Azure#20171)

* added guardrails profile to specs

* linter fix

* added x-ms-enum

* added guardrails definitions for versions route

* linter fix, added custom word

* fix

* typo fix

* fix for example

* added object type

* added object type

* removed data field

* changed descriptions

* *

* add "Mariner" for AKS os sku (Azure#20420)

* add KubeProxyConfig to AKS NetworkProfile (Azure#20446)

* add KubeProxyConfig to AKS NetworkProfile

* remove extra comma, type: integer for *Seconds

* add custom words

* prettier

* follow camel case ARM guidance

* 2nd camel case standard

* feat: add rest api spec for ip-based lb (Azure#20392)

* fix LroLocationHeader (Azure#20491)

* fix ProvisioningStateValidation (Azure#20490)

* Removed guardrailsVersions route, added guardrails profice to MC properties (Azure#20625)

* removed guardrails-versions route, added guardrails profice to MC properties

* removed unsued file for guardrails versions, removed unused custom word

Co-authored-by: Shiqian Tao <62196586+ShiqianTao@users.noreply.github.com>
Co-authored-by: rsamigullin <89222124+rsamigullin@users.noreply.github.com>
Co-authored-by: Ace Eldeib <aleldeib@microsoft.com>
Co-authored-by: Matt Stam <mattstam@live.com>
Co-authored-by: Qi Ni <pomelonicky@gmail.com>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
azure-spring All azure-spring related issues azure-spring-dependency Spring dependency related issues. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Event Hubs
Projects
None yet
Development

No branches or pull requests

3 participants