Oct 31st, 2006, 04:07 AM
[Xlint:cantFindTypeAffectingJPMatch] How to manage Xlint ?
Environment: J2EE Application deployed to Websphere App Server 126.96.36.199
Development: Windows Xp
Test and Production : Websphere deployed to Aix 5.3
JVM: IBM JRE runtime for Websphere 6.1
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.
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
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.
The pointcut definition would be something like:
<aopointcut id="soiadaptercalls" expression="execution(public * *..ServiceOnIntegrationAdapter.*(..))"/>
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.
Aug 1st, 2007, 06:41 PM
How to skip some classes?
I am working on RAD 7.
Following is the snippet from bean config that I am using.
<!-- Spring Bean Config -->
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<bean id="jmsConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryB ean">
<property name="jndiName" value="jms/TestQ" />
<ref bean="jmsTemplate" />
<bean id="instrumentationAspect" class="com.xyz.infrastructure.aspects.SystemArchit ectureAspect"/>
I am getting the following exception:
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
... 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
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.
Aug 10th, 2010, 05:11 AM
Today I faced this problem too. You can fix this by setting the proxy-interface property on your jndi-lookups of your queues.
<jee:jndi-lookup id="aQueue" jndi-name="MY_QUEUE" resource-ref="true" proxy-interface="javax.jms.Queue" />