cancel
Showing results for 
Search instead for 
Did you mean: 

Subject: How to reference standard SAP DC to a Java DC

Former Member
0 Kudos

Hello SAP Java Gurus:

At our client, we have a

a) Java DC -- contains some business logic

b) extlibs DC -- contains external Jar files

c ) ejb DC -- contains session beans EJB

d) ear DC -- for bundling a, b, c

Java DC, ejb DC both use extlibs DC so, accordingly

public parts were exposed out of extlibs DC and 'Used

DC' relation was established between a-c, and c-b.

The purpose of ear DC is just to bundle a, b, c and

deploy them to the server. So we created public parts

of a, b, c and then created 'Used DC' relationship btwn

d and a, b, c. Everything is compiling, deployed and

working fine.

Now, we added a new functionality in to a)Java DC

which needed some two new standard SAP delivered

DCs (1) Connector.jar -- j2eeca

(2)GenericConnector.jar --- tc/conn/connectorframework

So, we added these standard DCs as 'Used DC' to Java

DC for both build time and runtime(strong). The code

compiled well and when deployed and run, it is giving

an exception "java.lang.NoClassDefFoundError:

com/sapportals/connector/ConnectorException".

This class and package structure exists in the standard

SAP DC -- tc/conn/connectorframework. This was

given as both build time and runtime(strong) reference

to Java DC !! Why the code in Java DC is failing to use

it during the runtime ??

To do some testing, we gave the same build time and

runtime references to those two standard SAP DCs to

the other two DCs too, i.e., ejb DC and ear DC, but

no use, same error.

Does anyone have any ideas over this ?

Your suggestions are highly appreciated.

Best Regards,

Prasad Nutalapati

Accepted Solutions (1)

Accepted Solutions (1)

snehal_kendre
Active Contributor
0 Kudos

Hi prasad,

Open application-j2ee-engine.xml

and add library/service reference as

sap.com/tc/conn/connectorframework

the refernce may be library or service or sharing. please do as per your requirment.

for this check the DC tc/conn/connectorframework in development configuration perspective. where you can see the type of DC. i.e. it is library of service

this will solve the problem.

Former Member
0 Kudos

The problem was already solved.

The problem is that the Java DC is deployed via the EARu2026so it gets the runtime linkage via the EAR linkages to Jars/Libraries on the AS Java. To do this you need to set these linkages or references on the EAR DCu2019s application-j2ee-engine.xml. There you can make references to libraries/services/interfaces on the AS Java that contain the APIs of the DCs mentioned.

This solution does only work for 7.0 AS Javau2026if it is a 7.1 AS Java then the above will not be true sine things have changed there.

Thanks,

Prasad

Answers (0)