Category "java"

Can't refactor rename in Eclipse

If I do a refactor rename on something, it tries to do it for a moment but then just reverts it right back to what it was named before. No errors or any indica

Can I update a JSF component from a JSF backing bean method?

Is there a way to have a JSF Backing bean cause an update of a component on the page? I am not looking to use an ajax component with update attribute to update

com.mongodb.MongoTimeoutException when using MongoClient with list ServerAddress

I'm trying to deploy a replica database onto one server with different port and connect with it. Everything is ok if I just use single ServerAddress and connect

Are applets dead?

A long time ago I made an applet, when I tried to a open it few days ago in website and it says that there is a security problem and it can not open it. I Goog

Implementing search bar and getting 'java.lang.Object[] java.util.Collection.toArray()' on a null object reference error

I am new to android studio and I have been trying to implement a search bar onto my app and I've come across a building error. It install's fine but when I try

Any java async tracing framework?

I'd like to trace my async application with some key checkpoint. Is there any popular framework I can use? For example, I may choose to use vert.x or any other

MongoDb error: cannot use 'j' option when a host does not have journaling enabled

I was using mongo in dev just fine, when deploying the app into test env I got this error when objects are saved in the application cannot use 'j' option when

Bitmap image to base64 conversion

I am trying to convert a bitcode image to base64 format. I tried to code like public static String encodeToBase64(Bitmap image, Bitmap.CompressFormat compressF

Why is processing a sorted array faster than processing an unsorted array?

Here is a piece of C++ code that shows some very peculiar behavior. For some strange reason, sorting the data (before the timed region) miraculously makes the l

Dynamically creating rows in Excel sheet with Apache POI

I'm writing a program to read a large xml file and create an excel file from it. The attributes of each node will be the column headers in excel file. I created

Get cookies from selenium session

I want to get session variable and cookies after login. i have used selenium webdriver and successfully login. but how to get session and cookies after login in

Out of memory error: Java heap memory on Android Studio

How do I fix java.lang.OutOfMemoryError: Java heap space when compiling my Android project? I get this after I upgraded to version 1 of Android Studio. But, I d

Undefined steps in cucumber

After running my test, Cucumber says my step is undefined. Did I do something wrong? Feature: Then I should see Error message for "ORIGIN" zipcode with key &l

Flyway nested exception is java.lang.IllegalArgumentException: Name must not be null

I cannot deploy my Spring boot application due to this exception when I am trying to connect Flyway to Oracle db. Below are the configuration and stacktrace. Th

Scroll down method selects text in Appium

I'm using TouchAction with coordinates in Appium to scroll down the native app. Code sample: TouchAction ts = new TouchAction(driver);ts.press(207, 582).moveTo(

Why does this GridBagLayout not appear as planned?

I was trying to achieve the end result required in Setting an arbitrary width in GridBagLayout. For easy reference, here it is: This is the current result:

GLSL Shader does not compile, Java and LWJGL shader error

I've encountered this error a few times now when compiling my shaders. Here is the infoLog/Error Vertex shader failed to compile with the following errors: ERRO

Adding The Date and Time to the File name

Hello I am trying to add the date and time to a file name in JAVA. I can get the date and time printed within the file, which I also want done, but when I place

SpringBoot 2.6.3 not binding @ConfigurationProperties on List of Objects

I know this must be simple, and I've seen multiple similar questions, however my entire setup seems to be ok (as solutioned in the other posts), yet this proble

Building general trees in java (with recursion)

I have been stuck on a problem for quite a few days. My end goal is to perform preorder, inorder, and postorder traversals on a general tree. The problem I am h