Category "java"

How to add exported label in manifest when there is no activity tag in Android Studio?

in my Manifets.xml file I have no <activity> tag and I am trying to add the exported = true but I don't know how. Is there a way? Here is my manifest: <

Spring data: DeleteAll and Insert in same transaction

I am trying to achieve below native query logic using hibernate (Spring JPA). But save(Iterable) throws exception and rollback the entire transaction if one of

Postman is returning a 404 error on my Spring Boot API

I've built a spring boot rest api. However, when I try to test it in Postman, I am getting a 404 error. I have linked the code below. Please note that there

Is it a good or bad convention to update entity / row without calling save() in hibernate / spring-jpa?

Recently I found it not necessary to call repository.save() if within a @Transactional block. Hibernate / Spring-JPA will update row automatically when exiting

Error: Static mocking is already registered in the current thread

Junit test case getting failed: existing static mocking registration must be deregistered Test class: @RunWith(MockitoJUnitRunner.class) public class DeleteRe

Limiting max. concurrent FTP client connections in Java

I was wondering if there's a Java FTP client library, that can limit the max. concurrent connections or if there's a feasible way to implement this feature arou

Java Maven Project "Source option 5 is no longer supported. Use 6 or later."

I'm following a PluralSight course, "Spring Framework: Spring Fundamentals" by Bryan Hansen. I've followed the demo precisely (I believe) but am getting the err

How to extract response header & status code from Spring 5 WebClient ClientResponse

I am new to Spring Reactive framework & trying to convert Springboot 1.5.x code into Springboot 2.0. I need to return response header after some filtering,

Why does GLES20.glCreateShader always returns 0?

I'm trying to make an OpenGL ES app in android using java and I have run in a major issue: GLES20.glCreateShader(type) (type beeing GLES20.GL_VERTEX_SHADER or G

Apache Kafka - Implementing a KTable

I am new to Kafka Streams API and I am trying to create a KTable. I have an input topic: s-order-topic, which is a json format message, as shown below. { "curr

How to load test soap api using jmeter

How to load test soap api using jmeter 4.0 , multbinding The follow: example for soap request ::

Could not find or load main class org.apache.maven.wrapper.MavenWrapperMain

I have a spring boot project here: https://github.com/jcasbin/jcasbin-springboot-plugin. I encountered the following error in Travis CI: shell 3.43s$ ./mvnw in

Does JUnit 5 support test method execution in alphabetical order or any similar functionality? [duplicate]

JUnit 4 has @FixMethodOrder(MethodSorters.NAME_ASCENDING) to support test execution in alphabetical order. Is there any similar functionality

java.lang.ClassNotFoundException: org.apache.logging.log4j.Logger after updating log4j 1.2.17 to 2.13.0

I am running Tomcat v9.0 server on a Java Eclipse project. Each time I run my application on the server I get this Problem Occured message: Server Tomcat v

TestNG Gradle how to run multiple suites in parallel

I was wondering if there is a way to run multiple test suites in parallel with TestNG + Gradle. I have a master suite file which contains other individual suite

How can I connect a Python websocket client to my Spring endpoint?

I'm new to Python and I'm trying to connect to a service that I currently have up running in Spring. On the server-side I have a custom Handshake handler in pla

Passing constructor as a parameter to a method

I am new to java and started working on constructors. I am seeing few examples where constructor is passed as parameter to a Method. Please tell me what happens

error using mvn spring-boot:build-image - received unexpected HTTP status: 500 Server Error"

I tried using 'mvn spring-boot:build-image' command and get that error.. ( I saw that maven have a new way to create an image with spring) Building image 'doc

How can I clear notification?

I have to hide a notification when a timer is cancelling. I instantiate a notification manager and use myNotificationManager.cancelAll(); but it doesn't work.

MappingException (Hibernate)

"Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister " I am not using any maven or such tools and manually add and reference