cancel
Showing results for 
Search instead for 
Did you mean: 

Deploy External jars to Java Engine

0 Kudos

Hi Guys

I have developed adapter module which will be used in the receiver FTP channel to delete files in the FTP directory. I have done core testing in NWDS and working fine. For the FTP functionality I have used the following imports which are part of external jar commons-net-ftp-2.0.jar.

import org.apache.commons.net.ftp.FTPClient;

import org.apache.commons.net.ftp.FTPFile;

I have also made the entry in application-j2ee-engine.xml as follows

<reference 
	reference-type="hard">
	<reference-target 
	provider-name="apache.com" 
	target-type="library">org.apache.commons.net.ftp.FTPClient</reference-target>
	</reference>
}<reference 
	reference-type="hard">
	<reference-target 
	provider-name="apache.com" 
	target-type="library">org.apache.commons.net.ftp.FTPFile</reference-target>
	</reference>


When I create EAR file and deploy it in J2EE engine i am getting following error

Application [JavaEE/FileDeletion_EAR] cannot be started. Reason: it has hard reference to resource [apache.com~org.apache.commons.net.ftp.FTPClient] with type [library], which is not active on the server.
Hint: 1) Is referred resource deployed? 2) Is referred resource able to start?

Looks like even though my EAR contains the external jar and being made the entry in application-j2ee-engine.xml, the external jar is not getting deployed properly.

I have gone through some post which reference external jars but could not comprehend that well. I also went through following thread and a blog in about creating jar Library

Following is my NWDS version

SAP NetWeaver Developer Studio

SAP NetWeaver 7.1 Composition Environment SP05 PAT0000

Build id: 200802231406

We are on SAP PI 7.1.1 EHP1

Can you guys throw some light into this issue..

Any Suggestions Please

Edited by: Kishore on Dec 1, 2010 12:16 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Please look at below weblog links. They are explaining how to create external library DC and use in a project.

/people/raphael.vogel/blog/2008/05/05/how-to-use-external-libraries-in-the-sap-component-model-part-i

/people/raphael.vogel/blog/2008/05/05/how-to-use-external-libraries-in-the-sap-component-model-part-ii

Kind regards,

Altuğ Bayram

RKothari
Contributor
0 Kudos

Hi Kishore,

Can you try the method given in the weblog /people/andreas.seifried/blog/2007/01/18/referencing-the-mdm-java-api-during-development-and-runtime? Hope it solves your problem.

Regards,

Rahul