Category "java"

Generating Unique identifier using two strings

I would like to get an idea on how can we generate an unique identifier using two Strings. My requirement here is to generate an unique identifier for a particu

How make cxf-codegen-plugin generate Webservices from jakarta.xml.ws?

Migrating from Java 8 to Java 11. Updated cxf-codegen-plugin from version 3.2.0 to 3.3.6. Plugin still generates Java stubs from wsdl files using packages from

Is it possible to add partitions to an existing topic in Kafka 0.8.2

I have a Kafka cluster running with 2 partitions. I was looking for a way to increase the partition count to 3. However, I don't want to lose existing messages

Hibernate Mapping Error: MappingException: An AnnotationConfiguration instance

I have a project with Hibernate.I tried to read the configuration file hibernate.cfg and got this error: Error creando una factoria de session.org.hibernate.M

"Cannot find symbol" error when creating an instance of an object

I'm new to using maven and have a Project where I'm trying to create an instance of an object but keep getting the error: error: cannot find symbol Comm

Is there any an issue with the file name openjdk-8-jdk-headless?

I am trying to install Spark which requires Java with using !apt-get install openjdk-8-jdk-headless -qq > /dev/null And I get an error after it. E: Failed

Java coding style to be more concise

How can I compact these code in Java without creating other objects? myObjectNumberOne.setTitle("title"); myObjectNumberOne.setBody("body"); myObjectNumberOne.s

Array Problems java.lang.ArrayIndexOutOfBoundsException: 9

I am trying to write a class that takes a phone number that the user inputs as a string, then stores each digit in an array. I converted the string to a long us

french accents giving "<?>" in http responses with correct charset (Java)

Calling an API that returns french sentences, all the accented characters are displayed like <?> in my java code, even if the charset is well defined (app

Swing Timer stopwatch in Java

Can someone provide me an example of a Swing Timer stopwatch GUI in Java using a constantly-updating JLabel? I am not familiar with using @Override, so please

get a date using a JDateChooser and save it into mysql database

I need to read a date from a JDateChooser and save it into a MYSQL database table using the ActionPerformed method of a JButton. There are three JDateChooser

JVM MaxHeapSize := 0 - what does this mean?

I have seen other questions on here like: How is the default max Java heap size determined? and Understanding java heap I run the command to see my heap size ja

How to generate java client code for swagger REST API documentation

My scenario is the following. I have a swagger .json eg.: http://petstore.swagger.io/v2/swagger.json I want to use a generated java client for the REST API abo

What XPath to select only non-taged text inside div. Selenium. Java

I want to select only the text "only this text" from the snipet below using XPath (in Java) but that text is random and I don't know what is written there. &l

Exception class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader

I don't understand how to fix it, first time i see mistake like this. i downland this from github https://github.com/nikishubin/Notebook but its does not work O

HTTP status 404 - Not Found while creating springBoot Application

This a springboot Application. It run perfectly but did not get output (it shows me HTTP Status 404 error in browser) pom.xml <project xmlns="http://maven.

Maven is not using Java 11 - Fatal error compiling: invalid target release: 11

I am trying to compile my project with Java 11. When I try to run the application with Java 8 as the Java version in pom.xml, it works fine. But when I try to r

Why Getting NoClassDefFound error for JedisConnection when using Spring Redis

Hello when trying to use spring-redis i am getting java.lang.NoClassDefFoundError: Could not initialize class org.springframework.data.redis.connection.jedis.

how to read json response in jsp

My client side program is like this: DefaultHttpClient httpClient = new DefaultHttpClient(); HttpResponse res = httpClient.execute(req); Server side, I have

Check whether the document exists using Mongodb and Java?

I have created a simple java application as my college mini project in which one of the module I'm allowing users to perform operations like insert, delete, upd