Questions tagged [java-8]
Use this tag for questions specific to Java 8 which is version 8 (internal number 1.8) of the Java platform, released on 18 March 2014. In most cases, you should also specify the java tag.
23,109
questions
0
votes
0
answers
6
views
Error Starting Wildfly 11 After JDK 1.8 Update
We have an existing client production instance using Wildfly 11 and for compliance with the PCIDSS (vulnerabilities), we are required to perform patching on some of the identified vulnerabilities in ...
0
votes
0
answers
27
views
Gradle build failing to find jar
I have a spring boot(2.1.9) gradle project which is trying to build by downloading a jar file from the artifactory but it is telling it is not able to find the jar file in the following location. But ...
-1
votes
0
answers
64
views
Alternative website for Spring Initializr for java 8? (start.spring.io now only allow Java 17+)
I'm trying to develop a Spring Boot App. I want to start with https://start.spring.io/ but now it only supports Java17+ (it used to support Java8 years ago I think).
My company is using Java8 and it ...
0
votes
0
answers
50
views
JAVA 8 || The operator % is undefined for the argument type(s) int[], int [duplicate]
Can anyone help me to find the root cause why I am getting these below error ?
The operator % is undefined for the argument type(s) int[], int
Code Snippet :
int arr1[] = {1,2,3,4,5,6,7};
Stream.of(...
0
votes
0
answers
33
views
Spring Boot WebClient- How to pass parameter in webclient Get call and how to get Page Object in return type
`I need to call an API through webclient.[Spring Boot]
Example Rest controller API looks like ---
`
@Getmapping("/demo")
public page<Object> find(Pageable pageable)
{
return ...
0
votes
0
answers
48
views
Remove null entry from custom list in java 8
I have a custom list as below
[Application(bname=null, cid=null, fname=“abc”)]
Now I need to set the values to another list but I have to remove null values i.e. bname=null so I don't want to set it ...
0
votes
0
answers
28
views
@Transactional is not working when it tagged on the method created using functional interfaces
I created a method in my service implementation & annotated by Transactional class. but @Transactional is no effective when then method is created as functional interfaces such as BiFunction, ...
1
vote
0
answers
21
views
Setup flutter and android studio in mac 2020
I have installed flutter and android studio giraffe on my macbook
Here is what the zshrc file looks like
export JAVA_HOME="/Users/davete0302/Desktop/jdk1.8.0_391.jdk/Contents/Home"
export ...
0
votes
0
answers
26
views
when i add jdk 1.8 in eclipse i this problems how to resolve this
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/ashokit/Application has been compiled by a more recent version of the Java Runtime (class file version 61.0), this ...
1
vote
1
answer
33
views
How to avoid " " (CR) in XMLSignature generated from webapp running on Tomcat 8.5 with JDK8
I'm experiencing a problem with java XMLSignature: when I try to generate the signature and then sign the XML file, an unwanted HTML-like Carriage Return (" ") is placed at then end ...
1
vote
0
answers
65
views
How does java.c determine which to call since there are three function implementations for different systems in Jdk8?
What puzzles me is how it determines which to call when entering the function JVMInit(as well as LoadJavaVM) in jdk/src/share/bin/java.c since there are three function implementations in different ...
0
votes
0
answers
34
views
Java-SOAP:java.net.ConnectException: Connection timed out: no further information
I am trying to call a Soap Webservice from my Java application as follows:
@Override
public String getLoginServiciosGeneral() throws Exception {
String idSesion = "";
try{...
0
votes
0
answers
17
views
how do I resolve pylucene installation error for java1.8 when using jcc. I am getting fata error
I am trying to install PyLucene on my colab notebook. I am using Java 1.8 for pyLucene 8.8.1 as instructed in the documentation. Here are the steps I followed while installing it followed by the error ...
1
vote
1
answer
61
views
Scala Akka Quickstart: Java Version Mismatch and Compilation Error
I am relatively new to Scala and Akka, transitioning from a Java, Spring, and REST API background. Currently, I am working through the Akka Actors Quickstart with Scala tutorial.
Upon attempting to ...
1
vote
0
answers
42
views
Reading BASE64 from HttpURLConnection's InputStream in Java 8
I am facing issues in reading a BASE64 response which has content type "Application/pdf". I have a java class as a middleware (packaged as jar) between IBM BAW and REST Api. Java class ...
0
votes
0
answers
29
views
How to fix duplicate key error java 8 @ManyToMany relationship
I have a ManyToMany relationship in java 8, that consists of array of id's on each side, user and track system. I have a linking table in the database that has a pkey on each column userId, ...
0
votes
0
answers
23
views
ERROR util.ResourceLeakDetector: LEAK: ByteBuf.release() Connection.getTable().put(List)
I am trying to do a lot of PUTs in Hbase, however, after some time of operation, a memory leak occurs due to the following error:
ERROR util.ResourceLeakDetector: LEAK: ByteBuf.release() was not ...
-1
votes
0
answers
32
views
JAVA 8 Parallel Streams - Compare 2 Lists and get a different list [duplicate]
I am looking for a better solution/suggestion which is high in performance.
I have the below use case
Compare 2 lists. List A and List B. Both lists contain List of Car objects. I have to check if ...
0
votes
0
answers
18
views
Spring Boot Parallel Processing of files from drop zones locations using multi threading executor services
I have to change the code to implement parallel processing implementation to scan the below drop zone locations once at a time by implementing multithread processing
Dropzones:SDS-NonK,SDS-K,Eco-Docs,...
-1
votes
1
answer
89
views
Summarizing daily sales of products in Java7 / Java 8
I have list of products. I want to sum all the data with the same id
public class Product {
private int id;
private String name;
private double price;
private int quantity;
.....
}
I ...
0
votes
2
answers
73
views
Java stream an array list and compare with previous record
I have a simple RecordA class that holds an id and an int value. Multiple "sorted" RecordA elements are stored in a list.
I want to traverse the list and compare the current with the ...
-1
votes
1
answer
88
views
Java Comparison issue - Comparison method violates its general contract [duplicate]
I am trying to do a sorting of some number. I am getting a "java.lang.IllegalArgumentException: Comparison method violates its general contract!" Exception when I execute the following code.
...
-1
votes
0
answers
36
views
Composite item reader in spring batch
I'm new to spring batch, I have a requirement like i have 2 different database/servers and i to query from this 2 databases from different tables for this i need to create a simple composite item ...
0
votes
0
answers
21
views
tomcat8 slow and inaccessible after windows server upgrade from 2012 to 2016
We have two apps environnements (dev and qualification) running under windows server 2012
every environnement have two servers with multiples tomcat 8 instances , and all the stuff is load balanced ...
0
votes
0
answers
10
views
java.lang.ClassNotFoundException: org.mentawai.core.Controller, I'm not able to make a standard mentawai connection
I'm just trying to connect to test the CRUD functionalities, but the error persists and I can't think of a way to fix it, I'm using Java 8 and Mentawai 2.5.6, it's an application with Hibernate too, ...
-1
votes
0
answers
63
views
Is there a way to edit XSLFSlideShow footer text using ApachePOI
Is there a way to edit .pptx XMLSlideShow document footer programmatically using Apache POI?
Also I have multiple XSLFPictureShape in slides to which I need to assign different images using Apache POI,...
1
vote
0
answers
12
views
Why does rate of memory allocation in an application change depending on network settings when using VisualVM to monitor the JVM heap size?
Environment: I was using VisualVM IntelliJ plugin to investigate a memory leak in a standard OpenJDK Java 8 service I have running locally, and I believe I solved the application bug.
Problem: However,...
0
votes
0
answers
35
views
java spring mvc project does not start after dependency updates
I'm trying to use Java Time classes (like Instant, DateTime...) in a Java 8 project with Spring MVC (and Maven)
With these dependencies
<!-- Spring -->
<spring-framework.version>4....
3
votes
1
answer
92
views
How to concat two Strings by each character by using java8 stream API? [duplicate]
I need help on solving this problem,I have two Strings
String s1 = "Mohan";
String s2 = "1234567";
I need output as
"M1o2h3a4n567"
like s1 first character then s2 first ...
0
votes
0
answers
19
views
Validation @QueryParam variable before conversion into boolean type
I would like to to validate @QueryParams parameter in method before it would parse to Boolean type (in case when value is not true/false it should throw an error instead of parse to false).
Something ...
0
votes
1
answer
26
views
Compiling Jose4j .93 with JDK 8. I am getting errors when compling .93 Jose4j. Anyone knows how to fix this JDK 17 works
Unable to compile Jose4j .93 with JDK 8
I tried compiling Jose4j .93. version with JDK 8
It works with JDK 17.
My requirement is to compile and run it on JDK 8.
Are there are guidelines to compile ...
0
votes
2
answers
33
views
I need to sort a map which have around 100 key value pairs as "H":"Hector", "A":"Alpha" and so on, I need to sort first 10 in a specific order
Map<String, String> records = new HashMap<>();
HOSTING.put("H", "Hector");
HOSTING.put("B", "Bravo");
HOSTING.put("W&...
0
votes
0
answers
10
views
Assert on Flux List which changes list contents while iterating
I am having a flux created from list of object type. While iterating on List I am calling 2 methods updateCashCT and updatePaymentDocument for which item of list which updates the list items. Since I ...
0
votes
1
answer
62
views
Migrate Jersey webservices to Java 17 java.lang.NoClassDefFoundError: Could not initialize class org.glassfish.jersey.internal.inject.Providers
I'm currently in the process of upgrading my Maven-based Java project from JDK 8 to JDK 17. During this transition, I've encountered a specific error message that's impeding my progress.
Currently i'm ...
3
votes
1
answer
76
views
Java nested stream find any value
is there a better approach to get any value from a nested stream?
String a = obj.getCustomer().getDetails().stream()
.findAny()
.map(CustomerDetail::getContact)
.flatMap(o -> o....
0
votes
0
answers
18
views
Upgrading geocoder-java for Java 8 and Adding Geocoder API Key Support
I'm currently using the com.google.code.geocoder-java:geocoder-java:0.15 library in my Java project to retrieve latitude and longitude for a given location using a client ID and client key. However, I ...
0
votes
2
answers
69
views
Filter list of custom object by specific object field
I have an object Batch (String id, Instant date, Long version)
I have a list of Batch and I want to filter to keep one batch for each id where version is the highest i.e:
batch1 = Batch(1, date, 5)
...
0
votes
1
answer
78
views
Java8 ServiceLoader : Unable to load
In my Java8 Spring boot application that has a dependency on groovy-json library version 3.0.19 to execute groovy scripts, it fails with below exception when my application war file is deployed in ...
0
votes
3
answers
94
views
Reduce if-else statements with Java8 Streams while filtering multiple conditions
I got a review comment from my peers that i need to reduce the use of multiple If-else blocks in my code and instead use imperative programming techniques to achieve the same functionality
Background
...
0
votes
1
answer
83
views
How do I install Java in an ec2 instance?
java -version
sudo yum install java-1.8.0-openjdk
I am using this command but I get the error
Last metadata expiration check: 0:52:13 ago on Fri Nov 3 16:57:25 2023.
No match for argument: java-1.8....
0
votes
2
answers
41
views
How to build a HashMap<String, Set<String>> using java8 collectors
I am trying to learn java8 and specifically collectors for building collections. I have a pre-java8 way for building a particular HashMap<String, Set> . It is the following:
HashMap<String, ...
0
votes
0
answers
36
views
Apache Spark 3.4.1 version with hudi 0.11.0 version slowness
I am using spark , hudi and hadoop & java8 , AWS S3 in my project.
In my spark jobs , I was using spark 2.4.5 version, hadoop 2.9.1 version with apache-hudi-0.8.0 version and wrote data on S3 ...
-2
votes
1
answer
52
views
I want to convert arraylist of custom java object to hashmap by keeping key-value pair of arraylist same in the map [closed]
This is my list I am fetching from db (It can be updated in db in future by addition of more variables :
response
{
"nameField1" : "nameLabel1",
"numberField2"...
0
votes
0
answers
55
views
How can I use a very large classpath JVM argument?
I have a Java application which is being started from a C# utility. The C# program uses the Process.Start function with the following command to launch the app:
cmd /C <java-path> -cp <...
0
votes
1
answer
13
views
Jenkins doesn't catch timezone of my base OS
I've been struggling with one issue that Jenkins doesn't want to see the default host timezone. Does anybody know why it happens? I setup correct date and time on my server based on Debian 12. After ...
0
votes
0
answers
53
views
Copying an XSLFTableRow to XSLFTable using Apache POI
I have successfully added/copied rows to XWPFTable using Apache POI but unable to achieve the same in XSLFTable. Following is the code for XWPFTable
public void addNewTemplateRowToTable(...
0
votes
0
answers
53
views
JBoss subsystem remoting and ejb3 error WFLYCTL0013
When I try to deploy my JBoss based Java application, my application is failing deployment due to the below errors.
My application is running on JDK8 and JBoss 7.4.13
I do have subsystem remoting and ...
-3
votes
1
answer
86
views
Optional.orElse() change the return type? [closed]
I need help on understanding the Optional.orElse() method's return type.
Please take a look at the simple method below. It is supposed to return a String. If the arg is not null, then the map ...
0
votes
0
answers
8
views
How to get the all issues/defect list of Amazo Corretto 8.382
Guys I’m working on my project and decided to upgrade the jre version to 1.8.382 do my team wants to do the Anomaly review for this.
How will I get the list of all active issues. For example in the ...
0
votes
1
answer
32
views
Java 8 - POST request with Bearer token fails with 401
Please note that I must use java 8 for this work.
Initially do a POST for authentication to the middleware Gateway and get accessToken. Using the same access token I do a POST to the service end ...