Skip to Content
author's profile photo Former Member
Former Member

Module Processor : Module exception java.lang.ClassCastException

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 02, 2005 at 07:18 PM

    Hi KK

    Well what I can get out of this is only this. Some where u need to cast your class(user defined ) into type module precessor expecting.

    Even I do not have any idea where it is to done ..

    thanx & regards

    Vinod Ahir

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 04, 2005 at 07:04 AM

    Hi KK -

    Another option for deployment, especially for your example, is using the SDM tool. Ulitimately this is how the sample module you're working with was deployed during the XI installation. There is a corresponding 'sample_module.sda' in the file system at:

    \usr\sap\ \DVEBMGS00\SDM\root\origin\ sap.com\com.sap.aii.af.sample.module\SAP AG\3.0.1120050323100537.0000

    OR (for a Web AS Java)

    \usr\sap\ \JC00\SDM\root\origin\ sap.com\com.sap.aii.af.sample.module\SAP AG\3.0.1120050221120510.0000

    Note that the 3.0.XXXXXXXXXXXXXXXX.XXXX will vary depending on the particular patch/SP.

    Open up the .sda file with winzip and adjust it to your needs. You can use SDM to deploy the adjusted .sda. It may also help you troubleshoot your NWDS deployment.

    Regards,

    Jin

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Mustafa -

      I'm assuming you changed the package name and the name of the class. Given this, you have to make the corresponding changes in the following files within the sda:

      Sap_manifest.mf

      application.xml

      com.sap.aii.af.sample.module-dd.xml (this file is referred to in Sap_manifest.mf. To be consistent, change the name of the file to <your package>-dd.xml and make the adjusted reference in Sap_manifest.mf).

      log-configuration.xml

      I'll admit that there's a lot of room for human error here so double check all your files and references. Once you have it right once, it's not too bad.

      Jin

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.