PDA

View Full Version : OS issue??!!!or what?


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

davison
Aug 18th, 2004, 04:52 AM
are you doing a clean build before running on the Linux machine? No possibility that an old class file or jar of your application code is hanging around, or that you're working on the wrong CVS branch/version? What happens if you build on the Windows machine and deploy the WAR file to the Linux box?

It's certainly not an error specific to the OS - looks much more likely to be a versioning issue of some description.

catalin
Aug 18th, 2004, 06:16 AM
I deployed the war file from Windows to Linux JBoss and I had the same problem. And we have the same version from CVS. btw we had a clean build too :D

Colin Sampaleanu
Aug 18th, 2004, 03:04 PM
Try killing your temp directory and work directory under JBoss, and look for other places (such as app server lib dir or wherever) that an older version of the code in question could be. This really seems to have no relationship to a platform issue, but rather some sort of versioning issue where the copy of the class in question that is being found simply doesn't have that property.

Regards,

catalin
Aug 18th, 2004, 03:53 PM
btw Mrs Colin, r u planing to come in Romania? :D

All well

Colin Sampaleanu
Aug 18th, 2004, 03:59 PM
Very off-topic, :-), but I'll actually be in Romania for a wedding in Sept. I would probably try to speak at a user's group meeting (or something of that nature) in Bucharest some time during that visit, but my Romanian is not quite up to that level unfortunately...

Regards,