Category "java"

Parentheses around data type?

I am a beginning programmer and came across this in my textbook: public boolean equals(DataElement otherElement) { IntElement temp = (IntElement) otherElem

Searching data in the JTable using

I have a table that I post with a database connection. I am searching the table, but after searching, selecting the row and bringing the result to the textbox r

Binary tree not clearing with each loop iteration

I am using a binary tree to convert prefix expression into infix, and then solving them. That part works fully. My issue is the input loop I set up is adding on

How to fix 'java.lang.NoClassDefFoundError: org/springframework/validation/annotation/ValidationAnnotationUtils' In Spring MVC

I have Spring MVC application with JSP and the server is Tomcat. when I run this web application. Tomcat log as follows. 24-Feb-2022 16:13:16.054 SEVERE [http-n

Firebase functions deploy errors

I've deployed firebase deploy in cmd console. but error has occured several times. I already tried these things: Changing %RESOURCE_DIR% in firebase.json file T

Wildfly 26 elytron security domain config is not working

I am trying to migrate an application to wildfly 26, and i am trying to use elytron to secure the application. I successfully run this commands using the jboss

Can a custom serializer/deserializer be a Spring bean?

I have a field in a POJO which needs to be encrypted before being serialized and, similarly, decrypted upon deserialization. The issue is that a cryptor is a Sp

What is the meaning of the construction in array initialization?

I was solving tasks and saw a construction like that: String t[] = new String[n], e; Can you help me, what does ", e" mean? Wasn't able to find something about

How can I create a truststore from a base64 encoded String?

I have a String that is encoded in base64, I need to take this string, decode it and create a truststore file, but when I do that, the final file is not valid.

How to wait until file is downloaded and also wait until the file is deleted from folder in Selenium Java

Have to download a file in multiple formats xls, pdf, rtf, csv, txt. But I have to check all these file formats are downloaded one after another So I have writt

The method setColor(Color) is undefined for the type JFrame

Error code shown below : The method setColor(Color) is undefined for the type JFrame package task3; class Execute { public static void main(String[] a

Is there an alternative to the builder pattern that is preferred in C++?

I'm coming from Java where the builder pattern is used heavily, e.g. Foo foo = new FooBuilder() .setBar(43) .setBaz("hello, world!") .enableCache(tr

How do I access index from filter in java?

I'm planning to convert the following without a for loop and using functional programming: int count = 0; for (int i = 0; i < 5; i++) { //Feedback: avoid for

Why Unicode u+202e and u+202c cause output text to have a different result

In Java: If I print "123\u202e987\u202c456abc" then the result is 123‮987‬456abc If I print "123\u202e987\u202cxyzabc" then the result is 123‮

B2c accelerator hybris 1905 : install.bat -r b2c_acc_plus not working

I have an exception when I try to run install.bat -r b2c_acc_plus , can you help me to resolve it ? java.lang.NoClassDefFoundError: Could not initialize class o

Add delay in consuming messages in rabbitmq stream

i'm using rabbitmq stream and i need to add a delay between messages because the stream handles messages very fast. how can I do that?

DB default column value null while saving with Spring Data JPA

I have a JPA entity with the following fields: @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "modified_by_user_id") private User modifiedByUser; @Conve

Logback log to different files from the same package

I want to log into two different files, historic.log and applicative.log, from the same package that is com.authenticationservice.user.UserRequest. In the histo

JLabel not displaying image after choosing from jFileChooser in java netbeans IDE 8.02

I am using NetBeans IDE 8.0.2 to create my project application. I have created my application's signup page using multiple panels in CardLayout. For users to up

Spring: @RequestScope - annotated method does not get called

In the application I would like to create a request-scoped bean (annotated with @RequestScope) that would represent a user of the application (for authenticatio