0

I had a RAD Server package ProjA.bpl with several endpoints and some of them use a unit called UntAccess.pas.
Now I created another server package ProjB.bpl with different endpoints than ProjA and adjusted emsserver.ini configuration file section [Server.Packages] to call both packages .

The problem appeared when EMS Server starts, it shows the following error message :

{"Thread":32068,"Error":{"Type":"Package","Filename":"C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\Win64\ProjDevAPI.bpl","Exception":"EPackageError","Message":"Cannot load package 'ProjB.bpl' It contains unit 'UntAccess.pas', which is also contained in package 'ProjA.bpl'"}}

How can I share same units among tow or more RAD Server .bpl packages ?

Environment : Delphi 10.4.2 , Windows 10

JRG
  • 513
  • 9
  • 23

1 Answers1

4

Create a new package containing that common unit (and probably more in the future). Then add this package as required to ProjA and ProjB.

Uwe Raabe
  • 45,288
  • 3
  • 82
  • 130
  • Thks Uwe. Let me try it. I'll back with the results. – JRG Sep 19 '22 at 16:37
  • thanks Sir. ! It worked now by following your instructions. I had to create a Delphi-package Package_X, putting on it all common units used in both RAD Server packages (.bpl) , then it generated a .dcp file into C:\Users\Public\Documents\Embarcadero\Studio\21.0\Dcp folder, then I went to each RAD Server package (.bpl) removed the common units and added this newly Package_X . It's working as expected now ! – JRG Sep 19 '22 at 19:50