Book a Demo

Author Topic: Accessing Repository from Java fails  (Read 2908 times)

Motorpsycho

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Accessing Repository from Java fails
« on: July 17, 2008, 07:54:29 am »
Hello, i am having trouble accessing my database stored models from JAVA. I can connect to the database and open the repository but access to models, packages or elements only returns "null". See the following code snippet:


DatabaseRepository = new org.sparx.Repository();
DatabaseRepository.OpenFile("eap --- DBType=0;Connect=Provider=MSDASQL.1;Persist Security Info=False;Data Source=eap");

DatabaseRepository.GetLatestUpdate(); // works => Repository is ready and opened

Collection<org.sparx.Package> models = DatabaseRepository.GetModels();  // always returns "null" though there are models existing

org.sparx.Package p = DatabaseRepository.GetPackageByGuid("<guid>"); // returns "null" if <guid> is existing, else throws java.lang.exception

I didn't had this problem with 6.x release of EA. Anyone any idea what i might be missing?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Accessing Repository from Java fails
« Reply #1 on: July 17, 2008, 08:26:22 am »
There was a problem with the early 7.1 builds that caused this.  The latest build should fix your problem.  (And searching would have helped you get this answer sooner...)
« Last Edit: July 17, 2008, 08:26:43 am by simonm »