cancel
Showing results for 
Search instead for 
Did you mean: 

how to access version of the deployed DC

Former Member
0 Kudos

Hi All,

I am working on a Java Webdynpro application that has several development components, as per a requirement I need to programmatically display the version of a DC that is currently deployed on the J2EE engine.

Does the Java Webdynpro provide us with an API to get this information or is there any other possible way to get this information.

Any suggestion would be of great help.

Many Thanks in Advance

Amit Kapoor

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Thanks for the quick and valuable response.

I tried adding SLUtil.jar to the Java Build Path of my Webdynpro DC and added the library reference also.

But as soon as I do a build, the SLUtil.jar disappears from the Java Build path.

The library reference remains however.

Any idea why this might be happening?

Then I created a new External Library DC and added the jar to it.

I added this Library DC to the Used DC’s list of my Webdynpro DC and I could use the API suggested by you and access deployment information.

But the problem is that I do not wish to create any NEW DC.

I could find SLUtil.jar at one more location

“C:\DocumentsandSettings\i038070\.dtc\0\DCs\sap.com\<b>tc\bi\anttasks</b>\_comp\gen\default\public\def\lib\java”

In our project whenever we need to use any JAR, what we do is to use the DC’s under the SC’s provided with the development configuration.

So I tried to add the DC <b>tc/bi/anttasks</b> under the SC <b>sap.com_SAP_BUILDT_1</b>

to the Used DC’s list of my WebDynpro DC but it throws me an illegal dependency error. I guess the reason could be that the DC tc/bi/anttasks is a build plug-in.

Could you please suggest me a DC (which has the required JAR ofcourse) that I can add to the Used DC’s list of a normal WebDynpro DC

OR

Any other JAR(having the required API)which is available under a DC that I could use.

Thanks for all the help!!!

Amit Kapoor

Former Member
0 Kudos

Hi Amit,

I face a similar illegal dependency problem when i try to add tc/bi/bp/portalapplication as used DC in my Web Dynpro DC.

Did you solve the illegal dependency problem?

Thanks

Ramesh

Former Member
0 Kudos

Hi Ramesh,

In my case, the DC that I was trying to use was a build plug-in, so it could not be used by a normal Web Dynpro DC for run time reference.

I am sorry but i am not aware what may be causing the problem that you are facing.

You may want to check for the dependency between the SC where your DC resides and the SC where tc/bi/bp/portalapplication resides and see if the d

dependency is well defined.

Many Thanks

Amit

former_member182372
Active Contributor
0 Kudos

Hi Amit,

1) Add "<NWDS_ROOT>/JDT/eclipse/plugins/com.sap.ide.eclipse.jarsap/lib/SLUtil.jar" to your`s project classpath

2) Add "tcSLUTIL" as "Library reference" (right click on WD project, select "Web Dynpro References", select "Library References", click "Add")

3) Put following code:


import com.sap.sl.util.components.api.ComponentElementIF;
import com.sap.sl.util.cvers.api.CVersFactoryIF;
import com.sap.sl.util.cvers.api.CVersManagerIF;

...
CVersManagerIF cversManager = CVersFactoryIF.getInstance().createCVersManager();
ComponentElementIF[] elementIFs = cversManager.readCVers("DC");
for (int i = 0; i < elementIFs.length; i++) {
	ComponentElementIF elementIF = elementIFs<i>;
	//use component information
}

Best regards, Maksim Rashchynski.