Здравствуйте!
Столкнулся с такой ошибкой:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
2012-06-28 16:21:17,447 WrapperSimpleAppMain ERROR [org.mortbay.log] Nested in org.springframework.beans.factory.BeanCreationException: Erro
r creating bean with name 'urlMapping' defined in class path resource [beans.xml]: Initialization of bean failed; nested exception is org.sp
ringframework.beans.factory.BeanCreationException: Error creating bean with name 'work-hessian' defined in class path resource [beans.xml]:
Cannot resolve reference to bean 'workImpl' while setting bean property 'service'; nested exception is org.springframework.beans.factory.Bea
nCreationException: Error creating bean with name 'workImpl' defined in class path resource [beans.xml]: Error setting property values; nest
ed exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'asteriskDBService' of bean class [ru.novotelecom.r
mo.server.hessian.WorkbenchImpl]: Bean property 'asteriskDBService' is not writable or has an invalid setter method. Does the parameter type
of the setter match the return type of the getter?:
org.springframework.beans.NotWritablePropertyException: Invalid property 'asteriskDBService' of bean class [ru.novotelecom.rmo.server.hessia
n.WorkbenchImpl]: Bean property 'asteriskDBService' is not writable or has an invalid setter method. Does the parameter type of the setter m
atch the return type of the getter?
Понять не могу в какую сторону копать. Подскажите плз.
bean.xml:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
<bean id="asteriskDBService" class="pool.AsteriskDBServiceImpl"
autowire="byType">
<property name="sessionStorage" ref="sessionStorage" />
<property name="sqlMapClient" ref="asteriskSqlMapClient" />
</bean>
<bean id="asteriskService" class="pool.AsteriskServiceImpl"
autowire="byType">
<property name="sessionStorage" ref="sessionStorage" />
<property name="asteriskDBService" ref="asteriskDBService" />
</bean>
.................
<bean id="workImpl" class="pool.WorkbenchImpl"
autowire="byType">
<property name="asteriskDBService" ref="asteriskDBService" />
</bean>
................
<bean
class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="beanNames">
<list>
<value>asteriskService</value>
<value>asteriskDBService</value>
</list>
</property>
<property name="interceptorNames">
<list>
<value>logInterceptor</value>
</list>
</property>
</bean>
Сам сеттер для БДшки
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
import java.sql.SQLException;
import pool.UserSessionStorage;
import pool.interfaces.AsteriskDBService;
import com.ibatis.sqlmap.client.SqlMapClient;
public class AsteriskDBServiceImpl implements AsteriskDBService {
private SqlMapClient sqlMapClient;
@SuppressWarnings("unused")
private UserSessionStorage sessionStorage;
public String getPhoneByExecutorName(String executorName)
throws SQLException {
return (String) sqlMapClient.queryForObject("getPhoneByExecutorName", executorName);
}
public void setSqlMapClient(SqlMapClient sqlMapClient) {
this.sqlMapClient = sqlMapClient;
}
public void setSessionStorage(UserSessionStorage sessionStorage){
this.sessionStorage = sessionStorage;
}
}
В java я новичок - только пару месяцев программирую. Если выложил не все необходимые данные, говорите что еще надо.
Можете подсказать что не так?