on ‎2014 Jun 23 10:58 AM
Hi All,
After upgrading to the 64bit version of PowerDesigner I could no longer connect to PowerDesigner using Java. Ultimately it was a problem which I could only fix by modifying the jar file with the interop that comes with PowerDesigner. The interop in the installation is a 32bit version. Using this with a 32bit JVM and 32bit Eclipse library version resulted in an error telling me that PowerDesigner was not installed. Using it with the 64bit JVM and Eclipse libraries resulted in another error telling me that the function was not found.
Has anyone had similar problems using Java to connect to PowerDesigner? I have logged an incident with SAP but there is no solution yet from them.
If you have please respond, so I can make a better case for fixing it 🙂
Best regards,
Marcel
Request clarification before answering.
how do you connect to powerdesigner with java? can you give some more details?
via the Eclipse Plugin???
regards
dj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dirk,
I connect from plain Java. I use Eclipse as the IDE and the PowerDesigner interop uses the COM library from Eclipse.
If you follow the instructions from the document in the installation folder of PowerDesigner under: "Ole Automation\Java Samples\JavaProxy.doc" it used to work without a problem with the 32bit version.
The code can be something like this (see the samples in the folder as well):
import org.eclipse.swt.internal.ole.win32.COM;
import com.sybase.stf.powerdesigner.PdCommon.Application;
import com.sybase.stf.powerdesigner.PdPDM.Model;
public class Test {
public static void main(String[] args) {
int hr = COM.OleInitialize(0);
try{
Application pdApp = Application.getInstance();
if (pdApp != null){
Model model = new Model(pdApp.GetActiveModel());
System.out.println("Active model code: " + model.GetCode());
}
}catch (Exception e) {
System.out.println("Something went wrong.");
}finally {
if (hr == COM.S_OK)
COM.OleUninitialize();
}
}
}
The above prints the code of the model that is currently active in PowerDesigner.
Best Regards,
Marcel
Hi Schot,
I am trying to get the detaisls of a model in PD, But I am not able to get the details of active model.It is throughing error , No active model opend.
How to connect the reposotory of Powerdesigner from Java api?there is any way that we could enter server details?
Could you please help if you know this . Thank you.
Regards,
Sri.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.