I could use a little hand with utPLSQL.
I am trying to produce the test results so that Sonar would pick it up and scan them. so far, Sonar is picking up the report file, but the test executions are ignored because they are not referencing to the appropriate source files.
I am trying to make a reference to the source and test files when running ut.run(ut_sonar_test_reporter()); and our Jenkins does not have utPLSQL-cli installed. Short version: They said they will not install it.
To get a result for a single test, I tried the following:
spool sonar_results.xml;
exec ut.run('test_get_something');
exec ut.run(ut_sonar_test_reporter(), a_source_file_mapping => ut_file_mappings(ut_file_mapping(file_name => 'this_dir/get_something.fnc', object_owner=> 'GET_SOMETHING_OWNER', object_name=> 'GET_SOMETHING', object_type=>'FUNCTION'));
spool off;
And got the following error message:
Error starting at line : 4 in command -
BEGIN ut.run(ut_sonar_test_reporter(), a_source_file_mapping => ut_file_mappings(ut_file_mapping(file_name => 'this_dir/get_something.fnc', object_owner=> 'GET_SOMETHING_OWNER', object_name=> 'GET_SOMETHING', object_type=>'FUNCTION'));
Error report -
ORA-06550: line 1, column 219:
PLS-00306: wrong number or types of arguments to call to 'RUN'
ORA-06550: line 1, column 219
PL/SQL: Statement ignored
utPLSQL's documentation doesn't provide anything about referencing parameters like a_source_file_mapping or a_test_file_mapping.
I am a little stumped.
I wanted to name this post Make SQLite abort on first error but StackOverflow's AI overlords decided it doesn't fit their conception of intelligent human behavior. For the record, I was googling exactly that, but perhaps even Google AI considered my question unworthy and didn't bother to help me. Mods, feel free to change the title according to what your AI bosses desire (if you can figure it out).
I have this script
create if not exists table entries (
id integer primary key,
start datetime not null,
end datetime not null
);
delete from entries;
insert into entries values (1, '2018-08-01 10:00', '2018-08-01 15:00');
insert into entries values (2, '2018-08-01 17:00', '2018-08-01 20:00');
insert into entries values (1, '2018-08-02 19:00', '2018-08-02 00:00');
insert into entries values (1, '2018-08-03 00:00', '2018-08-03 04:00');
insert into entries values (1, '2018-08-03 14:00', '2018-08-03 18:00');
There is a mistake in create statement. When I run the script I get
% sqlite3 db.sqlite3 <ddl.sql
Error: near line 1: near "if": syntax error
Error: near line 7: no such table: entries
Error: near line 8: no such table: entries
Error: near line 9: no such table: entries
Error: near line 10: no such table: entries
Error: near line 11: no such table: entries
Error: near line 12: no such table: entries
How do I make SQLite exit executing the script on first error it encounters? I'm looking for equivalent of set -e in Bash.
From the documentation, it looks like you can turn on the dot command .bail.
.bail on|off Stop after hitting an error. Default OFF
See also - O'Reilly Using Sqlite
Edit
To exit, you can use the .exit dot command.
The log shows there is duplicated columns, insert will fail.
[Aug 29 08:14:42] DEBUG[8683] cel_pgsql.c: Inserting a CEL record: [INSERT INTO cel ("id","eventtype","eventtime","userdeftype","cid_name","cid_num","cid_ani","cid_rdnis","cid_dnid","exten","context","channame","appname","appdata","amaflags","accountcode","peeraccount","uniqueid","linkedid","userfield","peer","id","eventtype","eventtime","userdeftype","cid_name","cid_num","cid_ani","cid_rdnis","cid_dnid","exten","context","channame","appname","appdata","amaflags","accountcode","peeraccount","uniqueid","linkedid","userfield","peer") VALUES (DEFAULT,'CHAN_END','2017-08-29 08:14:42.167195','','9004','9004','9004','','9001','9001','public','SIP/9004-00000008','','',3,'','','1503994474.12','1503994474.12','','',DEFAULT,'CHAN_END','2017-08-29 08:14:42.167195','','9004','9004','9004','','9001','9001','public','SIP/9004-00000008','','',3,'','','1503994474.12','1503994474.12','','')].
alp-test*CLI> core show version
Asterisk 14.4.1 built by buildozer # build-3-6-x86_64 on a x86_64 running Linux on 2017-05-22 06:13:12 UTC
There is no update for cel_pgsql from 2015
cel_pgsql.conf
[global]
hostname=127.0.0.1
port=5432
dbname=ast
password=ast
user=ast
table=cel
cel.conf
[general]
enable=yes
apps=dial,park
events=APP_START,CHAN_START,CHAN_END,ANSWER,HANGUP,BRIDGE_ENTER,BRIDGE_EXIT
Because I load cel_pgsql.so two times, after remove preload => cel_pgsql.so everything is fine.
I have imported same dbdump on 2 machines. When, I execute an sql, I see 2 different values.
select struct_doc_id, START_DATE, END_DATE from structured_doc where struct_doc_id = 1329 order by START_DATE;
Machine1:
1329 31-03-11 09:00:00.000000000 PM 01-01-16 08:59:59.999000000 PM
1329 01-04-11 12:00:00.000000000 AM 31-12-15 11:59:59.999000000 PM
Machine 2:
1329 01-04-11 12:00:00.000000000 AM 31-12-15 11:59:59.999000000 PM
1329 01-04-11 12:00:00.000000000 AM 31-12-15 11:59:59.999000000 PM
Also, I executed the sql:
select dbtimezone, sessiontimezone, systimestamp, current_timestamp
from dual;
and the results on both the machines are:
Machine 1:
-07:00 Asia/Calcutta 09-02-16 02:15:55.422190000 AM -08:00 09-02-16 03:45:55.422204000 PM ASIA/CALCUTTA
Machine 2:
-07:00 Asia/Calcutta 09-02-16 05:23:20.703408000 AM -05:00 09-02-16 03:53:20.703418000 PM ASIA/CALCUTTA
Note: I have 2 database running on 2 different machines.
Can anyone please tell me what may be the possible reasons for the difference in the values while running first sql?
As i can see it might be one reason for that :
Check the datatype of the column structured_doc is it :
"timestamp" or "timestamp with local timezone","timestamp with timezone".
Oracle will automatically ajust the date provided, according the session's attributes of the client.
I guess you're executing the import remotely in one database, and locally in the other.
Best Regards
I have created a report in AX 2012 and Visual Studio properly but once I try to open it the following list of erors appears:
Thank you
Error executing code: FormRun (data source) has no valid runable code in method 'new'.
Stack trace
(C)\Classes\FormRun\new
(C)\Classes\SysSetupFormRun\new - line 4
(C)\Classes\ClassFactory\formRunClassOnClient - line 10
(C)\Classes\ClassFactory\formRunClass - line 24
(C)\Classes\DialogForm\doInit - line 12
(C)\Classes\Dialog\doInit - line 12
(C)\Classes\Dialog\doRun - line 24
(C)\Classes\SysOperationDialog\run - line 12
(C)\Classes\SysOperationController\dialogShow - line 6
(C)\Classes\SysOperationController\dialogRun - line 40
(C)\Classes\SysOperationController\prompt - line 9
(C)\Classes\SrsReportRunController\runToScreen - line 26
(C)\Classes\SrsReportRunController\runReport - line 68
(C)\Classes\SrsReportRunController\run - line 27
(C)\Classes\SysOperationController\startOperation - line 10
(C)\Classes\SrsReportRunController\startOperation - line 12
To me, this is mostly base code, so it's a compile or CIL-compile issue most likely.
Have you compiled your CIL or performed an incremental CIL compile?
Refresh your report caches (Tools>Caches>Refresh Report Server).
Are the WCF settings in the AXC used for the report server refreshed?
Is the report server using a specific AXC that may not be refreshed? (https://technet.microsoft.com/en-us/library/hh389774.aspx)
You can find that the issue is with form (as the infolog suggest). The name of the form can be found out if you debug the code in classes.
Try putting debugger on DialogForm.doInit(). In this method, you can find the name of the form in the object variable, "form", used inside this method in a call to args.object(form).
You have to compile this form; Restore it and report does get generated.
Remember, DialogForm.doInit() gets called 2 times, Once, launching input UI form and another when trying to launch report viewer. So if the input/contract form is getting opened and the error comes before showing the report output, its the second time when you are interested to find the name of the form.
In my case, culprit forms were, SysOperationTemplateForm and SRSReportViewer form.