[Xlint:cantFindTypeAffectingJPMatch] How to manage Xlint ?
Environment: J2EE Application deployed to Websphere App Server 6.1.0.0
Development: Windows Xp
Test and Production : Websphere deployed to Aix 5.3
JVM: IBM JRE runtime for Websphere 6.1
Summary:
We may have a problem with Xlint and our pointcut definitions in some websphere environments:
From a couple of articles on the web it looks like you can control the behaviour of xlint using an xlint.properties.
1. Can I use this approach with spring.
2. If so how do I do this.
Gory Details:
We have a requirement to do some performance monitoring of various calls within the system. To achieve this I have used the Spring AOP framework. Everything works fine in my Junittest and when deployed to the test and production appservers.
However, if I deploy the application on my local Websphere installation I get an error during the spring initialisation as follows:
Initialization of bean failed; nested exception is org.aspectj.weaver.reflect.ReflectionWorld$Reflect ionWorldException: warning can't find type com.ibm.ws.sib.api.jms.JmsInternalConstants whilst determining signatures of call or execution join point for void com.ibm.ws.sib.api.jms.impl.JmsDestinationImpl.set ForwardRoutingPath(java.lang.String[]), this may cause a pointcut to fail to match at this join point
[Xlint:cantFindTypeAffectingJPMatch]
I'm removed some of the noise from the stack trace.
The underlying bean implementation that is registered within Spring has a method something like setDestinationQueue(javax.jms.Queue targetQueue). I can only assume that this method is causing an issue during the AOP pointcut parsing / init on startup. However, this method does not appear in the interface being used in the pointcut definition.
This allows me to do performance monitoring on all the methods in the interface.
This problem only occurs on the development Websphere environments. To solve this issue I have explicitly include each method in the pointcut definition and dropped the wildcard .*(..). so now we match method1(..) method2(..). This is not ideal as we will have to keep adding entries to the AOP definition if we add new methods on the interface.
From a couple of articles on the web it looks like you can control the behaviour of xlint using an xlint.properties. Can I use this approach with spring. If so how do I do this.
I have provided the full Websphere startup log with the log trace from spring and my app if required.
A final note:Its not clear why this problem only occurs with the deployment to Websphere in development. However, this is not the issue. If it can happen on the dev environment it can happen in the live and test. Hence, the reason for the redefinition of the pointcut to try and reduce the risk of any future issues. However, it would be nice to keep the wildcard pointcut definition if possible.
Caused by: Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jmsTemplate' defined in class path resource [resources/beanconfig-ct.xml]: Initialization of bean failed; nested exception is org.aspectj.weaver.reflect.ReflectionWorld$Reflect ionWorldException: warning can't determine implemented interfaces of missing type com.ibm.ws.sib.api.jms.JmsInternalConstants
[Xlint:cantFindType]
... 82 more
Caused by: org.aspectj.weaver.reflect.ReflectionWorld$Reflect ionWorldException: warning can't determine implemented interfaces of missing type com.ibm.ws.sib.api.jms.JmsInternalConstants
[Xlint:cantFindType]
at org.aspectj.weaver.reflect.ReflectionWorld$Excepti onBasedMessageHandler.handleMessage(ReflectionWorl d.java:163)
In case anyone has come across this, please let me know how I can change the Xlint properties (if at all) or any other workaround.