4,005
questions
1
vote
2
answers
96
views
Binding label text to an observable variable
Just for background, I used to code a bit years ago doing web design stuff, but for all intents and purposes I am just getting my feet wet with Java (like literally 3 days in), so try and take it easy ...
0
votes
0
answers
32
views
Abstract @Configuration, multiple implementations. Inject correct dependencies?
I am trying to create an abstract @Configuration of a client to reduce boilerplate. Users should only provide 2 concrete implementations of specific dependencies for this client, and the rest should ...
-2
votes
1
answer
48
views
How to select a specific bean per custom scope instance out of multiple candidates in Spring / Spring Boot?
I'm working on a multi-tenant Spring Boot web app. There is a twist: the count of tenants is low (up to 10), and tenants require to have customized business logic plugged into common API code.
Custom ...
-1
votes
0
answers
10
views
How to Import Beans from Another Subproject in a Multi-Module Spring Boot Application?
I have a multi-module Spring Boot application using Java and Gradle. The project structure is as follows:
Main Project (contains the @SpringBootApplication annotated class and a @Configuration class):
...
0
votes
1
answer
58
views
Circular references error in spring security when starting application
I am trying to learn Spring Security. I have understood a bit, but I am encountering a cycle error that I cannot seem to resolve. I will also share the code for the classes with you.
Springboot ...
0
votes
1
answer
25
views
MapStruct conditionQualifiedByName not getting applied in the Implementation class of mapper
conditionQualifiedByName is not getting applied here with mapstruct.
@Setter
public class BaseUpdateEmployeeMapper extends BaseDesktopMapper<Source, Target> {
@Named("...
1
vote
1
answer
39
views
Spring Boot @RequestScope Constructor not printing in console
I am trying to understand different Bean Scopes. When working with @RequestScope I don't see message printed to console from constructor and destroy() method in order to confirm when this Bean is ...
1
vote
1
answer
571
views
How to use a @Bean with void return type defined in a 3rd party library in SpringBoot 3.x app
My SpringBoot 3.X app is using a 3rd party library (dependency) which has a @Bean defined as follows in a @Configuration class:
@Bean
public void performUpdateForAllInstances() throws Exception {....}
...
1
vote
1
answer
48
views
Unable to load XML Configuration file into ClassPathXmlApplicationContext even it dose exist
I am attempting to create a bean in Spring application but encounterd IOException while loading XML configuration file into ClassPathXmlApplicationContext.
Test Class Code :
public class Test {
...
0
votes
0
answers
34
views
Error creating bean with name 'userController': Unsatisfied dependency expressed through field 'userService': Error creating bean [duplicate]
I keep getting this error for all the component including UserController, UserService, UserRepo, when I run the code, even the one that was provided by the tutor in github.
Error creating bean with ...
0
votes
0
answers
32
views
BeanCreationException in spring 6 and beans created without proxy
Has anyone seen this exception and may have some clue how to fix it?
When I turn on spring bean debug logging, there are thousands of logged exceptions like below:
2024-06-06T21:17:46.221Z [main] ...
0
votes
1
answer
92
views
Spring expected single matching bean but found 2
I have a Spring configuration class like this where I need to configure 2 different Queue:
@Configuration
public class DataQueue {
/**
* Queue to store the {@link SlowVars} read from the PLC
...
0
votes
1
answer
58
views
How does one get around the "first letter lowercase" limitation in the `@Qualifier` annotation in Spring?
MRE:
Controller:
@RestController
public class DITestRestController {
private Language language;
@Autowired
public DITestRestController(@Qualifier("haskell") ...
1
vote
0
answers
80
views
Resolving NoClassDefFoundError for com.sap.aii.security.lib.exception.SecurityException in SAP NetWeaver PO EJB Project Configuration along with DWP
I'm facing a NoClassDefFoundError for com.sap.aii.security.lib.exception.SecurityException in my EJB project, which is deployed on SAP NetWeaver. Here are the details:
Project Setup:
IDE: NetWeaver ...
0
votes
0
answers
40
views
Getting Bean isssue while migrating Spring boot 2.7.2 to 3.2.1
`Hi all,
I trying to migrate my project from spring 2.7.2 to spring boot 3.2.1 but getting error expected single matching bean but found 2 mock service,service and if I added @Primary on mockService ...
0
votes
1
answer
58
views
External module bean injection in quarkus
i want to inject bean from an external module(maven project) in a quarkus application but i fetched this jakarta.enterprise.inject.UnsatisfiedResolutionException:
how to get rid of this
I scan the ...
-1
votes
1
answer
45
views
How to access another field in springs @Value
like the title suggests I want to access another fields value using springs @Value annotation.
I want to do this to resolve the fields value by another fields id. Eg.: I have a field id and a field ...
-2
votes
1
answer
62
views
SpringBoot - Bean could not be found
I get this error when I run my Spring Boot application:
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2024-05-11T14:59:30....
0
votes
0
answers
10
views
I am doing a SpringMVCProject, but when I want to run it on the server, it shows that UnsatisfiedDependencyException
I think it started with "Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister."
This problem then make the eclipse can't create bean named sessionFactory. ...
0
votes
0
answers
26
views
Unsatisfied Dependency Exception: Error creating bean with name & Also getting Invalid client token
{Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'leadCreationServiceImpl' defined in file [C:\Users\AAA\IdeaProjects\lead-management-...
0
votes
0
answers
8
views
Expression Language Expansion Issue
I want JSF expression language to expand #(bean.property} before I access it in code so that I can get access to the CSS3 top and left property values in a in-line html style. Here is the JSF html ...
1
vote
1
answer
88
views
Spring Boot does not find Mapper bean
I have the next mapper:
@Mapper
@Component
public interface PriceEntityMapper {
@Mapping(source="brandId", target="brandId")
@Mapping(source="startDate", target=&...
0
votes
1
answer
29
views
I have created a bean of PasswordEncoder type but still my springboot app is showing me that i don't have any such bean
I am working on a spring boot application. where I have created a bean of type PasswordEncoder but when I run the code it shows me the following error
Description:
Parameter 1 of constructor in
com....
0
votes
1
answer
38
views
Spring JPA failing to find repository
Spring JPA application is failing to find the repository. I have tried annotating it with @repository, putting the controller, service and repository in component scan etc but I'm not having any luck. ...
0
votes
0
answers
22
views
quarkus cant find list of defined beans
I have an Interface and abstract class that implements this interface
public interface ProcessingStrategy {...}
public abstract class AbstractProcessingStrategy implements ProcessingStrategy{...}
...
0
votes
1
answer
121
views
Spring boot @ConditionalOnBean does not detect AutoConfiguration bean
I want to ensure that the MyKafkaProducer bean is only activated when KafkaAutoConfiguration is loaded, so I have created the code as follows:
@Service
@ConditionalOnBean(KafkaAutoConfiguration.class)
...
0
votes
0
answers
14
views
Parameter 0 of constructor in 'Controller' required a bean of type 'service' that could not be found. Adding annotation and componentscan doesn't work [duplicate]
It's multy-module app. user-app is working well but when I pushed my work from one-module project Interllij gave me this error. Everythink was working before I added modules.
Trying to make it working....
0
votes
0
answers
19
views
Parameter 0 of constructor in required a bean ... that could not be found
In a SpringBatch application I'm developing, I want to make my REST calls from an infra-rest module, but I'm encountering an error concerning bean recognition.
Here is the classes :
@Service
@...
0
votes
0
answers
17
views
Application context get bean in spring native image
I am creating a bean using the method :
public <T, E> MyClient<T, E> createMyClient(Class<T> AType, Class<E> BType) {
return applicationContext.getBean(MyClient.class, ...
1
vote
0
answers
67
views
<java.io.NotSerializableException: javafx.beans.property.SimpleStringProperty> how to serialize a propertyString in javafx
First I really appreciate any assitance from the community! Thanks a lot!!!!
So I am on my first semester of Javafx and I am struggling a bit with this error:
java.io.NotSerializableException: javafx....
-1
votes
1
answer
378
views
Caused by:NoUniqueBeanDefinitionException: No qualifying bean of type available: expected single matching bean but found 2
problem statement: conflict between two beans with same name
example scenario
Inteface
public interface FakeInterface{
}
implementations which will act as beans
@Slf4j
@Service
public class ...
0
votes
1
answer
41
views
BeanCreationException, How to troubleshoot?
Hello StackOverflow community,
I'm encountering an issue with a NullPointerException occurring within the ShopPromotionScheduler class in my Spring Boot application.
I'm relatively new to implementing ...
0
votes
0
answers
43
views
Dynamic bean registration Quarkus
Is there any way to initialize bean dynamically through runtime in Quarkus like it's in Spring https://www.baeldung.com/spring-5-functional-beans
@RunWith(SpringRunner.class)
@SpringBootTest(classes = ...
2
votes
0
answers
59
views
Spring BeanPostProcessor and inconsistently failing app startup
This is interesting.
I have my client's java app code dockerized. The maven build happens also through containers (a separate build.Dockerfile). If I, client, dev, whoever build the application ...
-3
votes
1
answer
58
views
Java Beans and the relation to GUIs [duplicate]
I understand that a Java Bean is a Java class that adheres to the 3 conditions:
Having a no-arg ctor
Having private fields with setters and getters
Be serializable
However, I'm having hard time to ...
0
votes
1
answer
270
views
How to solve this beans conflict?
I am trying to add Login and Registration to my API Application. But I ran into problems. Two beans conflict with each other. I put all classes which interact with these beans in the message.
2024-03-...
0
votes
2
answers
53
views
JSP and JavaBeans, why can't I use a bean method's return value?
I am learning JSP and javabeans. I have written a simple web app that calculates loan repayments. The app correctly sets the bean's fields with user input (from a form). The bean also contains a ...
1
vote
0
answers
153
views
Quarkus: is there a way to register bean without any @Produces and other annotations?
Is there a way to register bean into bean container without any annotation like @Producer, @ApplicationScoped and so on?
I know there is a way to do it in Spring, but I can't find any way how to do it ...
0
votes
1
answer
52
views
Why don't data of different clients mix with singleton beans
I am new to springboot learning, so I have one question. This question might look a bit silly, I am sorry for that before asking a question.
I read that a bean with a singleton scope is created only ...
0
votes
1
answer
41
views
Infinite loop during XML file serialization (java.beans)
In the process of serializing to XML file, I'm encountering an infinite loop issue. I'm using java.beans, and through XMLEncoder, I'm attempting to serialize three classes: Category, Contact, and ...
0
votes
0
answers
24
views
Consider defining a bean of type 'service.CloudVendorService' in your configuration error is showing
Consider defining a bean of type 'service.CloudVendorService' in your configuration.
This error is showing.
My project can be found here:
https://github.com/binit1212/rest-demo
There are several ...
-1
votes
1
answer
38
views
Spring Bean Factory
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'entityManagerFactory' defined in class path
resource
[org/springframework/boot/autoconfigure/orm/jpa/...
1
vote
0
answers
56
views
Why does method reference can be used instead of PropertyChangeListener? [duplicate]
In the following Java code, PropertyChangeListener is implemented in two ways: 1) using a class that implements PropertyChangeListener interface, and 2) using a method reference.
According to the API, ...
0
votes
0
answers
50
views
Obfuscation by Proguard of method targeted by java Property Descriptor
I am using Proguard to obfuscate my project, and I am using some property descriptor in my Java 8 project.
The problem is Java Property Descriptor uses a small constructor which assumes what will be ...
0
votes
1
answer
238
views
Camel Karavan VS Code java.lang.ClassNotFoundException from Bean
I want to use integration using Camel Karavan. The essence of integration is to receive messages from REST service and transfer them to RabbitMq. To create a connection to RabbitMq I made Bean.
Here ...
0
votes
1
answer
180
views
Error: creating bean with name 'entityManagerFactory' defined in class path resource
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/...
1
vote
0
answers
19
views
JavaEE - Strategy Pattern - Error while injecting Lambda [duplicate]
I am learning java EE by buildig a supply manager app. I'm trying to implement the strategy pattern, by having a SalesCalculatorService interface:
public interface SalesCalculatorService extends ...
0
votes
1
answer
507
views
Error: cvc-elt.1.a: Cannot find the declaration of element 'beans'
when adding this code, this error appears, I tried adding beans:beans to the tag, but then the same error appears, please help me solve this problem
<?xml version="1.0" encoding="UTF-...
0
votes
1
answer
80
views
Spring autowiring order
I am curretly doing a spring task that recuries me to create bean methods for Video and Channel objects. Each created video must have a localdate with value of one day after the previous one. ...
0
votes
0
answers
22
views
Trying to use session_scoped spring bean to persist the flow of our chatbot conversation tree. We are facing issue in resetting session scoped bean
We are build a chatbot application with a complex conversation tree where a request is built based on numerous inputs
from customer conversation and finally is send to our own captive application. ...