Paul Herrerias

Greenhorn
+ Follow
since Aug 05, 2018
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Paul Herrerias

Tim Nachreiner wrote:Paul,

Here is a series of steps that will fix your problem:

1. Use a better naming convention; ie, stick to camel-case.  Rename your interfaces to: UserDao, UserService.
2. Even though you are autowiring UserDao twice, you still use the singleton instance created by the Spring container.
3. Remove @Qualifier annotation; it is not needed.
4. Remove line 41 from db-config.xml, since Component scanning will create this bean anyway.
5. In Web.xml remove lines 38-41.  You've already created a ContextLoaderListener in lines 20-23



This worked but now I am getting a whole different error, if this can be replied here please, help me if not, I will create a new topic, I must say this is the first time I am working with Hibernate therefore there are some concepts I miss:


5 years ago

Al Hobbs wrote:You don't need to even use qualifier unless you have more than one bean of the same type.



I know, and I autowire 2 beans of the same type UserDAOIface that's why I am using Qualifier besides I already tried to remove them and I showed what I get.
5 years ago
I use the Qualifier name because I autowire UserDAOIface twice and therefore I get this:



And I do not know how to specify the name in the @Repository annotation.
5 years ago
This is the code:



And why would the qualifier names be the issue?
5 years ago
web.xml

   

The exception I get:

     
5 years ago
I am having an issue when publishing my project to my server, I have tried several solutions and I couldn't make it work, I have all annotations in place and the XML configuration done correctly as well.

UserController.java

   

UserServiceImpl.java

 

UserDAOImpl.java

   

UserDetailsServiceImpl.java

   

db-config.xml

   

dispatcher-servlet.xml

   
 
5 years ago