on 09-04-2006 3:48 PM
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
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 DCs 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 DCs under the SCs 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 DCs 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 DCs 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.