danieleteti / delphimvcframework

DMVCFramework (for short) is a popular and powerful framework for WEB API in Delphi. Supports RESTful and JSON-RPC WEB APIs development.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Standalone Server Does Not Work Properly When Compiled in Runtime Package Mode

marcosnielsen opened this issue · comments

Hello,
I'm working with TNullabes type serialization
based on the example: "samples \ renders_spring4d_nullables \ renders_spring4d_nullables"
and custom serialization works perfectly.

But the DMVC presents a problem in serialization when I try to use packets at runtime:

Explanation:
I create a new default standalone server by wizard,
when you enable the Runtime package = true option,
I add the following BLPs in the package list:
loggerproRT, dmvcframeworkRT, dmvcframeworkDT.

Then I run the application and the following errors occur:
1 - The system does not generate the log files: logs \ StandAloneServer.00.dmvcframework.log
2 - Standalone Server does not recognize TCustomTypesSerializers classes.

but if I run the same server with Runtime option package = False;
DMVS generates the log file and writes the log of the serialized types:
see example of my StandAloneServer.00.dmvcframework.log:
...
2019-07-17 10: 56: 50: 043 [TID 14452] [DEBUG] Registering TypeSerializer for: Nullable <System.Integer> [dmvcframework]
2019-07-17 10: 56: 50: 043 [TID 14452] [DEBUG] Registering TypeSerializer for: Nullable <System.Currency> [dmvcframework]
2019-07-17 10: 56: 50: 043 [TID 14452] [DEBUG] Registering TypeSerializer for: Nullable <System.Double> [dmvcframework]
...
The renders_spring4d_nullables example also does not work with "Runtime package = true"

Thanks for listening.

Att
Marcos Nielsen.

I use Delphi 10.3 update 1 Professional
and tested the same example in delphimvcframework 3.1.0 and branche delphimvcframework-master 3.1.1

Hi, can you try to put the required packages in the application folder and run the app?

Hello Danielli
I tried this, but it did not work.
I believe the problem is with regard to packet loading.
When doing the requested test with the packages in the same directory I noticed that the package dmvcframeworkRT.bpl is not loading.
only the dmvcframeworkDT and loggerproRT packages were loaded.

I am sending the delphi load modules print and the list of packages marked for runtime.

Packages loadeds

Runtime pakages list

Any news using 3.2 RCs?

Hello!
I remake this teste with ** DMVCFramework Server ** build 3.2.0 (boron) RC4,
But I have same error again!

However, if you need nullables, you can use the new mvcframework.nullables.pas

We cannot reproduce this problem. Our DMSContainer is a project which uses dmvcframework as run-time linked package (directly and indirectly). Is this your situation?

Hello, I tested again with the current repository and this error no longer occurs

Thank you!