Java Community | Help. Code. Learn.

JCH

Java Community | Help. Code. Learn.

With more than 20,000 members, join one of the biggest and most active Java Communities on Discord! ☕

Join

java-help

❓︱qotw-answers

Publishing to Maven Central Repository

Anybody here already released an open source project in Maven Central repository? I've trying to release my open source project (https://github.com/psycotrompus/sql-stringbuilder-dsl) to help generate SQL statements using a custom DSL. I think I've already configured the project's pom.xml file according to their recommendations, but I'm still getting 401 response when uploading the artifacts....

Repositioning objects to stay in the same position relative to each other when rotated.

I have a grid of cubes, and currently when the rotation of a cube is requested it adds it with the rotation of it's grid. While this does keep the rotation of all objects in the grid synced, it does not reposition them to upkeep the illusion of them being one solid object. I'd imagine the solution would be as simple as also modifying the position of each cube based on the grid rotation, but I need some help figuring out what mathematical calculation would be needed....
No description

how do I read source code, and is it possible to learn java from reading source code?

I have some ideas for porting mods, and I don't exactly have a firm grasp on java (yet) and wanted to ask for some basic guidelines on how to read source code

how to create SOAP webservice?

hey guys. i need to code soap webservice. i was wondering if you could help me out with a couple of questions? 1. i have these dependencies in my gradle file. do ineed smth more? ``` dependencies { xsd2java "com.sun.xml.bind:jaxb-xjc:2.2.6"...

java 17 obfuscator

please advise java 17 obfuscator

how to call my application that is running on a server?

hey guys. i have a server dev.burokelis.lt, and i have java spring app deployed on it. its running fine, but i dont understand how to call its endpoints. when i was developing on my computer, in postman i used localhost:8080/createPaymentInformation, now whem im trying to call my app thats on a server, i do dev.burokelis.lt:22/createPaymentInformation, but nothing happens in postman. can smb help me out?

chrome driver

im trying to set up a chrome driver all i have to do is put ( chrome-headless-shell-win64 ) into my systems path which i did but when i checked in my cmd prompt to see if it works this came up ( chrome-headless-shell' is not recognized as an internal or external command, operable program or batch file. )

How to make spring boot @Value fields inject the values from properties?

```java @ExtendWith(MockitoExtension.class) @TestPropertySource("classpath:application-test.properties") class AuthServiceTests { ...
No description

Drawing SVG paths in javafx css

any idea why is it still filled? it shouldnt be according to the rendered svg
No description

Exception Handling in Spring

Hey i am getting 500 response code instead of 404 even after handling the exception ```package com.ShelfSpace.ShelfSpace.exception; public class ResourceNotFoundException extends RuntimeException {...

RequestParam / User Not Found

Hello again guys, I'd like to render my data user on a template with the GET method. I made sure my page was created and my datas are persisted in my db. I tried to render my data through the email user as it's shown below and I want my URL to be like this : http://localhost:8080/[email protected] ( which works perfectly if I write this in my browser bar ) but when I want to access to my profile it return me a USer nto found, because Spring boot sees it as null...

Suggest kotlin/java backend framework

I tried ktor, but its documentation is... too difficult I didnt found how to set up cookies, auto documentation and stuff Or im just too dumb for it 😦...

Why/how is displayMap null

I have a class here and it seems like nothing in the constructor is running except the super() call. None of the prints run and when repaint is called it throws an error for displayMap being null. What is wrong?

Issue with multimodule project

I'm trying to publish my project to maven central, but I get this error. ``` Execution failed for task ':api:publishMavenPublicationToMavenCentralRepository'.
Failed to publish publication 'maven' to repository 'mavenCentral' Invalid publication 'maven': multiple artifacts with the identical extension and classifier ('jar', 'javadoc')....

Render dynamic dayas / Status 400

Hello guys, I'm trying to render dynamically my datas from my entity ( the datas are well persisted, there's no problem in the database side ) with thymeleaf an user page once he's authenticated but I have the famous
Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.
Wed Jul 24 16:43:43 CEST 2024
There was an unexpected error (type=Bad Request, status=400).
Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.
Wed Jul 24 16:43:43 CEST 2024
There was an unexpected error (type=Bad Request, status=400).
...

best way to insert JSON object into DB table?

hey guys. i want to construct a json in my java code and insert it into a DB table. can i just use json in a string and replace needed values?

how to check if record exists in DB table?

hey guys. can smb help me out? in my repo class i have this:
@Query(value = "select count(1) from my_tablewhere transaction_id= :transactionId",nativeQuery = true)
boolean existsByTransactionId(@Param("transactionId") String transactionId);
@Query(value = "select count(1) from my_tablewhere transaction_id= :transactionId",nativeQuery = true)
boolean existsByTransactionId(@Param("transactionId") String transactionId);
...

service deletes DB records, but i still get `No results were returned by the query`

hey guys. can smb help me out? i have this service: ```java public void createPaymentpaymentReversal(PaymentDTO paymentReversalRequest) throws NoEarlierPaymentException { Optional<Payment> earlierPayment=paymentRepository.findByTransactionId(paymentReversalRequest.getTransactionId()); ...

apache Mina sshd

If anyone had expierence with Apache Mina and setting up a ssh server please tell me. I got an issue where my client session are mixxed up if there’s more than 1 of them… (the 2nd user becomes the first) Tell me guys I am tired of posting the code...