Initialisation de Bean : notWritablePropertyException
Bonjour :)
Je début avec l'utilisation de Spring et j'ai un petit problème à l'initialisation d'une bean (du moins je pense).
Au démarrage de Tomcat, j'ai l'erreur suivante :
Code:
1 2
| 15:44:36,578 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'download-file' defined in file [C:\alfresco-env\alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\extension\download-file-action-context.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'exchangeServerIP' of bean class [org.alfresco.customUI.actions.DownloadActionExecuter]: Bean property 'exchangeServerIP' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? |
J'ai lu la FAQ Spring et notamment l'exemple "Comment injecter des propriétés de type simple ?" mais j'ai cette erreur et je ne trouve pas son origine :/
Je vous joins le contenu de mon fichier de context:
Code:
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
| <beans>
<!-- Download Action Bean -->
<bean id="download-file" class="org.alfresco.customUI.actions.DownloadActionExecuter" parent="action-executer">
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="exchangeServerIP" value="192.168.20.241" />
<property name="fileServerIP" value="192.168.20.221" />
<property name="filesRootFolderPath" value="/company/shared/" />
<property name="publicAction">
<value>false</value>
</property>
</bean>
<!-- Action properties -->
<bean id="extension.actionResourceBundles" parent="actionResourceBundles">
<property name="resourceBundles">
<list>
<value>alfresco.extension.download-file-action-messages</value>
</list>
</property>
</bean>
</beans> |
Ainsi que le début de la classe DownloadActionExecuter :
Code:
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
| public class DownloadActionExecuter extends ActionExecuterAbstractBase {
public final static String NAME = "download-file";
public static final String PARAM_FILES_ROOT = "filesRootFolderPath";
public static final String PARAM_EXCHANGESERV_IP = "exchangeServerIP";
public static final String PARAM_FILESERV_IP = "fileServerIP";
protected NodeService nodeService;
public void setNodeService(NodeService nodeService) { this.nodeService = nodeService; }
private String exchangeServerIP;
public void SetExchangeServer(String exchangeServerIP){ this.exchangeServerIP = exchangeServerIP; }
public String getExchangeServer(){ return this.exchangeServerIP; }
private String fileServerIP;
public void setFileServer(String filerServerIP){ this.fileServerIP = filerServerIP; }
public String getFileServer(){ return this.fileServerIP; }
private String filesRootFolderPath;
public void setFilesRootFolder(String filesRootFolderPath){ this.filesRootFolderPath = filesRootFolderPath; }
public String getFilesRootFolder(){ return this.filesRootFolderPath; } |
Merci pour l'aide que vous pourrez m'apporter :)