cancel
Showing results for 
Search instead for 
Did you mean: 

External JARs not available in runtime

Former Member
0 Kudos

Hi experts,

In NWDS 7.1 EHP1 I have a EJB project with a EJB Session Bean 3.0. I add external jars in the build path but these external jars are not available during runtime.

Is there any way to have this external jars available during runtime?

Thanks in advance

Pablo.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Maksim,

Thanks for your answer, but I already tried that. These libraries are already deployed and I referenced to them in my EJB, this way works fine but the failure comes when I try to deploy my EJB to the server.

So I tried two scenarios:

- EJB with external libraries --> runtime errors but able to deploy to the server (but webservice deployed returns runtime errors)

- EJB with dependecies --> no runtime errors (EJB works fine in local) but unable to be deployed to the server

Any idea what could I do?

Thanks in advance

Pablo

former_member182372
Active Contributor
0 Kudos

Pablo, deployment failure is due to incorrect reference (you have hard reference, right?). Please, post your application-j2ee-engine.xml and name of the library.

Former Member
0 Kudos

Hi Maksim,

Here you are the content of application-j2ee-engine.xml from EAR project

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

<application-j2ee-engine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="application-j2ee-engine.xsd">

</application-j2ee-engine>

And just in case, content of ejb-j2ee-engine.xml from the EJB project

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

<ejb-j2ee-engine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ejb-j2ee-engine_3_0.xsd">

</ejb-j2ee-engine>

Libraries i'm using are: mdm-admin.jar, mdm-common.jar, mdm-core.jar, mdm-data.jar, mdm-extension.jar, mdm-protocol.jar and mdm-publishing.jar

Not sure what's the prefered option, if use these libraries as external jars or add to my project as dependency

Thanks a lot in advance

Pablo

former_member182372
Active Contributor
0 Kudos

Try to change it to


<application-j2ee-engine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="application-j2ee-engine.xsd">
	<reference reference-type="hard">
		<reference-target target-type="library">MDM4J</reference-target>
	</reference>
</application-j2ee-engine>

Former Member
0 Kudos

Hi Maksim,

Thanks a lot, it worked fine!

I had to add also the package because deployment was not working without it

<application-j2ee-engine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="application-j2ee-engine.xsd">

<reference reference-type="hard">

<reference-target target-type="library">com.sap.mdm.tech.mdm4j</reference-target>

</reference>

</application-j2ee-engine>

Best regards

Pablo

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos

You have to create external library and deploy it to the server and after that reference it.

For example

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60d99678-1a29-2d10-94b4-9d9a67b71...