Hello,
I have been created a project and it works fine with MySQL. I need to use SQL Server instead of MySQL, the exception bellow is displayed:
com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection on managed bean ManageUserBean
Knowing that I made some changes on the file spring.xml like the following, could you please tell me what's missing ?.
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="employeeDAO" class="com.journaldev.spring.jdbc.dao.EmployeeDAOImpl"> <property name="dataSource" ref="dataSource" /> </bean> <bean id="employeeDAOJDBCTemplate" class="com.journaldev.spring.jdbc.dao.EmployeeDAOJDBCTemplateImpl"> <property name="dataSource" ref="dataSource" /> </bean> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" /> <property name="url" value="jdbc:sqlserver://localhost:1433;database=springDBA"/> <property name="username" value="lm" /> <property name="password" value="pp" /> </bean> </beans>
Any Reply is appreciated.Thanks in advance.
the solution is that I made "User" as a table name; this name is considered like a reserved keyword in SQL. I changed the name from "User" to "Employee" and thus this was fixed.