Results 1 to 3 of 3

Thread: [Xlint:cantFindTypeAffectingJPMatch] How to manage Xlint ?

  1. #1
    Join Date
    Oct 2006
    Posts
    1

    Default [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.

    The pointcut definition would be something like:

    <aop:config proxy-target-class="false">
    <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.

    Regards

    Frag
    Attached Files Attached Files

  2. #2
    Join Date
    Aug 2007
    Posts
    3

    Default 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">
    <property name="connectionFactory">
    <ref bean="jmsConnectionFactory"/>
    </property>
    <property name="defaultDestination">
    <ref bean="destination"/>
    </property>
    </bean>

    <bean id="jmsConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiName">
    <value>jms/TestCF</value>
    </property>
    </bean>

    <bean id="destination"
    class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiName" value="jms/TestQ" />
    </bean>

    <bean id="asyncTaskServiceImpl"
    class="com.xyz.app.services.mmt.impl.AsyncTaskServ iceImpl">
    <property name="jmsTemplate">
    <ref bean="jmsTemplate" />
    </property>
    </bean>

    <bean id="instrumentationAspect" class="com.xyz.infrastructure.aspects.SystemArchit ectureAspect"/>

    <aop:config>
    <aop:aspect ref="instrumentationAspect">
    <aopointcut id="instrumentService"
    expression="execution(* com.xyz.base.AbstractServiceImpl+.*(..))"/>
    <aop:around pointcut-ref="instrumentService"
    method="instrument"/>
    </aop:aspect>
    </aop:config>


    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
    [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.

    Regards,
    Shubhomoy

  3. #3
    Join Date
    Jun 2008
    Posts
    15

    Default Late reply

    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" />

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •