java.lang.NumberFormatException: null with error status 500

I faced issue with submitting data from html to servlet Can’t This is my html file <input type="radio" id="add" …

How to close com.microsoft.sqlserver.jdbc.SQLServerDataSource

I’m using sql server jdbc driver mssql-jdbc-9.2.1.jre8-sources.jar and create an object of com.microsoft.sqlserver.jdbc.SQLServerDataSource. After setting it up with host-credential-etc, opening …

How to avoid having multiple methods with different arguments for url construction

How to avoid having multiple methods with different arguments for url construction. I would like to optimize this further protected String invUrl() { return endpointUrl(“invs”, null, …

Java Generics – argument type and casting

I have a generics problem I am trying to resolve. I’m doing some manual casting and it feels like I’m doing something wrong. I’m a bit new to using generics, so it’s very much possible I am misusing …

It’s possible to use JsonIgnore when my lazily initialize is failed?

I search one way to use JsonIgnore (or just return an empty array) when my assotiation variable with fetch = FetchType.LAZY isn’t initialize and use my own serializer when it is. I tryed to do test in …

Flink ElasticsearchSinkFunction not serializable in non-static method, but serializable in static method

I have a piece of code that only works inside static methods. If I put the code in a static method, then call it from a non-static method, it works. Never heard of anything like this and couldn’t find …

How would I get multiple results from a MySQL table? [closed]

Say I have 2 columns, the first one is ID and the second one is colour. How would I search for a specific colour and get all of the id’s that are in the same row as the colour? How would I turn the …

No such directory: C:/Users/Admin/IdeaProjects/untitled/src/com/company/Main.java [closed]

I’m trying to write my first Java program, but I’m getting this error trying to open the main.java terminal: Cannot open Local Terminal No such directory: C:/Users/Admin/IdeaProjects/untitled/src/com/…

How to use environment variables in CMD using Java?

I am new to using the ProcessBuilder object to run commands inside of Java. My issue is that when I put my environment variables into the builder.command(…) method, it doesn’t work. However, when I …

How to reduce a limited stream (e.g. an ArrayList) from right in Java?

I would like to convert a list to a self-implemented linked list using reduce. I managed to do that in a reverse order: import java.util.Arrays; import java.util.List; public class Reverse { …