You are not logged in.
Hi,
Is there a project sample somewhere ? if not maybe someone have one helloworld project to share on Github
?
So the problem should be elsewhere.
Look like in Zeoslib, see comment on line 4640 of the file "ZDbcMetadata.pas" (zeoslib 7.2.10):
{**
Set the Wildcards character for WildcardsArray variable.
Overrride this method if the wildcards character is different in other database
}
procedure TZAbstractDatabaseMetadata.FillWildcards;
begin
SetLength(WildcardsArray,2);
WildcardsArray[0]:='_'; //<---- seems to be a trublemaker, no idea how to test it with our tests. See http://zeoslib.sourceforge.net/viewtopic.php?f=40&t=13184
WildcardsArray[1]:='%';
end;If you read the post following the link, you will find a workarround and a discussion there: https://zeoslib.sourceforge.io/viewtopi … 2&p=160450
Okay, tried with your sample and I can confirm then.
Just to say that it works on my side on Delphi 10.4.2 pro.
The only things I have to fix afterward, it's the included units (still generate "unit uses" from mORMot v1) :
uses
SynCommons,
mORMot;and to comment the TTextWriter initialization :
// TTextWriter.RegisterCustomJSONSerializerFromText
[...]Compiled / run successfully on Delphi Sydney 10.4.2
Thanks for QuickJS ![]()
Just a small question to be sure, as the last post here is from 2017, the EWB book 2nd edition is about mORMot too, right ?
Oke @ab, thanks you.
Downloading the source and the static files version 3.34.1 from there : https://github.com/synopse/mORMot2/releases
ask for the 3.34.0 static files when running an executable, is this expected ?

Currently for Windows instances we always create a copy of a active log file before opening it in LogView to prevent such unexpected errors
Thanks you @mpv, that's what I ended doing ![]()
Thanks for the hint @ab, I reproduced it, in fact, I was opening the log file with the LogViewer while the soft was running.
Hello all,
Two hours ago I suffered a "crash" and I am trying to find the culprit (me for sure
) as I am quite new to this framework.
Note: It is possible that timeout are misconfigured and that I misunderstand the flow of the session expiration/client re-connection even if everything can run a week without any error or interruption
The setup is the following:
- Clients and server are built on mORMot2
- a database server (MariaDB 10) on a Windows server
- the (mORMot) server is an instance of TSQLHttpServer and hosted on the same computer as the database server
- the (mORMot) clients (~83 in the wild) are instance of TRestHttpClient and run on Windows 7 embedded
----------------
Server definition and timeout (maybe wrong and I should set it to a greather value) :
constructor TSagasServer.Create(Props: TSQLDBZEOSConnectionProperties);
var
Conn: TSQLDBConnection;
begin
fProps := Props;
fProps.ConnectionTimeOutMinutes := 1;
[...]
end;Client definition and timeout (3000 ms)
fClient := TRestHttpClient.Create(AnsiString(SERVER_URL), PORT_NAME, fModel, false, '', '', 3000, 3000, 3000);----------------
Suddenly, all the clients (~83) disconnected at the same time (by timeout ? from what I see in the client logs) :
> 16/03/2021 08:55:00.496 Exception EWinHttp {Message:"winhttp.dll error 2EE2 (timeout)"} [] at 6af783 stack trace API (TZOracleConnection.PingServer)
And on the server side, 15 seconds before (at 08:54:46) :
> 3/16/2021 08:54:45.944 Enter mormot.rest.sqlite3.TRestServerDB(02b56e10).URI PUT root/Capteurs/10?session_signature=258902d3016d2b0916971c8c in=464 B
> 3/16/2021 08:54:45.944 User auth mormot.rest.server.TRestServerRoutingRest(0308cba0) kingspark/629736147 1.2.3.4
> 3/16/2021 08:54:45.944 SQL mormot.db.sql.zeos.TSqlDBZEOSStatement(02b76530) ExecutePrepared 1.42ms wr=1 update Capteurs set NumeroConcessionnaire=0,NumeroParking=15,NumeroBorne=1,Etat_Monetique=0,Etat_CB=0,Etat_Imp_Sortie=0,Etat_Imp_Sortie_Papier=0,Etat_Imp_Sortie_Papier_Low=0,Etat_Laser_Entree=1,Etat_Laser_Sortie=0,Etat_Imp_Entree=1,Etat_Imp_Entree_Papier=0,Etat_Imp_Entree_Papier_Low=0,Barriere_Entree_Open=0,Barriere_Sortie_Open=0,Type_SIP=0,Etat_Connexion_SIP=0,WatchDog=0,WatchDog_UserStop=0,Update_time='2021-03-16 08:54:36',Site_Link=0 where ID=10
> 3/16/2021 08:54:45.944 Server kingspark 1.2.3.4 PUT root/Capteurs Write=200 out=0 B in 1.56ms
> 3/16/2021 08:54:45.944 Leave 00.001.574
> 3/16/2021 08:54:46.240 Enter mormot.rest.sqlite3.TRestServerDB(02b56e10).URI POST root/UpdateService.Get?session_signature=258902850056589b9976698e in=46 B
> 3/16/2021 08:54:46.240 User auth mormot.rest.server.TRestServerRoutingRest(0308cba0) kingspark/629736069 1.2.3.4
> 3/16/2021 08:54:46.240 Service call mormot.rest.sqlite3.TRestServerDB(02b56e10) IUpdateService.Get[{numeroParking:15,numeroBorne:3,typeBorne:1}]
> 3/16/2021 08:54:46.288 New run ==================================================
3/16/2021 08:54:52.208 Exception EHttpApiServer {LastError:1229,LastApi:"hSendHttpResponse"} [HttpSvr 61337 root THttpApiSvr] at 6c3aa7
About this last error exception, I read on this forum that it could be a timeout misconfiguration..
And the really strange part (to me) is the "New Run" event which poped multiple times each 100ms on the server side - I don't really know at this time what this mean.. please see the following pastebin log file :
> https://pastebin.com/9ZL8ndxj
----------------
To get back running everything, I paniked and restarted the server manualy, the first time I was still getting the execption ERROR_CONNECTION_INVALID.
Any hint please ? What I can/should add to this post so it will be more clear to you and easier to help ?
Thanks yo guys, have a nice day.
Note that the ORM with external DB has not be fully validated yet.
Feedback is welcome, because it is hard to validate on all DB/Library/OS combinations out there...
Thanks @ab,
I will test with external db and I will report it.
Awesome, does it mean I can clone the project and recompile my fresh project under mORMot 2 ?
Ok I understand much better. I know it's not ready for production, I am testing it and preparing myself for the release, as well contributing by reporting bugs.
Thanks Arnaud for the answer and again for the work put in Mormot.
Hello,
I am new here and I adopted a Mormot v1 some weeks ago and I must say that I am astonished by the strength and the simplicity of the framework
I started to port a - still small - project to Mormot v2 and I ran into an AV when running the program (quite simple), it look like it's related to Zeos and not Mormot but as I am a beginner with Mormot I prefer to ask/post first here.
My setup :
- fresh Delphi Sydney 10.4.1 install (tested on earlier version 10.4 and found a post here in this forum about a compiler bug reported which should have been fixed in 10.4.1)
- fresh clone of mormot2
- latest ZeosLib 7.2.8 (also tested old version)
I can compile and run the test without any issue. But once I try to use external MariaDB database with ZeosLib (it works fine with Mormot v1 and Zeos 7.2.8)
So starting with the following code :
begin
var
Props: TSQLDBZEOSConnectionProperties;
aPassword: RawUTF8; // aPassword is set on command line
Props := TSQLDBZEOSConnectionProperties.Create(RawUTF8('zdbc:mysql://localhost:3306/mydatabase?username=mylogin;password=' + aPassword), 'mydatabase', 'mylogin', aPassword);
[...]
end;It compile fine, but when running the program crash there :
procedure ClassToText(C: TClass; var result: RawUTF8);
var
P: PShortString;
begin
if C = nil then
result := ''
else
begin
P := PPointer(PtrInt(PtrUInt(C)) + vmtClassName)^;
FastSetString(result, @P^[1], ord(P^[0])); ❌
end;
end;The call stack :
Any hint ?
Thanks Arnaud and all contributors for this framework ![]()