0

I have a requirement to automate the process of connecting to PowerDesigner through java to extract the models from repository. I have used the OLE Automation JavaProxy document to configure the process.

when trying to run, I'm getting this error:

Exception in thread "main" java.lang.NoSuchMethodError: org.eclipse.swt.internal.ole.win32.COM.CoCreateInstance(Lorg/eclipse/swt/internal/ole/win32/GUID;IILorg/eclipse/swt/internal/ole/win32/GUID;[I)I at com.sybase.stf.powerdesigner.PdCommon.Application.start(Application.java:57) at com.sybase.stf.powerdesigner.PdCommon.Application.(Application.java:31) at com.sybase.stf.powerdesigner.PdCommon.Application.getInstance(Application.java:42) at OOM.src.createOOM.CreateOOM.CreateAndDisplayOOM(CreateOOM.java:37) at OOM.src.createOOM.CreateOOM.main(CreateOOM.java:28)

Versions:

  • PowerDesigner - 16.5.5.0
  • Eclipse 4.18

Supporting Jars:

  • pdj2com_16.5.5.jar
  • org.eclipse.swt.win32.win32.x86_64_3.115.100.v20201202-1103.jar

The above issue is resolved Thanks!

Now i'm facing trouble connecting again with the below issue.

org.eclipse.swt.SWTException: Action can not be performed. result = -2137456383 (com.sybase.stf.powerdesigner.com.COMException: COM Failure [HRESULT: 0x80990101]) at org.eclipse.swt.ole.win32.OLE.error(OLE.java:345) at com.sybase.stf.powerdesigner.com.COMException.raiseOnFail(COMException.java:83) at com.sybase.stf.powerdesigner.com.IDispatchEx.raisingInvoke(IDispatchEx.java:231) at com.sybase.stf.powerdesigner.PdCommon.IApplication.CreateModel(IApplication.java:84) at OOM.src.createOOM.CreateOOM.createOOM(CreateOOM.java:68) at OOM.src.createOOM.CreateOOM.CreateAndDisplayOOM(CreateOOM.java:42) at OOM.src.createOOM.CreateOOM.main(CreateOOM.java:28) Caused by: com.sybase.stf.powerdesigner.com.COMException: COM Failure [HRESULT: 0x80990101] at com.sybase.stf.powerdesigner.com.COMException.raiseOnFail(COMException.java:88) ... 5 more Is there anything else to add to the code to connect?

I am not able to find any solution online. Kindly help me figure this out. Thanks in advance.

Darla
  • 75
  • 1
  • 2
  • 11

1 Answers1

1

The swt.win.win32.x86_64 jar is for 64-bit, so I assume you're using a 64-bit Java.

In my case, the pdj2com jar is named something like pdj2com_16.N.Nx64.jar for the 64-bit version. pdj2com_16.N.N.jar is the name of the 32-bit version.

pascal
  • 3,287
  • 1
  • 17
  • 35
  • This did help in resolving, Thanks so much! – Darla Jul 05 '21 at 03:55
  • i have added another error that is preventing me from connecting or creating a model in power designer, Can you kindly take a look at it and suggest. – Darla Jul 05 '21 at 06:12