Announcement Announcement Module
Collapse
No announcement yet.
Websphere JCA jndi lookup failure: TypeMismatchException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Websphere JCA jndi lookup failure: TypeMismatchException

    We are having trouble configuring Spring JMS to use JCA with Websphere, when using a JNDI lookup for the activation spec. We are using Websphere 6.1 and Sibus.

    We are get the following exception:

    org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.ibm.ejs.j2c.ActivationSpecBindingInfo] to required type [javax.resource.spi.ActivationSpec] for property 'activationSpec'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [com.ibm.ejs.j2c.ActivationSpecBindingInfo] to required type [javax.resource.spi.ActivationSpec] for property 'activationSpec': no matching editors or conversion strategy found


    Here is the failing configuration:
    Code:
    <jee:jndi-lookup id="rule-activationSpec" jndi-name="eis/RuleActivationSpec" resource-ref="false" />
    
    <bean id="was-resourceAdapter" class="org.springframework.jca.support.ResourceAdapterFactoryBean">
    	<property name="resourceAdapter">
    		<bean class="com.ibm.ws.sib.api.jmsra.impl.JmsJcaResourceAdapterImpl"/>
    	</property>
    	<property name="workManager">
    		<bean class="org.springframework.jca.work.SimpleTaskWorkManager">
    			<property name="asyncTaskExecutor">
    				<bean class="org.springframework.scheduling.commonj.WorkManagerTaskExecutor">
    					<property name="workManagerName" value="wm/default" />
    				</bean>
    			</property>
    		</bean>
    	</property>
    </bean>
    <bean id="rule-endpoint" class="org.springframework.jms.listener.endpoint.JmsMessageEndpointManager">
    	<property name="resourceAdapter" ref="was-resourceAdapter" />
    	<property name="activationSpec"  ref="rule-activationSpec" />
    	<property name="messageListener" ref="rule-messageListener"/>
    </bean>
    This works ok when we replace the activation spec jndi lookup with a hard-coded value, i.e.:
    Code:
    <bean id="rule-activationSpec" class="com.ibm.ws.sib.api.jmsra.impl.JmsJcaActivationSpecImpl">
    	<property name="destination">
    		<jee:jndi-lookup jndi-name="jms/RuleQueue" resource-ref="true" />
    	</property>
    	<property name="destinationType" value="javax.jms.Queue" />
    	<property name="busName"         value="0503_TEST_SIB" />
    	<property name="maxConcurrency"  value="1" />
    </bean>

    The IBM class, com.ibm.ejs.j2c.ActivationSpecBindingInfo, doesn't implement any interfaces.

    Does anyone know of a fix or workaround for this problem?

  • #2
    RE: Websphere JCA jndi lookup failure: TypeMismatchException

    After spending days experimenting and sifting through the IBM documentation, we've concluded we're probably better off conforming to IBM's recommendation to use MDB's. Configuring Spring MDP's to properly work with JCA by hard-coding IBM's class names just feels wrong, and will probably cause us heartburn during websphere upgrades.

    On the other hand, if SpringSource finds a clean way to handle this, we'd definitely be interested.

    Comment


    • #3
      Hi

      glad you dropped that idea. We managed to have a working configuration, only to discover that it causes randon deadlocks within IBM's JCA code...

      you don't want to be there, really

      Comment


      • #4
        Anybody got a working solution for this? I am also stuck at the same exception :


        Server : WPS7

        Code: [spring-config.xml]

        <bean id="messageListener" class="com.mot.vcms.failurereports.listener.JMSEmi tterListener">
        </bean>
        <bean id="was-resourceAdapter" class="org.springframework.jca.support.ResourceAda pterFactoryBean">
        <property name="resourceAdapter">
        <bean class="com.ibm.ws.sib.api.jmsra.impl.JmsJcaResourc eAdapterImpl"/>
        </property>
        <property name="workManager">
        <bean class="org.springframework.jca.work.SimpleTaskWork Manager">
        <property name="asyncTaskExecutor">
        <bean class="org.springframework.scheduling.commonj.Work ManagerTaskExecutor">
        <property name="workManagerName" value="wm/NASPolling" />
        </bean>
        </property>
        </bean>
        </property>
        </bean>
        <jee:jndi-lookup id="activationSpec1" jndi-name="jms/cei/EAMSQueueActivationSpec" resource-ref="true" />
        <bean id="eventConsumer" class="org.springframework.jms.listener.endpoint.J msMessageEndpointManager">
        <property name="resourceAdapter" ref="was-resourceAdapter" />
        <property name="activationSpec" ref="activationSpec1" />
        <property name="messageListener" ref="messageListener"/>
        </bean>

        web.xml:

        <resource-ref>
        <description>Activation Spec</description>
        <res-ref-name>jms/cei/EAMSQueueActivationSpec</res-ref-name>
        <res-type>com.ibm.ws.sib.api.jmsra.impl.JmsJcaActivatio nSpecImpl</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Shareable</res-sharing-scope>
        </resource-ref>




        Caused by: org.springframework.beans.ConversionNotSupportedEx ception: Failed to convert property value of type 'com.ibm.ejs.j2c.ActivationSpecBindingInfo' to required type 'javax.resource.spi.ActivationSpec' for property 'activationSpec'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.ibm.ejs.j2c.ActivationSpecBindingInfo] to required type [javax.resource.spi.ActivationSpec] for property 'activationSpec': no matching editors or conversion strategy found


        Can someone please help resolving this..

        Comment

        Working...
        X