powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Java [игнор отключен] [закрыт для гостей] / Invalid property of bean class
3 сообщений из 3, страница 1 из 1
Invalid property of bean class
    #37858782
compasses
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Здравствуйте!
Столкнулся с такой ошибкой:
Код: plaintext
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:
Код: plaintext
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> 


Сам сеттер для БДшки
Код: plaintext
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 я новичок - только пару месяцев программирую. Если выложил не все необходимые данные, говорите что еще надо.
Можете подсказать что не так?
...
Рейтинг: 0 / 0
Invalid property of bean class
    #37858804
Фотография Blazkowicz
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
В AsteriskServiceImpl нет свойства asteriskDBService. А вы зачем то показываете AsteriskDBServiceImpl
...
Рейтинг: 0 / 0
Invalid property of bean class
    #37858878
compasses
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Да. Понял свою ошику. Разобрался. Не актуально. Пасибо)
...
Рейтинг: 0 / 0
3 сообщений из 3, страница 1 из 1
Форумы / Java [игнор отключен] [закрыт для гостей] / Invalid property of bean class
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]