IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
 View Only
  • 1.  Having Adapter issue in WTX API while running Multiple Messages in JAVA.

    Posted Fri March 18, 2016 11:00 AM

    Originally posted by: steverats


    Hi all,

     

    I am working on the concept of running the WTX compiled map (.mmc) in Java by using WTX API.

     

    when I pass the first input file it is working fine and getting output successfully.But when I try to send the second message it showing the below error.

     

     

    com.ibm.websphere.dtx.dtxpi.MException: Illegal function call - Native function: CMpiCard::_EnsureAdapterLoaded

    20:15:05,379 ERROR [stderr] (default-threads - 4)     at com.ibm.websphere.dtx.dtxpi.MCard.getAdapter(Native Method)

    20:15:05,380 ERROR [stderr] (default-threads - 4)     at com.walmart.mdb.entry.WTX_API.execute(WTX_API.java:59)

    20:15:05,381 ERROR [stderr] (default-threads - 4)     at com.walmart.mdb.entry.Trans_1.onMessage(Trans_1.java:70)

    20:15:05,382 ERROR [stderr] (default-threads - 4)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    20:15:05,382 ERROR [stderr] (default-threads - 4)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    20:15:05,382 ERROR [stderr] (default-threads - 4)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    20:15:05,382 ERROR [stderr] (default-threads - 4)     at java.lang.reflect.Method.invoke(Method.java:606)

    20:15:05,382 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)

    20:15:05,383 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,383 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

    20:15:05,383 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)

    20:15:05,384 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,384 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374)

    20:15:05,384 ERROR [stderr] (default-threads - 4)     at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:86)

    20:15:05,384 ERROR [stderr] (default-threads - 4)     at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:97)

    20:15:05,385 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)

    20:15:05,385 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,385 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

    20:15:05,386 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)

    20:15:05,386 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,386 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)

    20:15:05,386 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,386 ERROR [stderr] (default-threads - 4)     at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:93)

    20:15:05,387 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,387 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)

    20:15:05,387 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,387 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

    20:15:05,404 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)

    20:15:05,405 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,405 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)

    20:15:05,405 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,405 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:258)

    20:15:05,406 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:347)

    20:15:05,406 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:243)

    20:15:05,406 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,407 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

    20:15:05,407 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,407 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43)

    20:15:05,407 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,408 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)

    20:15:05,408 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,408 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)

    20:15:05,409 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,409 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

    20:15:05,409 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,409 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55)

    20:15:05,410 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,410 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentDescription$5$1.processInvocation(MessageDrivenComponentDescription.java:203)

    20:15:05,410 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,410 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)

    20:15:05,410 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,411 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

    20:15:05,411 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185)

    20:15:05,411 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)

    20:15:05,411 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

    20:15:05,456 ERROR [stderr] (default-threads - 4)     at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

    20:15:05,457 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)

    20:15:05,457 ERROR [stderr] (default-threads - 4)     at javax.jms.MessageListener$$$view3.onMessage(Unknown Source)

    20:15:05,457 ERROR [stderr] (default-threads - 4)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    20:15:05,457 ERROR [stderr] (default-threads - 4)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    20:15:05,458 ERROR [stderr] (default-threads - 4)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    20:15:05,458 ERROR [stderr] (default-threads - 4)     at java.lang.reflect.Method.invoke(Method.java:606)

    20:15:05,458 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ejb3.inflow.MessageEndpointInvocationHandler.doInvoke(MessageEndpointInvocationHandler.java:140)

    20:15:05,458 ERROR [stderr] (default-threads - 4)     at org.jboss.as.ejb3.inflow.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:73)

    20:15:05,459 ERROR [stderr] (default-threads - 4)     at com.sun.proxy.$Proxy24.onMessage(Unknown Source)

    20:15:05,459 ERROR [stderr] (default-threads - 4)     at com.ibm.mq.connector.inbound.MessageEndpointWrapper.onMessage(MessageEndpointWrapper.java:136)

    20:15:05,459 ERROR [stderr] (default-threads - 4)     at com.ibm.mq.jms.MQSession$FacadeMessageListener.onMessage(MQSession.java:138)

    20:15:05,459 ERROR [stderr] (default-threads - 4)     at com.ibm.msg.client.jms.internal.JmsSessionImpl.run(JmsSessionImpl.java:2677)

    20:15:05,460 ERROR [stderr] (default-threads - 4)     at com.ibm.mq.jms.MQSession.run(MQSession.java:963)

    20:15:05,460 ERROR [stderr] (default-threads - 4)     at com.ibm.mq.connector.inbound.ASFWorkImpl.doDelivery(ASFWorkImpl.java:102)

    20:15:05,460 ERROR [stderr] (default-threads - 4)     at com.ibm.mq.connector.inbound.AbstractWorkImpl.run(AbstractWorkImpl.java:236)

    20:15:05,461 ERROR [stderr] (default-threads - 4)     at org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:218)

    20:15:05,461 ERROR [stderr] (default-threads - 4)     at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)

    20:15:05,461 ERROR [stderr] (default-threads - 4)     at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:808)

    20:15:05,461 ERROR [stderr] (default-threads - 4)     at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)

    20:15:05,461 ERROR [stderr] (default-threads - 4)     at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:828)

    20:15:05,461 ERROR [stderr] (default-threads - 4)     at java.lang.Thread.run(Thread.java:745)

    20:15:05,462 ERROR [stderr] (default-threads - 4)     at org.jboss.threads.JBossThread.run(JBossThread.java:122)

     

     

    here I am attaching my code. Can you help me out in this???

     

    Thanks ,


    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 2.  Re: Having Adapter issue in WTX API while running Multiple Messages in JAVA.

    Posted Mon March 21, 2016 05:29 AM

    Originally posted by: paul.brett


    I am assuming this code is called from some parent code.

    This code contains

                MMap.initializeAPI(null);
    and
                MMap.terminateAPI();

     

    ...which is a complete no-no.  These functions must only be called once and therefore, should be in your parent code.

    Thank-you.

    Paul.

    Follow me on Twitter


    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 3.  Re: Having Adapter issue in WTX API while running Multiple Messages in JAVA.

    Posted Mon March 21, 2016 09:24 AM

    Originally posted by: steverats


    Thanks for the reply,

     

    I am using the both functions in the parent code itself. But it was not working for the second time triggering.


    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 4.  Re: Having Adapter issue in WTX API while running Multiple Messages in JAVA.

    Posted Wed March 23, 2016 04:26 AM

    Originally posted by: FentonO


    Can you provide some simple example code that demonstrates the issue?  Can you get the same results if you use the FILE adapter?

     

    Fenton.


    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 5.  Re: Having Adapter issue in WTX API while running Multiple Messages in JAVA.

    Posted Wed March 23, 2016 05:24 AM
      |   view attached

    Originally posted by: steverats


    The example code is attached here. Please find it.

     

    my scenario:    MQ------------------------>WTX_API------------------------>MQ

    • I am deploying this in JBOSS server6.4

     

    problem:

     

    • When executing for the first trigger message it is working gud.
    • when we execute the same deployment for the second trigger, it is showing the above error.

     

    I am trying to clear this roadblock...suggestions/comments appriciated.

     

     


    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange

    Attachment(s)

    java
    WTX.java   4 KB 1 version


  • 6.  Re: Having Adapter issue in WTX API while running Multiple Messages in JAVA.

    Posted Mon March 18, 2019 03:16 PM

    Originally posted by: DaveFerguson


    I am having the same issue. My app is intended to run multiple maps sequentially. 

    The first map runs fine but the second and fails with the exception ``com.ibm.websphere.dtx.dtxpi.MException: Illegal function call - Native function: CMpiCard::_EnsureAdapterLoaded``

    This is the case even though each map is instantiated and unloaded each time a map is run.

    This is a blocker for my current project so I would appreciate any feedback.

     


    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 7.  Re: Having Adapter issue in WTX API while running Multiple Messages in JAVA.

    Posted Tue March 26, 2019 05:58 AM

    Originally posted by: PaulBrett


    In the scenario above, the WTX.java code contains lines:

                MMap.initializeAPI(null);

    and

                MMap.terminateAPI();

    ...which is not allowed.

    Does your code do the same?  Any code that is called multiple times, cannot initialise the API.  The API initialisation needs to be done once, maybe in some kind of 'init' for the JBOSS server.

    The map can be (and should be) loaded then unloaded each transaction:

                MMap map = new MMap("C:\\Users\\User1\\IBM\\wtx\\workspace\\Map1.mmc");

                map.unload();

    Thank you.

    Paul

    Follow me on Twitter


    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender