Announcement Announcement Module
Collapse
No announcement yet.
Custom annotations not found on Proxy Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom annotations not found on Proxy

    Hello,

    I use

    Code:
    <aop:aspectj-autoproxy proxy-target-class="true"/>
    in my spring app. Now I have written a BeanPostProcessor which validates some custom annotations on the methods. Unfortunately I am unable to find some. I try to find the annotations with reflection. The target obejct seems to be proxied with cglib, because the class dont have any interfaces, and the method list, which I have got by reflection, shows this:

    Code:
    17:32:48,076 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Start to call methods with config annotation on bean: icdValidationService
    17:32:48,076 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: hashCode
    17:32:48,076 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: clone
    17:32:48,076 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: equals
    17:32:48,076 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: indexOf
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: indexOf
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: toString
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: newInstance
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: newInstance
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: newInstance
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: validate
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: isFrozen
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: getTargetSource
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: addAdvisor
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: addAdvisor
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: setTargetSource
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: setPreFiltered
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: isProxyTargetClass
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: setExposeProxy
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: isExposeProxy
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: getTargetClass
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: createErrorResponse
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: setDisableRemoteValidation
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: setXmlCreatorService
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: setXmlMapperService
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: getRequestType
    17:32:48,077 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: getRelevantResponse
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: getRelevantResponse
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: createServiceResult
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: parseResponse
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: parseResponse
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: saveResponse
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: saveResponse
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: setValidExpiryTimeInDays
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: setInvalidExpiryTimeInDays
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: bla
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: setHttpCommunicationService
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: setCreditValidationDao
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: getValidExpiryTimeInDays
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: getInvalidExpiryTimeInDays
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: isRemoteValidationDisabled
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: addAdvice
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: addAdvice
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: getAdvisors
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$SET_THREAD_CALLBACKS
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$SET_STATIC_CALLBACKS
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: setCallback
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: setCallbacks
    17:32:48,078 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: getCallback
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: getCallbacks
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$findMethodProxy
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$BIND_CALLBACKS
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: isPreFiltered
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: getProxiedInterfaces
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: isInterfaceProxied
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: removeAdvisor
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: removeAdvisor
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: replaceAdvisor
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: removeAdvice
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: toProxyConfigString
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$createErrorResponse$0
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$setDisableRemoteValidation$1
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$getRequestType$2
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$getRelevantResponse$3
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$getRelevantResponse$4
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$createServiceResult$5
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$parseResponse$6
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$parseResponse$7
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$saveResponse$8
    17:32:48,079 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$saveResponse$9
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$setValidExpiryTimeInDays$10
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$setInvalidExpiryTimeInDays$11
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$STATICHOOK24
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$bla$12
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$validate$13
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$setXmlCreatorService$14
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$setXmlMapperService$15
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$setHttpCommunicationService$16
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$setCreditValidationDao$17
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$getValidExpiryTimeInDays$18
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$getInvalidExpiryTimeInDays$19
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$isRemoteValidationDisabled$20
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$hashCode$22
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$clone$23
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$equals$24
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$toString$25
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Method: CGLIB$STATICHOOK25
    17:32:48,080 DEBUG [de.bla.configomator.ConfigomatorPostProcessorBean] () Found methods: []
    Should I find the annotations on the proxy as well?

    thx for help,

    Thilko
    Last edited by blackhacker; Sep 29th, 2009, 10:49 AM.
Working...
X