cancel
Showing results for 
Search instead for 
Did you mean: 

File CC not picking file after module is added

Former Member
0 Kudos

Hi Experts,

I am trying to develop an sample adapter module just to pick the name of the file and put it in the payload. I managed to deploy the module through SDM and it is showing as active in the visual admin. But when I run the interace it doesn't pick the file at all. The communication channel is working fine without module as it is picking the file processing it.

The module configured in the communcaiton channel is as below:

1 localejbs/AddFileNameToPayloadEJBBean Local Enterprise Bean 0

2 CallSapAdapter Local Enterprise Bean 0

Nothing esle is configured. Please advise I am missing some thing in the configuration or is there any other issue.

Regards,

SS

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

try to restart Java services from SMICM.

I had same problem a few days ago, solved with this solution.

Fabio

Answers (3)

Answers (3)

Former Member
0 Kudos

Is a Sender Channel right??

Change Module Order to:

1 CallSapAdapter Local Enterprise Bean 0

2 localejbs/AddFileNameToPayloadEJBBean Local Enterprise Bean 0

Former Member
0 Kudos

It is a sender channel , but I think the standard module is the last one to be called.

Regards,

SS

Former Member
0 Kudos

I found the issue, as the adapter audit log throwing error,

Attempt to process file failed with java.lang.ClassCastException: class com.amd.polsap.ble.module.AddFileNameToPayloadEJBLocalHomeImpl0_0 can not be casted to ModuleLocalHome or SModuleLocalHome

Any clue?

Regards,

SS

former_member200962
Active Contributor
0 Kudos

you need to revisit the way you have created the ear file for deployment....it seems that the unwanted libraries were not deleted from the ear file....check this post which is similar with your requirement:

Former Member
0 Kudos

I have gone through the link, but it appears in conclusive. If I am deleting the extra JARs, then, I have issue with the deployment as stated in the thread.

Regards,

SS

Former Member
0 Kudos

The issue is resolved. For me, deleting the additional Jars did n't work, as it caused in deployment error. The clue is to create a java class under a EJB project in NWDS, rather than creating EJB. If we create EJB, the additional HOME, REMOTE,LOCAL HOME interfaces are created. XI explicitly tries to cast them into ModuleHome,ModuleRemote etc, which results in Class Cast exception. If we are just creating a class without these additional Interfaces,XI manages it internally.

But we MUST have the ejbcreate() methods implemented/present in our Module-Class.

If we don't create EJB under EJB Project, then the ejb-jar.xml will not have the representation for Home,Remote, Local Home etc.

So we need to edit the ejb-jar.xml as follows.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"

                         "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

<ejb-jar>

    <description>EJB JAR description</description>

    <display-name>EJB JAR</display-name>

    <enterprise-beans>

        <session>

            <ejb-name>The class name(ex- Myclass)</ejb-name>

            <home>com.sap.aii.af.mp.module.ModuleHome</home>

            <remote>com.sap.aii.af.mp.module.ModuleRemote</remote>

            <local-home>com.sap.aii.af.mp.module.ModuleLocalHome</local-home>

            <local>com.sap.aii.af.mp.module.ModuleLocal</local>

            <ejb-class>The class name  with the package defn(ex- com.xyz.Myclass</ejb-class>

            <session-type>Stateless</session-type>

            <transaction-type>Container</transaction-type>

        </session>

    </enterprise-beans>

</ejb-jar>

For more info, pls follow [http://tleterme.developpez.com/bw/how/HowToCreateAdapterModules.pdf ]

Regards,

SS

former_member200962
Active Contributor
0 Kudos

try with unlocking the File adapter from VA and then check.

Former Member
0 Kudos

Correct, I restarted Java because i had no authorization to access VA.

Former Member
0 Kudos

I restarted the Java Stack, but no luck.

Regards,

SS

Former Member
0 Kudos

Hi,

1) Is the communication channel showing error in runtime workbench?

2) Try changing the Module processing sequence to:

first: CallSapAdapter Local Enterprise Bean 0

second: localejbs/AddFileNameToPayloadEJBBean Local Enterprise Bean 0

Regards,

Aravind

Former Member
0 Kudos

The file is not being picked at all, while we are using the module. So can't see any error.

Regards,

SS