cancel
Showing results for 
Search instead for 
Did you mean: 

Question about Java DCs

Former Member
0 Kudos

Hello,

i've got a Java DC using JCO to connect to SAP. The DC is used by a Web Dynpro DC to call the SAP Backend. It all works fine.

But now my question: Is there a possibility to test the Java DC standalone? I always get NoClassDefFound-Exception when I try to open a connection. The Public Parts(jco) of SAP JEE are used in my Java DC.

Greetings,

Geert

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Geert,

to get the negative stuff out of the way: No, as far as I know there is no possibility to test the Java DC in a standalone way.

The public parts of SAP JEE theoretically contain only API - there are provided for a build-time environment (read: classpath for compilation), there is no guarantee that they contain all classes required for a runtime environment (i.e. to execute the stuff).

For execution JCO requires some native libraries that are not part of SAP-JEE. In addition there is probably smoe configuration provided by the engine. All of this is missing if you try to execute the code in your Java DC without the engine.

What would be possible is to wrap the Java DC in a J2EE Server Component/Library so that your code is executable within the engine and then do some tests in that environment - but that's probably not very sensible if you already have the WebDynpro application running on the engine.

Alternatively you could install JCO on your development machine (i.e. including native stuff) and set up an appropriate test configuration in NWDS.

Regards,

Marc

Answers (1)

Answers (1)

Former Member
0 Kudos

Actually your DC setup is incorrect: You should not be using a Java DC to call a SAP Backend if you need to access it from a Web Dynpro. You should create Adaptive RFC models inside the Web Dynpro DC instead.

If you need to share these RFC connections amongst multiple Web Dynpro DCs, you should create a separate Web Dynpro DC that contains the models and publish these in its public part(s). Then use this public part in the other Web Dynpro DCs.

Former Member
0 Kudos

Good point.

Using JCO directly from a Java DC probably only makes sense if you really want to use it in some kind of standalone application - but then you also have to worry about load balancing, number of available connections, etc.