Java/JSF/Tomcat/Spring - Proxy-Object has different methods than original object

Viewed 1739

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

5 Answers
Related