on 07-13-2006 6:25 AM
Hi All,
when i am creating a J2EE customer-specific adapter module in SAP Netweaver Developer Studio, then in the java class when i write these statements:
<u>import com.sap.aii.af.mp.module.*;
import com.sap.aii.af.ra.ms.api.*;</u>
public class CustomerMeter implements SessionBean, <u>Module</u>{
it is showing error on the above underlined things that it cannot resolve these things.
can anybody suggest where to locate these librarys in Project - Properties - Java Build Path - Libraries path from the main menu.
Thanks,
Rajeev Gupta
Rajeev,
<i>The easiest way to obtain these
libraries is by downloading the newest patch of XI ADAPTER FRAMEWORK CORE 3.0
from SAP Service Marketplace. Open the file with WinZip and extract the following
SDAs:
aii_af_lib.sda, aii_af_svc.sda
aii_af_cpa_svc.sda
Open the SDA aii_af_lib.sda with WinZip and extract the following library files:
aii_af_cci.jar
aii_af_mp.jar
aii_af_ms_api.jar
aii_af_ms_spi.jar
aii_af_trace.jar
Open the SDA aii_af_svc.sda and extract the following library file:
aii_af_svc.jar
Open the SDA aii_af_cpa_svc.sda and extract the following library file:
aii_af_cpa.jar
(You can also find the SDA files on your Adapter Framework installation.)</i>
From the document https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01...
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
in this thread,
/people/gowtham.kuchipudi2/blog/2006/01/13/stop-creation-of-an-empty-file-from-file-adapter-using-module
can anybody tell me which library to import for the following bold classes:
<b>InputStream</b> File_Stream;
<b>DocumentBuilderFactory</b> docBuilderFactory = DocumentBuilderFactory.newInstance();
<b>DocumentBuilder</b> docBuilder = docBuilderFactory.newDocumentBuilder();
<b>Documen</b> doc = docBuilder.parse(File_Stream);
<b>NodeList</b> childNodes = doc.getDocumentElement().getChildNodes();
Thanks,
Rajeev Gupta
Hi,
InputStream is a standard Java class in package java.io
DocumentBuilder and DocumentBuilderFactory are from package javax.xml.parsers which as of JDK 1.4.2 is also part of standard jdk.
Document and NodeList are part of org.w3c.dom - the standard JAXP DOM Interface, should also be part of your JDK.
regards,
Peter
Hi All,
i am refering the SAP document on "How to create J2EE adapter module" to create my adapter module in SAP Netweaver Developer Studio(NWDS) in J2EE.
i have created EJB project. i have even created EAR project.
But the problem is coming at the last step. In the above document, it is written that in application-j2ee-engine.xml file, the given XML code of file should be written.
But when i write the XML of reference tags it gives the below error in NWDS:
<b>The content of element type "application-j2ee-engine" must match "(reference*,classpath?,provider-name?,modules-additional?,fail-over-enable?)".</b>
But when i copy-paste this XML in notepad and save as a XML file, i have to remove the DOCTYPE statement from top and then the XML file is displayed properly.............
But the above SAP document file is showing the DOCTYPE statement in application-j2ee-engine.xml file.......
On removing the DOCTYPE statement from application-j2ee-engine.xml file, the error in task list is removed but when i try to go to General Tab it says "The source page has errors. Other pages cannot be opened if the source page has errors."
Can anybody suggest what to do to correct this problem.
Thanks,
Rajeev Gupta
Hello Rajeev,
I have faced similar problem and here are my suggestions for the same:
1. The XML need not be displayed correctly in IE. The incomplete tag DOCTYPE is not an issue.
2. Instead of copying the entire given XML , just paste the below part in source.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">
<application-j2ee-engine>
</application-j2ee-engine>
3. The remaining details best be generated by configuration in Genreal tab like below:-
Vendor name : sap.com
Failover: Disable
References ->Add -> Add all four references one by one and set their properties as given in the PDF.
e.g.
Reference target: com.sap.aii.af.lib
Ref Type: Weak ( keep this weak and not hard )
Ref Target type: Library
Provider name: sap.com
In this way set all four references and try compiling. I feel this will solve your problem.
CHEERS
Amit
Switch to the source tab when you open the xml in NDS and paste this xml source.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">
<application-j2ee-engine>
<reference
reference-type="weak">
<reference-target
provider-name="sap.com"
target-type="library">com.sap.aii.af.lib</reference-target>
</reference>
<reference
reference-type="weak">
<reference-target
provider-name="sap.com"
target-type="service">com.sap.aii.adapter.xi.svc</reference-target>
</reference>
<reference
reference-type="weak">
<reference-target
provider-name="sap.com"
target-type="service">com.sap.aii.af.svc</reference-target>
</reference>
<reference
reference-type="hard">
<reference-target
provider-name="sap.com"
target-type="service">com.sap.aii.af.cpa.svc</reference-target>
</reference>
<provider-name>sap.com</provider-name>
<fail-over-enable
mode="disable"/>
</application-j2ee-engine>
Even if it gives error outside the development environment(not the seq error) , should work when you build and deploy your ear.
Hi All,
i have solved the application-j2ee-engine xml problem...now i have successfully created the .ear file.
when i went for deploying it through SDM, I got the following error:
06/07/13 12:22:25 - EAR file updated successfully for 128ms.
06/07/13 12:22:25 - Start deploying ...
06/07/13 12:22:26 - EAR file uploaded to server for 410ms.
06/07/13 12:22:27 - ERROR: Not deployed. Deploy Service returned ERROR:
java.rmi.RemoteException: Cannot deploy application sap.com/PWC_CustomerMeter_EAR_Prj..
Reason: Incorrect application sap.com/PWC_CustomerMeter_EAR_Prj:
Bean CustomerMeter: Cannot find home or component interfaces.; nested exception is:
com.sap.engine.services.deploy.container.DeploymentException: <--Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='com.sap.engine.services.ejb.exceptions.deployment.<b>EJBDeploymentException: Incorrect application sap.com/PWC_CustomerMeter_EAR_Prj:
Bean CustomerMeter: Cannot find home or component interfaces.</b>at com.sap.engine.services.ejb.deploy.verifier.Verifier.check(Verifier.java:66)
But when i used winzip to extract files from .ear file, i saw the .ejb file in it.........when i extracted the files from .ejb file......i found the following files in it:
ejb-j2ee-engine.xml
ejb-jar.xml
CustomerMeter.class
So why the SDM is not able to find this CustomerMeter class............Can anybody suggest..........<b>How to rectify this error so that the .ear can be successfully deployed.</b>
Thanks,
Rajeev Gupta
Hi All,
My ejb-jar.xml contents are as following:
<?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>CustomerMeter</ejb-name>
<ejb-class>pkgCustomerMeter.CustomerMeter</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
Thanks and Regards,
Rajeev Gupta
Hello Rajeev,
Change the ejb-jar.xml to as below:
<?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>CustomerMeter</ejb-name>
<ejb-class>pkgCustomerMeter.CustomerMeter</ejb-class>
<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>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
Hi Amit,
On changing the ejb-jar.xml as you said:
<?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>CustomerMeter</ejb-name>
<ejb-class>pkgCustomerMeter.CustomerMeter</ejb-class>
<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>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
But now on saving this xml, it is giving the following error:
<b>The content of element type "session" must match "(description?,display-name?,small-icon?,large-icon?,ejb-name,home?,remote?,local-home?,local?,ejb-class,session-type,transaction-type,env-entry,ejb-ref,ejb-local-ref,security-role-ref,security-identity?,resource-ref,resource-env-ref)".</b>
Could you please tell how to correct this error.
Thanks and Regards,
Rajeev Gupta
Hello Rajiv,
there was a small disorder in the XML which is not tolerated by system. Please use below XML:
<?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>
<enterprise-beans>
<session>
<description>EJB JAR description</description>
<display-name>EJB JAR</display-name>
<ejb-name>CustomerMeter</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>pkgCustomerMeter.CustomerMeter</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
This wil work !!
CHEERS
Amit
Hi All,
i deleted the prj completely......created a new ejb prj... then finally created a .ear file.....now my .ear file is successfully deployed as i can see in SDM Repository, my .ear filename............
my scenario is flat file - XML message in XI...i have used file content conversion in File sender adapter.
i included the module name in my communication channel as
Number Module Name Type
1 localejbs/CustomerMeter Local Enterprise Bean
2 localejbs/CallSapAdapter Local Enterprise Bean
i have activated the communication channel also.
but when i am giving the empty file, it simply gets deleted...but in the CustomerMeter java class, i have written a function to generate a dummy XML for empty file... i dont know whether my java function process is correct or not........
Can anybody suggest how to debug my EJB CustomerMeter java class in NetWeaver Developer Studio.....
How to find whether the module processor is calling the CustomerMeter EJB or not...........
Thanks and Regards,
Rajeev Gupta
Hi All,
Please reply to my above query.
i added audit log messages also to my java class file...
but still the audit log of the message is not showing the java class message......means java adapter module is either not getting invoked or java class process method is having some error in it - <b>So how can i find what is actually happening in the module pool processor for my message.</b>
Thanks and Regards,
Rajeev Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.