catalin
Aug 18th, 2004, 04:40 AM
Hi,
We devolp an application in Spring and Hibernate, using Eclipse M8 and JBoss 3.2.5 tools under 2 OS( Linux and Windows), the project is under CVS and all is fine until the parsing of applicationContext.
With the folowing beans :
- in x-servlet.xml
<bean id="userController" class="org.web.UserController">
<property name="userManager"><ref bean="userManager"/></property>
</bean>
- in applicationContext.xml
<bean id="userManager" class="org.springframework.transaction.interceptor.Transa ctionProxyFactoryBean">
<property name="transactionManager"><ref local="transactionManager"/>
</property>
<property name="target"><ref local="userManagerTarget"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="save*">PROPAGATION_REQUIRED</prop>
<prop key="remove*">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
</bean>
Under Windows is working smoothly, under Linux we receive the error
Context initialization failed
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'userController' defined in resource [/WEB-INF/x-servlet.xml] of ServletContext: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyExcep tion: Invalid property 'userManager' of bean class [org.web.UserController]: Property 'userManager' is not writable
org.springframework.beans.NotWritablePropertyExcep tion: Invalid property 'userManager' of bean class [org.web.UserController]: Property 'userManager' is not writable
- in UserController
public class UserController implements Controller {
private final Log logger = LogFactory.getLog( getClass() );
private UserManager userManager;
/**
* @param userManager The userManager to set.
*/
public void setUserManager(UserManager userManager) {
this.userManager = userManager;
}
....
Any ideas?
thanks cata
We devolp an application in Spring and Hibernate, using Eclipse M8 and JBoss 3.2.5 tools under 2 OS( Linux and Windows), the project is under CVS and all is fine until the parsing of applicationContext.
With the folowing beans :
- in x-servlet.xml
<bean id="userController" class="org.web.UserController">
<property name="userManager"><ref bean="userManager"/></property>
</bean>
- in applicationContext.xml
<bean id="userManager" class="org.springframework.transaction.interceptor.Transa ctionProxyFactoryBean">
<property name="transactionManager"><ref local="transactionManager"/>
</property>
<property name="target"><ref local="userManagerTarget"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="save*">PROPAGATION_REQUIRED</prop>
<prop key="remove*">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
</bean>
Under Windows is working smoothly, under Linux we receive the error
Context initialization failed
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'userController' defined in resource [/WEB-INF/x-servlet.xml] of ServletContext: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyExcep tion: Invalid property 'userManager' of bean class [org.web.UserController]: Property 'userManager' is not writable
org.springframework.beans.NotWritablePropertyExcep tion: Invalid property 'userManager' of bean class [org.web.UserController]: Property 'userManager' is not writable
- in UserController
public class UserController implements Controller {
private final Log logger = LogFactory.getLog( getClass() );
private UserManager userManager;
/**
* @param userManager The userManager to set.
*/
public void setUserManager(UserManager userManager) {
this.userManager = userManager;
}
....
Any ideas?
thanks cata