spring-boot-completable-future icon indicating copy to clipboard operation
spring-boot-completable-future copied to clipboard

added dependency

Open namakamru-git opened this issue 6 years ago • 8 comments
trafficstars

namakamru-git avatar Sep 18 '19 02:09 namakamru-git

Hi, Why do we need this dependency?

swathisprasad avatar Sep 18 '19 05:09 swathisprasad

Hi

I have went through the "Spring-boot-completable-future" service and tested my local system. It was good example. I have tested below flows,

  1. POST request working file . am uploading the csv file. --- working fine.
  2. GET request /api/car, getting the "antl class not found error", hence added the dependency and start working fine. If you want will share the exception details. In local environment added application.propertied related to h2 base also. .....

On Wed, Sep 18, 2019 at 10:54 AM Swathi Prasad [email protected] wrote:

Hi, Why do we need this dependency?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/swathisprasad/spring-boot-completable-future/pull/1?email_source=notifications&email_token=ANHHDD345A45JNROOPJXA33QKG3PXA5CNFSM4IXYKDYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD662VNY#issuecomment-532523703, or mute the thread https://github.com/notifications/unsubscribe-auth/ANHHDDYBTGJ4KINLG3QVSIDQKG3PXANCNFSM4IXYKDYA .

namakamru-git avatar Sep 18 '19 10:09 namakamru-git

@Kamruddin-git,

What is the Java version do you have? Even if it is Java 8, it should not give this problem.

P.S: I ran this project with Java 12.

Regards, Swathi

swathisprasad avatar Sep 18 '19 11:09 swathisprasad

I have worked with Java 8.

namakamru-git avatar Sep 18 '19 12:09 namakamru-git

I have worked with Java 8.

Can you provide the error log?

We don't need to add this dependency in POM.

swathisprasad avatar Sep 18 '19 12:09 swathisprasad

please refer the exception details

java.util.concurrent.CompletionException: java.lang.NoClassDefFoundError: antlr/RecognitionException at org.springframework.aop.interceptor.AsyncExecutionAspectSupport.lambda$doSubmit$3(AsyncExecutionAspectSupport.java:279) ~[spring-aop-5.1.9.RELEASE.jar:5.1.9.RELEASE] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) ~[na:1.8.0_73] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_73] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_73] at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_73] Caused by: java.lang.NoClassDefFoundError: antlr/RecognitionException

namakamru-git avatar Sep 18 '19 17:09 namakamru-git

@Kamruddin-git, Do you have this dependency in your POM? If you have this, it should automatically download antlr dependency as well. Antlr is a transitive dependency, so it is not necessary to include it explicitly.

spring-boot-starter-data-jpa

Are you using Spring Boot and what version is it? Do you use eclipse?

Regards, Swathi

swathisprasad avatar Sep 18 '19 17:09 swathisprasad

@swathisprasad

Please refer the below dependency for your reference. Am working with eclipse and STS

  	<parent>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-parent</artifactId>
	<version>2.1.8.RELEASE</version>
	<relativePath />
</parent>

<dependencies>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-web</artifactId>
	</dependency>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-data-jpa</artifactId>
	</dependency>
	<dependency>
		<groupId>com.h2database</groupId>
		<artifactId>h2</artifactId>
		<scope>runtime</scope>
	</dependency>
	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-api</artifactId>
	</dependency>
	<dependency>
		<groupId>org.projectlombok</groupId>
		<artifactId>lombok</artifactId>
		<version>1.18.10</version>
		<optional>true</optional>
	</dependency>
	
</dependencies>

@swathisprasad , do you have any sping security examples then please share it.

Thanks Kamruddin

namakamru-git avatar Sep 19 '19 01:09 namakamru-git