Author Topic: Java API: java.lang.NoSuchMethodError for GetTreeSelectedElements  (Read 2463 times)


  • EA User
  • **
  • Posts: 38
  • Karma: +0/-0
    • View Profile

I guess I don' see teh forest for the trees...  But I need urgent suggestion

In my HybridScript I added support for baseline nad did static on most "constants" I defined inside my script

org.sparx.Package packageSel = m_repository.GetTreeSelectedPackage();
m_repository.GetProjectInterface().CreateBaseline(packageSel.GetPackageGUID(),startDate, baseLineNoteStr + startDate);

 and first time all works right, but suddenly I get following crash message...

java.lang.NoSuchMethodError: Unable to find GetTreeSelectedElements
at org.sparx.Repository.comGetTreeSelectedElements(Native Method)
        at org.sparx.Repository.GetTreeSelectedElements(
        at SparxSystems.RepositoryInterface.syncEaWithPtcData(
        at SparxSystems.RepositoryInterface.main(
[Loaded java.lang.Shutdown from shared objects file]
[Loaded java.lang.Shutdown$Lock from shared objects file]

I deleted the libs eaapi.jar and SSJavaCOM.dll inside my local "lib"-package, but nothing changes.


  • EA Guru
  • *****
  • Posts: 12841
  • Karma: +367/-296
  • I'm no guru at all
    • View Profile
Re: Java API: java.lang.NoSuchMethodError for GetTreeSelectedElements
« Reply #1 on: May 08, 2017, 11:42:55 pm »
The GUID needs to be converted to XML format. See the appropriate GetProjectInterface operations.