Skip to Content
0
Former Member
May 02, 2005 at 06:40 PM

Module Processor : Module exception java.lang.ClassCastException

71 Views

Hello,

I am trying to understand how the Module processor works for our custom module exits.

So, using NW Dev. Studio, I created a EJB project with an EJB module Local interface. In the bean class, I have process() method and everything is same as the example module ConvertCRLFfromToLF provided by SAP (except the class name and the package).

My ejb-jar.xml looks like this

<?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>MYConvertCRLFfromToLFBean</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>com.kk.Adapter.Module.File.MYConvertCRLFfromToLFBean</ejb-class>

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

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

</session>

</enterprise-beans>

</ejb-jar>

The ejb-j2ee-engine.xml looks like

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

<!DOCTYPE ejb-j2ee-engine SYSTEM "ejb-j2ee-engine.dtd">

<ejb-j2ee-engine>

<enterprise-beans>

<enterprise-bean>

<ejb-name>MYConvertCRLFfromToLFBean</ejb-name>

<jndi-name>KK/MYConvertCRLFfromToLFBean</jndi-name>

<session-props/>

</enterprise-bean>

</enterprise-beans>

</ejb-j2ee-engine>

I am deploying this bean using NW Dev Studio.

In the module process or Sender File Adapter, I have provided the following

1. localejbs/KK/MYConvertCRLFfromToLFBean

2. localejbs/CallSapAdapter

After activating the comm. channel, I get the following error

"Error: Module exception java.lang.ClassCastException found"

However, if I use SAP's example module localejbs/SAP XI Sample/ConvertCRLFfromToLF, the same works OK.

I don't know what I am missing here. Any help will be highly appreciated.

Thanks

KK

Message was edited by: KK