Skip to Content
0
Former Member
Apr 08, 2008 at 11:26 AM

Adding External Jars in Module development

150 Views

Dear Friends,

Actually i am adding an external Jar file in my EJB Module in NWDS.I am using this jar file for converting XML to flat file and i am calling this module from Receiver ommunication channel.For this process, i am importing dom4j.jar file in the EJB Module.I have created a jar file for that module,

Now i have created an external Library project for the cause that i have used the external jar file, and i have made following code in the provider.xml file

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

<!DOCTYPE provider-descriptor SYSTEM "library.provider.dtd">

<provider-descriptor>

<display-name>

XML2EDI_Library

</display-name>

<component-name>

XML2EDI_Library

</component-name>

<major-version>6</major-version>

<minor-version>40</minor-version>

<micro-version>0</micro-version>

<provider-name>

dom4j.org

</provider-name>

<references>

<reference

provider-name="dom4j.org"

strength="weak"

type="library">org.dom4j.Document</reference>

<reference

provider-name="dom4j.org"

strength="weak"

type="library">org.dom4j.DocumentException</reference>

<reference

provider-name="dom4j.org"

strength="weak"

type="library">org.dom4j.Element</reference>

<reference

provider-name="dom4j.org"

strength="weak"

type="library">org.dom4j.io.SAXReader</reference>

</references>

<jars>

<jar-name>EDI_Module.jar</jar-name>

</jars>

</provider-descriptor>

I have included 4 references because i have imported following in my ejb module.

import org.dom4j.Document;

import org.dom4j.DocumentException;

import org.dom4j.Element;

import org.dom4j.io.SAXReader;

I am not sure of wht to include in reference target and provider name, I am getting the following exceptions in Message monitoring:

1. AO: Document Exception: org.dom4j.DocumentException: E:\usr\sap\BWS\DVEBMGS00\j2ee\cluster\server0\

2. Nested exception: E:\usr\sap\BWS\DVEBMGS00\j2ee\cluster\server0\

Help me in this issue..

Thanks in advance

N.Jayanth Kumar