Adapter module Transform.Class error
Hello,
I have a sender jdbc adapter which is calling the xslt transform class with no errors but its obvious that the xsl is not being invoked as my xml is not transformed, but I don't see any error in the audit log. When I purposely use a non existent file path/file name in XSLTConversion.XSLTFileName I expect to get an error in the message monitor audit log but I do not. Neither default.trace or xi.*.log provide any errors regarding the xslt transformation in the adapter module. The audit log actually indicates: "Transform: successfully transformed" Below is my adapter module configuration. Can anyone point me to a log file that might contain adapter module errors or notice any problem with this module config?
localejbs/AF_Modules/MessageTransformBean, Local, XSLT
CallSapAdapter, Local, call_AF_MS
XSLT, Transform.class, com.sap.aii.messaging.adapter.XSLTConversion
XSLT, XSLTConversion.XSLTFileName, /usr/sap/XIS/DVEBMGS00/j2ee/cluster/server0/tmgxsls/GL_split.xsl
Thanks in advance,
Dave
Hi
Check for correct spelling:
localejbs/AF_modules/MessageTransformBean
Check the parameters for trailing spaces:
'com.sap.aii.messaging.adapter.XSLTConversion_'
Check the path:
Windows: C:\...
Unix: /usr/...
and
Check the adit log of the message monitoring in the RWB for entries according to the module....
Trc or trace files on visual administrator is the closest answer from my part.
please refer,
/people/michal.krawczyk2/blog/2005/09/07/xi-why-dont-start-searching-for-all-errors-from-one-place
regards,
vasanth
Similar Messages
-
Receiver Mail Adapter Module Parameters
Hello PI Experts,
Can anyone pls provide me Mail adapter module parameter details for xml to txt file conversion. I have found a few but none of them are working, can you pls provide me some active links.
Thanks,
SriI need MAIL Adapter module transformation parameter for converting my attachment from xml to text file -
I have gone thro few forums and modified my comm channel, but still getting xml file as an output attachment instead of a text file.
Can anyone please suggest me how to change the module parameters to covert from xml file to text.
I have added these module processing - please help.
Processing sequence
localejbs/AF_Modules/MessageTransformBean - Local Enterprise Bean - XML2Plain
sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean - Local Enterprise Bean - Mail
Module configuration
XML2Plain - xml.endSeparator - 'nl'
XML2Plain - xml.fieldNames - Field1,Field2,Field3
XML2Plain - xml.fieldSeparator - | |
XML2Plain - Transform.Class - com.sap.aii.messaging.adapter.Conversion
XML2Plain - Transform.ContentDisposition - attachment;filename="extract_p.txt"
XML2Plain - Transform.ContentType - xml/plain;charset='UTF-8";name="extract_p.txt"
XML2Plain - xml.recordsetStructure - Details
Thanks,
Sri -
Error in adapter module - jndi lookup can't find the class
Hi gurus,
I have a problem with my adapter module, the error from the RWB is:
Error: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of KFCProc.
My EJB-JAR looks like this:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE ejb-jar (View Source for full doctype...)>
<ejb-jar>
<description>EJB JAR description</description>
<display-name>EJB JAR</display-name>
<enterprise-beans>
<session>
<ejb-name>KFCProc</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.sap.adapter.KFCProc</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
I think it should be all right, but it isn't.
Can be the problem, that I use for "com.sap.adapter.KFCProc"package "com.sap..."?
Thank you,
OlianHi Stefan,
I developed it using your document
This is my ejb-j2ee-engine.xml
<?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>KFCProc</ejb-name>
<jndi-name>KFCProc</jndi-name>
<session-props/>
</enterprise-bean>
</enterprise-beans>
</ejb-j2ee-engine>
My entry in Modules tab of CC config is
localejbs/KFCProc
I think this all should be ok...
Thanks,
Olian -
Standard Adapter Module "Message Transform Bean" in Seeburger AS2 Adapter
Hi,
I am calling standard adapter module "Message Transform Bean" in seeburger AS2 Sender adapter where I am getting the following error :
ClassNotFoundException:com.sap.aii.messaging.adapter.Conversion . Can anybody help me on this. Appreciate for your respoinse.
Thank you,
Mallikarjuna Rao MHi,
Thank you for your replies I manage to get NWA dump for this issue.. Here is the log
Could not call backend system: Error in ???-module:Transform: failed to set up the transformer for channel 6857fd15f84d3e23a7b0f51ca1851b20; modkey TXT2XML; caused by java.lang.ClassNotFoundException: com.sap.aii.messaging.adapter.Conversion
Loader Info -
ClassLoader name: [sap.com/com.sap.aii.af.mod.trans.app]
Living status: alive
Direct parent loaders:
[system:Frame]
[service:servlet_jsp]
[service:ejb]
[library:engine.j2ee14.facade]
[library:com.sap.base.technology.facade]
[library:com.sap.aii.af.lib]
[library:com.sap.aii.af.sdk.lib]
[service:com.sap.aii.af.cpa.svc]
[service:com.sap.aii.af.svc]
[service:com.sap.aii.adapter.xi.svc]
[library:com.sap.aii.adapter.lib]
Resources:
D:\usr\sap\BWD\DVEBMGS00\j2ee\cluster\apps\sap.com\com.sap.aii.af.mod.trans.app\EJBContainer\applicationjars\com.sap.aii.af.mod.trans.ejb.jar
[LOC: com.seeburger.as2.impl.SHCInitiatorProcessor.initiateToBackend] Caused by: Error in ???-module:Transform: failed to set up the transformer for channel 6857fd15f84d3e23a7b0f51ca1851b20; modkey TXT2XML; caused by java.lang.ClassNotFoundException: com.sap.aii.messaging.adapter.Conversion
Loader Info -
ClassLoader name: [sap.com/com.sap.aii.af.mod.trans.app]
Living status: alive
Direct parent loaders:
[system:Frame]
[service:servlet_jsp]
[service:ejb]
[library:engine.j2ee14.facade]
[library:com.sap.base.technology.facade]
[library:com.sap.aii.af.lib]
[library:com.sap.aii.af.sdk.lib]
[service:com.sap.aii.af.cpa.svc]
[service:com.sap.aii.af.svc]
[service:com.sap.aii.adapter.xi.svc]
[library:com.sap.aii.adapter.lib]
Resources:
D:\usr\sap\BWD\DVEBMGS00\j2ee\cluster\apps\sap.com\com.sap.aii.af.mod.trans.app\EJBContainer\applicationjars\com.sap.aii.af.mod.trans.ejb.jar
at com.seeburger.xi.api.module.impl.nw71.SeeModuleProcessorLocal71.process(SeeModuleProcessorLocal71.java:55)
at com.seeburger.xi.connector.fw.InitiationThread.run(InitiationThread.java:101)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:152)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247)
Caused by: java.lang.ClassNotFoundException: com.sap.aii.messaging.adapter.Conversion
Loader Info -
ClassLoader name: [sap.com/com.sap.aii.af.mod.trans.app]
Living status: alive
Direct parent loaders:
[system:Frame]
[service:servlet_jsp]
[service:ejb]
[library:engine.j2ee14.facade]
[library:com.sap.base.technology.facade]
[library:com.sap.aii.af.lib]
[library:com.sap.aii.af.sdk.lib]
[service:com.sap.aii.af.cpa.svc]
[service:com.sap.aii.af.svc]
[service:com.sap.aii.adapter.xi.svc]
[library:com.sap.aii.adapter.lib]
Resources:
D:\usr\sap\BWD\DVEBMGS00\j2ee\cluster\apps\sap.com\com.sap.aii.af.mod.trans.app\EJBContainer\applicationjars\com.sap.aii.af.mod.trans.ejb.jar
at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:259)
at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:228)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:353)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at com.sap.aii.af.modules.trans.MessageTransformBean.loadClass(MessageTransformBean.java:121)
at com.sap.aii.af.modules.trans.MessageTransformBean.setup(MessageTransformBean.java:178)
at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:346)
at sun.reflect.GeneratedMethodAccessor484_10002.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164)
at $Proxy2674_10002.process(Unknown Source)
at com.sap.aii.af.app.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:249)
at sun.reflect.GeneratedMethodAccessor311_10002.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164)
at $Proxy102_10002.process(Unknown Source)
at com.seeburger.xi.api.module.impl.nw71.SeeModuleProcessorLocal71.process(SeeModuleProcessorLocal71.java:43)
Waiting for your valuable inputs on this.
Thank you,
Mallikarjuna Rao M -
MalformedInputException Error in Adapter module for SFTP channel
Dear All,
I am using MessageTransformBean in adapter module for Plain to XML conversion. The channel works fine in all the cases but when I recieve " ì " or few more special characters in the file my channel does not pick file and show below error.
Error: com.aedaptive.adapter.sftp.SFTPException : Aborting processing: com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
I am using below parameter value in adapter module.
Transform.Class : com.sap.aii.messaging.adapter.Conversion
Transform.ContentType : text/xml;charset=ISO-8859-1
Please help me if any of you have faces such error in your developments.
AvanishHi Grzegorg,
I have tried using UTF-8 encoding in my channel but this doesn't work. Communication cahnnel is still giving same problem.
Error: com.aedaptive.adapter.sftp.SFTPException : Aborting processing: com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
The file which we are trying to process have character Ì and as far as my serach is concerned i think this belongs to charset ISO-8859-1.
Any more suggestion Guys to solve this problem.
Thanks and Regards
Avanish -
Error in Adapter Module to unzip files
Hello ,
I wish to unzip many files with use of an adapter module
To du this I use following code
package de.lsv.moduledevelopement;
import java.io.*;
import java.util.Hashtable;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import javax.ejb.CreateException;
import com.sap.aii.af.mp.module.Module;
import com.sap.aii.af.mp.module.ModuleContext;
import com.sap.aii.af.mp.module.ModuleData;
import com.sap.aii.af.mp.module.ModuleException;
import com.sap.aii.af.ra.ms.api.Message;
import com.sap.aii.af.ra.ms.api.MessageDirection;
import com.sap.aii.af.ra.ms.api.Payload;
import com.sap.aii.af.ra.ms.spi.Trace;
import com.sap.aii.af.service.auditlog.Audit;
import com.sap.aii.af.service.auditlog.AuditDirection;
import com.sap.aii.af.service.auditlog.AuditLogStatus;
import com.sap.aii.af.service.auditlog.AuditMessageKey;
* @ejbLocal <{de.lsv.moduledevelopement.UnZipFilesLocal}>
* @ejbLocalHome <{de.lsv.moduledevelopement.UnZipFilesLocalHome}>
* @stateless
public class UnZipFilesBean implements SessionBean, Module {
static AuditMessageKey amk = null;
static String auditStr = "UnzipFilesBean - ";
static ModuleException mEx = null;
public static final String VERSION_ID =
"$Id://de.lsv.moduledevelopement.UnZipFilesBean.java#1 $";
private static final Trace TRACE = new Trace(VERSION_ID);
public void ejbRemove() {
public void ejbActivate() {
public void ejbPassivate() {
public void setSessionContext(SessionContext context) {
myContext = context;
private SessionContext myContext;
* Create Method.
public void ejbCreate() throws CreateException {
// TODO : Implement
/* (non-Javadoc)
* @see com.sap.aii.af.mp.module.Module#process(com.sap.aii.af.mp.module.ModuleContext, com.sap.aii.af.mp.module.ModuleData)
public ModuleData process(
ModuleContext moduleContext,
ModuleData inputModuleData)
throws ModuleException {
Object obj = null;
Message msg = null;
Payload attachment = null;
//initializing variables for module parameters
String modkey = "";
String fileMask = "";
String directory = "";
String saveDirectory = "";
// String newMimeType = "";
// String newAttachmentName = "";
// String newAttachmentExtension = "";
// String newAttachmentNameReplace = "";
//this block is to manage the adapter when is not file/FTP
try {
//get the XI Message
obj = inputModuleData.getPrincipalData();
msg = (Message) obj;
// create AuditMessageKey object to write audit log.
if (msg.getMessageDirection() == MessageDirection.INBOUND)
amk =
new AuditMessageKey(
msg.getMessageId(),
AuditDirection.INBOUND);
else
amk =
new AuditMessageKey(
msg.getMessageId(),
AuditDirection.OUTBOUND);
// ******start get the module parameters from the configuration******
modkey = moduleContext.getContextData("module.key");
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
auditStr + "Module Configuration Key: " + modkey);
//***** einlesen der Moduke Parameter******************
//***** DateiMaske
fileMask = moduleContext.getContextData("FileMask");
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
auditStr + "FileMask: " + fileMask);
// check ob fileMask definiert ist
if (fileMask == null || fileMask.equalsIgnoreCase("")) {
//if no attachment name is specified in the module configuration the module will end the execution
throw mEx =
new ModuleException(
auditStr
+ "!FileMask in Modulconfiguration nicht definiert!");
//***** DateiMaske2
String fileMask2 = moduleContext.getContextData("FileMask2");
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
auditStr + "FileMask2: " + fileMask2);
//***** Directory
directory = moduleContext.getContextData("Directory");
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
auditStr + "Directory: " + directory);
// Fehler wenn Directory nicht definiert
if (directory == null || directory.equalsIgnoreCase("")) {
//the module will end the execution
throw mEx =
new ModuleException(
auditStr
+ "Directory in Modulconfiguration nicht definiert");
//***** Sicherungs Verzeichnis
saveDirectory = moduleContext.getContextData("SaveDirectory");
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
auditStr + "SaveDirectory: " + saveDirectory);
// entpacken aufrufen
entpacke(directory, saveDirectory, fileMask);
if (fileMask2.length() > 0) {
entpacke(directory, saveDirectory, fileMask2);
//update the XI Message
inputModuleData.setPrincipalData(msg);
} catch (Exception e) {
String errorMessage =
auditStr + "Error bei der . Exception:" + e.getMessage();
Audit.addAuditLogEntry(amk, AuditLogStatus.ERROR, errorMessage);
throw mEx = new ModuleException(auditStr + errorMessage);
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
auditStr + "Verarbeitung beendet ");
return inputModuleData;
//+++++++++++++++++++++++++
private static void entpacke(
String directory,
String saveDirectory,
String mask)
// TODO Auto-generated method stub
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
auditStr + "Funktion entpacke");
if (!directory.endsWith("\")) {
directory = directory + "\";
} // if
File f;
f = new File(directory);
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
auditStr + "f = new File(directory)");
// // Achtung Klasse in einer Klasse :-)
// String[] strFiles = f.list(new FilenameFilter() {
// public boolean accept(File file, String filename) {
// Wildcard wildcard1 = new Wildcard(mask);
// Audit.addAuditLogEntry(
// amk,
// AuditLogStatus.SUCCESS,
// auditStr + "wc1");
// return wildcard1.match(filename, false);
String [] strFiles = f.list(new MyFilter(mask));
// Liste der Gefundenen dateien
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
auditStr + "Anzahl gepackter Dateien: " + strFiles.length);
//System.out.println( strFiles.length + " Dateien zum entpacken");
for (int i = 0; i < strFiles.length; i++) {
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
auditStr + "verarbeite Datei: : " + strFiles<i>);
// System.out.println("f[" + i + "]=" + strFiles<i>);
} // for
// *****entpacken**********************
for (int i = 0; i < strFiles.length; i++) {
try {
byte[] buf = new byte[4096];
ZipInputStream in =
new ZipInputStream(
new FileInputStream(directory + strFiles<i>));
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
auditStr + "Entpacke " + directory + strFiles<i>);
//System.out.println("Entpacke " + directory + strFiles<i>);
int count = 0;
while (true) {
count++;
// Nächsten Eintrag lesen
ZipEntry entry = in.getNextEntry();
if (entry == null) {
break;
// Beschreibung ausgeben
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
auditStr + entry.getName());
//System.out.println(entry.getName());
// Ausgabedatei erzeugen
FileOutputStream out =
new FileOutputStream(directory + entry.getName());
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
out.close();
// Eintrag schließen
in.closeEntry();
} // while
in.close();
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
auditStr + count + "Dateien entpackt");
//System.out.println(count + "Dateien entpackt");
// verschieben
if (saveDirectory.length() > 0) {
File quelle = new File(directory + strFiles<i>);
File ziel = new File(saveDirectory + strFiles<i>);
boolean bla = quelle.renameTo(ziel);
if (!bla) {
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
auditStr
+ strFiles<i>
+ " konnte nicht verschoben werden");
} else {
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
auditStr
+ strFiles<i>
+ "verschoben nach "
+ saveDirectory);
// System.out.println(
// strFiles<i> + "verscgoben nach " + directory + "sik//");
} // if
} catch (Exception e) {
String errorMessage =
auditStr
+ "Error in entpacken. Exception:"
+ e.getMessage();
Audit.addAuditLogEntry(amk, AuditLogStatus.ERROR, errorMessage);
} // catch
// *****entpacken*************
} // for
} //entpacke
} // UnzipFilesBean
class Wildcard {
static AuditMessageKey amk = null;
static String auditStr = "WildCard - ";
static ModuleException mEx = null;
private final String wildcardString;
* Der Konstruktor für die WildcardSuche.
* @param wildcardString
* Der WildcardString
public Wildcard(String wildcardString) {
this.wildcardString = wildcardString;
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
auditStr + "Constructor");
* Die Methode, welche den Vergleich durchführt.
* @param str
* Der String, welcher darauf überprüft werden soll, ob er dem
* WildcardString entspricht.
* @return true Wenn der String dem wildcardString entspricht.
public boolean match(String str, boolean fCasesensitive) {
if (str == null || wildcardString == null) {
return false;
return recursiveMatch(wildcardString, str, fCasesensitive);
* Hier wird der eigentliche Vergleich durchgeführt
* @param strWildcard
* Der Wildcardstring, z.B.: "Test*"
* @param str
* Der zu überprüfende String, z.B. "Testlauf"
* @return true, wenn eine Übereinstimmung vorhanden ist, sonst false
private boolean recursiveMatch(
String strWildcard,
String str,
boolean fCasesensitive) {
while (true) {
if (strWildcard.length() == 0)
return str.length() == 0;
char ch = strWildcard.charAt(0);
switch (ch) {
case '?' :
if (str.length() == 0)
return false;
break;
case '*' :
strWildcard = strWildcard.substring(1);
while (true) {
if (recursiveMatch(strWildcard, str, fCasesensitive))
return true;
if (str.length() == 0)
return false;
str = str.substring(1);
default :
if (str.length() == 0)
return false;
if (fCasesensitive) {
if (ch != str.charAt(0))
return false;
} else if (
Character.toLowerCase(ch)
!= Character.toLowerCase(str.charAt(0)))
return false;
break;
strWildcard = strWildcard.substring(1);
str = str.substring(1);
//++++++++++++++++++++++++++
} // class
/** Nun der eigentliche Filter */
class MyFilter implements FilenameFilter {
static AuditMessageKey amk = null;
static String auditStr = "MyFilter - ";
static ModuleException mEx = null;
String fileMask;
public MyFilter(String fileMask) {
this.fileMask = fileMask;
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
auditStr + "Constructor");
} //constructor
public boolean accept(File file, String filename) {
// TODO Auto-generated method stub
//fileMask = "?5LBL*";
Wildcard wildcard1 = new Wildcard(fileMask);
return wildcard1.match(filename, false);
} //class
But in Audit Protocol it failed after:
17.09.2008 17:33:19 Erfolgreich UnzipFilesBean - Module Configuration Key: 2
17.09.2008 17:33:19 Erfolgreich UnzipFilesBean - FileMask: ?5LBL???
17.09.2008 17:33:19 Erfolgreich UnzipFilesBean - FileMask2:
17.09.2008 17:33:19 Erfolgreich UnzipFilesBean - Directory: //transfer//X1E//100//99//lb//ein
17.09.2008 17:33:19 Erfolgreich UnzipFilesBean - SaveDirectory: //transfer//X1E//100//99//lb//ein_s
17.09.2008 17:33:19 Erfolgreich UnzipFilesBean - Funktion entpacke
17.09.2008 17:33:19 Erfolgreich UnzipFilesBean - f = new File(directory)
17.09.2008 17:33:19 Fehler UnzipFilesBean - Error bei der . Exception:null
I could not find the error??
Were there any log files to look into?
regarts
ZimmerningkatHi Ralf,
I am late..........
I am bit confused with your explanation.
1. Does all zip files will be picked by file adapter in one shot or is it conditional, since you have a XML descriptor file in firts zip file and the XML files describes the list of JPEG files which might be stored in the other zipped JPEG files?
2. Can you tell the exact flow of your scenario
3. Receiver in your scenario?
Thanks,
Gujjeti. -
Error in Adapter module on decentral Adapter engine
Hi,
I have configured a scenario file to file for picking a xml file and then converting it to corresponding edifact file,using an adapter module at the receiver side.The adapter module is getting executed but i am getting this error
Message processing failed. Cause: java.lang.ClassCastException: class Xml_To_Edi.XML2EdifactLocalHomeImpl0_0 can not be casted to ModuleLocalHome or SModuleLocalHome
Can you all tell what is this error and how to rectify it.
regards,
ujjwal kumarHi Ujjawal,
Do the following steps...
1.created EJB of type StatelessSession Bean
2.Dont uncheck generate default interfaces
3. Fininsh.
Later in ejb-jar.xml file, modify Home,Remote,Local,LocalHome entries.
and for more info
I refered a blog ,in that its given as:
You need references to connector.jar file which has the classes required at compile time and runtime
Compile time :
From the context menu of the EJB project , follow the path Properties -> Java Build Path -> Libraries.
Click on Add variable and select TSSAP_JAVAX_HOME and click on Extend and select connector.jar from the list displayed.
Run time :
Navigate to the application-j2ee-engine.xml in your EAR project.
Select References on the General tab and click on Add.
Select Select library/interface/service as shown in the snapshot and select j2eeca as in the next snapshot.
Check this blog:
/people/amol.joshi2/blog/2006/11/28/alerts-from-adapter-modules--the-jra-way-part-ii
see the comments in the blog who faced same error.may this helps or gives an idea
Searched lot for this,dont forget to reward points
Regards
Pragathi.
Edited by: Pragathi on May 23, 2008 5:15 AM -
Hello Gurus,
We are facing issue in Adapter modules installed in J2EE engine. We deployed two different Adapter modules in J2EE engine and two different interfaces are using them. But if any one of the interfaces run, the other interface is giving following error:
"Error: BaseTransactionRolledbackLocalException: Exception thrown in method process. The transaction is marked for rollback.".
If we restart the J2EE engine, it will start to work but the another interface is giving the smae error.
Please help me.
Regards,
Indira DI facing the same error few days before.
My module was working well for the first time but running again used to give problem.
But on restarting server or redeploying module it again use to work fine.
The basic problem was...
there were few variables used in my modules which were initialised as class variables.
when the process() method gets called for first time it use to execute properly.
solution:
Reinitialize variables at the starting phase of process() method.
Reward points if useful.
thanks -
Is it possible to send error message from Adapter Module to CCMS?
Hi
Is it possible to send error message from Adapter Module to CCMS...?I have written on adatper module from there i have to send error message to CCMS or SXMB_MONI. Is it possible if yes please send me the related documents
Best Regards
Ravi Shankar BHi
I have written following User Defined Exeption in my Module program
class DuplicateFileException extends ModuleException{
DuplicateFileException(String message){
super(message);
I am throwing my Exception like this
try{
throw new DuplicateFileException("Duplicate File");
}catch(DuplicateFileException e){
throw e;
But i am not getting this exception in SXMB_MONI. In adpater monitoring i am getting the following exceptions
<b>
2007-05-16 15:51:30 GMT+05:30: Retry interval started. Length: 5.000 s
- 2007-05-16 15:51:30 GMT+05:30: Error: java.lang.NullPointerException
- 2007-05-16 15:51:30 GMT+05:30: An unknown error occured.
- 2007-05-16 15:51:30 GMT+05:30: Processing started
- 2007-05-16 15:51:25 GMT+05:30: Error: java.lang.NullPointerException</b>
can any one give me the idea how to send error from module program to SXMB_MONI
Thanks & Regards
Ravi Shankar B -
Adapter Module Error in PI 7.1
Hi,
I have built an adapter module which has been successfully deployed on PI 7.1 using JSPM, but in communication channel monitoring it is giving below error.
Error: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of UserModuleTestEjb
In Module tab of communication channel I have passed Bean name, which works fine for other Adapter Module but strangely its not working for this one.
I have also passed JNDI name which is same as EJB bean name. I have tried several other combinations like below none is working.
localeejbs/UserModuleTestEjb
localeejbs/sap.com/UserModuleTestEjb
Regards,
Nishanthi,
Check if u have added correct references in application-j2ee-engine.xml file and if u are using external library it is there in SDA file.
/people/stefan.grube/blog/2008/12/11/adjust-your-pi-70-adapter-modules-for-pi-71-in-15-minutes
Thanks. -
File sender adapter Module Error
Hi Everybody,
I have developed an adapter module for file sender to rename the file name which is picked from the directory and I am getting an error
"Attempt to process file failed with java.lang.NullPointerException".
Can anybody tell me why is this error?
Thanks,
ZabiHi,
first check that module has been succesfully executed or not .This you can check in RWB .
Secondly go in the file adpater and click on to module tab and check
1-there will be two things one will be adapter module that you have depolyed. other one will be call sap adapter.
2- make sure that call sap adapter should come after the module you have deployed. and having the key value less then adapter module (let say your adapter module is having the key value 1 and call sap adpater is having the key value 0 then you need to change the key value there)
Thanks
sachin -
Hi
Experts,
i have an adapter module for 7.0 and i am trying to replicate the same for PI 7.1 in 7.1 NWDS.
i have made the required changes as mentioned in stefan's blog :/people/stefan.grube/blog/2008/12/11/adjust-your-pi-70-adapter-modules-for-pi-71-in-15-minutes
but import com.sap.aii.mappingtool.tf7.rt.Container; shows error , do we need to inlcude any jar file for this :
i am using this module to rename file name (in case of pick and place scenario forwithot IR configuration)
getMessageProperty and setmessageProperty is getting deprecated.(striked off)
strFileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File","FileName");
Regards,
Srinivas> strFileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File","FileName");
in PI 7.1 you can use:
strFileName = msg.getMessageProperty(new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File"));
Note that property name and namspace come in different order. I almost got mad until I noticed
http://help.sap.com/javadocs/pi/SP3/xpi/index.html -
Adapter Module deployment error in PI 7.1
Hi Experts,
I have successfully deployed a adapter module on PI 7.1 thru NWDS, I see the ejb in NWA as well...
when i try to use it tit throws this error in comm channel monitoring
Error: javax.ejb.TransactionRolledbackLocalException: (Failed in component: sap.com/UserModule_EAR) Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.sap.adaptermodule.GetHostNameBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.sap.adaptermodule.GetHostNameBean@299c92f0 for bean sap.com/UserModule_EARxml|UserModule_EJB.jarxml|GetHostName in application sap.com/UserModule_EAR.; nested exception is: java.lang.NullPointerException; nested exception is: javax.ejb.EJBException: (Failed in component: sap.com/UserModule_EAR) Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.sap.adaptermodule.GetHostNameBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.sap.adaptermodule.GetHostNameBean@299c92f0 for bean sap.com/UserModule_EARxml|UserModule_EJB.jarxml|GetHostName in application sap.com/UserModule_EAR.; nested exception is: java.lang.NullPointerException; nested exception is: javax.ejb.EJBTransactionRolledbackException: (Failed in component: sap.com/UserModule_EAR) Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.sap.adaptermodule.GetHostNameBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.sap.adaptermodule.GetHostNameBean@299c92f0 for bean sap.com/UserModule_EARxml|UserModule_EJB.jarxml|GetHostName in application sap.com/UserModule_EAR.; nested exception is: java.lang.NullPointerException; nested exception is: javax.ejb.EJBException: (Failed in component: sap.com/UserModule_EAR) Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.sap.adaptermodule.GetHostNameBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.sap.adaptermodule.GetHostNameBean@299c92f0 for bean sap.com/UserModule_EARxml|UserModule_EJB.jarxml|GetHostName in application sap.com/UserModule_EAR.; nested exception is: java.lang.NullPointerException
any help is appreciated
Regards,
TejaHi Prateek,
Im facing the same issue...,So i thought I should add to this thread instead of posting a new one
The com channel looks as follows
Processing sequence:
Number ModuleName Type moduleKey
1 ModuleName LocalEnterpriseBean 0
2 CallSapAdapter LocalEnterpriseBean 2
Module Configuration
I have nt added anything in this module configuration tab...can u help me on this
Edited by: Ibrahim on Sep 9, 2009 12:50 PM -
Adapter Module Error-Sending excel file as an attachment of the mail
Hi ,
My scenario is as follows
1)I am sending an excel file as an attachment of the mail.I need to read that excel attachment as a payload.
So mail adapter is used in sender side.
To configure this, have used standard PayloadSwapBean module with proper module key.
Next to convert excel to XML another custom adapter module is being used.
Both this adapter module , I configured into the CC of sender mail adapter.
The order in which adapter modules are being used in the sender CC are as follows
1)localejbs/AF_Modules/PayloadSwapBean
2)localejbs/MDPExcelToXMLConversion
3)sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
MDPExcelToXMLConversion-Custom adapter module written to convert excel to xml.
I am getting the following error
exception caught during processing mail message [4899]com.sap.aii.af.lib.mp.module.ModuleException
And also,
no messages in coming MONI of PI.
Pls suggest what to do.
Thanks
AyanShabarish,
Will the ordering in which the adapter modules(In this case there are two-PayloadSwapBean & MDPExcelToXML) are appearing into Module tab of sender adapter matter?
Firstly, what is happenning
1)If I take out the custom adapter module MDPExcelToXML and put only PayloadSwapBean then it is successfully converting mail attachment into the main Payload i.e PayloadSwapBean module is working.
2)Nextly, my local code( i.e java code without including standard Module specific method like ejbActivate(),ejbPassivate(),process() etc etc.)) for MDPExcelToXML is successfuly converting the excel file into the XML file.Then I am making the local code into adapter module specific code and deploying that.
A few question arises here,
Do I need to do any specific configurations here in PI for this particular things.Maybe both the adapter module is clashing with each other.
And also using tracing and logging into my custom adapter module code.Getting the following error,
java.io.IOException: Unable to read entire header; 116 bytes read; expected 512 bytes#
Thanks
Ayan -
Adapter module in PI 7.1 EhP1 for Falt File Idoc to Idoc xml transformation
Hi Experts,
In PI 7.1 (EhP1) there is a java adapter module that can be added to the file adapter that automatically transforms Flat File representation of IDoc to IDoc XML. Can anyone provide the link to this particular module? Tried searching but could not get the specific module name or parameters.
The same conversion can be achieved using a standard SAP provided ABAP mapping but we need to use the module in this case.
Thanks and regards,
Shiladitya/people/william.li/blog/2009/04/01/how-to-use-user-module-for-conversion-of-idoc-messages-between-flat-and-xml-formats
FYI~~~
Maybe you are looking for
-
How to delete the CI_INCLUDE table
Hello , In CIFPUORCUS structure there is an Include CI_PUORCUS . Initially no field was exsisting in the CI_PUORCUS , later on I had added one field into it. and made it active But Now I donot need this field any more, So when I delete this field
-
Hello, I have a MBP 15", 2.16 GHz Intel Core 2 Duo (model # MA609xx/A, I think). I currently have 1 GB 667 MHz DDR2 SDRAM. Can I upgrade with a 2 GB stick of DDR2 PC-6400 or will that not be a compatible? (Do I need it to be PC2-5300... ? ) Thanks fo
-
Attr changes runs for all Infoobject in a process chain
Hi, I have a process chain for the master data ( ATTR, TEXT and HIER),I want a Hierarchy/attribute change run like a last process in my chain and actives all the InfoObject and Hierarchy. How can I carry out the structural changes for all InfoObject
-
Hello Gurus, I need to enhance the Shopping Cart Monitor Screen in SRM 7.0 portal but unable to do so. Any help would be highly appreciative. Thanks.
-
I've make two classes named First.java and Second.java in e:\javafiles\test\vg folder package vg; public class First public int m = 100; public int n = 200; package vg; public class Second public static void me0()