today I ran into this problem which really bugs me, as almost the code already worked (and stopped working even after reverting to the older version).
I’m accessing a Spring-Bean on a Facelets-Page. Spring wraps these objects in Proxies to use aspects and some other stuff.
The problem is, that I get an exception when trying to access the property of a bean. The exception is something like this:
javax.el.PropertyNotFoundException: /customers.xhtml @23,27 value="#{customerBean.customer}": Property 'customer' not found on type $Proxy88
I know for sure (!!) that the according getter/setter methods are there.
Things i tried so far:
- Deploy the application to another tomcat-installation
- Clear all tomcat-caches, the webapp-directory
- Clean the eclipse-project
- Check for the according methods using javap (and the methods/properties where there)
- Change the scope of the bean
- Change the class name of the bean
- Change the spring bean-id
- Change the serialVersionUID of the bean
Whatever I do, the class is somehow not correctly wrapped or not correctly loaded by the class-loader.
Has anybody an idea what could cause a problem like this? I don’t know what to try additionally, so any advice is greatly appreciated!
Thanks in advance!
Regards,
Robert
These errors usually occur if the load time weaving isn’t properly configured. Make sure that you do not just configure a load time weaver, but that you also load the an appropriate java agent, or that the application server does that for you.
See the spring documentation for more information on how to configure this environment, e.g. chapter 7.8.4.6 Environment-specific configuration. Although, this covers the load time waving topic for AOP, it’s the same configuration for other parts of spring that require load time weaving.