Project

General

Profile

Feature #4384

Builtin OO Implementation

Added by Roger Borrello over 4 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD

p2j.dll - Trunk based(rev 11342) 64-bit (186 KB) Eugenie Lyzenko, 02/20/2020 12:46 PM

cvt_20200221_134218.log Magnifier (30.9 KB) Mihai Popescu-Tiganea, 02/21/2020 06:45 AM

server.log Magnifier (5.33 KB) Mihai Popescu-Tiganea, 02/21/2020 06:45 AM

build_20200221_134218.log Magnifier (174 Bytes) Mihai Popescu-Tiganea, 02/21/2020 07:02 AM

import_db_h2_fwd_20200221_134218.log Magnifier (5.5 KB) Mihai Popescu-Tiganea, 02/21/2020 07:02 AM

import_db_h2_tran_man_20200221_134218.log Magnifier (20.3 KB) Mihai Popescu-Tiganea, 02/21/2020 07:02 AM

server.log Magnifier (4.78 KB) Mihai Popescu-Tiganea, 02/21/2020 07:19 AM

stdout.log Magnifier (3.82 KB) Mihai Popescu-Tiganea, 02/21/2020 07:20 AM

server.log Magnifier (8.24 KB) Mihai Popescu-Tiganea, 02/21/2020 07:34 AM

stdout.log Magnifier (3.82 KB) Mihai Popescu-Tiganea, 02/21/2020 07:34 AM

server.log Magnifier (6.25 KB) Mihai Popescu-Tiganea, 02/21/2020 07:59 AM

client_Mihai (909 Bytes) Mihai Popescu-Tiganea, 02/21/2020 08:00 AM

gradlew_jar_1.txt Magnifier (38.2 KB) Mihai Popescu-Tiganea, 02/26/2020 10:21 AM

sys-error.patch Magnifier - eclipse patch for changes on sys error handling (7.91 KB) Marian Edu, 03/28/2020 12:16 PM

skeleton.patch Magnifier (22.6 KB) Marian Edu, 04/07/2020 12:52 PM

skeleton.patch Magnifier (26.5 KB) Marian Edu, 04/15/2020 11:21 AM

skeleton.zip (1.47 MB) Marian Edu, 04/15/2020 12:46 PM

skeleton.p1 (25.9 KB) Marian Edu, 04/22/2020 10:31 AM

skeleton.p1 (19.3 KB) Marian Edu, 04/23/2020 02:17 AM

variable-sig.patch Magnifier (2.97 KB) Marian Edu, 04/24/2020 07:21 AM

skeleton.patch Magnifier (14.3 KB) Marian Edu, 05/01/2020 10:05 AM

skeleton.patch Magnifier (101 KB) Marian Edu, 05/20/2020 08:10 AM

skeleton.patch.eclipse - skeleton patch - eclipse format (111 KB) Marian Edu, 06/05/2020 06:24 AM

skeleton.patch Magnifier - skeleton patch - bazaar format (send) (130 KB) Marian Edu, 06/05/2020 06:24 AM

skeleton.patch Magnifier (488 KB) Marian Edu, 07/29/2020 07:23 AM

skeleton.patch Magnifier (481 KB) Marian Edu, 07/29/2020 08:50 AM

4384_oo_built_in_class_status_20201013.xls (25.5 KB) Greg Shah, 10/13/2020 08:42 AM

builtin_oo_classes_work_status_20201203.pdf (290 KB) Greg Shah, 12/04/2020 04:50 PM

skeleton.patch Magnifier (9.58 KB) Marian Edu, 12/17/2020 02:07 AM

builtin_oo_classes_work_status_20201215.pdf (385 KB) Greg Shah, 12/17/2020 04:14 PM

4384g.3821c.patch Magnifier (3.86 MB) Marian Edu, 02/01/2021 03:13 AM

3821c.4384g.patch Magnifier (779 KB) Marian Edu, 02/01/2021 08:26 AM

skeleton.patch Magnifier (65.8 KB) Marian Edu, 03/05/2021 03:58 AM

skeleton.patch Magnifier (60.7 KB) Marian Edu, 03/05/2021 04:16 AM

builtin_oo_classes_work_status_20210318.pdf (395 KB) Greg Shah, 03/18/2021 01:11 PM

3821c.4384i.patch Magnifier (151 KB) Marian Edu, 03/23/2021 07:46 AM

3821c_12170.zip (63.5 KB) Constantin Asofiei, 04/15/2021 11:08 AM

FwdHandler.java Magnifier (38.5 KB) Marian Edu, 04/19/2021 05:03 AM

name_map.xml Magnifier (329 KB) Marian Edu, 04/19/2021 05:03 AM

3821c.4384j.patch Magnifier (239 KB) Marian Edu, 05/04/2021 08:04 AM

3821c.4384k.patch Magnifier (117 KB) Marian Edu, 06/22/2021 02:20 AM

3821c.4384k.patch Magnifier (117 KB) Marian Edu, 06/22/2021 04:22 AM

3821c.4384l.patch Magnifier (183 KB) Marian Edu, 09/16/2021 09:23 AM

3821c.4384m.patch Magnifier (138 KB) Marian Edu, 02/14/2022 02:55 AM

3821c.4384m.patch Magnifier (139 KB) Marian Edu, 02/14/2022 03:52 AM

3821c.4384m.patch Magnifier (141 KB) Marian Edu, 02/15/2022 05:36 AM

3821c.4384m.patch Magnifier (143 KB) Marian Edu, 02/25/2022 07:05 AM

skeleton.patch Magnifier (7.78 KB) Marian Edu, 03/07/2022 02:26 AM

skeleton.security.patch Magnifier (2.7 KB) Marian Edu, 04/06/2022 03:11 AM


Subtasks

Bug #4891: Nested method calls ignore 'silent' (no-error) option.New


Related issues

Related to Base Language - Feature #4629: implement fully compatible 4GL collections (backed by protected temp-tables) New
Related to Base Language - Bug #4827: OO Conversion issue with method resolve (erasure) Closed
Related to Base Language - Bug #5011: unimplemented OO 4GL quirks and bugs New
Related to Base Language - Bug #5035: Temp-Table index on P.L.O field Test
Related to Base Language - Bug #5691: deviation in error generation for invalid method/property chaining New
Related to Base Language - Feature #5729: implement polymorphic reflection support for properties and variables New
Related to Runtime Infrastructure - Bug #8383: Some JsonObject methods create a LOG-MANAGER record in silent Review

History

#1 Updated by Roger Borrello over 4 years ago

OO Built-Ins Requiring Implementation

Breakdown of OO BuiltIns to focus on:
  • openedge.core.* = 3 Partial
  • openedge.net.* = 8 Partial, 3 None, 1 Stubs
    • openedge.net.http.* = 5 partial, 2 None
  • openedge.web.* = 3 Partial
  • openedge.json.* = 1 Partial
  • openedge.lang.* = 2 Partial, 1 Basic
Category Conversion Runtime
openedge.core.bytebucket Full Partial
openedge.core.memptr Full Partial
openedge.core.string Full Partial
openedge.net.http.clientbuilder Partial Partial
openedge.net.http.credentials None None
openedge.net.http.filter.payload.binaryentitywriter Partial Partial
openedge.net.http.filter.payload.messagewriter Partial Partial
openedge.net.http.ihttpclientlibrary None None
openedge.net.http.lib.clientlibrarybuilder Partial Partial
openedge.net.http.requestbuilder Partial Partial
openedge.net.messagepart Full Partial
openedge.net.mimetypehelper None None
openedge.net.multipartentity Full Partial
openedge.net.uri Full Partial
openedge.net.uriencodingtypeenum Partial Stubs
openedge.web.webhandler Full Partial
openedge.web.webresponse Full Partial
openedge.web.webresponsewriter Full Partial
progress.json.objectmodel.objectmodelparser Full Partial
progress.lang.apperror Full Partial
progress.lang.class Full Partial
progress.lang.parameterlist Full Basic
Table below is for help formatting tables:
Support Lvl
None
Stubs
Untested
Partial
Basic
Full (R)
Full

#2 Updated by Greg Shah about 4 years ago

  • Status changed from New to WIP
  • Assignee set to Mihai Popescu-Tiganea

The initial work on this task is to understand what each of the above classes do in the 4GL. After that, implementations will be written in Java.

Constantin will be answering questions and providing guidance on how to implement replacements for these classes in FWD.

Constantin: It may make sense to write up a wiki page in the FWD Internals document with details about how to write these classes.

Mihai: When you are ready to start on the Java code, we will create a new branch 4384a and we will provide some access to a bzr repo for that branch. This will be a place you can commit to and which we can review/collaborate before we merge the code to FWD trunk.

For now, you can access the latest version of FWD trunk (which has OO support) from xfer.goldencode.com:/opt/fwd/trunk which can be checked out using bzr and the sftp protocol.

I will need to provide access (for you and Marian) to some of our internal docs too, I'll figure that out shortly.

#3 Updated by Mihai Popescu-Tiganea about 4 years ago

Following your indication, I start to study classes mentioned above.
Greg, we have a order of implementation for those classes?
I checked out FWD trunk from supplied link.
I have download the sources using bazaar.
I use Eclipse under Windows ( but i can switch to Ubuntu in needed ).
Project existed in trunk folder was converted to gradle, and dependencies has been downloaded.
Unfortunately dependencies are missing from classes.
I need help in project set up in this stage.
Constantin can you guide me?

#4 Updated by Constantin Asofiei about 4 years ago

Mihai Popescu-Tiganea wrote:

I need help in project set up in this stage.
Constantin can you guide me?

Did you run 'antlr' in the project? Otherwise Eclipse will not compile it.

You should try (from the command line) running gradlew.bat jar to see if everything can compile. After that, do gradlew.bat native to create the FWD's p2j.dll (although if you haven't setup your Windows env properly, you will not be able to compile the native library).

#5 Updated by Mihai Popescu-Tiganea about 4 years ago

I follow your instruction, run "gradlew.bat jar", and files are compiled.

Dependencies used in java classes are resolved by adding build/lib folder to build path.
Right now, I think, java files are ready to receive code.

Constantin can you tell me how do we test methods ( after we write code in them )?
I do not observe unit tests in project.
I should do few tests to see if project setup is correct and results are as expected.

I am waiting an answer regarding priority of classes indicated by Greg.
In those classes are several TODO:'s.
Greg, those methods need attention?

#6 Updated by Constantin Asofiei about 4 years ago

Mihai Popescu-Tiganea wrote:

Constantin can you tell me how do we test methods ( after we write code in them )?
I do not observe unit tests in project.
I should do few tests to see if project setup is correct and results are as expected.

We don't have traditional unit tests, we write 4GL testcases (which can be ran without manual intervention, ideally - i.e. the correct output is encoded in the test). In the mean time, try setting up the Hotel ChUI and see if you can run it on Windows.

Details are here: https://proj.goldencode.com/projects/p2j/wiki/Hotel_ChUI_Demo_Application I think you can get away without installing the dependencies to compile the native parts. And just use the Swing client. Use the H2 database. If you can get this to work, try Hotel GUI next.

Greg, does Mihai have access to our testcases project?

I usually run both FWD server and client (Swing for ChUI and GUI) from Eclipse, but currently my setup is dependent on the testcases project.

I am waiting an answer regarding priority of classes indicated by Greg.

I would start with ByteBucket - there are some methods which are not implemented. And this is dependent on Memptr class. We don't have tests for any of these (at least I'm not aware of them), so the first step would be to write some 4GL tests.

#7 Updated by Greg Shah about 4 years ago

Greg, does Mihai have access to our testcases project?

He has access to the New Testcases but does not have access to testcases/uast/ (Old Testcases).

I usually run both FWD server and client (Swing for ChUI and GUI) from Eclipse, but currently my setup is dependent on the testcases project.

I agree that the best approach for now is to use one of the Hotel projects. It can always be made into a template if needed, but it is pretty easy to add things into the Hotel abl/ directory and then convert/run. The Swing client is fine. The ChUI project is probably also OK, though it may be a bit behind the GUI project.

#8 Updated by Greg Shah about 4 years ago

Constantin: Would you please add the necessary project configuration to the new testcases project? This would include the build support (build.xml et al), directory structure, configuration, deploy stuff and any necessary scripts. I think you can exclude the embedded stuff.

This will allow all of us to check-out, convert and run the testcases without each solving this ourselves.

#9 Updated by Constantin Asofiei about 4 years ago

Greg Shah wrote:

Constantin: Would you please add the necessary project configuration to the new testcases project? This would include the build support (build.xml et al), directory structure, configuration, deploy stuff and any necessary scripts. I think you can exclude the embedded stuff.

OK, I'll configure these. But I see some issues:
  1. everything (I think) is coded with the relative folder as . (as in, the program must be ran from the root project folder in 4GL). I need to figure out a way to map this to abl... maybe copy manually desired folder/programs to abl for conversion?
  2. as everything is coded in root folder, maybe it makes sense to even create a separate folder for converting and running in FWD (with manually copying files to abl/)
  3. I'll configure the db/fwd.df schema, but there is also ./tran_man/data/tran_man.df (only this one has a data dump associated with it). Maybe bzr move the fwd.df to the data/ folder? Or as alternative let an ant script do the work (to avoid duplicating scripts for both Windows and Linux).

#10 Updated by Greg Shah about 4 years ago

everything (I think) is coded with the relative folder as . (as in, the program must be ran from the root project folder in 4GL). I need to figure out a way to map this to abl... maybe copy manually desired folder/programs to abl for conversion?

In our old testcases project, we also have everything in ./, so this is possible. OR we can bzr move everything to a subdirectory, though I prefer not to use abl/. It should have been 4gl/ all along.

I definitely do NOT want to be required to manually copy things around. It is very messy and error prone.

I'll configure the db/fwd.df schema, but there is also ./tran_man/data/tran_man.df (only this one has a data dump associated with it). Maybe bzr move the fwd.df to the data/ folder?

I think both of them should be bzr move to the data/ directory. They should always exist there.

#11 Updated by Constantin Asofiei about 4 years ago

Greg Shah wrote:

I definitely do NOT want to be required to manually copy things around. It is very messy and error prone.

OK, I'll leave everything in place. But at least file-cvt-list.txt is needed, so you don't convert everything each time... I haven't reviewed the entire new testcases code, so I can't guarantee that everything is supposed to be ran from root folder, in 4GL.

I'll configure the db/fwd.df schema, but there is also ./tran_man/data/tran_man.df (only this one has a data dump associated with it). Maybe bzr move the fwd.df to the data/ folder?

I think both of them should be bzr move to the data/ directory. They should always exist there.

Understood, I'll bzr move the .df and data dump for tran_man.

The application name for these scripts (derived from Hotel ChUI) is testcases (this affects Java package name, etc). Also, should the project be configured for Windows or Linux (path and file separators, etc)?

#12 Updated by Constantin Asofiei about 4 years ago

Greg, I have the new testcases project configured from Hotel ChUI, and can run both ChUI and GUI programs, plus Web. The client scripts for ChUI are in deploy/client-chui and for GUI are in deploy/client-gui. This is currently configured for Linux - should I switch it to Windows conversion (and runtime) settings, like Hotel GUI?

A file-cvt-list.txt needs to be used to limit the number of converted programs - otherwise, all the files matching the pattern specified via app.4gl.pattern from build.properties will be converted. Mihai: this file-cvt-list.txt contains a list of files like gen/gen_all_scripts.p, etc, which need to be converted; the include files must not be specified; if you need, you can modify the conversion PROPATH in cfg/p2j.cfg.xml, to specify for example folders with include files (follow the same pattern, like ${P2J_HOME}/incs).

If OO is used, the skeleton project needs to be copied manually to the root folder (this can be found here: https://proj.goldencode.com/projects/p2j/wiki/Downloads#Object-Oriented-Skeleton-Classes ); or change the oo-skeleton-path in p2j.cfg.xml to a full path, to the skeleton project. Also, the FWD project needs to be copied to the root folder, and built. To convert, once you have FWD and skeleton setup, just run ant deploy.all - this will pick up all files specified in file-cvt-list.txt.

For Swing clients, use the setting for the client launch script, and specify the 4GL path for this program, like client:cmd-line-option:startup-procedure=gen/gen_all_scripts.p. For example, to start a FWD GUI Swing client:
  1. start the server:
    cd deploy/server
    ./server.sh
    

    look in server.log for Server ready.
  2. start the client:
    cd deploy/client-gui
    ./client.sh client:cmd-line-option:startup-procedure=gen/gen_all_scripts.p
    

As a side note, FWD trunk has a problem which doesn't allow ChUI clients to start (which is fixed in 4335a/11402). So please use only the FWD GUI client for now, in Swing. In Web mode, the p2j-entry in directory.xml must be modified before starting the server, to specify the desired program (Java-style).

Also, you need to configure the Windows OS to build FWD native library... Swing clients will not start without it. Details are mostly here: https://proj.goldencode.com/projects/p2j/wiki/Development_Environment_Setup

#13 Updated by Greg Shah about 4 years ago

This is currently configured for Linux - should I switch it to Windows conversion (and runtime) settings, like Hotel GUI?

I think it is OK to use Linux for now. There is very little GUI code so far. We may need to use hints at some point.

#14 Updated by Mihai Popescu-Tiganea about 4 years ago

https://proj.goldencode.com/projects/p2j/wiki/Development_Environment_Setup
I follow steps indicated in link above.
Running gradlew.bat all i receive below errors.
I was not use Eclipse, just followed steps under Windows 10 environment.

I will check again but meantime can someone give me an advice?

C:\Projects\fwd_test\p2j>gradlew.bat all
:check-gradle
:g-all
:ant-clean-native
:cleanDistribution
:ant-clean
:buildVersion
Product version: 3.2.1_p2j_4147a_11284
:makeManifests
:ant-prepare
:ant-chk_antlr_progress
:ant-antlr_progress
[ant:antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
:ant-chk_antlr_expression_evaluator
:ant-antlr_expression_evaluator
[ant:antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
:ant-chk_antlr_text
:ant-antlr_text
[ant:antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
:ant-chk_antlr_braces
:ant-antlr_braces
[ant:antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
:ant-chk_antlr_e4gl
:ant-antlr_e4gl
[ant:antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
:ant-chk_antlr_schema
:ant-antlr_schema
[ant:antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
:ant-chk_antlr_expression_compiler
:ant-antlr_expression_compiler
[ant:antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
:ant-chk_antlr_hql
:ant-antlr_hql
[ant:antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
:ant-antlr
:ant-compile
[ant:javac] C:\Projects\fwd_test\p2j\src\com\goldencode\asm\AsmUtils.java:66: error: package org.objectweb.asm does not exist
[ant:javac] import org.objectweb.asm.*;
[ant:javac] ^
[ant:javac] C:\Projects\fwd_test\p2j\src\com\goldencode\asm\AsmUtils.java:126: error: cannot find symbol
[ant:javac] public static void pushInt(MethodVisitor mv, int value)
[ant:javac] ^
[ant:javac] symbol: class MethodVisitor
[ant:javac] location: class AsmUtils
[ant:javac] C:\Projects\fwd_test\p2j\src\com\goldencode\ast\Aast.java:160: error: package antlr.collections does not exist
[ant:javac] import antlr.collections.AST;
..............................Other [ant:javac] messages - same idea different java files ...................
:ant-compile FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':ant-compile'.

Compile failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2 mins 29.913 secs

#15 Updated by Constantin Asofiei about 4 years ago

Mihai, you mentioned that you were able to compile FWD, already, right?

Don't use the FWD zip with 3.2.1_p2j_4147a_11284 - you need to use FWD trunk.

#16 Updated by Mihai Popescu-Tiganea about 4 years ago

Just tried again on trunk project.
Follow results are obtained:

C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk>gradlew.bat jar
:buildVersion
Fetching repository name and branch from bzr info...
org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'bzr''
WARN: Unable to resolve repository name. Make sure you build from a supported bzr repository location or the property repo is defined in version.properties.
WARN: Unable to resolve branch name. Make sure you build from a supported bzr repository location or the property branch is defined in version.properties.
Fetching revision number from bzr revno...
org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'bzr''
WARN: Unable to resolve revision number. Make sure you build from a supported bzr repository location or the property rev is defined in version.properties.
Product version: 4.0.0_undefined_undefined_undefined
:makeManifests
:ant-prepare
:ant-chk_antlr_progress
:ant-antlr_progress
:ant-chk_antlr_expression_evaluator
:ant-antlr_expression_evaluator
:ant-chk_antlr_text
:ant-antlr_text
:ant-chk_antlr_braces
:ant-antlr_braces
:ant-chk_antlr_e4gl
:ant-antlr_e4gl
:ant-chk_antlr_schema
:ant-antlr_schema
:ant-chk_antlr_expression_compiler
:ant-antlr_expression_compiler
:ant-chk_antlr_hql
:ant-antlr_hql
:ant-antlr
:ant-compile
:ant-aspectj
[ant:iajc] warning at C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes!com\goldencode\util\LoggingAspect.class::0 advice defined in com.goldencode.util.LoggingAspect has not been applied [Xlint:adviceDidNotMatch]
:check-gradle
:g-jar
:ant-jar
:jar

BUILD SUCCESSFUL

Total time: 2 mins 19.098 secs

Next step will be gradlew.bat native?

#17 Updated by Constantin Asofiei about 4 years ago

Mihai Popescu-Tiganea wrote:

Next step will be gradlew.bat native?

Yes.

#18 Updated by Mihai Popescu-Tiganea about 4 years ago

I have execute command.
Below is the answer received:

C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk>gradlew.bat native --info
Initialized native services in: C:\Users\Mihai Popescu\.gradle\native
Starting Build
Settings evaluated using settings file 'C:\master\settings.gradle'.
Projects loaded. Root project using build file 'C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build.gradle'.
Included projects: [root project 'trunk']
Evaluating root project 'trunk' using build file 'C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build.gradle'.
All projects evaluated.
Selected primary task 'native' from project :
Tasks to be executed: [task ':check-gradle', task ':g-native', task ':buildVersion', task ':makeManifests', task ':ant-prepare', task ':ant-chk_antlr_progress', task ':ant-antlr_progress', task ':ant-chk_antlr_expression_evaluator', task ':ant-antlr_expression_evaluator', task ':ant-chk_antlr_text', task ':ant-antlr_text', task ':ant-chk_antlr_braces', task ':ant-antlr_braces', task ':ant-chk_antlr_e4gl', task ':ant-antlr_e4gl', task ':ant-chk_antlr_schema', task ':ant-antlr_schema', task ':ant-chk_antlr_expression_compiler', task ':ant-antlr_expression_compiler', task ':ant-chk_antlr_hql', task ':ant-antlr_hql', task ':ant-antlr', task ':ant-compile', task ':ant-native_prepare', task ':ant-native', task ':native']
:check-gradle (Thread[main,5,main]) started.
:check-gradle
Executing task ':check-gradle' (up-to-date check took 0.002 secs) due to:
Task has not declared any outputs.
:check-gradle (Thread[main,5,main]) completed. Took 0.037 secs.
:g-native (Thread[main,5,main]) started.
:g-native
Executing task ':g-native' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:g-native (Thread[main,5,main]) completed. Took 0.002 secs.
:buildVersion (Thread[main,5,main]) started.
:buildVersion
Executing task ':buildVersion' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
Fetching repository name and branch from bzr info...
Starting process 'command 'bzr''. Working directory: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk Command: bzr info
org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'bzr''
WARN: Unable to resolve repository name. Make sure you build from a supported bzr repository location or the property repo is defined in version.properties.
WARN: Unable to resolve branch name. Make sure you build from a supported bzr repository location or the property branch is defined in version.properties.
Fetching revision number from bzr revno...
Starting process 'command 'bzr''. Working directory: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk Command: bzr revno
org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'bzr''
WARN: Unable to resolve revision number. Make sure you build from a supported bzr repository location or the property rev is defined in version.properties.
Product version: 4.0.0_undefined_undefined_undefined
:buildVersion (Thread[main,5,main]) completed. Took 0.728 secs.
:makeManifests (Thread[main,5,main]) started.
:makeManifests
Executing task ':makeManifests' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:makeManifests (Thread[main,5,main]) completed. Took 0.169 secs.
:ant-prepare (Thread[main,5,main]) started.
:ant-prepare
Executing task ':ant-prepare' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:copy] Copying 2 files to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes.aop
:ant-prepare (Thread[main,5,main]) completed. Took 5.36 secs.
:ant-chk_antlr_progress (Thread[main,5,main]) started.
:ant-chk_antlr_progress
Executing task ':ant-chk_antlr_progress' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-chk_antlr_progress (Thread[main,5,main]) completed. Took 0.008 secs.
:ant-antlr_progress (Thread[main,5,main]) started.
:ant-antlr_progress
Executing task ':ant-antlr_progress' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-antlr_progress (Thread[main,5,main]) completed. Took 0.001 secs.
:ant-chk_antlr_expression_evaluator (Thread[main,5,main]) started.
:ant-chk_antlr_expression_evaluator
Executing task ':ant-chk_antlr_expression_evaluator' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-chk_antlr_expression_evaluator (Thread[main,5,main]) completed. Took 0.002 secs.
:ant-antlr_expression_evaluator (Thread[main,5,main]) started.
:ant-antlr_expression_evaluator
Executing task ':ant-antlr_expression_evaluator' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-antlr_expression_evaluator (Thread[main,5,main]) completed. Took 0.001 secs.
:ant-chk_antlr_text (Thread[main,5,main]) started.
:ant-chk_antlr_text
Executing task ':ant-chk_antlr_text' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-chk_antlr_text (Thread[main,5,main]) completed. Took 0.001 secs.
:ant-antlr_text (Thread[main,5,main]) started.
:ant-antlr_text
Executing task ':ant-antlr_text' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-antlr_text (Thread[main,5,main]) completed. Took 0.0 secs.
:ant-chk_antlr_braces (Thread[main,5,main]) started.
:ant-chk_antlr_braces
Executing task ':ant-chk_antlr_braces' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-chk_antlr_braces (Thread[main,5,main]) completed. Took 0.001 secs.
:ant-antlr_braces (Thread[main,5,main]) started.
:ant-antlr_braces
Executing task ':ant-antlr_braces' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-antlr_braces (Thread[main,5,main]) completed. Took 0.001 secs.
:ant-chk_antlr_e4gl (Thread[main,5,main]) started.
:ant-chk_antlr_e4gl
Executing task ':ant-chk_antlr_e4gl' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-chk_antlr_e4gl (Thread[main,5,main]) completed. Took 0.003 secs.
:ant-antlr_e4gl (Thread[main,5,main]) started.
:ant-antlr_e4gl
Executing task ':ant-antlr_e4gl' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-antlr_e4gl (Thread[main,5,main]) completed. Took 0.001 secs.
:ant-chk_antlr_schema (Thread[main,5,main]) started.
:ant-chk_antlr_schema
Executing task ':ant-chk_antlr_schema' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-chk_antlr_schema (Thread[main,5,main]) completed. Took 0.002 secs.
:ant-antlr_schema (Thread[main,5,main]) started.
:ant-antlr_schema
Executing task ':ant-antlr_schema' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-antlr_schema (Thread[main,5,main]) completed. Took 0.001 secs.
:ant-chk_antlr_expression_compiler (Thread[main,5,main]) started.
:ant-chk_antlr_expression_compiler
Executing task ':ant-chk_antlr_expression_compiler' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-chk_antlr_expression_compiler (Thread[main,5,main]) completed. Took 0.002 secs.
:ant-antlr_expression_compiler (Thread[main,5,main]) started.
:ant-antlr_expression_compiler
Executing task ':ant-antlr_expression_compiler' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-antlr_expression_compiler (Thread[main,5,main]) completed. Took 0.002 secs.
:ant-chk_antlr_hql (Thread[main,5,main]) started.
:ant-chk_antlr_hql
Executing task ':ant-chk_antlr_hql' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-chk_antlr_hql (Thread[main,5,main]) completed. Took 0.002 secs.
:ant-antlr_hql (Thread[main,5,main]) started.
:ant-antlr_hql
Executing task ':ant-antlr_hql' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-antlr_hql (Thread[main,5,main]) completed. Took 0.001 secs.
:ant-antlr (Thread[main,5,main]) started.
:ant-antlr
Executing task ':ant-antlr' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-antlr (Thread[main,5,main]) completed. Took 0.001 secs.
:ant-compile (Thread[main,5,main]) started.
:ant-compile
Executing task ':ant-compile' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes\com\goldencode\p2j\Version.class
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes\com\goldencode\p2j\SpiVersion.class
[ant:javac] Compiling 2 source files to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes
:ant-compile (Thread[main,5,main]) completed. Took 4.439 secs.
:ant-native_prepare (Thread[main,5,main]) started.
:ant-native_prepare
Executing task ':ant-native_prepare' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-native_prepare (Thread[main,5,main]) completed. Took 13.068 secs.
:ant-native (Thread[main,5,main]) started.
:ant-native
Executing task ':ant-native' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:echo]
[ant:exec] make: *** No rule to make target 'process.o', needed by 'p2j.dll'. Stop.
:ant-native FAILED
:ant-native (Thread[main,5,main]) completed. Took 0.096 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':ant-native'.

exec returned: 2

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Total time: 36.617 secs

What can I do to obtain positive result for native command?

#19 Updated by Constantin Asofiei about 4 years ago

Did you follow the https://proj.goldencode.com/projects/p2j/wiki/Development_Environment_Setup#Install-C-Compiler-and-Native-Build-Utilities steps?

Eugenie, I think we may need your help a little.

#20 Updated by Mihai Popescu-Tiganea about 4 years ago

Constantin Asofiei wrote:

Did you follow the https://proj.goldencode.com/projects/p2j/wiki/Development_Environment_Setup#Install-C-Compiler-and-Native-Build-Utilities steps?

Yes i did.
First with mingw-w64-bin-x86_64-20200211 downloaded from surceforge.
Second with mingw64_4.9.0_20140425 downloaded from goldencode.
Same error trowed.

#21 Updated by Marian Edu about 4 years ago

Constantin Asofiei wrote:

Did you follow the https://proj.goldencode.com/projects/p2j/wiki/Development_Environment_Setup#Install-C-Compiler-and-Native-Build-Utilities steps?

Constantin, do we really need to build the native code? Can't we simply get the dll's (win 64-bit) from some distribution repository or something? I don't think we're going to do any development in C part so why bother building that from source code?

#22 Updated by Constantin Asofiei about 4 years ago

Marian Edu wrote:

Constantin, do we really need to build the native code? Can't we simply get the dll's (win 64-bit) from some distribution repository or something? I don't think we're going to do any development in C part so why bother building that from source code?

Yes, this should work. Eugenie: please post here a p2j.dll.

This will need to be copied manually to build/lib.

#23 Updated by Eugenie Lyzenko about 4 years ago

Constantin Asofiei wrote:

Did you follow the https://proj.goldencode.com/projects/p2j/wiki/Development_Environment_Setup#Install-C-Compiler-and-Native-Build-Utilities steps?

Eugenie, I think we may need your help a little.

The check list:
1. Open Windows command prompt(reqular one, not bundled with Visual C).
2. Run gcc -v
3. Run ant -version
4. Run java -version
5. Run echo %PATH%
6. Run echo %ANT_HOME%
7. Run echo %JAVA_HOME%
8. Check if the jvm.dll is on PATH, jvm.lib is inside mingw lib dir.
9. Check if the libffi is properly installed.

Run gradlew.bat all --info in FWD. Provide the results if failed.

#24 Updated by Mihai Popescu-Tiganea about 4 years ago

2. Run gcc -v

C:\WINDOWS\system32>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/4.9.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: /home/drangon/work/mingw-w64-dgn/source/gcc-4.9.0/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disable-nls --enable-languages=c,c++,objc,obj-c++ --with-gmp=/home/drangon/work/mingw-w64-dgn/build/for_target --with-mpfr=/home/drangon/work/mingw-w64-dgn/build/for_target --with-mpc=/home/drangon/work/mingw-w64-dgn/build/for_target --with-isl=/home/drangon/work/mingw-w64-dgn/build/for_target --with-cloog=/home/drangon/work/mingw-w64-dgn/build/for_target --enable-twoprocess --disable-libstdcxx-pch --disable-win32-registry --prefix=/home/drangon/work/mingw-w64-dgn/target --with-sysroot=/home/drangon/work/mingw-w64-dgn/target
Thread model: win32
gcc version 4.9.0 (GCC)

3. Run ant -version

C:\WINDOWS\system32>ant -version
Apache Ant(TM) version 1.10.7 compiled on September 1 2019

4. Run java -version

C:\WINDOWS\system32>java -version
openjdk version "1.8.0_192"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_192-b12)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.192-b12, mixed mode)

5. Run echo %PATH%

C:\WINDOWS\system32>echo PATH
C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Docker\Docker\Resources\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Python27\Scripts;C:\Program Files\PuTTY\;C:\Program Files\nodejs\;C:\Progress\12.1\bin\;C:\ProgramData\chocolatey\bin;C:\Program Files\AdoptOpenJDK\jdk8u192-b12\bin;C:\Program Files\Java\jdk1.8.0_221\bin;C:\Program Files (x86)\Android\android-sdk\tools;C:\Program Files (x86)\Android\android-sdk\platform-tools;C:\Program Files (x86)\Android\android-sdk\tools\bin;C:\mingw64\bin;C:\PROGRA~1\Java\jdk1.8.0_221\jre\bin\server;C:\apache-ant-1.10.7-bin\apache-ant-1.10.7\bin;C:\Users\Mihai Popescu\AppData\Local\Microsoft\WindowsApps;C:\Users\Mihai Popescu\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Mihai Popescu\AppData\Roaming\npm

6. Run echo %ANT_HOME%

C:\WINDOWS\system32>echo ANT_HOME
C:\apache-ant-1.10.7-bin\apache-ant-1.10.7

7. Run echo %JAVA_HOME%

C:\WINDOWS\system32>echo JAVA_HOME
C:\PROGRA~1\Java\jdk1.8.0_221

8. Check if the jvm.dll is on PATH, jvm.lib is inside mingw lib dir.

all files are set , as indicated.

9. Check if the libffi is properly installed.

libffi is installed using https://proj.goldencode.com/projects/p2j/wiki/Development_Environment_Setup - Install libffi

Run gradlew.bat all --info in FWD. Provide the results if failed.

C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk>gradlew.bat all --info
Initialized native services in: C:\Users\Mihai Popescu\.gradle\native
Starting Build
Settings evaluated using settings file 'C:\master\settings.gradle'.
Projects loaded. Root project using build file 'C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build.gradle'.
Included projects: [root project 'trunk']
Evaluating root project 'trunk' using build file 'C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build.gradle'.
All projects evaluated.
Selected primary task 'all' from project :
Tasks to be executed: [task ':check-gradle', task ':g-all', task ':ant-clean-native', task ':cleanDistribution', task ':ant-clean', task ':buildVersion', task ':makeManifests', task ':ant-prepare', task ':ant-chk_antlr_progress', task ':ant-antlr_progress', task ':ant-chk_antlr_expression_evaluator', task ':ant-antlr_expression_evaluator', task ':ant-chk_antlr_text', task ':ant-antlr_text', task ':ant-chk_antlr_braces', task ':ant-antlr_braces', task ':ant-chk_antlr_e4gl', task ':ant-antlr_e4gl', task ':ant-chk_antlr_schema', task ':ant-antlr_schema', task ':ant-chk_antlr_expression_compiler', task ':ant-antlr_expression_compiler', task ':ant-chk_antlr_hql', task ':ant-antlr_hql', task ':ant-antlr', task ':ant-compile', task ':ant-aspectj', task ':copyGWTLibs', task ':copyWebResources', task ':buildAdmin', task ':ant-admin_build', task ':ant-jar', task ':ant-native_prepare', task ':ant-native', task ':ant-javadoc', task ':distribution', task ':ant-all', task ':all']
:check-gradle (Thread[main,5,main]) started.
:check-gradle
Executing task ':check-gradle' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:check-gradle (Thread[main,5,main]) completed. Took 0.029 secs.
:g-all (Thread[main,5,main]) started.
:g-all
Executing task ':g-all' (up-to-date check took 0.001 secs) due to:
Task has not declared any outputs.
:g-all (Thread[main,5,main]) completed. Took 0.005 secs.
:ant-clean-native (Thread[main,5,main]) started.
:ant-clean-native
Executing task ':ant-clean-native' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-clean-native (Thread[main,5,main]) completed. Took 0.043 secs.
:cleanDistribution (Thread[main,5,main]) started.
:cleanDistribution
Executing task ':cleanDistribution' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:cleanDistribution (Thread[main,5,main]) completed. Took 0.04 secs.
:ant-clean (Thread[main,5,main]) started.
:ant-clean
Executing task ':ant-clean' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\preproc\PreprocTokenTypes.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\preproc\PreprocTokenTypes.txt
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\preproc\BracesParser.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\preproc\BracesLexer.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\preproc\BracesParser.smap
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\preproc\BracesLexer.smap
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\preproc\TextParser.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\preproc\TextLexer.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\preproc\TextParser.smap
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\preproc\TextLexer.smap
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\schema\ProgressParserTokenTypes.txt
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\schema\SchemaParserTokenTypes.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\schema\SchemaParserTokenTypes.txt
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\schema\SchemaParser.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\schema\SchemaParser.smap
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\uast\ProgressParserTokenTypes.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\uast\ProgressParserTokenTypes.txt
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\uast\ProgressParser.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\uast\ProgressLexer.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\uast\ProgressParser.smap
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\uast\ProgressLexer.smap
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\uast\ExpressionEvaluatorTokenTypes.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\uast\ExpressionEvaluatorTokenTypes.txt
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\uast\ExpressionEvaluator.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\uast\ExpressionEvaluator.smap
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\e4gl\E4GLParserTokenTypes.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\e4gl\E4GLParserTokenTypes.txt
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\e4gl\E4GLParser.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\e4gl\E4GLLexer.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\e4gl\E4GLParser.smap
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\e4gl\E4GLLexer.smap
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\expr\ExpressionParserTokenTypes.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\expr\ExpressionParserTokenTypes.txt
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\expr\ExpressionParser.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\expr\ExpressionLexer.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\expr\ExpressionParser.smap
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\expr\ExpressionLexer.smap
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\persist\hql\HQLParserTokenTypes.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\persist\hql\HQLParserTokenTypes.txt
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\persist\hql\HQLParser.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\persist\hql\HQLLexer.java
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\persist\hql\HQLParser.smap
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\persist\hql\HQLLexer.smap
:ant-clean (Thread[main,5,main]) completed. Took 10.59 secs.
:buildVersion (Thread[main,5,main]) started.
:buildVersion
Executing task ':buildVersion' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
Fetching repository name and branch from bzr info...
Starting process 'command 'bzr''. Working directory: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk Command: bzr info
org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'bzr''
WARN: Unable to resolve repository name. Make sure you build from a supported bzr repository location or the property repo is defined in version.properties.
WARN: Unable to resolve branch name. Make sure you build from a supported bzr repository location or the property branch is defined in version.properties.
Fetching revision number from bzr revno...
Starting process 'command 'bzr''. Working directory: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk Command: bzr revno
org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'bzr''
WARN: Unable to resolve revision number. Make sure you build from a supported bzr repository location or the property rev is defined in version.properties.
Product version: 4.0.0_undefined_undefined_undefined
:buildVersion (Thread[main,5,main]) completed. Took 0.972 secs.
:makeManifests (Thread[main,5,main]) started.
:makeManifests
Executing task ':makeManifests' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:makeManifests (Thread[main,5,main]) completed. Took 0.393 secs.
:ant-prepare (Thread[main,5,main]) started.
:ant-prepare
Executing task ':ant-prepare' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:mkdir] Created dir: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\lib
[ant:mkdir] Created dir: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes
[ant:mkdir] Created dir: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes\META-INF\services
[ant:mkdir] Created dir: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\empty
[ant:mkdir] Created dir: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\native
[ant:jar] Building MANIFEST-only jar: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\compile-classpath.jar
[ant:copy] Copying 5 files to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes
[ant:copy] Copying 46 files to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes
[ant:copy] Copying 39 files to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes
[ant:copy] Copying 43 files to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes
[ant:copy] Copying 84 files to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes
[ant:copy] Copying 1 file to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes
[ant:mkdir] Created dir: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\dist
[ant:mkdir] Created dir: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\dist\docs\api
[ant:copy] Copying 230 files to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\lib
[ant:copy] Copying 1 file to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes
[ant:copy] Copying 1 file to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes\META-INF\services
[ant:copy] Copying 1 file to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes\META-INF
[ant:copy] Copying 10 files to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes\com\goldencode\p2j\ui\client
[ant:copy] Copying 17 files to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes\fonts
[ant:copy] Copying 163 files to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes\com\goldencode\p2j\ui\client\gui\theme
[ant:copy] Copying 254 files to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes\com\goldencode\p2j\ui\client\gui\theme
[ant:copy] Copying 2 files to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes
[ant:copy] Copying 667 files to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes.aop
:ant-prepare (Thread[main,5,main]) completed. Took 18.57 secs.
:ant-chk_antlr_progress (Thread[main,5,main]) started.
:ant-chk_antlr_progress
Executing task ':ant-chk_antlr_progress' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-chk_antlr_progress (Thread[main,5,main]) completed. Took 0.004 secs.
:ant-antlr_progress (Thread[main,5,main]) started.
:ant-antlr_progress
Executing task ':ant-antlr_progress' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
[ant:copy] Copying 1 file to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\schema
:ant-antlr_progress (Thread[main,5,main]) completed. Took 4.273 secs.
:ant-chk_antlr_expression_evaluator (Thread[main,5,main]) started.
:ant-chk_antlr_expression_evaluator
Executing task ':ant-chk_antlr_expression_evaluator' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-chk_antlr_expression_evaluator (Thread[main,5,main]) completed. Took 0.002 secs.
:ant-antlr_expression_evaluator (Thread[main,5,main]) started.
:ant-antlr_expression_evaluator
Executing task ':ant-antlr_expression_evaluator' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
:ant-antlr_expression_evaluator (Thread[main,5,main]) completed. Took 0.943 secs.
:ant-chk_antlr_text (Thread[main,5,main]) started.
:ant-chk_antlr_text
Executing task ':ant-chk_antlr_text' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-chk_antlr_text (Thread[main,5,main]) completed. Took 0.002 secs.
:ant-antlr_text (Thread[main,5,main]) started.
:ant-antlr_text
Executing task ':ant-antlr_text' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
:ant-antlr_text (Thread[main,5,main]) completed. Took 0.927 secs.
:ant-chk_antlr_braces (Thread[main,5,main]) started.
:ant-chk_antlr_braces
Executing task ':ant-chk_antlr_braces' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-chk_antlr_braces (Thread[main,5,main]) completed. Took 0.002 secs.
:ant-antlr_braces (Thread[main,5,main]) started.
:ant-antlr_braces
Executing task ':ant-antlr_braces' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
:ant-antlr_braces (Thread[main,5,main]) completed. Took 0.798 secs.
:ant-chk_antlr_e4gl (Thread[main,5,main]) started.
:ant-chk_antlr_e4gl
Executing task ':ant-chk_antlr_e4gl' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-chk_antlr_e4gl (Thread[main,5,main]) completed. Took 0.002 secs.
:ant-antlr_e4gl (Thread[main,5,main]) started.
:ant-antlr_e4gl
Executing task ':ant-antlr_e4gl' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
:ant-antlr_e4gl (Thread[main,5,main]) completed. Took 0.8 secs.
:ant-chk_antlr_schema (Thread[main,5,main]) started.
:ant-chk_antlr_schema
Executing task ':ant-chk_antlr_schema' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-chk_antlr_schema (Thread[main,5,main]) completed. Took 0.002 secs.
:ant-antlr_schema (Thread[main,5,main]) started.
:ant-antlr_schema
Executing task ':ant-antlr_schema' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
:ant-antlr_schema (Thread[main,5,main]) completed. Took 1.002 secs.
:ant-chk_antlr_expression_compiler (Thread[main,5,main]) started.
:ant-chk_antlr_expression_compiler
Executing task ':ant-chk_antlr_expression_compiler' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-chk_antlr_expression_compiler (Thread[main,5,main]) completed. Took 0.002 secs.
:ant-antlr_expression_compiler (Thread[main,5,main]) started.
:ant-antlr_expression_compiler
Executing task ':ant-antlr_expression_compiler' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
:ant-antlr_expression_compiler (Thread[main,5,main]) completed. Took 0.732 secs.
:ant-chk_antlr_hql (Thread[main,5,main]) started.
:ant-chk_antlr_hql
Executing task ':ant-chk_antlr_hql' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-chk_antlr_hql (Thread[main,5,main]) completed. Took 0.002 secs.
:ant-antlr_hql (Thread[main,5,main]) started.
:ant-antlr_hql
Executing task ':ant-antlr_hql' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
:ant-antlr_hql (Thread[main,5,main]) completed. Took 0.727 secs.
:ant-antlr (Thread[main,5,main]) started.
:ant-antlr
Executing task ':ant-antlr' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-antlr (Thread[main,5,main]) completed. Took 0.001 secs.
:ant-compile (Thread[main,5,main]) started.
:ant-compile
Executing task ':ant-compile' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:javac] Compiling 2478 source files to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\admin\client\application\home\console\recordlocks\RecordLocksView.java:323: warning: [deprecation] showFilterDialog(String,HasWidgets,Consumer<String>) in InputDialog has been deprecated
[ant:javac] inputDialog.showFilterDialog(
[ant:javac] ^
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\admin\client\application\home\print\PrintPreviewView.java:457: warning: [deprecation] showFilterDialog(String,HasWidgets,Consumer<String>) in InputDialog has been deprecated
[ant:javac] inputDialog.showFilterDialog(
[ant:javac] ^
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\oo\web\WebResponseWriter.java:423: warning: [deprecation] setStatus(int,String) in HttpServletResponse has been deprecated
[ant:javac] httpResponse.setStatus(response.ref().getStatusCode().intValue(),
[ant:javac] ^
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\persist\DatabaseManager.java:2591: warning: [deprecation] StatisticsService in org.hibernate.jmx has been deprecated
[ant:javac] StatisticsService statsMBean = new StatisticsService();
[ant:javac] ^
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\persist\DatabaseManager.java:2591: warning: [deprecation] StatisticsService in org.hibernate.jmx has been deprecated
[ant:javac] StatisticsService statsMBean = new StatisticsService();
[ant:javac] ^
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\persist\TempTableHelper.java:1113: warning: [deprecation] getIdentifierGeneratorFactory() in Mapping has been deprecated
[ant:javac] public IdentifierGeneratorFactory getIdentifierGeneratorFactory()
[ant:javac] ^
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\persist\dialect\P2JH2Dialect.java:959: warning: [deprecation] getIdentifierGeneratorFactory() in Mapping has been deprecated
[ant:javac] public IdentifierGeneratorFactory getIdentifierGeneratorFactory()
[ant:javac] ^
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\persist\dialect\P2JPostgreSQLDialect.java:1092: warning: [deprecation] getLimitString(String,int,int) in Dialect has been deprecated
[ant:javac] public String getLimitString(String sql, int offset, int limit)
[ant:javac] ^
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\persist\dialect\P2JPostgreSQLDialect.java:1108: warning: [deprecation] getLimitString(String,int,int) in Dialect has been deprecated
[ant:javac] stmt = super.getLimitString(sql, offset, limit);
[ant:javac] ^
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\persist\dialect\P2JPostgreSQLDialect.java:1126: warning: [deprecation] supportsVariableLimit() in Dialect has been deprecated
[ant:javac] public boolean supportsVariableLimit()
[ant:javac] ^
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\persist\dialect\P2JPostgreSQLDialect.java:1128: warning: [deprecation] supportsVariableLimit() in Dialect has been deprecated
[ant:javac] return inlineLimit.get() ? false : super.supportsVariableLimit();
[ant:javac] ^
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\rest\JsonResponseArguments.java:150: warning: [deprecation] put(String,JsonNode) in ObjectNode has been deprecated
[ant:javac] jsonResponse.put(attr, (ObjectNode) val);
[ant:javac] ^
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\security\AcmeClient.java:527: warning: [deprecation] TlsSni01Challenge in org.shredzone.acme4j.challenge has been deprecated
[ant:javac] if (!acceptTlsSniChallenge(((TlsSni01Challenge) challenge).getSubject(),
[ant:javac] ^
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\ui\client\driver\swing\SwingKeyboardReader.java:190: warning: [deprecation] setModifiers(int) in KeyEvent has been deprecated
[ant:javac] last.setModifiers(last.getModifiers() | InputEvent.SHIFT_MASK);
[ant:javac] ^
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\ui\client\driver\swing\SwingKeyboardReader.java:194: warning: [deprecation] setModifiers(int) in KeyEvent has been deprecated
[ant:javac] last.setModifiers(last.getModifiers() | InputEvent.ALT_MASK);
[ant:javac] ^
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\ui\client\driver\swing\SwingKeyboardReader.java:198: warning: [deprecation] setModifiers(int) in KeyEvent has been deprecated
[ant:javac] last.setModifiers(last.getModifiers() | InputEvent.CTRL_MASK);
[ant:javac] ^
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\ui\client\gui\driver\web\GuiWebDriver.java:2544: warning: [deprecation] getTextWidth(String,int) in GuiWebSocket has been deprecated
[ant:javac] scaleX = (double)websock.getTextWidth(TEXT_SAMPLE_MONO, fd.font)/
[ant:javac] ^
[ant:javac] C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src\com\goldencode\p2j\ui\client\gui\driver\web\GuiWebDriver.java:2549: warning: [deprecation] getTextWidth(String,int) in GuiWebSocket has been deprecated
[ant:javac] scaleX = (double)websock.getTextWidth(TEXT_SAMPLE, fd.font)/
[ant:javac] ^
[ant:javac] Note: Some input files use unchecked or unsafe operations.
[ant:javac] Note: Recompile with Xlint:unchecked for details.
[ant:javac] 18 warnings
[ant:javac] Creating empty C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes\com\goldencode\asm\package-info.class
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes\com\goldencode\p2j\Version.class
[ant:delete] Deleting: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes\com\goldencode\p2j\SpiVersion.class
[ant:javac] Compiling 2 source files to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes
:ant-compile (Thread[main,5,main]) completed. Took 1 mins 37.886 secs.
:ant-aspectj (Thread[main,5,main]) started.
:ant-aspectj
Executing task ':ant-aspectj' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:iajc] warning at C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes!com\goldencode\util\LoggingAspect.class::0 advice defined in com.goldencode.util.LoggingAspect has not been applied [Xlint:adviceDidNotMatch]
:ant-aspectj (Thread[main,5,main]) completed. Took 1 mins 1.095 secs.
:copyGWTLibs (Thread[main,5,main]) started.
:copyGWTLibs
Executing task ':copyGWTLibs' (up-to-date check took 0.074 secs) due to:
Output property 'destinationDir' file C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\lib.gwt has changed.
Output property 'destinationDir' file C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\lib.gwt\asm-util-5.0.3.jar has been removed.
Output property 'destinationDir' file C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\lib.gwt\jetty-security-9.2.14.v20151106.jar has been removed.
:copyGWTLibs (Thread[main,5,main]) completed. Took 2.038 secs.
:copyWebResources (Thread[main,5,main]) started.
:copyWebResources
Executing task ':copyWebResources' (up-to-date check took 1.759 secs) due to:
Output property 'destinationDir' file C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes.aop\com\goldencode\expr\doc-files has been removed.
Output property 'destinationDir' file C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes.aop\com\goldencode\p2j\net\doc-files has been removed.
Output property 'destinationDir' file C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes.aop\com\goldencode\p2j\preproc\doc-files has been removed.
:copyWebResources (Thread[main,5,main]) completed. Took 2.4 secs.
:buildAdmin (Thread[main,5,main]) started.
:buildAdmin
Executing task ':buildAdmin' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
Starting process 'command 'C:\Program Files\Java\jdk1.8.0_221\bin\java.exe''. Working directory: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk Command: C:\Program Files\Java\jdk1.8.0_221\bin\java.exe -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\src;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.google.gwt\gwt-dev\2.8.0\f160a61272c5ebe805cd2d3d3256ed3ecf14893f\gwt-dev-2.8.0.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.google.gwt\gwt-codeserver\2.8.0\6c1bec5a7a57b4ba292eb958e61463ee61727369\gwt-codeserver-2.8.0.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.google.gwt\gwt-user\2.8.0\518579870499e15531f454f35dca0772d7fa31f7\gwt-user-2.8.0.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.googlecode.gwt-validation\gwt-validation\2.1\efaac01230e1196f49ee53e12be26c0c78ea5fb4\gwt-validation-2.1.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.gwtplatform\gwtp-mvp-client\1.6\85774c3572ed4e1914e1112116437db6fee2b21c\gwtp-mvp-client-1.6.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.gwtplatform\gwtp-dispatch-rest\1.6\a998a2755d7ec2ba2385d33faef2eb0e3f8e1cf\gwtp-dispatch-rest-1.6.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.gwtbootstrap3\gwtbootstrap3\0.9.4\ae7963124d41ccff98958b1d096b2d140d8f2953\gwtbootstrap3-0.9.4.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.gwtbootstrap3\gwtbootstrap3-extras\0.9.4\52901f283d6369cb37961a99c9e8ad15d3a5ceb7\gwtbootstrap3-extras-0.9.4.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.google.guava\guava-gwt\21.0\2def57e98fa0168e3177c4b25bb2962d17b09b01\guava-gwt-21.0.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.apache.pdfbox\pdfbox\2.0.5\bf3a2bda6d416360e81bef356db326eb55b7b7ee\pdfbox-2.0.5.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.apache.pdfbox\fontbox\2.0.5\ca00287e3f18d5a52e5fddc9b6afc43ebd5e53e6\fontbox-2.0.5.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\de.intarsys.opensource\jPod\5.5.1\d218f4756ad654dbba6978e61aa7e6e0516e537b\jPod-5.5.1.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.google.code.gson\gson\2.6.2\f1bc476cc167b18e66c297df599b2377131a8947\gson-2.6.2.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm\5.0.3\dcc2193db20e19e1feca8b1240dbbc4e190824fa\asm-5.0.3.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-util\5.0.3\1512e5571325854b05fb1efce1db75fcced54389\asm-util-5.0.3.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-commons\5.0.3\a7111830132c7f87d08fe48cb0ca07630f8cb91c\asm-commons-5.0.3.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\colt\colt\1.2.0\abc984f3adc760684d49e0f11ddf167ba516d4f\colt-1.2.0.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\ant\ant\1.6.5\7d18faf23df1a5c3a43613952e0e8a182664564b\ant-1.6.5.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\commons-collections\commons-collections\3.2.2\8ad72fe39fa8c91eaaf12aadb21e0c3661fe26d5\commons-collections-3.2.2.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\commons-io\commons-io\2.4\b1b6ea3b7e4aa4f492509a4952029cd8e48019ad\commons-io-2.4.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\tapestry\tapestry\4.0.2\e855a807425d522e958cbce8697f21e9d679b1f7\tapestry-4.0.2.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\net.sourceforge.htmlunit\htmlunit\2.19\230f011fa87e96ff4115cd8c9d1572572d718b3e\htmlunit-2.19.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-webapp\9.2.14.v20151106\773f1c45f6534bff6313997ab3bdbe25533ee255\jetty-webapp-9.2.14.v20151106.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-servlets\9.2.14.v20151106\a75c78a0ee544073457ca5ee9db20fdc6ed55225\jetty-servlets-9.2.14.v20151106.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-annotations\9.2.14.v20151106\bb7030e5d13eaf9023f38e297c8b2fcae4f8be9b\jetty-annotations-9.2.14.v20151106.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\apache-jsp\9.2.14.v20151106\756745c6efff964ae8d183866b962a534f20e30\apache-jsp-9.2.14.v20151106.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.google.jsinterop\jsinterop-annotations\1.0.1\e9135c43d12b30a6d02706e97ce256a90d68dc9d\jsinterop-annotations-1.0.1.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.google.jsinterop\jsinterop-annotations\1.0.1\90645da74a2fc6e8fd8ba81b34899aef0d553d89\jsinterop-annotations-1.0.1-sources.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\javax.validation\validation-api\1.0.0.GA\b6bd7f9d78f6fdaa3c37dae18a4bd298915f328e\validation-api-1.0.0.GA.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\javax.validation\validation-api\1.0.0.GA\7a561191db2203550fbfa40d534d4997624cd369\validation-api-1.0.0.GA-sources.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\javax.servlet\javax.servlet-api\3.1.0\3cd63d075497751784b2fa84be59432f4905bf7c\javax.servlet-api-3.1.0.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.w3c.css\sac\1.3\cdb2dcb4e22b83d6b32b93095f644c3462739e82\sac-1.3.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.reflections\reflections\0.9.5\12d5bb5c74b486c133e3de9899a692e67f71642c\reflections-0.9.5.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.freemarker\freemarker\2.3.18\7b0cd31bfed5ceb396bdcdc088b24e6ff9eae96f\freemarker-2.3.18.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-simple\1.6.1\58e59bfb3e247097b8122243b3bfe0049c8cfae8\slf4j-simple-1.6.1.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.gwtplatform\gwtp-clients-common\1.6\47f5508bcb5d1bb8aea1ec5707f00b120984fde5\gwtp-clients-common-1.6.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.gwtplatform\gwtp-mvp-shared\1.6\5ccc74d39acfbb255de449767c0166ff6807c4e7\gwtp-mvp-shared-1.6.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.google.gwt.inject\gin\2.1.2\eb47e8676a4d851a1c16c0e660b98ee7bb889598\gin-2.1.2.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.apache.velocity\velocity\1.7\2ceb567b8f3f21118ecdec129fe1271dbc09aa7a\velocity-1.7.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\3.0.1\f7be08ec23c21485b9b5a1cf1654c2ec8c58168d\jsr305-3.0.1.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.gwtplatform\gwtp-dispatch-common-client\1.6\fa648d46dc5972cf0ae5b35cc7adae4ee9be195b\gwtp-dispatch-common-client-1.6.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.google.inject\guice\3.0\9d84f15fe35e2c716a02979fb62f50a29f38aefa\guice-3.0.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.google.inject.extensions\guice-multibindings\3.0\5e670615a927571234df68a8b1fe1a16272be555\guice-multibindings-3.0.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.github.nmorel.gwtjackson\gwt-jackson\0.14.1\346632fc8f89851c8b40f8be3ccc87c3ea05e285\gwt-jackson-0.14.1.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.google.errorprone\error_prone_annotations\2.0.15\822652ed7196d119b35d2e22eb9cd4ffda11e640\error_prone_annotations-2.0.15.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.google.j2objc\j2objc-annotations\1.1\ed28ded51a8b1c6b112568def5f4b455e6809019\j2objc-annotations-1.1.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\commons-logging\commons-logging\1.2\4bfc12adfe4842bf07b657f0369c4cb522955686\commons-logging-1.2.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\de.intarsys.opensource\iscwt\5.5\8b38ff76a2ea959ca0a9d569d6b74d77628a778f\iscwt-5.5.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\de.intarsys.opensource\isrt\4.10\958ee2e49966376044eb5b68b14be2a8c4e37a65\isrt-4.10.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\de.intarsys.opensource\jbig2\5.5.1\a3f4214b62615d4456de761ccef1136cba65a663\jbig2-5.5.1.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-tree\5.0.3\287749b48ba7162fb67c93a026d690b29f410bed\asm-tree-5.0.3.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\xalan\xalan\2.7.2\d55d3f02a56ec4c25695fe67e1334ff8c2ecea23\xalan-2.7.2.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-lang3\3.4\5fe28b9518e58819180a43a850fbc0dd24b7c050\commons-lang3-3.4.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpclient\4.5.1\7e3cecc566df91338c6c67883b89ddd05a17db43\httpclient-4.5.1.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpmime\4.5.1\96823b9421ebb9f490dec837d9f96134e864e3a7\httpmime-4.5.1.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\commons-codec\commons-codec\1.10\4b95f4897fa13f2cd904aee711aeafc0c5295cd8\commons-codec-1.10.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\net.sourceforge.htmlunit\htmlunit-core-js\2.17\4316d68f449d42f69faf4ee255aa31b03e4f7dd5\htmlunit-core-js-2.17.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\xerces\xercesImpl\2.11.0\9bb329db1cfc4e22462c9d6b43a8432f5850e92c\xercesImpl-2.11.0.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\net.sourceforge.nekohtml\nekohtml\1.9.22\4f54af68ecb345f2453fb6884672ad08414154e3\nekohtml-1.9.22.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\net.sourceforge.cssparser\cssparser\0.9.18\61c015378d27b5e245a5deb7a324c7e716b4706a\cssparser-0.9.18.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty.websocket\websocket-client\9.2.13.v20150730\52833f983df57fd6aaae9642d39b87a82d38c177\websocket-client-9.2.13.v20150730.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-xml\9.2.14.v20151106\946a5a1d4fb816fd346dba74d09a6c0e162cafcd\jetty-xml-9.2.14.v20151106.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-servlet\9.2.14.v20151106\3a2cd4d8351a38c5d60e0eee010fee11d87483ef\jetty-servlet-9.2.14.v20151106.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-continuation\9.2.14.v20151106\8909d62fd7e28351e2da30de6fb4105539b949c0\jetty-continuation-9.2.14.v20151106.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-http\9.2.14.v20151106\699ad1f2fa6fb0717e1b308a8c9e1b8c69d81ef6\jetty-http-9.2.14.v20151106.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-util\9.2.14.v20151106\57e00b912ae0c35859ac81594a996007706a0b\jetty-util-9.2.14.v20151106.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-io\9.2.14.v20151106\dfa4137371a3f08769820138ca1a2184dacda267\jetty-io-9.2.14.v20151106.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-plus\9.2.14.v20151106\1e9304873f2d3563d814a1e714add6b6b3ac0b24\jetty-plus-9.2.14.v20151106.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\javax.annotation\javax.annotation-api\1.2\479c1e06db31c432330183f5cae684163f186146\javax.annotation-api-1.2.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-server\9.2.14.v20151106\70b22c1353e884accf6300093362b25993dac0f5\jetty-server-9.2.14.v20151106.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty.toolchain\jetty-schemas\3.1.M0\6179bafb6ed2eb029862356df6713078c7874f85\jetty-schemas-3.1.M0.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.mortbay.jasper\apache-jsp\8.0.9.M3\e46309f2423c0d7321cc2a0928f4e411b82aee9\apache-jsp-8.0.9.M3.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\javassist\javassist\3.12.1.GA\526633327faa61aee448a519e8a4d53ec3057885\javassist-3.12.1.GA.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api\1.6.1\6f3b8a24bf970f17289b234284c94f43eb42f0e4\slf4j-api-1.6.1.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\dom4j\dom4j\1.6.1\5d3ccc056b6f056dbf0dddfdf43894b9065a8f94\dom4j-1.6.1.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.google.inject.extensions\guice-assistedinject\3.0\544449ddb19f088dcde44f055d30a08835a954a7\guice-assistedinject-3.0.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\commons-lang\commons-lang\2.4\16313e02a793435009f1e458fa4af5d879f6fb11\commons-lang-2.4.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\javax.inject\javax.inject\1\6975da39a7040257bd51d21a231b76c915872d38\javax.inject-1.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\aopalliance\aopalliance\1.0\235ba8b489512805ac13a8f9ea77a1ca5ebe3e8\aopalliance-1.0.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.sonatype.sisu.inject\cglib\2.2.1-v20090111\7ce5e983fd0e6c78346f4c9cbfa39d83049dda2\cglib-2.2.1-v20090111.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.8.4\de3570327cf8d1d4f37920535c51a1f74225a6de\jackson-annotations-2.8.4.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.8.4\be29f3af1b8864b0589834c05bec9d7108d4713b\jackson-annotations-2.8.4-sources.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.squareup\javapoet\1.0.0\2229f5de3e511d034cb4a20c67fd96bec214ef17\javapoet-1.0.0.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\de.intarsys.opensource\isfreetype\5.5\caa0ab3e5d8657803f3045412f69c3395a07c954\isfreetype-5.5.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\javax.media\jai-core\1.1.3\b179d2efb1174658483e8b41bf4ac9d2eb5de438\jai-core-1.1.3.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.sun.media\jai-codec\1.1.3\34a67ba62097778e4695c951156bf189c2c8e016\jai-codec-1.1.3.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\xalan\serializer\2.7.2\24247f3bb052ee068971393bdb83e04512bb1c3c\serializer-2.7.2.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpcore\4.4.3\e876a79d561e5c6207b78d347e198c8c4531a5e5\httpcore-4.4.3.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\xml-apis\xml-apis\1.4.01\3789d9fada2d3d458c4ba2de349d48780f381ee3\xml-apis-1.4.01.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty.websocket\websocket-common\9.2.13.v20150730\1e7b1ef77f4bd774b4bbaf5495772194ef8da691\websocket-common-9.2.13.v20150730.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-security\9.2.14.v20151106\2d36974323fcb31e54745c1527b996990835db67\jetty-security-9.2.14.v20151106.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-jndi\9.2.14.v20151106\c5fb5420a99b8aee335a3ff804c6094eb9034d04\jetty-jndi-9.2.14.v20151106.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.mortbay.jasper\apache-el\8.0.9.M3\98daa71c32b7d27dd9463b36de9cebab3f2e5e2e\apache-el-8.0.9.M3.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\asm\asm\3.1\c157def142714c544bdea2e6144645702adf7097\asm-3.1.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\de.intarsys.opensource\isnativec\5.5\cdc0ecdeae6b884ff44a6e77c266064a8ebce647\isnativec-5.5.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty.websocket\websocket-api\9.2.13.v20150730\11f8b6f733f45e218bcdf0406667af99995bc45b\websocket-api-9.2.13.v20150730.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\net.java.dev.jna\jna\3.2.7\4f25aa7292f70e721a9b96a6ed49365ba6e03eab\jna-3.2.7.jar;C:\Users\Mihai Popescu\.gradle\caches\modules-2\files-2.1\com.google.guava\guava\21.0\3a3d111be1be1b745edfa7d91678a12d7ed38709\guava-21.0.jar;C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes.aop com.google.gwt.dev.Compiler -war build/classes.aop/com/goldencode/p2j/admin -strict -style PRETTY com.goldencode.p2j.admin.AdminApp
Successfully started process 'command 'C:\Program Files\Java\jdk1.8.0_221\bin\java.exe''
Compiling module com.goldencode.p2j.admin.AdminApp
Computing all possible rebind results for 'com.goldencode.p2j.admin.shared.AdminService'
Rebinding com.goldencode.p2j.admin.shared.AdminService
Invoking generator com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator
Generating client proxy for remote service interface 'com.goldencode.p2j.admin.shared.AdminService'
Analyzing 'com.goldencode.p2j.admin.shared.AdminService' for serializable types
Analyzing methods:
public abstract boolean addProcess(com.goldencode.p2j.admin.ProcessDef process, java.io.Serializable ext)
Parameter: java.io.Serializable ext
java.io.Serializable
Verifying instantiability
com.google.common.collect.ImmutableEnumMap
[WARN] Checking all subtypes of Object which qualify for serialization
com.google.gwt.validation.client.impl.PathImpl
Verifying instantiability
com.google.gwt.validation.client.impl.PathImpl
Analyzing the fields of type 'com.google.gwt.validation.client.impl.PathImpl' that qualify for serialization
[WARN] Field 'private final java.util.List<javax.validation.Path.Node> nodes' will not be serialized because it is final
Rebinding com.goldencode.p2j.admin.shared.AdminService
Invoking generator com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator
Generating client proxy for remote service interface 'com.goldencode.p2j.admin.shared.AdminService'
Analyzing 'com.goldencode.p2j.admin.shared.AdminService' for serializable types
Analyzing methods:
public abstract boolean addProcess(com.goldencode.p2j.admin.ProcessDef process, java.io.Serializable ext)
Parameter: java.io.Serializable ext
java.io.Serializable
Verifying instantiability
com.google.common.collect.ImmutableEnumMap
[WARN] Checking all subtypes of Object which qualify for serialization
com.google.gwt.validation.client.impl.PathImpl
Verifying instantiability
com.google.gwt.validation.client.impl.PathImpl
Analyzing the fields of type 'com.google.gwt.validation.client.impl.PathImpl' that qualify for serialization
[WARN] Field 'private final java.util.List<javax.validation.Path.Node> nodes' will not be serialized because it is final
Rebinding com.goldencode.p2j.admin.shared.AdminService
Invoking generator com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator
Generating client proxy for remote service interface 'com.goldencode.p2j.admin.shared.AdminService'
Analyzing 'com.goldencode.p2j.admin.shared.AdminService' for serializable types
Analyzing methods:
public abstract boolean addProcess(com.goldencode.p2j.admin.ProcessDef process, java.io.Serializable ext)
Parameter: java.io.Serializable ext
java.io.Serializable
Verifying instantiability
com.google.common.collect.ImmutableEnumMap
[WARN] Checking all subtypes of Object which qualify for serialization
com.google.gwt.validation.client.impl.PathImpl
Verifying instantiability
com.google.gwt.validation.client.impl.PathImpl
Analyzing the fields of type 'com.google.gwt.validation.client.impl.PathImpl' that qualify for serialization
[WARN] Field 'private final java.util.List<javax.validation.Path.Node> nodes' will not be serialized because it is final
Rebinding com.goldencode.p2j.admin.shared.AdminService
Invoking generator com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator
Generating client proxy for remote service interface 'com.goldencode.p2j.admin.shared.AdminService'
Analyzing 'com.goldencode.p2j.admin.shared.AdminService' for serializable types
Analyzing methods:
public abstract boolean addProcess(com.goldencode.p2j.admin.ProcessDef process, java.io.Serializable ext)
Parameter: java.io.Serializable ext
java.io.Serializable
Verifying instantiability
com.google.common.collect.ImmutableEnumMap
[WARN] Checking all subtypes of Object which qualify for serialization
com.google.gwt.validation.client.impl.PathImpl
Verifying instantiability
com.google.gwt.validation.client.impl.PathImpl
Analyzing the fields of type 'com.google.gwt.validation.client.impl.PathImpl' that qualify for serialization
[WARN] Field 'private final java.util.List<javax.validation.Path.Node> nodes' will not be serialized because it is final
Rebinding com.goldencode.p2j.admin.shared.AdminService
Invoking generator com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator
Generating client proxy for remote service interface 'com.goldencode.p2j.admin.shared.AdminService'
Analyzing 'com.goldencode.p2j.admin.shared.AdminService' for serializable types
Analyzing methods:
public abstract boolean addProcess(com.goldencode.p2j.admin.ProcessDef process, java.io.Serializable ext)
Parameter: java.io.Serializable ext
java.io.Serializable
Verifying instantiability
com.google.common.collect.ImmutableEnumMap
[WARN] Checking all subtypes of Object which qualify for serialization
com.google.gwt.validation.client.impl.PathImpl
Verifying instantiability
com.google.gwt.validation.client.impl.PathImpl
Analyzing the fields of type 'com.google.gwt.validation.client.impl.PathImpl' that qualify for serialization
[WARN] Field 'private final java.util.List<javax.validation.Path.Node> nodes' will not be serialized because it is final
Computing all possible rebind results for 'com.goldencode.p2j.admin.client.application.home.MenuView.Binder'
Rebinding com.goldencode.p2j.admin.client.application.home.MenuView.Binder
Invoking generator com.google.gwt.uibinder.rebind.UiBinderGenerator
[WARN] Escaping unsafe runtime String expression used for URI with UriUtils.fromString(). Use SafeUri instead: <a href='#{nameTokens.getSessions}'> (:93)
[WARN] Escaping unsafe runtime String expression used for URI with UriUtils.fromString(). Use SafeUri instead: <a href='#{nameTokens.getLocks}'> (:94)
[WARN] Escaping unsafe runtime String expression used for URI with UriUtils.fromString(). Use SafeUri instead: <a href='#{nameTokens.getAcquiredLocks}'> (:95)
[WARN] Escaping unsafe runtime String expression used for URI with UriUtils.fromString(). Use SafeUri instead: <a href='#{nameTokens.getGroups}'> (:108)
[WARN] Escaping unsafe runtime String expression used for URI with UriUtils.fromString(). Use SafeUri instead: <a href='#{nameTokens.getUsers}'> (:109)
[WARN] Escaping unsafe runtime String expression used for URI with UriUtils.fromString(). Use SafeUri instead: <a href='#{nameTokens.getProcesses}'> (:110)
[WARN] Escaping unsafe runtime String expression used for URI with UriUtils.fromString(). Use SafeUri instead: <a href='#{nameTokens.getCerts}'> (:111)
[WARN] Escaping unsafe runtime String expression used for URI with UriUtils.fromString(). Use SafeUri instead: <a href='#{nameTokens.getACL}'> (:127)
[WARN] Escaping unsafe runtime String expression used for URI with UriUtils.fromString(). Use SafeUri instead: <a href='#{nameTokens.getCustomLibraries}'> (:151)
[WARN] Escaping unsafe runtime String expression used for URI with UriUtils.fromString(). Use SafeUri instead: <a href='#{nameTokens.getServerMessages}'> (:178)
Computing all possible rebind results for 'com.google.gwt.cell.client.ImageCell.Template'
Rebinding com.google.gwt.cell.client.ImageCell.Template
Invoking generator com.google.gwt.safehtml.rebind.SafeHtmlTemplatesGenerator
Constructing interface com.google.gwt.cell.client.ImageCell.Template
Generating method body for img()
Template with variable in URL attribute context: The template code generator will sanitize the URL. Use SafeUri to specify arguments in a URL attribute context that should not be sanitized.
Compiling 5 permutations
Compiling permutation 0...
Compiling permutation 1...
Compiling permutation 2...
Compiling permutation 3...
Compiling permutation 4...
Compile of permutations succeeded
Compilation succeeded -
143.196s
Linking into C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\classes.aop\com\goldencode\p2j\admin\adminapp
Invoking Linker Verify the availability of a more recent version of GWTP.
Checking version information for gwtp-mvp-client
You are using the latest version of gwtp-mvp-client!
Checking version information for gwtp-dispatch-rest
You are using the latest version of gwtp-dispatch-rest!
Link succeeded
Linking succeeded -- 5.991s
:buildAdmin (Thread[main,5,main]) completed. Took 2 mins 33.634 secs.
:ant-admin_build (Thread[main,5,main]) started.
:ant-admin_build
Executing task ':ant-admin_build' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:ant-admin_build (Thread[main,5,main]) completed. Took 0.001 secs.
:ant-jar (Thread[main,5,main]) started.
:ant-jar
Executing task ':ant-jar' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:jar] Building jar: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\lib\p2j.jar
[ant:jar] Building jar: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\lib\p2jpl.jar
[ant:jar] Building jar: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\lib\p2jspi.jar
[ant:jar] Building jar: C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\lib\fwdaopltw.jar
:ant-jar (Thread[main,5,main]) completed. Took 13.243 secs.
:ant-native_prepare (Thread[main,5,main]) started.
:ant-native_prepare
Executing task ':ant-native_prepare' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:copy] Copying 1 file to C:\Users\Mihai Popescu\Progress\Developer Studio 4.9\workspace\trunk\build\native
:ant-native_prepare (Thread[main,5,main]) completed. Took 10.014 secs.
:ant-native (Thread[main,5,main]) started.
:ant-native
Executing task ':ant-native' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
[ant:echo]
[ant:exec] make: *** No rule to make target `process.o', needed by `p2j.dll'. Stop.
:ant-native FAILED
:ant-native (Thread[main,5,main]) completed. Took 0.099 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':ant-native'.

exec returned: 2

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Total time: 6 mins 30.578 secs

#25 Updated by Eugenie Lyzenko about 4 years ago

The just compiled p2j.dll from recent trunk(rev 11342). 64-bit version. You can use it instead of building local one.

#26 Updated by Mihai Popescu-Tiganea about 4 years ago

Constantin Asofiei wrote:

This will need to be copied manually to build/lib.

Donne.
Looking forward what is the next step?

#27 Updated by Constantin Asofiei about 4 years ago

Mihai Popescu-Tiganea wrote:

Looking forward what is the next step?

In the testcases project:
  • copy the p2j/ project if you haven't already done so
  • edit file-cvt-list.txt to include the file(s) you want to convert
  • do ant deploy.all to convert, compile/deploy and create/import db
  • start FWD server and try the Swing clients (GUI and ChUI)

#28 Updated by Mihai Popescu-Tiganea about 4 years ago

Constantin Asofiei wrote:

In the testcases project:
  • copy the p2j/ project if you haven't already done so
  • edit file-cvt-list.txt to include the file(s) you want to convert
  • do ant deploy.all to convert, compile/deploy and create/import db
  • start FWD server and try the Swing clients (GUI and ChUI)
What I did:
  • pull the testcases project from sftp://xfer.goldencode.com/opt/testcases
  • copy all files from trunk project in p2j folder created inside testcases project
    • trunk project has been build and p2j.dll was added
  • modify file-cvt-list.txt pointing to a procedure from testcases project
  • do ant deploy.all
  • run server.cmd from testcases/deploy/server

Server is unable to start.
Attached are logs generated by ant deploy.all and server.com maybe you can find a solution.

#29 Updated by Constantin Asofiei about 4 years ago

There must be a log file starting with build_ - please attach that, too. Actually, attach all .log files from the testcases root folder.

Conversion was OK, something must have happened during build of the converted file, or deploy.

#30 Updated by Mihai Popescu-Tiganea about 4 years ago

Constantin Asofiei wrote:
Actually, attach all .log files from the testcases root folder.

#31 Updated by Constantin Asofiei about 4 years ago

Please edit server.cmd and remove the . from the cpath - this should look like this:

set cpath=..\lib\hotel.jar;..\lib\p2j.jar;

Please let me know if it works or not.

#32 Updated by Constantin Asofiei about 4 years ago

Actually, sorry, it needs to be like this:

set cpath=..\lib\testcases.jar;..\lib\p2j.jar;

#33 Updated by Mihai Popescu-Tiganea about 4 years ago

Modified as requested.
Seems that is not working.
Server logs attached.

#34 Updated by Constantin Asofiei about 4 years ago

Change it this way and try again:
set cpath=..\lib\testcases.jar;..\lib\p2j.jar;..\lib\fwdaopltw.jar

#35 Updated by Mihai Popescu-Tiganea about 4 years ago

Just tried.
Seems that is not working.
Attached.

#36 Updated by Constantin Asofiei about 4 years ago

Do you have another Java process (for a FWD server) running? Please check in Task Manager.

The error is because the FWD server port (3333 and 3433) are in use.

#37 Updated by Mihai Popescu-Tiganea about 4 years ago

Checked and stop process.
Server is running - see log attached.
Try to start gui client:
  • testcases\deploy\client-gui\client.cmd but without success - log attached

#38 Updated by Constantin Asofiei about 4 years ago

Mihai Popescu-Tiganea wrote:

  • testcases\deploy\client-gui\client.cmd but without success - log attached

This needs to be ran from testcases\deploy\client-gui folder. Did you do so?

#39 Updated by Mihai Popescu-Tiganea about 4 years ago

Yes I did.
File client_Mihai, attached above, is what client.cmd has generated.

#40 Updated by Constantin Asofiei about 4 years ago

Mihai Popescu-Tiganea wrote:

Yes I did.
File client_Mihai, attached above, is what client.cmd has generated.

OK, then something must be wrong with the client.cmd. I'm looking at it.

#41 Updated by Constantin Asofiei about 4 years ago

Try this (the target program needs to be enclosed in quotes):

client.cmd "client:cmd-line-option:startup-procedure=gen/gen_all_scripts.p" 

And let me know if you get the infinite loop with gen/gen_folder_tests.p" was not found (kill the FWD server if you do). This means that is working, as that program was not included in conversion.

Now either add gen/gen_folder_tests.p to the file-cvt-list.txt and do ant deploy again, or test another simple 4GL program and leave only that in file-cvt-list.txt.

#42 Updated by Mihai Popescu-Tiganea about 4 years ago

Just did C:\Progress\workspace\testcases\deploy\client-gui>client.cmd "client:cmd-line-option:startup-procedure=gen/gen_all_scripts.p"
Without success.
file client_Mihai has same content as attached above at note #37
My user for Win10 is Mihai Popescu with space between words.
Should this affect expected result?

#43 Updated by Constantin Asofiei about 4 years ago

Mihai Popescu-Tiganea wrote:

Just did C:\Progress\workspace\testcases\deploy\client-gui>client.cmd "client:cmd-line-option:startup-procedure=gen/gen_all_scripts.p"
Without success.
file client_Mihai has same content as attached above at note #37
My user for Win10 is Mihai Popescu with space between words.
Should this affect expected result?

I think so.
Try this:

client.cmd -l client.log "client:cmd-line-option:startup-procedure=gen/gen_all_scripts.p" 

#44 Updated by Mihai Popescu-Tiganea about 4 years ago

Success.
I experience kind of "old" window with blue on top just like predicted:

infinite loop with gen/gen_folder_tests.p" was not found (kill the FWD server if you do).

I will try with other simple procedure .

#45 Updated by Mihai Popescu-Tiganea about 4 years ago

I was tried few test procedure, including oo approach, and seems to work as expected.

I propose following steps:
  • start with openedge.core.memptr and openedge.core.bytebucket
  • test will be written in testcases project, in 4GL - procedural way - using below order:
    1. test constructors
    2. test methods
    3. attributes/properties

Tests will be converted to java and results will tell us what we must implement for each class.

#46 Updated by Constantin Asofiei about 4 years ago

Mihai Popescu-Tiganea wrote:

Tests will be converted to java and results will tell us what we must implement for each class.

That looks good. I'll have some guidelines for writing the Java code today.

#47 Updated by Mihai Popescu-Tiganea about 4 years ago

Tests for:
  • openedge.core.memptr
    1. constructor
    2. methods: clear, get-byte
  • openedge.core.bytebucket
    1. constructor

has been created.
Are located in: testcases/oo/openedge/core/memptr and testcases/oo/openedge/core/bytebucket folders

Tests are checked by following steps:
  • add file in file-cvt-list.txt
  • run ant deploy.all in project folder
  • run server.cmd from deploy/server
  • run client.cmd -l client.log "client:cmd-line-option:startup-procedure=oo/openedge/core/memptr/test_method_get_byte.p" from deploy/client-gui

Behavior should be identical with OE, same (more or less) window, same messages.

Am I right?

What should we do if not?

#48 Updated by Constantin Asofiei about 4 years ago

Mihai Popescu-Tiganea wrote:

Behavior should be identical with OE, same (more or less) window, same messages.
Am I right?

Yes, especially ERROR condition messages.

What should we do if not?

Well, you need to think how to implement it :)

I've added some details about what the Java code for these legacy classes needs to follow: https://proj.goldencode.com/projects/p2j/wiki/Implementing_the_Legacy_OE_Classes_in_FWD Please read and let me know if you have any questions. Basically, except the Java definition for the class, members and methods which have a 4GL equivalent (as they must be 4GL-compatible), everything else can be pure-Java; what matters is to properly validate the input, raise errors if necessary, do the work and return the proper value. The 'do the work' part can be pure Java.

#49 Updated by Marian Edu about 4 years ago

Constantin Asofiei wrote:

I've added some details about what the Java code for these legacy classes needs to follow: https://proj.goldencode.com/projects/p2j/wiki/Implementing_the_Legacy_OE_Classes_in_FWD Please read and let me know if you have any questions. Basically, except the Java definition for the class, members and methods which have a 4GL equivalent (as they must be 4GL-compatible), everything else can be pure-Java; what matters is to properly validate the input, raise errors if necessary, do the work and return the proper value. The 'do the work' part can be pure Java.

Thanks Constantin, guess the setup is now complete and Mihai can start doing some real work :)

A couple of questions before we delve in though:
- reference implementation to de used, those OO (like JDK) changes over time and there are differences between two different OE versions (sometime even breaking changes unlike the rest of the 4GL). The code is available in each OE release, some have stored those various versions over time like Mike over here [[https://github.com/consultingwerk/ADE-Sourcecode]]. Question is what is the OE release we must use, considering some of those classes were already implemented or stub exists we should probably use the same version you've based the current conversion on.

- handling errors, namely using NO-ERROR when calling an instance method. I thought that using recordOrShowError will not display the error message dialog if we use NO-ERROR but for whatever reason this seems not to be the case. Looking at ErrorManager looks like even if we call the method with NO-ERROR inside of the method isSilent and IsSilentError returns both false, on the other hand isSystemAlertBoxes return true but either way this should not affect how NO-ERROR behaves. Basically calling any method in 4GL OO with NO-ERROR should prevent the error from popping up and the error should be either thrown as an Error instance if there is a CATCH block and/or set to the ERROR-STATUS system handle. What are we missing here, what is the difference between recordOrShowError and recordOrThrowError and how those should be used?

- the whole development/deployment process, can we do something to reduce the roundtrip here as there seems to be a lot of waiting time involved. Say when we change something in a Java class, we need to:
  • run `gradle jar` in 'trunk' (Java code)
  • stop the server
  • run `ant deploy.all` in testcases (4GL code)
  • restart server and run client to test

Are there any build targets that we can use to make the whole process shorter? Not sure how everything works but I thought rebuilding the jars in 'trunk' will reflect those changes when we ran the client but it looks like this is not the case. Then I thought maybe the server is the one that actually do the work so this is the one that needs to be restarted when java code changes but this is again not enough. It looks like deploy.all is building a jar with both FWD code and application code (or something like that) so whenever any of the two changes we must go that route... this is quite time consuming :(

How do you guys work, what should we do when:
A. Java code is changed
B 4GL code (test cases) are changed

Thanks

#50 Updated by Constantin Asofiei about 4 years ago

Marian Edu wrote:

- reference implementation to de used...

I'll let Greg answer this. But I assume whatever is 'latest'.

- handling errors, namely using NO-ERROR when calling an instance method. I thought that using recordOrShowError will not display the error message dialog if we use NO-ERROR but for whatever reason this seems not to be the case. Looking at ErrorManager looks like even if we call the method with NO-ERROR inside of the method isSilent and IsSilentError returns both false, on the other hand isSystemAlertBoxes return true but either way this should not affect how NO-ERROR behaves. Basically calling any method in 4GL OO with NO-ERROR should prevent the error from popping up and the error should be either thrown as an Error instance if there is a CATCH block and/or set to the ERROR-STATUS system handle. What are we missing here, what is the difference between recordOrShowError and recordOrThrowError and how those should be used?

NO-ERROR has both a conversion and runtime part. When NO-ERROR is used, you will see that the call is enclosed in a silent(() -> { code to run }); block. The runtime will take care of either displaying/raising or not the error.

How do you guys work, what should we do when:

I have eclipse targets to:
  • convert the code - look in the build.xml for convert.list - you can take that and create an Eclipse task to convert the code, with the proper 'working dir' set to testcases project (full path)
  • run the FWD server and client, both from Eclipse - run server.cmd -t and client.cmd -t and you can extract from there the commands, to configure the Eclipse target for each one. The 'working dir' needs to be the deploy/server and deploy/client_gui, for each
  • for the client to work, you will need to install the Eclipse AspectJ compiler plugin

This setup works fine for me - you just need to link the 'testcases/src' to your FWD project in Eclipse, so everything is compiled 'at once'. This will solve the overhead of rebuilding FWD and testcases, but otherwise, the FWD server will need to be restarted after each change (FWD runtime or new conversion). You may 'get away' with editing the Java code while FWD Server is running, but that has limitations and is usually usable only for minor bug fixes.

And to be clear: with the above setup, you need only to run 'antlr' to compile the parser. Otherwise, you don't need to add the p2j.jar to the classpath (only the others from build/lib). And copy the p2j.dll to build/lib, also.

#51 Updated by Constantin Asofiei about 4 years ago

Ah, and you will need an initial 'ant deploy.all' to just import the db - as the FWD server for the testcases project is configured to use persistence. If you don't need persistence to be active, just deactivate it in directory.xml - look for this node:

       
        <node class="container" name="persistence">
          <node class="boolean" name="foreign-keys">
            <node-attribute name="value" value="FALSE"/>
          </node>
          <node class="boolean" name="active">
            <node-attribute name="value" value="TRUE"/>
          </node>
        </node>

and set 'active' to FALSE.

#52 Updated by Greg Shah about 4 years ago

- reference implementation to de used...

I'll let Greg answer this. But I assume whatever is 'latest'.

11.7 is the best reference. If you do know if major changes to these classes in 12.x let us know.

#53 Updated by Marian Edu about 4 years ago

Greg Shah wrote:

11.7 is the best reference. If you do know if major changes to these classes in 12.x let us know.

11.7 it is then, we will use the latest service pack 11.7.4 as reference.

#54 Updated by Marian Edu about 4 years ago

Constantin Asofiei wrote:

NO-ERROR has both a conversion and runtime part. When NO-ERROR is used, you will see that the call is enclosed in a silent(() -> { code to run }); block. The runtime will take care of either displaying/raising or not the error.

Well, it's true that the code is wrapped inside a silent block in the converted source, however when running that code the error message is still displayed to the user in an alert box. Even more, the error is not set in ERROR-STATUS system handle. Shouldn't those properties in ErrorManager (IsSilent, IsSilentError) be set to true inside the silent block?

Another thing that looks odd is that while FINALLY blocks gets converted alright no CATCH block seems to be converted from 4GL, that part seems to be simply ignored. Is that the expected behaviour, as in not yet supported, or we are really doing something wrong here?

Finally, we get some strange error inside the client when calling some methods and when that happens we end up in an infinite retry loop where the startup procedure is ran over and over again only to hit the same error condition...

[02/26/2020 09:46:52 EET] (com.goldencode.p2j.util.TransactionManager:SEVERE) Abnormal end; original error:
java.lang.NegativeArraySizeException
        at com.goldencode.p2j.util.MemoryManager.read(Native Method)
        at com.goldencode.p2j.util.MemoryDaemon.read(MemoryDaemon.java:256)
        at com.goldencode.p2j.util.LowLevelBufferMethodAccess.invoke(Unknown Source)
        at com.goldencode.p2j.util.MethodInvoker.invoke(MethodInvoker.java:156)
        at com.goldencode.p2j.net.Dispatcher.processInbound(Dispatcher.java:757)
        at com.goldencode.p2j.net.Conversation.block(Conversation.java:412)
        at com.goldencode.p2j.net.Conversation.waitMessage(Conversation.java:348)
        at com.goldencode.p2j.net.Queue.transactImpl(Queue.java:1201)
        at com.goldencode.p2j.net.Queue.transact(Queue.java:672)
        at com.goldencode.p2j.net.BaseSession.transact(BaseSession.java:271)
        at com.goldencode.p2j.net.HighLevelObject.transact(HighLevelObject.java:211)
        at com.goldencode.p2j.net.RemoteObject$RemoteAccess.invokeCore(RemoteObject.java:1473)
        at com.goldencode.p2j.net.InvocationStub.invoke(InvocationStub.java:145)
        at com.sun.proxy.$Proxy6.standardEntry(Unknown Source)
        at com.goldencode.p2j.main.ClientCore.start(ClientCore.java:374)
        at com.goldencode.p2j.main.ClientCore.start(ClientCore.java:165)
        at com.goldencode.p2j.main.ClientDriver.start(ClientDriver.java:250)
        at com.goldencode.p2j.main.CommonDriver.process(CommonDriver.java:444)
        at com.goldencode.p2j.main.ClientDriver.process(ClientDriver.java:144)
        at com.goldencode.p2j.main.ClientDriver.main(ClientDriver.java:313)

#55 Updated by Mihai Popescu-Tiganea about 4 years ago

Greg Shah wrote:

Mihai: When you are ready to start on the Java code, we will create a new branch 4384a and we will provide some access to a bzr repo for that branch. This will be a place you can commit to and which we can review/collaborate before we merge the code to FWD trunk.

We are ready to write Java code.

Please help us with new branch and bzr access.

#56 Updated by Greg Shah about 4 years ago

Another thing that looks odd is that while FINALLY blocks gets converted alright no CATCH block seems to be converted from 4GL, that part seems to be simply ignored. Is that the expected behaviour, as in not yet supported, or we are really doing something wrong here?

Catch blocks have a known problem in trunk. The fixes are in branch 4335a, which is a branch that includes a wide range of new features and fixes for customer projects. We are trying to stabilize it right now, so that we can merge it to trunk. It may make sense to work with that branch instead of trunk. You already have access to it at xfer.goldencode.com:/opt/fwd/4335a.

I'll provide a new branch for your development shortly.

#57 Updated by Constantin Asofiei about 4 years ago

Marian Edu wrote:

Well, it's true that the code is wrapped inside a silent block in the converted source, however when running that code the error message is still displayed to the user in an alert box. Even more, the error is not set in ERROR-STATUS system handle. Shouldn't those properties in ErrorManager (IsSilent, IsSilentError) be set to true inside the silent block?

In ErrorManager.silent, srv.setSilent(wa, true); takes care of setting the silent flag. I'm not sure why is not working for you - can you provide a simple test? And how you use ErrorManager.recordOrShowError and recordOrThrowError?

Finally, we get some strange error inside the client when calling some methods and

What is the 4GL code which gives you this error? Is this for a new test you added? If yes, maybe you are missing validation for some argument; we validate the arguments right at the beginning of the API which we are implementing - and if it fails validation, we use the ErrorManager APIs. Note that you always must terminate the Java method with a return, right after the recordOrShowError or recordOrThrowError call.

when that happens we end up in an infinite retry loop where the startup procedure is ran over and over again only to hit the same error condition...

This is because stop_disposition in directory.xml is set to 1 (which means the client restarts on abend); set it to 2 and you will no longer see the infinite restarting loop.

#58 Updated by Mihai Popescu-Tiganea about 4 years ago

You already have access to it at xfer.goldencode.com:/opt/fwd/4335a.

I have get from bzr 4335a project.
Command gradlew.bat jar used to build jar's is throwing errors in command line.

I attach a file with this errors.

Constantin, can you guide me to build project?

#59 Updated by Greg Shah about 4 years ago

Please help us with new branch and bzr access.

For now, I think it is best to build upon 4335a. Make sure that your branch is "unbound" (use bzr unbind if needed). This allows you to commit locally. From there, you can send us sets of revisions using bzr send. This will package up all changes for those revisions into a single file which we can apply here.

Once 4335a is in trunk, we will have more flexibility to create a branch just for your work.

#60 Updated by Mihai Popescu-Tiganea about 4 years ago

Mihai Popescu-Tiganea wrote:

Constantin, can you guide me to build project?

Issue solved.
Seems that classpath from build/compile-classpath.jar should not contain space like:

Class-Path: ../../../../Users/Mihai%20Popescu/.gradle/caches/modules-2/files-2.1/org.apache.ant/ant-antlr/1.9.14/71b14a00b3fb7e08327cf2c149e79d97204b9820/ant-antlr-1.9.14.jar

Moving project inside user folder should be ok.
New classpath:

Class-Path: ../../../../../.gradle/caches/modules-2/files-2.1/org.apache.ant/ant-antlr/1.9.14/71b14a00b3fb7e08327cf2c149e79d97204b9820/ant-antlr-1.9.14.jar

#61 Updated by Constantin Asofiei about 4 years ago

Mihai, yes, Java is not that comfortable with spaces in the path. Try to avoid folders with spaces.

#62 Updated by Constantin Asofiei about 4 years ago

On 3/9/20 1:36 PM, Mihai Tiganea wrote:

After create tests in progress for ByteBucket and Memptr constructors, properties and methods I have experienced following issues:
  • Gradlew.bat deploy.all for oo/openedge/core/byte_bucket/test_method_get_hash_algorithm.p does not generate TestMethodGetHashAlgorithm.java file
  • Gradlew.bat deploy.all for oo/openedge/core/memptr/test_method_get_hash_algorithm.p does not generate TestMethodGetHashAlgorithm.java file

For these two problems, please post the conversion log. There might be an issue.

  • Generated class TestMethodGetHash.java for oo/openedge/core/byte_bucket/test_method_get_hash.p is not behave correct because class com.goldencode.p2j.oo.core. HashAlgorithmEnum is not implemented
  • Generated class TestMethodGetHash.java for oo/openedge/core/memptr/test_method_get_hash.p is not behave correct because class com.goldencode.p2j.oo.core. HashAlgorithmEnum is not implemented

Greg, do we have some guildelines how the converted 4GL ENUMs should look? I think we need to add HashAlgorithmEnum.

Generated classes from

         oo/openedge/core/byte_bucket/test_method_get_string_int64_int64_char_char.p
         oo/openedge/core/byte_bucket/test_method_get_string_int64_int64_char.p
         oo/openedge/core/byte_bucket/test_method_get_string_int64_int64.p
         oo/openedge/core/byte_bucket/test_method_get_string_int64.p
         oo/openedge/core/byte_bucket/test_method_get_string.p

seems to have an issue (errors throwed are not like OE) with executing copy-lob internal stage when codepages used are:
                 invalid – meaning that are not in convmap.p
                 UNDEFINED
                 incompatible

What we shell do in this kind of situations?

Generally, when we found an unrelated issue to the current WIP task, we try to 'move around' the FWD problem so that we can fix the original issue without having to fix the unrelated one. And also document the problem in another redmine task.

I suggest try to rewrite the tests without copy-lob (if possible). And keep the original ones (which show the problem), too.

#63 Updated by Marian Edu about 4 years ago

Constantin Asofiei wrote:

  • Gradlew.bat deploy.all for oo/openedge/core/memptr/test_method_get_hash_algorithm.p does not generate TestMethodGetHashAlgorithm.java file

For these two problems, please post the conversion log. There might be an issue.

The issue was due to the fact that GetEnum methods in skeleton class for Enum were not static, adding those along with all enum values (as static properties) in HashAlgorithmEnum helps a bit, now the Java class gets converted but the result does not compile.

silent(() -> rawRsp.assign(oByteBucket.ref().getHash(new object<? extends openedge.core.hashalgorithmenum>(com.goldencode.p2j.oo.core.HashAlgorithmEnum.getEnum(entry(nrCount, algList))))));

notice the openedge.core.hashalgorithmenum class that does not exist.

Greg, do we have some guildelines how the converted 4GL ENUMs should look? I think we need to add HashAlgorithmEnum.

There are a bunch of Enums classes there, all but one are just mockups and the OpenEdge.Net.HTTP.StatusCodeEnum doesn't look like a real enum as it only returns integer values not actual enum values.

What we've tried was to add some base implementation in Progress.Lang.Enum and then use static properties/methods in each specific enum classes. Since GetEnum methods are static those need to be added to each and every enum, I've used a static block to populate the list of enums. If you have a better idea or want this to be implemented in a specific way please let us know.

However, we need to somehow fix the conversion to make the generated code compile. Using new object doesn't seem to work, unless we make the enum class return enum instance on GetEnum not object and the generate code use something like this:

silent(() -> rawRsp.assign(oByteBucket.ref().getHash(new object<com.goldencode.p2j.oo.core.HashAlgorithmEnum>(com.goldencode.p2j.oo.core.HashAlgorithmEnum.getEnum(entry(nrCount, algList))))));

Or, we leave the enum methods/properties return object and then there is no need to use new object with return value.

silent(() -> rawRsp.assign(oByteBucket.ref().getHash(com.goldencode.p2j.oo.core.HashAlgorithmEnum.getEnum(entry(nrCount, algList)))));

#64 Updated by Marian Edu about 4 years ago

It turns out returning an object<> that has a reference that was not 'registered' with ObjectOps will fail anyway with 'invalid handle' error. I see for legacyclass that has static methods much like enums all classes are registered, maybe something like that should be done for enums?

We will probably skip the tests that uses enums for the time being until you have a decision on how the enums must be converted/implemented.

I do have another question about those skeleton 4GL classes used by the lexer (it seems only the syntax fails), what should we do with the changes we made there, are those in another repository?

#65 Updated by Constantin Asofiei about 4 years ago

On 3/10/20 12:20 PM, Mihai Tiganea wrote:

Getting deeper with tests for openedge.core.bytebucket I discover comments like:

 /**
   * Resizes the internal 'array' of records. We can shrink down the number of rows, but not
   * smaller than the bucket's size in bytes. Not used in the current implementation.
   *
   * @param _p1 the new size (number of records) for the internal structure.
   */

Meaning that method is not used and should be left as is?

The comment was added that the method was not used 'currently'. It needs to be implemented (and the comment removed).

My question is made in context that this method, “Resize(int)”, should be used in method “Initialize()” who is used in “Instance()”(and with params).

In 4GL:

If object is created with Instance(), applying GetByte() using out of range Position – error 138 is throwed

If object is created with new .. applying GetByte() using out of range Position – no-error is throwed but response is unknown (?)

You need to use ObjectOps.newInstance to create a new 4GL-compatible instance. Do not use the Java new operator directly.

In FWD only second case can be tested and it behave like described.
Please advise.
If there is any other way and place (like redmine) to rise this kind of problems please let me know.

#66 Updated by Constantin Asofiei about 4 years ago

Marian Edu wrote:

The issue was due to the fact that GetEnum methods in skeleton class for Enum were not static, adding those along with all enum values (as static properties) in HashAlgorithmEnum helps a bit, now the Java class gets converted but the result does not compile.
[...]
notice the openedge.core.hashalgorithmenum class that does not exist.

This is a bug, needs to be fixed. I'll take a look at it.

Greg, do we have some guildelines how the converted 4GL ENUMs should look? I think we need to add HashAlgorithmEnum.

There are a bunch of Enums classes there, all but one are just mockups and the OpenEdge.Net.HTTP.StatusCodeEnum doesn't look like a real enum as it only returns integer values not actual enum values.

We previously emulated OE enums via OE properties, at the skeleton levels. This is not correct, and needs to be changed.

What we've tried was to add some base implementation in Progress.Lang.Enum and then use static properties/methods in each specific enum classes. Since GetEnum methods are static those need to be added to each and every enum, I've used a static block to populate the list of enums. If you have a better idea or want this to be implemented in a specific way please let us know.

I'm not sure I understand what you mean here: are all 4GL enums derived from Progress.Lang.Enum?

However, we need to somehow fix the conversion to make the generated code compile. Using new object doesn't seem to work, unless we make the enum class return enum instance on GetEnum not object and the generate code use something like this:
[...]

Or, we leave the enum methods/properties return object and then there is no need to use new object with return value.
[...]

Can you isolate this issue in a simple, standalone, testcase?

Greg: what's the priority on the enum support?

#67 Updated by Greg Shah about 4 years ago

Greg, do we have some guildelines how the converted 4GL ENUMs should look? I think we need to add HashAlgorithmEnum.

I am starting work on ENUM support right now. Please watch #4349 for details. While this is in process, try to work around this limitation. Sorry.

I do have another question about those skeleton 4GL classes used by the lexer (it seems only the syntax fails), what should we do with the changes we made there, are those in another repository?

These are in the skeletons project. Any changes can be provided via bzr send and we can commit here.

#68 Updated by Mihai Popescu-Tiganea about 4 years ago

When testing ByteBucket methods we have found that is need for improvement in other classes who is used by ByteBucket.
  • longchar.java -> codepage is not transferred when returnNormal is used - issue solved by overwrite assign method
  • CopyLob.java -> Following errors are not trowed: 912 - codepage not in convmap; 11395 - incompatible codepage; 12125 - UNDEFINED codepage usage restrictions - issues not solved

Can we try to modify other classes - like longchar or CopyLob ( of course - only if we can do it ) ?

What steps do we need to follow in this kind of situations?

#69 Updated by Constantin Asofiei about 4 years ago

The email patches are in 4231b ref 11364
  • Fixed an issue with method call's argument annotation in case of chained OO method calls (no need to emit 'new object').
  • Fixes for UNDO, THROW ERROR and UNDO, RETURN ERROR@, in case when a OO-like error condition needs to be generated.
  • Fixed a typo in ByteBucket.putBytes_1's LegacySignature annotation.
  • Fixed UNDO, RETURN ERROR and UNDO, RETURN NO-APPLY conversion.

#70 Updated by Greg Shah about 4 years ago

Can we try to modify other classes - like longchar or CopyLob ( of course - only if we can do it ) ?

Yes, please do!

What steps do we need to follow in this kind of situations?

We just merged branch 4335a to trunk. The next branch we are sharing is 4231b which will be based on trunk 11345 which is the same as 4335a. I'll post here when it is available.

Use the same process as for the OO classes. For now we will push a branch to xfer.goldencode.com:/opt/fwd/4231b and bzr send revisions to us for merge/commit.

#71 Updated by Greg Shah about 4 years ago

xfer.goldencode.com:/opt/fwd/4231b is now available. FYI, xfer.goldencode.com:/opt/fwd/4335a has been removed.

#72 Updated by Marian Edu about 4 years ago

Greg Shah wrote:

xfer.goldencode.com:/opt/fwd/4231b is now available. FYI, xfer.goldencode.com:/opt/fwd/4335a has been removed.

OK Greg, does this mean we have to merge our local branch with the new one? I've tried to do just that but there seems to be quite a few of merge conflicts when I do that so what should we do here?

Text conflict in build.xml
Text conflict in rules/annotations/ocx_conversion.rules
Text conflict in rules/convert/control_flow.rules
Text conflict in rules/convert/java_templates.tpl
Text conflict in rules/convert/literals.rules
Text conflict in rules/convert/ui_statements.rules
Text conflict in rules/include/common-progress.rules
Text conflict in src/com/goldencode/p2j/concurrent/WaitStatus.java
Text conflict in src/com/goldencode/p2j/main/ClientBuilderOptions.java
Text conflict in src/com/goldencode/p2j/main/WebServiceHandler.java
Text conflict in src/com/goldencode/p2j/persist/BufferImpl.java
Text conflict in src/com/goldencode/p2j/persist/PreselectQuery.java
Text conflict in src/com/goldencode/p2j/persist/QueryWrapper.java
Text conflict in src/com/goldencode/p2j/persist/RandomAccessQuery.java
Text conflict in src/com/goldencode/p2j/persist/RecordBuffer.java
Text conflict in src/com/goldencode/p2j/persist/RuntimeJastInterpreter.java
Text conflict in src/com/goldencode/p2j/persist/SortCriterion.java
Text conflict in src/com/goldencode/p2j/persist/TemporaryBuffer.java
Text conflict in src/com/goldencode/p2j/security/BitFlagsResource.java
Text conflict in src/com/goldencode/p2j/uast/SymbolResolver.java
Text conflict in src/com/goldencode/p2j/uast/progress.g
Text conflict in src/com/goldencode/p2j/ui/ConfigManager.java
Text conflict in src/com/goldencode/p2j/ui/chui/ThinClient.java
Text conflict in src/com/goldencode/p2j/ui/client/FocusManager.java
Text conflict in src/com/goldencode/p2j/ui/client/Frame.java
Text conflict in src/com/goldencode/p2j/util/AppServerLauncher.java
Text conflict in src/com/goldencode/p2j/util/HandleOps.java
Text conflict in src/com/goldencode/p2j/util/ObjectOps.java
Text conflict in src/com/goldencode/p2j/util/ProcedureManager.java
Text conflict in src/com/goldencode/p2j/util/SharedVariableManager.java
Text conflict in src/com/goldencode/p2j/util/TextOps.java
Text conflict in src/com/goldencode/p2j/util/Utils.java
32 conflicts encountered.

#73 Updated by Greg Shah about 4 years ago

I assume that you have not changed the files in the merge conflict list?

The new 4231b branch is a "superset" of 4335a. It has the final 4335a changes plus quite a few other changes. The best thing to do is to merge only your specific changes into that branch. You can do this by selecting a range of revisions on the bzr merge.

#74 Updated by Marian Edu about 4 years ago

Greg Shah wrote:

I assume that you have not changed the files in the merge conflict list?

The new 4231b branch is a "superset" of 4335a. It has the final 4335a changes plus quite a few other changes. The best thing to do is to merge only your specific changes into that branch. You can do this by selecting a range of revisions on the bzr merge.

None of those files in conflict were changed by us locally so I would say I can just pick the 'other' version and resolve all conflicts so we get all those changes in our local branch.

Are we still to use unbind and work locally and then use send or we can push changes in that branch?

Thanks

#75 Updated by Greg Shah about 4 years ago

None of those files in conflict were changed by us locally so I would say I can just pick the 'other' version and resolve all conflicts so we get all those changes in our local branch.

It may be faster to apply just your changes into a new local copy of that branch.

Are we still to use unbind and work locally and then use send

Yes, this is still a shared branch so there is quite a bit of change coming from our side.

#76 Updated by Marian Edu about 4 years ago

Greg Shah wrote:

xfer.goldencode.com:/opt/fwd/4231b is now available. FYI, xfer.goldencode.com:/opt/fwd/4335a has been removed.

We can't get the code generation to work with the new branch, it goes into a loop and blow with stack overflow...

[java] Scanning Progress Source (preprocessor, lexer, parser, persist ASTs)
     [java] ------------------------------------------------------------------------------
     [java] oo\openedge\core\memptr\test_constructors.p
     [java]    Lvl01 parse: .\abl\skeleton\oo4gl\OpenEdge\Core\HashAlgorithmEnum.cls
     [java]    Lvl02 parse: | .\abl\skeleton\oo4gl\Progress\Lang\Enum.cls
     [java]    Lvl03 parse: | | .\abl\skeleton\oo4gl\Progress\Lang\Object.cls
     [java]    Lvl04 parse: | | | .\abl\skeleton\oo4gl\Progress\Lang\Class.cls
     [java]    Lvl05 parse: | | | | .\abl\skeleton\oo4gl\Progress\Lang\ParameterList.cls
     [java]    Lvl01 DONE:  .\abl\skeleton\oo4gl\OpenEdge\Core\HashAlgorithmEnum.cls
     [java] Exception in thread "main" java.lang.StackOverflowError
     [java]     at com.goldencode.p2j.security.ContextLocal.get(ContextLocal.java:459)
     [java]     at com.goldencode.p2j.security.ContextLocal.get(ContextLocal.java:430)
     [java]     at com.goldencode.p2j.util.TransactionManager$ContextContainer.obtain(TransactionManager.java:10363)
     [java]     at com.goldencode.p2j.util.TransactionManager.getTransactionHelper(TransactionManager.java:1709)
     [java]     at com.goldencode.p2j.util.ProcedureManager$WorkArea.init(ProcedureManager.java:4176)
     [java]     at com.goldencode.p2j.security.ContextLocal.initializeValue(ContextLocal.java:655)
     [java]     at com.goldencode.p2j.security.ContextLocal.access$600(ContextLocal.java:198)
     [java]     at com.goldencode.p2j.security.ContextLocal$Fallback.initialValue(ContextLocal.java:870)
     [java]     at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180)
     [java]     at java.lang.ThreadLocal.get(ThreadLocal.java:170)
     [java]     at com.goldencode.p2j.security.ContextLocal.get(ContextLocal.java:459)
     [java]     at com.goldencode.p2j.security.ContextLocal.get(ContextLocal.java:430)
     [java]     at com.goldencode.p2j.util.ProcedureManager.getProcedureHelper(ProcedureManager.java:995)
     [java]     at com.goldencode.p2j.util.WidgetPool$WorkArea.<init>(WidgetPool.java:863)
     [java]     at com.goldencode.p2j.util.WidgetPool$WorkArea.<init>(WidgetPool.java:857)
     [java]     at com.goldencode.p2j.util.WidgetPool$1.initialValue(WidgetPool.java:265)
     [java]     at com.goldencode.p2j.util.WidgetPool$1.initialValue(WidgetPool.java:262)
     [java]     at com.goldencode.p2j.security.ContextLocal$Fallback.initialValue(ContextLocal.java:869)
     [java]     at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180)
     [java]     at java.lang.ThreadLocal.get(ThreadLocal.java:170)

The problem seems to be related to the HashAlgorithmEnum, I've tried almost everything there - change the skeleton, change the Java implementation to no avail... it fails even if I leave the skeleton class empty and extend Progress.Lang.Object :(

Are we doing something wrong there, is there a predefined way of implementing Enums that we need to follow?

As it stands now we can't generate anything anymore, should we revert the merge and continue on what we had before (4335a)?

Thanks

#77 Updated by Constantin Asofiei about 4 years ago

There's something weird - the code you posted in the stacktrace should never execute during conversion. Did you add some Java code which executes on class loading (static c'tor, static vars, etc), in HashAlgorithmEnum.java?

#78 Updated by Marian Edu about 4 years ago

Constantin Asofiei wrote:

There's something weird - the code you posted in the stacktrace should never execute during conversion. Did you add some Java code which executes on class loading (static c'tor, static vars, etc), in HashAlgorithmEnum.java?

There are static vars and c'tor (block) in that 'enum' class but that was working just fine before, haven't had any issues with the conversion before merging the new branch :(

I'm trying to remove all static parts now to see if that helps but Enums needs static vars, how do you want us to go around this?

#79 Updated by Marian Edu about 4 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

There's something weird - the code you posted in the stacktrace should never execute during conversion. Did you add some Java code which executes on class loading (static c'tor, static vars, etc), in HashAlgorithmEnum.java?

There are static vars and c'tor (block) in that 'enum' class but that was working just fine before, haven't had any issues with the conversion before merging the new branch :(

I'm trying to remove all static parts now to see if that helps but Enums needs static vars, how do you want us to go around this?

OK, removing the static c'tor and add enums as needed seems to solve the issue.

#80 Updated by Constantin Asofiei about 4 years ago

Marian, how did you define the static members? This needs to be something like this:

   private static ContextLocal<integer> none = new ContextLocal<integer>()
   {
      protected integer initialValue()
      {
         return UndoableFactory.integer();
      }
   };

If you need a 4gl-compatible static ctor, it needs to be like this:

   @LegacySignature(type = Type.CONSTRUCTOR)
   @LegacyResourceSupport(supportLvl = CVT_LVL_FULL|RT_LVL_STUB)
   public static void __net_Uri_constructor__static__()
   {
      externalProcedure(Uri.class, new Block((Body) () -> 
      {
         // do not call super static ctor here
      }));
   }

#81 Updated by Marian Edu about 4 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

There's something weird - the code you posted in the stacktrace should never execute during conversion. Did you add some Java code which executes on class loading (static c'tor, static vars, etc), in HashAlgorithmEnum.java?

Constantin, while the conversion now seems to work we again don't see the client window status bar and it's again not getting focus. That we've solved by adding aspectj nature to the project in Eclipse, still this is already set and the builder takes considerable time to weave all files there (constantly dying from time to time with heap errors)... does all classes in there needs to be weaved or we can somehow limit the 'scope' of aspectj?

#82 Updated by Marian Edu about 4 years ago

Constantin Asofiei wrote:

Marian, how did you define the static members? This needs to be something like this:
[...]

For an Enum we have all values as 'static properties' - HashAlgorithmEnum:MD5, this is how we've tried to implement it. It seems to work but maybe we're doing it all wrong, what does ContextLocal does?

/** * Get the MD5 hash algorithm Enum. * * @return Enum.
*/
@LegacySignature(type = Type.GETTER, name = "MD5")
@LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_FULL)
public static object<HashAlgorithmEnum> getMd5() {
return addEnum(new character("MD5"), new int64(1));
}

#83 Updated by Constantin Asofiei about 4 years ago

Marian Edu wrote:

Constantin, while the conversion now seems to work we again don't see the client window status bar and it's again not getting focus. That we've solved by adding aspectj nature to the project in Eclipse, still this is already set and the builder takes considerable time to weave all files therae (constantly dying from time to time with heap errors)... does all classes in there needs to be weaved or we can somehow limit the 'scope' of aspectj?

This is a downside when running the FWD server and client from Eclipse; try increasing the heap for Eclipse process. The only way to run something without aspectj (from Eclipse) is to use the FWD Swing ChUI client (which now should work) and without any 4GL frame usage (MESSAGE statement can be used).

#84 Updated by Greg Shah about 4 years ago

FYI, my work on enums (#4349) is in process. I will have generic conversion and runtime support for enums when I am done. For now your static member approach is a good approximation. We will need to rework that code to match the implementation when it is ready. I hope to finish my testcases today so I can start the coding.

#85 Updated by Constantin Asofiei about 4 years ago

Marian Edu wrote:

... what does ContextLocal does?

In FWD, all clients are on the same Java process. And the Java static vars are JVM-wide - so we can't used 'pure static' vars. Instead, ContextLocal allows each user to have access to its own/local version of the static variable.

#86 Updated by Marian Edu about 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

... what does ContextLocal does?

In FWD, all clients are on the same Java process. And the Java static vars are JVM-wide - so we can't used 'pure static' vars. Instead, ContextLocal allows each user to have access to its own/local version of the static variable.

Thanks Constantin, good to know... for Enums however I think this is unnecessary as those are practically final static variables that doesn't change so pure Java static variables might work just fine in this case. Will change the code to follow the prescribed implementation when Greg is ready with the guidelines.

#87 Updated by Greg Shah about 4 years ago

FYI, the named enum instances will be final static and will have no mutable state. I agree that we don't need ContextLocal for enums. The only case where we will instantiate enums (outside of the class init) will be for flag enums where both bitwise operators and certain methods (e.g. SetFlag, UnsetFlag and ToggleFlag) will return new immutable instances based on existing instances.

#88 Updated by Marian Edu about 4 years ago

We somehow still have some issues with the error handling there.

Say one methodA needs to call another methodB with some default parameters, the parameters sent as input in methodA are validated right there and if not right an error is being thrown and that seems to work just fine. However, the other parameters are validated in methodB and even if that method throws the assert error this is not propagated outside of the method, so after calling methodA the error status is not set. If we do the same validation as in methodB inside methodA then the error is correctly set but this actually defeats the purpose of code reuse, most of the OO code out there will expect the error thrown in one method to pop out is block/routine level statements are used.

We do have `onBlockLevel(Condition.ERROR, Action.THROW);` inside our class `execute` method and so the error does gets thrown out of the class method but it looks like it only works one level deep :(

Aside from this there are places when calling methodB from methodA is done directly - aka, `return methodB()`, while other times the function/procedure blocks are used together with returnNormal. The latter approach seems to be what the code conversion is doing as well, I wonder why/when is appropriate to use the first approach - just calling the Java method normally?

#89 Updated by Constantin Asofiei about 4 years ago

Marian Edu wrote:

Say one methodA needs to call another methodB with some default parameters, the parameters sent as input in methodA are validated right there and if not right an error is being thrown and that seems to work just fine. However, the other parameters are validated in methodB and even if that method throws the assert error this is not propagated outside of the method, so after calling methodA the error status is not set. If we do the same validation as in methodB inside methodA then the error is correctly set but this actually defeats the purpose of code reuse, most of the OO code out there will expect the error thrown in one method to pop out is block/routine level statements are used.

Can you isolate this in a simple example? Or point me to an existing test?

Aside from this there are places when calling methodB from methodA is done directly - aka, `return methodB()`, while other times the function/procedure blocks are used together with returnNormal. The latter approach seems to be what the code conversion is doing as well, I wonder why/when is appropriate to use the first approach - just calling the Java method normally?

Never use Java return statement - you need to use BlockManager.returnNormal (and other return APIs) as needed.

#90 Updated by Marian Edu about 4 years ago

Constantin Asofiei wrote:

Can you isolate this in a simple example? Or point me to an existing test?

Since all OO classes use heavily Assert methods to validate input we must work with that Assert class and while most of the methods there are not yet implemented we're trying to add implementation on a 'as needed' basis it's not clear how we should do that.

All assert methods in there are static, some use internalProcedure blocks but others don't and simply validate input and throw error if assertion fails.

  • using internalProcedure the error is not thrown out of the method, it's not even silenced when `silent` is being used so it is simply shown as an alert box message
           internalProcedure(Assert.class, "IsPositive", new Block((Body) () -> 
              {
                  notNullBase(_p1, _p2);
                  if (_p1.longValue() <=0 )
                  {
                     raiseNonPositive(_p2);
                  }
              }));
    
  • When no block is being used the error thrown does goes up the stack, the error status is being set but even then this only seems to work for one level - throwing from methodB called by methodA doesn't make the error pass the methodA body.
                     notNullBase(_p1, _p2);
                  if (_p1.longValue() <=0 )
                  {
                     raiseNonPositive(_p2);
                  }
    
What we've tried:
  1. add a 'static' constructor on `Assert` class where we set the block level undo, throw option
  2. set the block level undo, throw option in `Memptr` class `execute` block
  3. add `ObjectOps.load(Assert.class);` on static methods to make the static constructor fire
  4. use returnError to throw the assertion failed error `returnError(ObjectOps.newInstance(AssertionFailedError.class, "I", reason));`
  5. use undoThrowTopLevel to throw the assertion failed error `undoThrowTopLevel(ObjectOps.newInstance(AssertionFailedError.class, "I", reason));`

Never use Java return statement - you need to use BlockManager.returnNormal (and other return APIs) as needed.

Yes, we figure out that much but then you need to be inside a Block to be able to do that and as said we've found places where no function/internalProcedure blocks are being used :(

#91 Updated by Constantin Asofiei about 4 years ago

Marian Edu wrote:

All assert methods in there are static, some use internalProcedure blocks but others don't and simply validate input and throw error if assertion fails.

If the implementation of the Assert methods relies on raising 4GL-like conditions, then the internalProcedure body is required - please add as needed.

  • using internalProcedure the error is not thrown out of the method, it's not even silenced when `silent` is being used so it is simply shown as an alert box message
    [...]

Some notes here - if you have a 'helper' Java method, then treat that method as if it was 'inlined' at the caller - you don't need a internalProcedure block for them.

  • When no block is being used the error thrown does goes up the stack, the error status is being set but even then this only seems to work for one level - throwing from methodB called by methodA doesn't make the error pass the methodA body.

I don't understand this part - do you have an explicit test?

What we've tried:

From looking at the code, I think there are some issues with block-level and routine-level statements for static methods. I'm checking this with some standalone tests.

#92 Updated by Constantin Asofiei about 4 years ago

Constantin Asofiei wrote:

I don't understand this part - do you have an explicit test?

I see it now... a two or more deep call is not working in FWD.

#93 Updated by Marian Edu about 4 years ago

Constantin Asofiei wrote:

Constantin Asofiei wrote:

I don't understand this part - do you have an explicit test?

I see it now... a two or more deep call is not working in FWD.

Constantin, as this seems to be quite important for us I've took the time to add more test cases for you in error_handling folder of testcases repository. Those new ones are for OO methods and I think most of the cases are covered there - various block/routine level options used both in the tested class as well as inside test procedure, also method calls two levels deep are covered.

Let me know if you have questions or need more test cases for this one.

#94 Updated by Constantin Asofiei about 4 years ago

Marian Edu wrote:

Let me know if you have questions or need more test cases for this one.

Thanks Marian, I still have some issues with the 'default' behavior, I hope to have it running tomorrow.

#95 Updated by Marian Edu about 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

Let me know if you have questions or need more test cases for this one.

Thanks Marian, I still have some issues with the 'default' behavior, I hope to have it running tomorrow.

So, should we change Assert as it should using internalProcedure block and loadClass with static c'tor for all those static methods and wait for your fix or we make it throw the error without the internalProcedure block so we can go on with our tests/implementation?

#96 Updated by Constantin Asofiei about 4 years ago

Marian Edu wrote:

So, should we change Assert as it should using internalProcedure block and loadClass with static c'tor for all those static methods and wait for your fix

Yes, please change these.

#97 Updated by Constantin Asofiei about 4 years ago

Marian, the changes are in 4231b rev 11389

Some parts were a little tricky to fix... sorry it took so long. If you happen to find other cases which are not working, please document them as a test in error_handling/. I'm using this set as a benchmark. Thanks for the help.

#98 Updated by Marian Edu about 4 years ago

Constantin Asofiei wrote:

Marian, the changes are in 4231b rev 11389

Some parts were a little tricky to fix... sorry it took so long. If you happen to find other cases which are not working, please document them as a test in error_handling/. I'm using this set as a benchmark. Thanks for the help.

Thanks, will do a merge with our local branch tomorrow morning and see how that works. Still working on rewriting the Assert methods, is the issue with error throwing from two or more level deep method call fixed already?

#99 Updated by Greg Shah about 4 years ago

I have pushed revision 11389 to xfer.goldencode.com:/opt/fwd/4231b.

#100 Updated by Constantin Asofiei about 4 years ago

Marian Edu wrote:

is the issue with error throwing from two or more level deep method call fixed already?

Yes, everything in your error handling tests works.

#101 Updated by Marian Edu about 4 years ago

Greg Shah wrote:

I have pushed revision 11389 to xfer.goldencode.com:/opt/fwd/4231b.

Thanks Greg, quick question... how are we to send changes from our local trunk? We have Memptr almost ready, Assert will be hopefully fixed tomorrow and ButeBucket is close as well. There are some other changes in non-related classes (longchar is one I know for sure) and changes in skeleton as well. Right now we send changes between us by sharing the projects in internal git repositories, I'm a bit worried of getting the best of `bzr send` as changes grows :(

#102 Updated by Greg Shah about 4 years ago

bzr send would maintain the revision history. An alternative is to zip up only your changed files and send those. We can check them in and you can pull down the latest 4231b with those changes. That would be the foundation for your next work.

#103 Updated by Marian Edu about 4 years ago

Greg Shah wrote:

I have pushed revision 11389 to xfer.goldencode.com:/opt/fwd/4231b.

Did eventually made a pull and merged with 4231b, we had some troubles starting the server due to the fact the newly added HostManager calls into ClientsToPortsGenerator to read the host file and if that does not exist creating it with 'rw-r--r--' permissions is not working for us mortals using MS$ :(

Creating an empty hosts.txt file in working folder solved the issue though so we're all good now.

However, I must be something really stupid as now the errors thrown from Assert are again displayed as alert-box message, the error status is not set and even more the block execution continue pass the Assert method that fails :(

While writing this thought to regenerate the code for the tests and try again, it now seems the error is even thrown out of a silent block and it goes into the catch block of the top level block (the procedure). Even more odd the internal procedure we use to log unexpected errors "log-err-obj" is not found anymore.

The code that calls the IP is `silent(() -> ControlFlowOps.invokeWithMode("log-err-obj", "I", oErr));` and this is how the procedure got generated:

@LegacySignature(type = Type.PROCEDURE, name = "log-err-obj", parameters = 
   {
      @LegacyParameter(name = "oErr", type = "OBJECT", qualified = "progress.lang.error", mode = "INPUT")
   })
   public void logErrObj(final object<? extends com.goldencode.p2j.oo.lang.LegacyError> _oErr)
   {
   }

What are we doing wrong here???

#104 Updated by Marian Edu about 4 years ago

Marian Edu wrote:

While writing this thought to regenerate the code for the tests and try again, it now seems the error is even thrown out of a silent block and it goes into the catch block of the top level block (the procedure). Even more odd the internal procedure we use to log unexpected errors "log-err-obj" is not found anymore.

Removing the catch block from the procedure 'solves' the issue, well the error being thrown out of the silent block not sure why the IP "log-err-obj" is not found but that is another issue.

Constantin, it doesn't matter if the closest block have a catch option set, when executing something with no-error (silent) the error does not get thrown... if it's suppressed the error-status error is set to true, if it is an @AppError and have a ReturnValue that one is set as return-value and if there are any messages those are added into the error-status message's stack.

#105 Updated by Constantin Asofiei about 4 years ago

Marian Edu wrote:

Creating an empty hosts.txt file in working folder solved the issue though so we're all good now.

Sorry, this was fixed recently in 4231b.

However, I must be something really stupid as now the errors thrown from Assert are again displayed as alert-box message, the error status is not set and even more the block execution continue pass the Assert method that fails :(

I missed the NO-ERROR with CATCH case. I'm looking into it.

The code that calls the IP is `silent(() -> ControlFlowOps.invokeWithMode("log-err-obj", "I", oErr));` and this is how the procedure got generated:

There's something wrong here; do you have errors during conversion? What test exactly are you converting (so I can double-check)?

#106 Updated by Constantin Asofiei about 4 years ago

I think your problem is now fixed in 4231b 11398 (xfer was updated, too). Please test.

The reason: I was processing the CATCH block too early; the fix was to let the exception propagate until the block owning the CATCH caught it.

If you have any logs for the conversion problem, please attach them.

#107 Updated by Eugenie Lyzenko about 4 years ago

Constantin Asofiei wrote:

I think your problem is now fixed in 4231b 11398 (xfer was updated, too). Please test.

The reason: I was processing the CATCH block too early; the fix was to let the exception propagate until the block owning the CATCH caught it.

If you have any logs for the conversion problem, please attach them.

I do not need to restart conversion for this change, right?

#108 Updated by Constantin Asofiei about 4 years ago

Eugenie Lyzenko wrote:

I do not need to restart conversion for this change, right?

Reconversion is not needed.

#109 Updated by Marian Edu about 4 years ago

Constantin Asofiei wrote:

I think your problem is now fixed in 4231b 11398 (xfer was updated, too). Please test.

Pulled that out, gradle jar and then convert files and all seems to work now (even the hosts.txt file is not needed anymore), thanks for that.

If you have any logs for the conversion problem, please attach them.

There was no error on conversion, the "log-err-obj" method was correctly converted... the only thing I can think of now if maybe the 'scope' in the catch block did hide the whole procedure scope so the internal procedure was not resolved at that point. Did tried to debug the whole resolving process but was late yesterday and I don't think I've completely understood it, fact is the procedure was not resolved as internal entry, nor in procedure supper nor session supper so it fall back to external procedure resolver which normally failed to find any "log-err-obj.p" in PROPATH :(

Will try to change the test to see if that is still the case, right now the errors are not being thrown out of the silent block so I need to write some other test for that... will let you know if anything.

#110 Updated by Marian Edu about 4 years ago

Marian Edu wrote:

Will try to change the test to see if that is still the case, right now the errors are not being thrown out of the silent block so I need to write some other test for that... will let you know if anything.

Ok, just tested and now the IP is correctly resolved (as internal entry) when in a catch block.

#111 Updated by Constantin Asofiei about 4 years ago

Marian Edu wrote:

Marian Edu wrote:

Will try to change the test to see if that is still the case, right now the errors are not being thrown out of the silent block so I need to write some other test for that... will let you know if anything.

Ok, just tested and now the IP is correctly resolved (as internal entry) when in a catch block.

From your previous note, looks like the root cause was that the CATCH block was executed in the wrong stack location, and not where it was defined (and THIS-PROCEDURE was incorrect).

If you see other issues, please let me know.

#112 Updated by Greg Shah about 4 years ago

In regard to 4231b rev 11398, do we need to loop through the enclosing blocks in BlockManager.processLegacyError() or is it enough to let the exception "bubble up"? Or better yet, unwind to a very specific target block before honoring the error. I ask because the current code figures out which catch block honors the exception (if any) but it then throws the exception anyway if it is not the current block. Doesn't this mean that we will repeat this process (looping through enclosing block definitions) at each level as we bubble up? It seems like extra work is being done here which we can eliminate. It may have performance implications in loops that enclose deeply nested blocks where exceptions are heavily used.

#113 Updated by Constantin Asofiei about 4 years ago

Greg Shah wrote:

In regard to 4231b rev 11398, do we need to loop through the enclosing blocks in BlockManager.processLegacyError() or is it enough to let the exception "bubble up"? Or better yet, unwind to a very specific target block before honoring the error. I ask because the current code figures out which catch block honors the exception (if any) but it then throws the exception anyway if it is not the current block. Doesn't this mean that we will repeat this process (looping through enclosing block definitions) at each level as we bubble up? It seems like extra work is being done here which we can eliminate. It may have performance implications in loops that enclose deeply nested blocks where exceptions are heavily used.

I agree the current implementation might not be the most optimal approach, as 4GL might have a cleaner way of treating these. Is still a little blurry of how everything behaves, I need to spend some time 'writing down' each and every case and look for similar patterns. Currently, what I found was that there is different behavior, depending on the type of error (RETURN ERROR, RETURN ERROR new AppError, UNDO, THROW), silent mode and BLOCK-LEVEL or ROUTINE-LEVEL statements. I've tried to 'unify' the different code paths FWD is using to manage an error condition, but there is still a 'diversion' between a simple RETURN ERROR and the other AppError cases. I'm also missing cases tests where the ERROR condition is generated by business logic, and not explicitly (this may be another case to treat differently).

Anyway, I need to think a little more on this...

#114 Updated by Greg Shah about 4 years ago

OK, that is fair. We need to handle all cases with compatibility before implementing any optimizations.

#115 Updated by Marian Edu about 4 years ago

Greg Shah wrote:

OK, that is fair. We need to handle all cases with compatibility before implementing any optimizations.

Not really sure how this is implemented internally but given the block nesting level in an app can be really deep I don't think they figure out right there where the error occurs what needs to be done. The error just bubble up depending on the block it occurred:
- does the block have a catch on that specific error or one of it's base classes then that catch block is executed and the error doesn't go up, unless thrown back from the catch block
- the default block error processing apply, using block/routine level statements in the processing unit affects the block processing (mainly switching from "undo, leave" or "undo, retry" to "undo, throw")
- there is no real difference between return error, return error new AppError (I think this statement does not convert as it should) and using undo, throw statements, all are generating error conditions and it's up to the block to handle them. A return error will actually throw an AppError that one can catch if they use the new structured error handling, else it will go to the error-status system handle.

@Constantin, I'm testing the latest changes and there still seems to be differences in how error handling works at least for constructors. Error thrown from a constructor in FWD are not propagated, doing an assign `var = new Class() no-error` does not set the error-status error although I can see the error is being thrown.

#116 Updated by Constantin Asofiei about 4 years ago

Marian Edu wrote:

- there is no real difference between return error, return error new AppError (I think this statement does not convert as it should) and using undo, throw statements, all are generating error conditions and it's up to the block to handle them. A return error will actually throw an AppError that one can catch if they use the new structured error handling, else it will go to the error-status system handle.

A RETUNR ERROR "foo" sets the RETURN-VALUE in some cases. And if there is no BLOCK-LEVEL or ROUTINE-LEVEL, then no AppError is throw - these are some of the differences I refer to.

@Constantin, I'm testing the latest changes and there still seems to be differences in how error handling works at least for constructors. Error thrown from a constructor in FWD are not propagated, doing an assign `var = new Class() no-error` does not set the error-status error although I can see the error is being thrown.

I'm looking into it, c'tors have their own way of being called in FWD...

#117 Updated by Marian Edu about 4 years ago

Constantin Asofiei wrote:

A RETUNR ERROR "foo" sets the RETURN-VALUE in some cases. And if there is no BLOCK-LEVEL or ROUTINE-LEVEL, then no AppError is throw - these are some of the differences I refer to.

If you add a catch section to that block the RETURN ERROR statement will throw an AppError that you will be able to catch in that section. It will have a ReturnValue property set correctly and no other messages.

I'm looking into it, c'tors have their own way of being called in FWD...

Maybe this is the issue, we're using an internalProcedure block for constructors so it should probably behave like that block or we might need to use a different one?

#118 Updated by Constantin Asofiei about 4 years ago

Marian Edu wrote:

Maybe this is the issue, we're using an internalProcedure block for constructors so it should probably behave like that block or we might need to use a different one?

No, there's no problem with the internalProcedure (or how we convert c'tors); in FWD logic, ObjectOps.newInstance is as if a RUN statement was used to execute the c'tor. This is another branch of cases I need to check... (including functions, dynamic functions calls, dynamic OO method calls), at least I can model them from the existing ones. I think it will take a while, hope to have them on Monday.

#119 Updated by Marian Edu about 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

Maybe this is the issue, we're using an internalProcedure block for constructors so it should probably behave like that block or we might need to use a different one?

No, there's no problem with the internalProcedure (or how we convert c'tors); in FWD logic, ObjectOps.newInstance is as if a RUN statement was used to execute the c'tor. This is another branch of cases I need to check... (including functions, dynamic functions calls, dynamic OO method calls), at least I can model them from the existing ones. I think it will take a while, hope to have them on Monday.

Constantin, apart the error from c'tor we need to be able to catch the system errors - those you usually throw from FWD using recordOrThrowError. At one point there the error message was simply displayed to the user and a TODO stated that it should throw the error for structured error handling. I've made a few changes there along that line, see the patch attached, and this seems to work - for our use-case. It still need to figure out wether or not to throw the error or display it at some point because as it is now in our changes if not silent out the error goes up the stack but it is never displayed to the client as a last resort if no catch block exist :(

I imagine you're working on this so won't delve more into it, just changed that so our tests pass ;)

#120 Updated by Marian Edu almost 4 years ago

We have an issue with the 'extent' variables here, we get at NPE on ArrayAssigner.registerDynamicArray because as the code is generated at that point the scope for the ArrayAssigner is not started (peek will return null so add will throw NPE). I think the issue come from the code generation, if we declare a variable with indeterminate extent:

define variable cRsp as character no-undo extent.

the generated code have the character array defined outside of the execute block so it will fire on init where only the top level 'startup' block was loaded.

character[] cRsp = TypeFactory.characterExtent();

#121 Updated by Constantin Asofiei almost 4 years ago

I have FWD fixes for cases of 'nested' calls (for ctors, methods, internal procedures, dynamic functions), which cover RETURN ERROR "foo", RETURN ERROR new AppError, UNDO, THROW ERROR and 'implicit' OE errors (like accessing an attribute in an unknown handle). These work, except the case for RETURN ERROR with nested constructors and default error management (no ROUTINE/BLOCK-LEVEL statements): if this is called from a super-constructor, then 4GL behaves differently - unlike RUN (or other types of calls), the ERROR flag propagates up the stack, until it reaches the NEW operator (and this makes sense, as the object needs to be 'invalidated', because the c'tor failed...); I haven't found a solution in FWD for this, yet.

The other parts which needs to be covered in 4GL tests are:
  • direct function calls
  • dynamic new
  • dynamic object method calls
  • external programs
  • ON ERROR UNDO, THROW clauses.
  • error propagation in nested blocks

From these, I think only the last two may need explicit fixing - as it looks like the ERROR can be 'eaten' by a parent block, even if it doesn't have a CATCH block to treat it.

I'll prepare the current changes and look into the ArrayAssigner NPE, too. I'll defer the other issues.

#122 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

We have an issue with the 'extent' variables here, we get at NPE on ArrayAssigner.registerDynamicArray because as the code is generated at that point the scope for the ArrayAssigner is not started (peek will return null so add will throw NPE). I think the issue come from the code generation, if we declare a variable with indeterminate extent:
[...]

the generated code have the character array defined outside of the execute block so it will fire on init where only the top level 'startup' block was loaded.
[...]

Argh, the issue here is that some parts of ArrayAssigner logic needs to be executed before the actual block is started (and its scope is pushed). FWD behaves OK in defining the variable as a class member or a Java method variable (outside of the BlockManager API). The problem here is that we need to defer some logic, to be executed only after the scope has been pushed on the stack.

#123 Updated by Greg Shah almost 4 years ago

From these, I think only the last two may need explicit fixing - as it looks like the ERROR can be 'eaten' by a parent block, even if it doesn't have a CATCH block to treat it.

Anything not completed now should go into a new task which we can link in to #4373.

#124 Updated by Constantin Asofiei almost 4 years ago

Marian, what's the use case for the extent problem? Can you modify it so that it uses a fixed extent? Or to execute the test 'one top-level down', from an internal procedure. This would be a way to bypass the abend. Although the problem is real, the fixes are pretty intrusive, and I'd like to postpone them for now.

The error fixes mentioned in #4384-121 are in 4231b rev 11406 - xfer was updated.

#125 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian, what's the use case for the extent problem? Can you modify it so that it uses a fixed extent? Or to execute the test 'one top-level down', from an internal procedure. This would be a way to bypass the abend.

The use case is methods in String that returns character extent (split), we can move the test in an IP and that should probably fix it - moving the variable declaration inside the execute (main block) also works but moving it into an IP means we don't need to update the generated code by hand :)

#126 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

I have FWD fixes for cases of 'nested' calls (for ctors, methods, internal procedures, dynamic functions), which cover RETURN ERROR "foo", RETURN ERROR new AppError, UNDO, THROW ERROR and 'implicit' OE errors (like accessing an attribute in an unknown handle). These work, except the case for RETURN ERROR with nested constructors and default error management (no ROUTINE/BLOCK-LEVEL statements): if this is called from a super-constructor, then 4GL behaves differently - unlike RUN (or other types of calls), the ERROR flag propagates up the stack, until it reaches the NEW operator (and this makes sense, as the object needs to be 'invalidated', because the c'tor failed...); I haven't found a solution in FWD for this, yet.

But didn't you mentioned c'tors are already treated differently in FWD? Not sure if we have that use-case yet though.

The other parts which needs to be covered in 4GL tests are:

Do you need us to write test for those or just mentioned those here for completeness?

From these, I think only the last two may need explicit fixing - as it looks like the ERROR can be 'eaten' by a parent block, even if it doesn't have a CATCH block to treat it.

The error is normally 'eaten' by the block where it occurred as most of the blocks in 4GL have undo, retry or undo, leave as a default. Using BLOCK-LEVEL directive will change the default for all blocks in the unit (destructor, UI triggers block excluded), ROUTINE-LEVEL changes the default only for internal procedure/functions, methods, constructors, property accessors and DB triggers blocks.

#127 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

The error fixes mentioned in #4384-121 are in 4231b rev 11406 - xfer was updated.

OK, I will do a pull and merge with our local 'branch'. Wonder if the changes I've made in the patch I've sent will create conflicts, in fact I hope they will so I can just resolve to `other` :)

#128 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

But didn't you mentioned c'tors are already treated differently in FWD? Not sure if we have that use-case yet though.

Yes, some parts are different, and some parts are common, with the RUN ERROR processing (for default error level) being one.

Do you need us to write test for those or just mentioned those here for completeness?

No, I'll continue with that, thanks for the help.

The error is normally 'eaten' by the block where it occurred as most of the blocks in 4GL have undo, retry or undo, leave as a default.

I guess this part, the blocks in 4GL have undo, retry or undo, leave as a default, is what I was seeing.

#129 Updated by Marian Edu almost 4 years ago

Quick question on naming convention, for interfaces it seems the conversion translate the OE names to all lower for the package name and then the name of the interface is Pascal case but the first letter after 'I' is lower - as in IhttpClientLibrary, IhttpRequest and so on. For classes also Pascal case but since there is no "I" to start with the names used in 4GL are preserved - ClientOptions.

In fact there are many interfaces there that follows the same name pattern so guess this is what we have to use, problem is one of the interfaces we're working with already existed there but with the same name as in 4GL - IHttpClientLibrary. Is it ok to just rename those as needed when name doesn't match the one used by the conversion?

#130 Updated by Greg Shah almost 4 years ago

it seems the conversion translate the OE names to all lower for the package name

Yes. Except the Progress and OpenEdge are mapped differently.

then the name of the interface is Pascal case

Yes, but in Java we use "camel cased" names.

I hate the use of the I prefix for interfaces (e.g. IMyInterfaceName) convention. Please do not use it.

but the first letter after 'I' is lower - as in IhttpClientLibrary, IhttpRequest and so on.

This is just implemented improperly. Our standards do NOT specify this.

For classes also Pascal case but since there is no "I" to start with the names used in 4GL are preserved - ClientOptions.

Again, camel case.

In fact there are many interfaces there that follows the same name pattern so guess this is what we have to use, problem is one of the interfaces we're working with already existed there but with the same name as in 4GL - IHttpClientLibrary. Is it ok to just rename those as needed when name doesn't match the one used by the conversion?

You do not need to keep the class or interface names the same as in OE. If it makes sense, that is OK. But it is not required. Mostly, I just want good, descriptive names.

For our standards, please see Naming

#131 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

Yes, but in Java we use "camel cased" names.

camel case for variables, class names are still pascal case it seems (aka, starts with capital letter).

I hate the use of the I prefix for interfaces (e.g. IMyInterfaceName) convention. Please do not use it.

No comment but thought that is we are to map what exist in OE we must keep the same name, else how would you map in FWD from OE name?

This is just implemented improperly. Our standards do NOT specify this.

Again, this is not something we've added - we just map the OE names and what we've found there already in FWD was following the same path.

You do not need to keep the class or interface names the same as in OE. If it makes sense, that is OK. But it is not required. Mostly, I just want good, descriptive names.

Same question as before, how would you map the class name used in OE to the one in FWD - it seems to be the classes/interfaces in skeleton are used by the generator but other than that I don't see how the names are mapped, if different :(

For our standards, please see Naming

#132 Updated by Greg Shah almost 4 years ago

Yes, but in Java we use "camel cased" names.

camel case for variables, class names are still pascal case it seems (aka, starts with capital letter).

The term camel case is also used for classes and interfaces. It really just refers to the idea that different syllables of a compound word are delineated by an upper case letter while all other letters are lowercase. The fact that classes and interfaces also start with a capital is still camel case.

thought that is we are to map what exist in OE we must keep the same name, else how would you map in FWD from OE name?

Yes, most of the time it is OK to use the same names. Sometimes it is not possible, where there are conflicts with existing Java classes.

If you use the same names it will map automatically. If you use different names, then some mapping data is needed in conversion. We handle OO naming in multiple places but I think all the "override mapping" is found in rules/inlcude/common-progress.rules, in the java_override_oo_names function. Constantin is making changes in this area in #3741 but I think you are OK adding there.

Again, this is not something we've added - we just map the OE names and what we've found there already in FWD was following the same path.

I know. I just would prefer not to follow this convention.

#133 Updated by Constantin Asofiei almost 4 years ago

Greg: for the skeleton classes, the Java equivalent is the one returned by our NameConverter rules - a IWebHandler 4GL name will convert in FWD as IwebHandler.

Marian: to make sure you got it right, create a simple test which has something like:

def var x as progress.web.iwebhandler.
message x.

and see what Java class name is FWD emitting in the converted code. You must use that in the p2j.oo equivalent.

#134 Updated by Greg Shah almost 4 years ago

Greg: for the skeleton classes, the Java equivalent is the one returned by our NameConverter rules - a IWebHandler 4GL name will convert in FWD as IwebHandler.

Yes, this is definitely not matching our standard. It leaves a bad result.

#135 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Greg: for the skeleton classes, the Java equivalent is the one returned by our NameConverter rules - a IWebHandler 4GL name will convert in FWD as IwebHandler.

Marian: to make sure you got it right, create a simple test which has something like:
[...]
and see what Java class name is FWD emitting in the converted code. You must use that in the p2j.oo equivalent.

That's exactly what we did and observed the pattern we described, problem is for instance IHttpClientLibrary interface was already present in FWD but when we try to use that in a test it is converted as IhttpClientLibrary. Question is, is that the right thing, if yes, should we go ahead and rename the existing interfaces to follow that naming convention or how to handle this?

#136 Updated by Constantin Asofiei almost 4 years ago

Greg Shah wrote:

Greg: for the skeleton classes, the Java equivalent is the one returned by our NameConverter rules - a IWebHandler 4GL name will convert in FWD as IwebHandler.

Yes, this is definitely not matching our standard. It leaves a bad result.

One way would be to find the p2j.oo equivalent automatically (searching for the LegacyResource annotation), and use the 'real implementation' Java name. I would rather do this than start coding exceptions in java_override_oo_names.

The downside is that the naming will rely on already having the legacy class defined in FWD - I can't say for sure, but this may affect the parsing part, if FWD is missing that skeleton.

#137 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

That's exactly what we did and observed the pattern we described, problem is for instance IHttpClientLibrary interface was already present in FWD but when we try to use that in a test it is converted as IhttpClientLibrary. Question is, is that the right thing, if yes, should we go ahead and rename the existing interfaces to follow that naming convention or how to handle this?

This one, and maybe others, I think were added early on, and were written 'by hand', without checking how this converts in FWD.

I think we can declare this as an exception and map it in java_override_oo_names.

#138 Updated by Greg Shah almost 4 years ago

One way would be to find the p2j.oo equivalent automatically (searching for the LegacyResource annotation), and use the 'real implementation' Java name. I would rather do this than start coding exceptions in java_override_oo_names.

I agree this is a better way. In fact, we really want to eliminate the skeletons as much as is possible.

The downside is that the naming will rely on already having the legacy class defined in FWD - I can't say for sure, but this may affect the parsing part, if FWD is missing that skeleton.

We can use the LegacyResource annotation where it is available and fall back to skeletons for anything not found. Over the intermediate term, I still want to eliminate the skeletons but we will need to come up with an approach.

#139 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

This one, and maybe others, I think were added early on, and were written 'by hand', without checking how this converts in FWD.

I think we can declare this as an exception and map it in java_override_oo_names.

OK, so the one that already exist we do not 'refactor' but we need to add them as exceptions. That one that are missing and we need to add will follow the naming convention used by the conversion - aka, first letter after 'I' is lowercase. Is that correct?

#140 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

OK, so the one that already exist we do not 'refactor' but we need to add them as exceptions.

Correct. Let me know if it works or not.

That one that are missing and we need to add will follow the naming convention used by the conversion - aka, first letter after 'I' is lowercase. Is that correct?

Yes, my opinion is to go this route, to not complicate things. I'd rather go through them all once, and rename anything which doesn't follow our standards, once we have the LegacyResource approach in place.

#141 Updated by Greg Shah almost 4 years ago

OK

#142 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

OK, so the one that already exist we do not 'refactor' but we need to add them as exceptions.

Correct. Let me know if it works or not.

That one that are missing and we need to add will follow the naming convention used by the conversion - aka, first letter after 'I' is lowercase. Is that correct?

Yes, my opinion is to go this route, to not complicate things. I'd rather go through them all once, and rename anything which doesn't follow our standards, once we have the LegacyResource approach in place.

OK, tried to add one extra rule to java_override_oo_name in common-progress.rules like this:

<rule>ovrdNames.put("net.http.ihttpclientlibrary", "net.http.IHttpClientLibrary")</rule>

Tried various combinations, none seems to work. Anything else we need to do apart from gradle jar there, do we need the full name or maybe just the name?

#143 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

The error fixes mentioned in #4384-121 are in 4231b rev 11406 - xfer was updated.

@Constantin, just to let you know I did the merge and error handling seems to work so far. Thanks

#144 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Tried various combinations, none seems to work. Anything else we need to do apart from gradle jar there, do we need the full name or maybe just the name?

Use this:

<rule>ovrdNames.put("net.http.ihttpclientlibrary", "IHttpClientLibrary")</rule>

The idea here is that we override only the converted class name (without package). Sorry, I should have mentioned this earlier.

#145 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

Tried various combinations, none seems to work. Anything else we need to do apart from gradle jar there, do we need the full name or maybe just the name?

Use this:
[...]

The idea here is that we override only the converted class name (without package). Sorry, I should have mentioned this earlier.

OK, changed the entry like that and now it converts just fine. Thanks

#146 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian, what's the use case for the extent problem? Can you modify it so that it uses a fixed extent? Or to execute the test 'one top-level down', from an internal procedure. This would be a way to bypass the abend. Although the problem is real, the fixes are pretty intrusive, and I'd like to postpone them for now.

Constantin, we did changed the tests to run the actual test code in an internal procedure and now the converted code runs, still the result is not as expected and the issue is with the @ArrayAssigner.assignMulti, that takes the initial target as input and if not initialised it will do the initialisation and in the end return it back to the caller. Problem is the generated code doesn't use any returned value from the method and expects to have the values set in the method, since Java is passing by value (the reference) the new array variable is never assigned back to the original target.

Changing this:

assignMulti(arrChar[0], com.goldencode.p2j.oo.net.MimeTypeHelper.splitType(new character("first string/second string")));

to this:
arrChar[0] = (character[]) assignMulti(arrChar[0], com.goldencode.p2j.oo.net.MimeTypeHelper.splitType(new character("first string/second string")));

fixes the reference but the uncheck cast is ugly to say at least :(

BTW, why an extent variable gents generated as an array of arrays and not simply array?

character[] arrChar[] = 
      {
         TypeFactory.characterExtent()
      };

#147 Updated by Marian Edu almost 4 years ago

Marian Edu wrote:

fixes the reference but the uncheck cast is ugly to say at least :(

Changing the assignMulti to use generics solved this, still the generated code must assign the result of assignMulti back to the variable that is the target of the assignment.

#148 Updated by Constantin Asofiei almost 4 years ago

Marian, there's a FWD conversion bug for this extent assign case. I'll fix it.

What's the signature for assignMulti that you are using? Did you remove the cast from the conversion rules?

Also, the 2-dimensional array is used because of 2 reasons:
  1. the var must be defined outside of the internalProcedure block
  2. as this is a dynamic extent, the Java reference must be mutable - and in Java, this requires the variable (when used in lambda expressions, anon classes, etc) to be 'effectively final'. Using a 2-dimensional array with only one element on the first index solves this issue, as we can mutate the Java reference.

#149 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian, there's a FWD conversion bug for this extent assign case. I'll fix it.

What's the signature for assignMulti that you are using? Did you remove the cast from the conversion rules?

In our case this one was used:

 public static BaseDataType[] assignMulti(BaseDataType[] target, BaseDataType[] source)

There was no cast in the conversion rule and we didn't changed the rules simply modified the generated code for the test procedure by hand.

Also, the 2-dimensional array is used because of 2 reasons:
  1. the var must be defined outside of the internalProcedure block
  2. as this is a dynamic extent, the Java reference must be mutable - and in Java, this requires the variable (when used in lambda expressions, anon classes, etc) to be 'effectively final'. Using a 2-dimensional array with only one element on the first index solves this issue, as we can mutate the Java reference.

I understand #2 if #1 is needed but I don't see why the var needs to be defined out of the internalProcedure/function block :(

#150 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

There was no cast in the conversion rule and we didn't changed the rules simply modified the generated code for the test procedure by hand.

OK, the extent assign bug is fixed in 4238b rev 11420 - xfer was updated. This should solve your case.

I understand #2 if #1 is needed but I don't see why the var needs to be defined out of the internalProcedure/function block :(

This is a 'condition' inherited from defining the vars scoped to the external program as Java fields; we followed the same pattern, as certain state needs to be 'delayed' until the next scope has opened (i.e. internalProcedure or externalProgram).

And even if we would define the var inside the internalProcedure's Block instance, then the same problem exists - as the var can be referenced inside other inner blocks, like DO, REPEAT, etc. So we still need to be to change the Java reference.

#151 Updated by Greg Shah almost 4 years ago

Created branch 4384a, branched from 4231b revision 11425.

Access it:

bzr co sftp://<userid>@xfer.goldencode.com/opt/fwd/4384a

Mihai/Marian: You can commit directly to this branch. We will need to do one of the following periodically:

  • Rebase it from 4231b; OR
  • Merge the changes into 4231b and then re-branch/overwrite 4384a from the merged 4231b.

Constantin and I will work with you on these last items as needed.

#152 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

Created branch 4384a, branched from 4231b revision 11425.

Access it:

bzr co sftp://<userid>@xfer.goldencode.com/opt/fwd/4384a

Mihai/Marian: You can commit directly to this branch.

OK, I did bind our local branch to 4384a and did a merge/update/commit that seemed to work fine (rev 11426)... going through all changed files to fill in missing revision comments at the moment.

We will need to do one of the following periodically:

  • Rebase it from 4231b; OR
  • Merge the changes into 4231b and then re-branch/overwrite 4384a from the merged 4231b.

Constantin and I will work with you on these last items as needed.

OK, we will continue to work with our local git repository and only I will push changes to bazaar to keep it simple.

#153 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

There was no cast in the conversion rule and we didn't changed the rules simply modified the generated code for the test procedure by hand.

OK, the extent assign bug is fixed in 4238b rev 11420 - xfer was updated. This should solve your case.

@Constantin, the code generated still doesn't work for us when indeterminate extents are used. This is how it is generated:

silent(() -> assignMulti(cRsp[0], com.goldencode.p2j.oo.core.LegacyString.split(lcValue)));

This doesn't work since cRsp0 is an empty array that is only initialised in that method but in the caller it remains as it was sent so our tests for methods that returns indeterminate extents only work if we tweak them by hand to really assign the value returned from assignMulti.

silent(() -> cRsp[0] = (character[]) assignMulti(cRsp[0], com.goldencode.p2j.oo.core.LegacyString.split(lcValue)));

As said before changing assignMulti to use generics will remove the need to use the cast and is something we can do if you want, changing the generator rules is not something we can venture into as it will definitively require a lot of digging and the learning curve there might be painful slow :(

#154 Updated by Greg Shah almost 4 years ago

OK, we will continue to work with our local git repository and only I will push changes to bazaar to keep it simple.

There is no danger in each of you committing independently into that bzr branch. The only reason that Constantin/myself need to be involved is to move the changes from 4384a into 4231b or the changes from 4231b into 4384a.

In fact, you can always rebase an unbound 4384a branch from the latest 4231b on xfer and then bzr push --overwrite the 4384a branch on xfer. So you really don't need our help to move changes from 4231b into 4384a.

#155 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

@Constantin, the code generated still doesn't work for us when indeterminate extents are used. This is how it is generated:

What's the testcase for this? This example:

function func0 returns int extent 5.

end.
procedure procx.
def var x as int extent.

x = func0().
x = oo.Foo:m1().
x = func0() no-error.
x = oo.Foo:m1() no-error.
end.

converts the calls as this:
         x[0] = (integer[]) assignMulti(x[0], func0());
         x[0] = (integer[]) assignMulti(x[0], com.goldencode.testcases.oo.Foo.m1());
         silent(() -> x[0] = (integer[]) assignMulti(x[0], func0()));
         silent(() -> x[0] = (integer[]) assignMulti(x[0], com.goldencode.testcases.oo.Foo.m1()));

#156 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

In fact, you can always rebase an unbound 4384a branch from the latest 4231b on xfer and then bzr push --overwrite the 4384a branch on xfer. So you really don't need our help to move changes from 4231b into 4384a.

Sounds simple enough, how do we know when we need to incorporate changes from 4231b, will someone notify us or we simply need to long-pool on that one from time to time?

#157 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

@Constantin, the code generated still doesn't work for us when indeterminate extents are used. This is how it is generated:

What's the testcase for this?

One of the test cases that doesn't convert correct for us is `oo/openedge/core/string/test_method_split_longchar.p`. The method in the class returns `character extent` (indeterminate), it is annotated with `extent = -1` and I see you did added something in assignments.rules for that case but the code still does not do the assignment back as the comment say it should :(

#158 Updated by Marian Edu almost 4 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

Marian Edu wrote:

@Constantin, the code generated still doesn't work for us when indeterminate extents are used. This is how it is generated:

What's the testcase for this?

Oddly enough your sample converts fine, even if I leave the function returns indeterminate extent (not five as in your example) but still calling one method in String class is not right:

internalProcedure(new Block((Body) () -> 
      {
         x[0] = (integer[]) assignMulti(x[0], func0());
         assignMulti(y[0], com.goldencode.p2j.oo.core.LegacyString.split(new longchar(new longchar("")), new character("")));
      }));

Now, might it be related to the fact that the method is static?

#159 Updated by Constantin Asofiei almost 4 years ago

I think is related to using a skeleton class. For example, at least the skeleton methods are missing the extent for the return type:

  method public static character extent Split(p1 as longchar):
  end.

  method public static character extent Split(p1 as longchar, p2 as character):
  end.

But this doesn't solve this fully. I'm looking into it.

#160 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

I think is related to using a skeleton class. For example, at least the skeleton methods are missing the extent for the return type:
[...]

Not in our version, we have a bunch of changes in the skeleton classes and those methods are correctly set to return character extent.

Maybe I should make a bzr send on that repository as well...

But this doesn't solve this fully. I'm looking into it.

#161 Updated by Marian Edu almost 4 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

I think is related to using a skeleton class. For example, at least the skeleton methods are missing the extent for the return type:

Attached a patch for skeleton updates against https://proj.goldencode.com/downloads/skeletons/repo, let me know if we need to push those to some other repository.

#162 Updated by Constantin Asofiei almost 4 years ago

The fix is in 4231b rev 11427 on xfer. I should have added it to 4384a, sorry.

You can try the rebase now :)

#163 Updated by Greg Shah almost 4 years ago

Marian Edu wrote:

Marian Edu wrote:

Constantin Asofiei wrote:

I think is related to using a skeleton class. For example, at least the skeleton methods are missing the extent for the return type:

Attached a patch for skeleton updates against https://proj.goldencode.com/downloads/skeletons/repo, let me know if we need to push those to some other repository.

FYI, I have updated https://proj.goldencode.com/downloads/skeletons/repo to rev 89 earlier today. Is your patch against that version?

#164 Updated by Greg Shah almost 4 years ago

Sounds simple enough, how do we know when we need to incorporate changes from 4231b, will someone notify us or we simply need to long-pool on that one from time to time?

We'll probably have both cases as makes sense.

The rebase process is documented in Rebase. It is important to follow the step-by-step process carefully. The process depends on the use of the "rewrite" plugin (see step 5 here Rewrite Plugin).

#165 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

FYI, I have updated https://proj.goldencode.com/downloads/skeletons/repo to rev 89 earlier today. Is your patch against that version?

Yes, the patch was done minutes before attaching it here.

#166 Updated by Marian Edu almost 4 years ago

@Greg, do you have already a blue print for the OE Enums? We still have some issues with those and would be nice to know which is the way to go if there is already a prescribed way.

Thanks

#167 Updated by Greg Shah almost 4 years ago

Marian Edu wrote:

@Greg, do you have already a blue print for the OE Enums? We still have some issues with those and would be nice to know which is the way to go if there is already a prescribed way.

Thanks

I'm writing up my testing results and implementation plan right now. As I go through this process of documentation, it highlights unanswered questions leading to more tests. Anyway, I will have that soon and then can start writing the implementation.

#168 Updated by Marian Edu almost 4 years ago

I've tried to merge your changes to skeleton with ours and no wonder there are merge conflicts, I can solve those now but since we're constantly finding gaps in skeleton classes and we update those as needed we're keep going to have those merge conflicts if skeleton is completed meanwhile (more or less the same). It looks to me someone was busy doing a lot of changes there, maybe it will be easier to have the skeleton up to date - as said we're using 11.7.4 as reference - and then we can work with that.

Not sure how the skeleton works for you, looks like it's being used by the parser to resolve references, but I don't think having method overrides added there makes much sense. Another thing is we find private methods and often protected ones are also defined as public in skeleton, do you really need private members there?

Did pushed the changes to 4384a branch yesterday, let me know if I should merge back 4231b into it.

#169 Updated by Marian Edu almost 4 years ago

OK, I give-up :(

I'm trying to make sense of why the conversion is using the wrong method name here but I really don't see how the skeleton classes are used here so we will need some help with this one. The test is oo/openedge/net/message_part/test_property_headers.p, the issue we have is that when the getter for Value property is used on the HttpHeader the conversion uses the getValue_1 method instead of getValue which is annotated as a GETTER for that property. There is a getValue_1 method that is mapped to the GetValue method in 4GL but that one is protected and that makes the generated test class to fail to compile :(

#170 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

The test is oo/openedge/net/message_part/test_property_headers.p

Marian, I'm looking into it.

#171 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

The test is oo/openedge/net/message_part/test_property_headers.p

Marian, I'm looking into it.

Thanks, just to be sure I've also tested with another testcase we've made for HttpHeader - oo/openedge/net/http/header/header_properties.p and it generates the same erroneous method call. Thought maybe it gets confused by the use of extent variable or something.

#172 Updated by Marian Edu almost 4 years ago

And the skeleton have a public property and protected methods like this:

define public property Value as character get. set.

method protected character GetValue():
end.

method protected void SetValue(p1 as character):
end.

#173 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

And the skeleton have a public property and protected methods like this:
[...]

Hmm... are these supposed to be the 'implicit getter and setter' for the Value property? If so, they don't need to exist in the skeleton, FWD should be aware that this is a property and emit the getter/setter accordingly. Please check what happens if you remove these from the skeleton.

#174 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

And the skeleton have a public property and protected methods like this:
[...]

Hmm... are these supposed to be the 'implicit getter and setter' for the Value property? If so, they don't need to exist in the skeleton, FWD should be aware that this is a property and emit the getter/setter accordingly. Please check what happens if you remove these from the skeleton.

No, those are present in 4GL implementation as protected methods... the accessors call those protected methods so those can be overridden as needed.

#175 Updated by Constantin Asofiei almost 4 years ago

Marian, this is fixed in 3471a which will be in trunk soon.

If you want to fix this now, just move the _1 suffix from the property getter to the Java method associated with the 4GL code. I think this will solve your case.

The 'root cause' is how trunk currently computes the Java name - it isn't aware of how the associated Java method is named in FWD, it just recomputes a Java method name, keeping in mind for collisions (and assumes this name is the correct one).

As a temporary patch, you can move this section:

         <action>iter2 = clsDef.getDefinedMethods().iterator()</action>
         <while>iter2.hasNext()
            <action>mname = iter2.next()</action>
            <action>xeAst2 = xml.createAst(xml.element_node, "method", xeAst)</action>
            <action>xaAst = xml.createAst(xml.attribute_node, "name", xeAst2)</action>
            <action>xml.createAst(xml.content, mname, xaAst)</action>
         </while>

from rules/fixups/post_parse_fixups.xml at line 257 to at the end of the while loop (line 280 in 4231b), so that the method names are computed after the property accessors. But I don't guarantee this will not break something else.

#176 Updated by Constantin Asofiei almost 4 years ago

Constantin Asofiei wrote:

If you want to fix this now, just move the _1 suffix from the property getter to the Java method associated with the 4GL code. I think this will solve your case.

You can try this too, but is more of a headache than the post_parse_fixups solution.

#177 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Constantin Asofiei wrote:

If you want to fix this now, just move the _1 suffix from the property getter to the Java method associated with the 4GL code. I think this will solve your case.

You can try this too, but is more of a headache than the post_parse_fixups solution.

Thanks guys, I'm trying the fix-up approach now and see how that works.

#178 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

As a temporary patch, you can move this section:
[...]
from rules/fixups/post_parse_fixups.xml at line 257 to at the end of the while loop (line 280 in 4231b), so that the method names are computed after the property accessors.

Did that and seems to work, thanks.

But I don't guarantee this will not break something else.

Guess we will have to see, so far so good :)

#179 Updated by Marian Edu almost 4 years ago

Roger Borrello wrote:

OO Built-Ins Requiring Implementation

Breakdown of OO BuiltIns to focus on:
  • openedge.core.* = 3 Partial
  • openedge.net.* = 8 Partial, 3 None, 1 Stubs
    • openedge.net.http.* = 5 partial, 2 None
  • openedge.web.* = 3 Partial
  • openedge.json.* = 1 Partial
  • openedge.lang.* = 2 Partial, 1 Basic
Category Conversion Runtime
openedge.core.bytebucket Full Partial
openedge.core.memptr Full Full
openedge.core.string Full Full
openedge.net.http.clientbuilder Partial Partial
openedge.net.http.credentials Full Full
openedge.net.http.filter.payload.binaryentitywriter Partial Partial
openedge.net.http.filter.payload.messagewriter Partial Partial
openedge.net.http.ihttpclientlibrary None None
openedge.net.http.lib.clientlibrarybuilder Partial Partial
openedge.net.http.requestbuilder Partial Partial
openedge.net.messagepart Full Full
openedge.net.mimetypehelper Full Full
openedge.net.multipartentity Full Full
openedge.net.uri Full Partial
openedge.net.uriencodingtypeenum Partial Stubs
openedge.web.webhandler Full Partial
openedge.web.webresponse Full Partial
openedge.web.webresponsewriter Full Partial
progress.json.objectmodel.objectmodelparser Full Partial
progress.lang.apperror Full Partial
progress.lang.class Full Partial
progress.lang.parameterlist Full Basic
Table below is for help formatting tables:
Support Lvl
None
Stubs
Untested
Partial
Basic
Full (R)
Full

#180 Updated by Greg Shah almost 4 years ago

Not sure how the skeleton works for you, looks like it's being used by the parser to resolve references,

Yes, this is exactly what it is used for.

Constantin: How will this change with your incremental compilation work (#3471)?

but I don't think having method overrides added there makes much sense.

Without these we cannot match the exact call signature to the correct target method. I don't see a way around this.

Another thing is we find private methods and often protected ones are also defined as public in skeleton, do you really need private members there?

We should not ever need private members. Protected ones are needed, of course.

I've tried to merge your changes to skeleton with ours and no wonder there are merge conflicts, I can solve those now but since we're constantly finding gaps in skeleton classes and we update those as needed we're keep going to have those merge conflicts if skeleton is completed meanwhile (more or less the same). It looks to me someone was busy doing a lot of changes there,

We only work on skeletons when we are trying to get some new 4GL code to parse (and that code has references to missing skeletons or missing members of existing skeletons).

I don't anticipate having as much change there in the next month or two. Let's get your changes merged in.

One thing: I didn't anticipate your need to greatly change the skeletons. Can you help us understand the need for the effort?

maybe it will be easier to have the skeleton up to date - as said we're using 11.7.4 as reference - and then we can work with that.

If it is not needed, I prefer to wait. We have so much to do already.

#181 Updated by Greg Shah almost 4 years ago

One thing: I didn't anticipate your need to greatly change the skeletons. Can you help us understand the need for the effort?

Nevermind this question. Thinking about this, I guess you are filling in the gaps in the classes which need implementation. And these reference other classes which aren't present yet. Or the new features reference missing members of other skeleton classes. Sorry, I just needed to turn on my brain here.

#182 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

One thing: I didn't anticipate your need to greatly change the skeletons. Can you help us understand the need for the effort?

As we've discovered if anything is missing or has the wrong signature in the skeleton the conversion for our tests does not work :(

#183 Updated by Greg Shah almost 4 years ago

Thanks for posting a high level status.

It is very high priority to get the conversion parts finished ASAP. Can your team please focus on those, leaving stubs as needed so that any references to the needed classes can be converted and compiled? This would mean that the "Conversion" column of the implementation status table would be "Full" for all entries.

Tell us when you want your changes merged back into 4231b. As soon as they are stable on your side, we can do this. It is important that any existing functionality is not broken because the existing parts of these classes are being used in applications today. So if you need time, let us know. Otherwise, we may want to go ahead and merge the changes. Then we can refresh 4384a as a copy of 4231b.

#184 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

One thing: I didn't anticipate your need to greatly change the skeletons. Can you help us understand the need for the effort?

Nevermind this question. Thinking about this, I guess you are filling in the gaps in the classes which need implementation. And these reference other classes which aren't present yet. Or the new features reference missing members of other skeleton classes. Sorry, I just needed to turn on my brain here.

No worries, the concern was understandable... I do have one concern on my own which is the scope of those changes. Yesterday trying to implement one method in ClientBuilder I've ended-up changing about 7-8 other classes and interfaces, sometimes only in fwd but other times also in skeleton. Things are pretty linked one to another especially in the net package and then most of the core is needed as well so I fear not to derail out of the scope here :(

#185 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

Thanks for posting a high level status.

It is very high priority to get the conversion parts finished ASAP. Can your team please focus on those, leaving stubs as needed so that any references to the needed classes can be converted and compiled? This would mean that the "Conversion" column of the implementation status table would be "Full" for all entries.

Yes, we've started doing that today and hopefully we will be ready tomorrow with all the stubs. The way we do is write mockup tests for each class and then see if those 'compiles' in FWD.

Tell us when you want your changes merged back into 4231b. As soon as they are stable on your side, we can do this. It is important that any existing functionality is not broken because the existing parts of these classes are being used in applications today. So if you need time, let us know. Otherwise, we may want to go ahead and merge the changes. Then we can refresh 4384a as a copy of 4231b.

If we're ready with the stubs for all classes listed by tomorrow we will push a new revision and we can attempt to merge.

#186 Updated by Greg Shah almost 4 years ago

Great!

#187 Updated by Constantin Asofiei almost 4 years ago

Greg Shah wrote:

Not sure how the skeleton works for you, looks like it's being used by the parser to resolve references,

Yes, this is exactly what it is used for.

Constantin: How will this change with your incremental compilation work (#3471)?

Greg, there is no change here, except now I'm leaving behind a .ast file for them (so for incremental conversion, the skeleton/ project needs to be preserved, together with the converted project). But there is an issue if the skeleton class doesn't have a counterpart in FWD - this will fail conversion in 3471a. I'm working on adding this support back (i.e. allow conversion to pass, but - obviously - compilation will fail as the FWD class for the skeleton is not there).

#188 Updated by Constantin Asofiei almost 4 years ago

Marian, are all your 4384a changes pushed to xfer?

Also, please upload to xfer the full skeleton project, with your changes (based on latest https://proj.goldencode.com/downloads/skeletons/repo). I tried yesterday to do a merge for your skeleton patch, and I had conflicts.

#189 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian, are all your 4384a changes pushed to xfer?

Also, please upload to xfer the full skeleton project, with your changes (based on latest https://proj.goldencode.com/downloads/skeletons/repo). I tried yesterday to do a merge for your skeleton patch, and I had conflicts.

Will try to push the changes to 4384a now, for skeleton it looks like bazaar fails me and I can't commit changes to our local repo - it keeps giving me 'no such file' error for one .rix file which indeed is not there but have no idea how to fix it :(

#190 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Will try to push the changes to 4384a now

OK, do let me know when they are there. I need to do a review and see if they can be merged into 4231b, and rebase 4231b from latest trunk after that.

for skeleton it looks like bazaar fails me and I can't commit changes to our local repo - it keeps giving me 'no such file' error for one .rix file which indeed is not there but have no idea how to fix it :(

Just zip and upload the entire skeleton/ folder to xfer - I assume all your changes are there. I'll commit the changes to our local repo and you will be able to use that, after Greg refreshes the web archive.

#191 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

OK, do let me know when they are there. I need to do a review and see if they can be merged into 4231b, and rebase 4231b from latest trunk after that.

Committed revision 11429 on #4384a.

for skeleton it looks like bazaar fails me and I can't commit changes to our local repo - it keeps giving me 'no such file' error for one .rix file which indeed is not there but have no idea how to fix it :(

Just zip and upload the entire skeleton/ folder to xfer - I assume all your changes are there. I'll commit the changes to our local repo and you will be able to use that, after Greg refreshes the web archive.

Did pulled the skeleton fresh and sync the two folders, attached the patch.

#192 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Did pulled the skeleton fresh and sync the two folders, attached the patch.

Where did you pull from? xfer or web? xfer is on an older version... https://proj.goldencode.com/downloads/skeletons/repo is latest. I get this when applying the patch:

2 out of 2 hunks FAILED -- saving rejects to file oo4gl/OpenEdge/Net/HTTP/ClientBuilder.cls.rej
1 out of 1 hunk FAILED -- saving rejects to file oo4gl/OpenEdge/Net/HTTP/Credentials.cls.rej
1 out of 1 hunk FAILED -- saving rejects to file oo4gl/OpenEdge/Net/HTTP/IHttpClientLibrary.cls.rej
1 out of 1 hunk FAILED -- saving rejects to file oo4gl/OpenEdge/Net/MimeTypeHelper.cls.rej
bzr: ERROR: Patch application failed

#193 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

Did pulled the skeleton fresh and sync the two folders, attached the patch.

Where did you pull from? xfer or web? xfer is on an older version... https://proj.goldencode.com/downloads/skeletons/repo is latest. I get this when applying the patch:
[...]

I don't know about xref, the web is what we've always used - https://proj.goldencode.com/downloads/skeletons/repo. I did not expect any conflicts since as said I've just checked out the repository fresh and moved out changes to that then unbind, local commit and then send. If you want I can pack the folder as zip and attach it.

#194 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

Marian Edu wrote:

Did pulled the skeleton fresh and sync the two folders, attached the patch.

Where did you pull from? xfer or web? xfer is on an older version... https://proj.goldencode.com/downloads/skeletons/repo is latest. I get this when applying the patch:
[...]

I don't know about xref, the web is what we've always used - https://proj.goldencode.com/downloads/skeletons/repo. I did not expect any conflicts since as said I've just checked out the repository fresh and moved out changes to that then unbind, local commit and then send. If you want I can pack the folder as zip and attach it.

Yes, please zip it and upload it to xfer.

#195 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Yes, please zip it and upload it to xfer.

I'm confused as of what you refer to when you say xfer but here it is attached :)

#196 Updated by Constantin Asofiei almost 4 years ago

Marian, did you do a bzr merge or bzr rebase for 4384a, with 4231b?

I'm trying to rebase 4384a from 4231b, and I think I'm moving in circles... same revisions are getting back to 'rebase', instead of increasing the revision number as I resolve conflicts, at some point I think is going back to the beginning...

#197 Updated by Constantin Asofiei almost 4 years ago

Constantin Asofiei wrote:

Marian, did you do a bzr merge or bzr rebase for 4384a, with 4231b?

I'm trying to rebase 4384a from 4231b, and I think I'm moving in circles... same revisions are getting back to 'rebase', instead of increasing the revision number as I resolve conflicts, at some point I think is going back to the beginning...

Actually, no, it's not from 4384a. The 'revisions left' decreases in 'bzr status'. It's just the rebase process, for some reason it goes through all the 4231b revisions.

Greg: I don't think we want to do this rebase again... I'm more than one hour into the process and I think half way there.

#198 Updated by Greg Shah almost 4 years ago

I think the faster way is to:

  1. merge the exact revisions from 4384a into 4231b
  2. rebase 4231b from trunk 11346
  3. replace the 4384a branch with a new copy/branch of 4231b

#199 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

Yes, please zip it and upload it to xfer.

I'm confused as of what you refer to when you say xfer but here it is attached :)

Thanks, I've committed the changes to our internal skeleton project rev 90.

Greg: can you please update the web repo?

#200 Updated by Constantin Asofiei almost 4 years ago

Greg Shah wrote:

I think the faster way is to:

  1. merge the exact revisions from 4384a into 4231b

The 11426..11429 revisions of 4384a are on 4231b as 11453..11456.

The commands I used are:
  • in 4384a:
    bzr diff -p1 -r 11425..11426 > p1.patch
    bzr diff -p1 -r 11426..11427 > p2.patch
    bzr diff -p1 -r 11427..11428 > p3.patch
    bzr diff -p1 -r 11428..11429 > p4.patch
    
  • in 4231b:
    bzr patch -p1 p1.patch
    bzr patch -p1 p2.patch
    bzr patch -p1 p3.patch
    bzr patch -p1 p4.patch
    

#201 Updated by Greg Shah almost 4 years ago

Greg: can you please update the web repo?

Done.

#202 Updated by Constantin Asofiei almost 4 years ago

Greg Shah wrote:

  1. rebase 4231b from trunk 11346

The rebase of 4231b is done.

  1. replace the 4384a branch with a new copy/branch of 4231b

I think we should preserve 4384a as a dead branch on devsrv01 and create 4384b.

#203 Updated by Greg Shah almost 4 years ago

I think we should preserve 4384a as a dead branch on devsrv01 and create 4384b.

Will do.

#204 Updated by Greg Shah almost 4 years ago

Branch 4384b was created from 4231b revision 11458. Access it using bzr co sftp://<userid>@xfer.goldencode.com/opt/fwd/4384b.

#205 Updated by Greg Shah almost 4 years ago

4384a was archived as dead on devsrv01. Please note that I was unable to bzr push --overwrite on devsrv01 so I zipped/transferred/unzipped. This is not optimal since it includes the entire branch history instead of sharing the devsrv01 repo.

#206 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

Branch 4384b was created from 4231b revision 11458. Access it using bzr co sftp://<userid>@xfer.goldencode.com/opt/fwd/4384b.

OK, how exactly are we supposed to switch to this new branch? Tried to bind to it and then `bzr update` which lead to 42 conflicts... most of those file we did not touch at all. The ones that we've added conflict with those added on the new branch and gets `moved`, should I go ahead with that and try to resolve conflicts and then continue to use this branch or there is another(better) way?

#207 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Greg Shah wrote:

Branch 4384b was created from 4231b revision 11458. Access it using bzr co sftp://<userid>@xfer.goldencode.com/opt/fwd/4384b.

OK, how exactly are we supposed to switch to this new branch? Tried to bind to it and then `bzr update` which lead to 42 conflicts... most of those file we did not touch at all. The ones that we've added conflict with those added on the new branch and gets `moved`, should I go ahead with that and try to resolve conflicts and then continue to use this branch or there is another(better) way?

Marian, just do a bzr revert and bzr clean-tree - to cleanup after the update.

#208 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian, just do a bzr revert and bzr clean-tree - to cleanup after the update.

OK, that worked fine... the only issue now is one of the classes does not compile because of an import that was probably added by mistake cause it's definitively not used in persist.BufferedFieldImpl - `import org.aspectj.org.eclipse.jdt.core.dom.*;`.

There are a bunch of other includes that are not used there, this is the only one that causes us issues though... is it safe to get rid of it or really that was added on purpose there?

Thanks

#209 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

Marian, just do a bzr revert and bzr clean-tree - to cleanup after the update.

OK, that worked fine... the only issue now is one of the classes does not compile because of an import that was probably added by mistake cause it's definitively not used in persist.BufferedFieldImpl - `import org.aspectj.org.eclipse.jdt.core.dom.*;`.

Yes, you can remove this line, will be fixed in 4231b, too.

There are a bunch of other includes that are not used there, this is the only one that causes us issues though... is it safe to get rid of it or really that was added on purpose there?

I know, we will fix these.

#210 Updated by Marian Edu almost 4 years ago

Quick question about P.L.Class as that is listed in the short list there... do you need reflection support for that or more interested in dynamic new/invoke? The ParameterList is also listed so guess dynamic invocation is needed, not sure about reflection although maybe Progress.Reflection.Flags will be needed for FlagsEnum.

#211 Updated by Constantin Asofiei almost 4 years ago

Marian, I'm mostly interested in Progress.Lang.Class:new and invoke calls when ParameterList is involved (so yes, reflection). For the CALL statement, we found that 4GL has a... weird way of converting an argument of a certain datatype to the target's type. I hope this is not the case for ParameterList, but we need tests for combinations of various datatypes: for example, if the datatype argument for setParameter is integer and you pass a character (which either can be a string representation for an integer or not). We would need combinations for all datatypes, and also tests to validate the setParameter arguments. I also don't know when the validation is done - at setParameter or when the new or invoke call is made.

We have a basic implementation in FWD (i.e. assume everything is fine and just invoke), but we don't have support for the above.

#212 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian, I'm mostly interested in Progress.Lang.Class:new and invoke calls when ParameterList is involved (so yes, reflection).

Sorry, was talking about more specific features of reflection like getting available/declared methods/properties and such... I will probably start by adding the missing skeleton classes in Reflection package just to get the conversion to work and maybe stubs for the time being in FWD implementation.

For the CALL statement, we found that 4GL has a... weird way of converting an argument of a certain datatype to the target's type. I hope this is not the case for ParameterList, but we need tests for combinations of various datatypes: for example, if the datatype argument for setParameter is integer and you pass a character (which either can be a string representation for an integer or not). We would need combinations for all datatypes, and also tests to validate the setParameter arguments. I also don't know when the validation is done - at setParameter or when the new or invoke call is made.

Understood, we will focus on dynamic method invocation then.

#213 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

Marian, I'm mostly interested in Progress.Lang.Class:new and invoke calls when ParameterList is involved (so yes, reflection).

Sorry, was talking about more specific features of reflection like getting available/declared methods/properties and such... I will probably start by adding the missing skeleton classes in Reflection package just to get the conversion to work and maybe stubs for the time being in FWD implementation.

OK, I see that we are missing from Progress.Lang.Class the methods which resolve a class member via reflection. I think we need those, too. But they too rely on ParameterList to resolve the signature, so fixing it now will help these, too.

#214 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

OK, I see that we are missing from Progress.Lang.Class the methods which resolve a class member via reflection. I think we need those, too. But they too rely on ParameterList to resolve the signature, so fixing it now will help these, too.

OK, we're starting with the skeleton and I'll send you a patch when done with that part.

#215 Updated by Marian Edu almost 4 years ago

I see properties are converted to getter/setter methods and are annotated with the name as defined in 4GL, for variables those are converted to plain java properties without getter/setter but there is no annotations to map them to the 4GL variable (the name might be different if keyword in java). Would it be possible to add a new type for VARIABLE and annotate those with @LegacySignature during conversion?

#216 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

I see properties are converted to getter/setter methods and are annotated with the name as defined in 4GL, for variables those are converted to plain java properties without getter/setter but there is no annotations to map them to the 4GL variable (the name might be different if keyword in java). Would it be possible to add a new type for VARIABLE and annotate those with @LegacySignature during conversion?

Hmm... yes, I think we need to annotate both variables and properties, otherwise we can't disambiguate them for reflection purposes.

For the builtin classes, we will need to annotate all these manually. But we also need TRPL changes for the business logic. Do you want to take a crack at this? Look how LegacySignature is used in i.e. convert/method_definitions.rules line 167 and further.

For variables/properties, the changes would be at the beginning of the convert/variable_definitiones.rules (so we create the Java annotation before the Java definition for the var/property).

Once we have the Java annotations for the legacy vars/properties, the FWD runtime would look for Java fields with these annotations, to resolve them via 'legacy reflection'.

#217 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

I see properties are converted to getter/setter methods and are annotated with the name as defined in 4GL, for variables those are converted to plain java properties without getter/setter but there is no annotations to map them to the 4GL variable (the name might be different if keyword in java). Would it be possible to add a new type for VARIABLE and annotate those with @LegacySignature during conversion?

Hmm... yes, I think we need to annotate both variables and properties, otherwise we can't disambiguate them for reflection purposes.

Yeah, that was the idea.

For the builtin classes, we will need to annotate all these manually. But we also need TRPL changes for the business logic. Do you want to take a crack at this?

That sounds like fun, now that I can debug the whole conversion process this might be interesting... right now we only have the reflection as stubs, still a few other things to complete implementation for higher in the list but we will get there eventually :(

Should I try again a 'bzr send' for the skeleton or how should we send the changes there?

#218 Updated by Marian Edu almost 4 years ago

Marian Edu wrote:

Should I try again a 'bzr send' for the skeleton or how should we send the changes there?

That option seems not to work anymore anyway...

>bzr send https://proj.goldencode.com/downloads/skeletons/repo/ -o skeleton.patch -Ossl.cert_reqs=none
Not checking SSL certificate for proj.goldencode.com
Not checking SSL certificate for proj.goldencode.com
bzr: ERROR: Transport error: Server refuses to fulfill the request (403 Forbidden) for https://proj.goldencode.com/downloads/skeletons/repo/.bzr/repository/pack-names

#219 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

That sounds like fun, now that I can debug the whole conversion process this might be interesting... right now we only have the reflection as stubs,

Don't forget the -Drules.tracing=true for keeping a 'who set what annotation' history in the AST, sometimes it helps. Otherwise, look for existing TRPL code which does something similar (like building the LegacySignature annotation) and extrapolate from that.

Should I try again a 'bzr send' for the skeleton or how should we send the changes there?

I would try bzr diff -p1 -r <your checkout revision> so that on our side we can use bzr patch -p1.

#220 Updated by Constantin Asofiei almost 4 years ago

Marian, quick question - do you have the toString method for net.Uri class implemented? If not, I'm adding it in 4231b.

#221 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

I would try bzr diff -p1 -r <your checkout revision> so that on our side we can use bzr patch -p1.

Our local repository was merged back to web skeleton and that was revision 63 (local), attached the diff to that revision.

>bzr diff -p1 -r63 > skeleton.p1

#222 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian, quick question - do you have the toString method for net.Uri class implemented? If not, I'm adding it in 4231b.

We didn't add anything to that one just yet, it's all only stubs for now so it probably needs attention.

#223 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

I would try bzr diff -p1 -r <your checkout revision> so that on our side we can use bzr patch -p1.

Our local repository was merged back to web skeleton and that was revision 63 (local), attached the diff to that revision.
[...]

Still not working, I'm getting conflicts. The web skeleton is on rev 90 AFAIK.

Greg: please fix the permissions, I can't even do a checkout from https://proj.goldencode.com/downloads/skeletons/repo

Marian: what does bzr info say for your skeleton project? I would bind to https://proj.goldencode.com/downloads/skeletons/repo, do a bzr update, and after that bzr diff -p1 -r 90. This ensures we are all on the same 'base' revision. (as always, keep a copy of your project before doing this)

#224 Updated by Greg Shah almost 4 years ago

Greg: please fix the permissions, I can't even do a checkout from https://proj.goldencode.com/downloads/skeletons/repo

Sorry, I must have left it in the wrong state. Try it now.

#225 Updated by Constantin Asofiei almost 4 years ago

Greg Shah wrote:

Greg: please fix the permissions, I can't even do a checkout from https://proj.goldencode.com/downloads/skeletons/repo

Sorry, I must have left it in the wrong state. Try it now.

Thanks, it's working now.

Marian: please try my previous suggestions and repost the patch.

#226 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian: please try my previous suggestions and repost the patch.

Wouldn't be easier to just merge our local branch with 'trunk' instead of bind/update/resolve/commit/unbind/commit/diff|send???

Luckily I had everything in a git repository, first update really screwed the local repository :(

#227 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

For variables/properties, the changes would be at the beginning of the convert/variable_definitiones.rules (so we create the Java annotation before the Java definition for the var/property).

Constantin, this seems to work but you should better take a look at it before... attached the patch (eclipse format). Basically all properties/variables at class level should be annotated so we can use them in reflection. While I was at it thought serialisation info could be added to the 'signature' (serialize/hidden/name), while serializable/non-serializable flags works the serialize-name is not handled correctly - the keyword seems to be ignored and the string that follows is simply added as-is.

define public property boolean as character serialize-name "Alias" protected get. set.

gets converted to
@LegacySignature(type = Type.PROPERTY, name = "boolean")
private character boolean_ = UndoableFactory.character() = "Alias";

#228 Updated by Greg Shah almost 4 years ago

Marian: Other than the missing enum stuff which I am resolving, is there anything else blocking you from delivering the full support for conversion/compilation of these built-in classes?

#229 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

Marian: Other than the missing enum stuff which I am resolving, is there anything else blocking you from delivering the full support for conversion/compilation of these built-in classes?

I didn't yet look into the Web package and that is tight to the PASOE and web handlers mainly so no idea how we are going to test anything there... in 4GL there is a WEBSTREAM that is used to send back the response. I will try to review that tomorrow to see how FWD implementation works.

#230 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

I didn't yet look into the Web package and that is tight to the PASOE and web handlers mainly so no idea how we are going to test anything there... in 4GL there is a WEBSTREAM that is used to send back the response. I will try to review that tomorrow to see how FWD implementation works.

I'm doing some improvements to FWD's support for REST and WebHandler at this time. I think this will be in 4231b by Monday, and I'll need your help with some stuff related to the HTTP request/response (especially misc APIs in web.WebResponse and WebResponseWriter). I'll let you know.

#231 Updated by Marian Edu almost 4 years ago

Marian Edu wrote:

gets converted to
[...]

Found it, probably serialization not needed yet but was a fun learning experience :)

#232 Updated by Marian Edu almost 4 years ago

I have a question about collections/maps, the implementation in 4GL is based on temp-tables but I would say using existing Java collections would make more sense... the problem is often the inner temp-tables are protected hence visible for extending classes. The only option here to be 100% compatible with the 4GL implementation is to stick to their 'limited' implementation using temp-tables. I would say those are more general use objects that are less likely to be extended by anyone but as long as this is possible it's always a possibility:(

Thoughts?

#233 Updated by Greg Shah almost 4 years ago

Marian Edu wrote:

I have a question about collections/maps, the implementation in 4GL is based on temp-tables but I would say using existing Java collections would make more sense... the problem is often the inner temp-tables are protected hence visible for extending classes. The only option here to be 100% compatible with the 4GL implementation is to stick to their 'limited' implementation using temp-tables. I would say those are more general use objects that are less likely to be extended by anyone but as long as this is possible it's always a possibility:(

Thoughts?

Nasty.

For now, let's do the simple approach and map things to the Java collections.

As usual, we will eventually hit an application which has such code. It is inevitable. But we will wait to implement the full tmep-table approach until then. For the common case, it is much better to use the Java collections. So even when we do implement the temp-table backed 4GL collections, we will only use them for the subclasses which have this bad behavior (directly inspecting/manipulating data structures in parent classes is considered quite "dirty"). We will have to implement some special conversion rules in that case, detecting any access to that protected table. But we will leave this part until later.

#234 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

For now, let's do the simple approach and map things to the Java collections.

As usual, we will eventually hit an application which has such code. It is inevitable. But we will wait to implement the full tmep-table approach until then. For the common case, it is much better to use the Java collections. So even when we do implement the temp-table backed 4GL collections, we will only use them for the subclasses which have this bad behavior (directly inspecting/manipulating data structures in parent classes is considered quite "dirty"). We will have to implement some special conversion rules in that case, detecting any access to that protected table. But we will leave this part until later.

Sounds good to me, already implementing map and stringstringmap (huh)... next time I'me going to see Peter Judge I have a few things to tell him only as it stands now not sure it will happen this year though :(

#235 Updated by Greg Shah almost 4 years ago

  • Related to Feature #4629: implement fully compatible 4GL collections (backed by protected temp-tables) added

#236 Updated by Marian Edu almost 4 years ago

Constantin, the update you've made on testcases repository for the appsrv/rest kinda ruined the environment, at least for me :(
I can't get anything to convert right now. Did updated the p2j.cfg.xml to set the oo-skeleton-path back to what it was, not it does find the classes in 'propath' but still it gives errors in gap analysis..

[java] Rule Type :   WALK
     [java] Source AST:  [ RaiseError ] BLOCK/ASSIGNMENT/EXPRESSION/OBJECT_INVOCATION/OO_METH_VOID/ @538:8 {17179874524}
     [java] Copy AST  :  [ RaiseError ] BLOCK/ASSIGNMENT/EXPRESSION/OBJECT_INVOCATION/OO_METH_VOID/ @538:8 {17179874524}
     [java] Condition :  mark = getGapMarking(jname, getNoteString("javaname"), lsig)
     [java] Loop      :  false

#237 Updated by Marian Edu almost 4 years ago

OK, moving skeleton files in project root and let the p2j.cfg.xml as is seems to solve it.

#238 Updated by Marian Edu almost 4 years ago

Marian Edu wrote:

OK, moving skeleton files in project root and let the p2j.cfg.xml as is seems to solve it.

As in it can now convert but starting the server is not working anymore :(

We've started that with secure connection set to false before with only insecure port set, now it complains it must be running in secure mode to spawn clients. So turned the secure to on and then only set secure port, it does not start because it still seems to need insecure port to be set??? Anyway, adding both secure and insecure ports helps move one step further. Now it gives error when trying to spawn clients, what is that spawner-path and how should we change to make it work?

[04/29/2020 12:50:29 EEST] (ClientSpawner.spawn():SEVERE) {00000000:00000016:standard} Cannot spawn the process.
java.io.IOException: Cannot run program "[spawner-path]" (in directory "C:\Projects\goldencode\workspace-fwd\testcases"): CreateProcess error=2, The system cannot find the file specified

#239 Updated by Constantin Asofiei almost 4 years ago

Marian, the error is related to appserver agents. Do you have Server ready message in the log? If yes, then non-web clients will work.

You need to configure all these occurences in directory.xml, after you run install_spawner.cmd:
  • [os-user] with the current local Windows OS user
  • [spawner-path] with the full path to the deploy\spawner folder in the testcases project
  • [client-start-dir] with the full path to the deploy\client folder in the testcases project

After this, you will be able to run Web clients, too.

#240 Updated by Constantin Asofiei almost 4 years ago

Ah, forgot you are on windows. You need to add this node on the same level as systemUser, with the user's Windows password, in plain text:

              <node class="string" name="systemPassword">
                <node-attribute name="value" value="[os-user-password]"/>
              </node>

And the [spawner-path] needs to be the full path to deploy\spawner\spawn.exe.

#241 Updated by Marian Edu almost 4 years ago

I have some issues with the URI encode/decode, the 4GL implementation is not really matching the one available in URLDecoder/URLEncoder. If we are to match the exact 4GL implementation I don't see any solution that doing the encoding ourselves in some cases :(

#242 Updated by Greg Shah almost 4 years ago

Marian: I am trying to get all the enums support from 4384b into 4231b. I hope to have this tonight, though there is quite a lot of rework. Then we want to merge the rest of your changes so that we can use them in a customer project which we getting to convert. From there we can reset 4384b as a copy of 4231b. This will give you the current enum conversion support which covers most of the possible cases.

Some questions:

  1. What is the conversion support status of the items in #4384-1?
  2. When can you have all your changes checked in to 4384b so that we can merge them into 4231b? We would probably want to do that tomorrow morning.
  3. Is it OK to reset 4384b as a fresh copy of 4231b at that time? It will include your merged changes and the interim state of the enum support.

#243 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

Marian: I am trying to get all the enums support from 4384b into 4231b. I hope to have this tonight, though there is quite a lot of rework.

Wouldn't fixing the enums in skeleton and ran the conversion on those supposed to work? This will reduce the rework but otherwise we can take the base classes and we will fix the enums as needed.

Some questions:

  1. What is the conversion support status of the items in #4384-1?

I will check everything now just to make sure and will post a separate message with the status.

  1. When can you have all your changes checked in to 4384b so that we can merge them into 4231b? We would probably want to do that tomorrow morning.

All changes has been checked in now even some classes are incomplete, the last commit is for variable annotation and add support for serialisation but this is something that definitively needs to be reviewed :(

  1. Is it OK to reset 4384b as a fresh copy of 4231b at that time? It will include your merged changes and the interim state of the enum support.

Fine with us, just let me know what we need to do... will it work if we just do an update afterwards or there is more to it?

#244 Updated by Constantin Asofiei almost 4 years ago

Greg/Marian, have you changed the skeleton classes to use DEFINE ENUM instead of property members, for the 4GL enums?

#245 Updated by Greg Shah almost 4 years ago

I have not. I have only pulled the LegacyEnum and FlagsEnum from 4384b and reworked those before commit in 4231b. I am still working on those classes right now. When they are done, we will need to rework any enums in 4384b. I agree, we could run conversion on these if needed, so long as all enums have been switched back to ENUM statement/DEFINE ENUM.

#246 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Greg/Marian, have you changed the skeleton classes to use DEFINE ENUM instead of property members, for the 4GL enums?

I didn't, guess we need the new conversion support before we do that. I had an issue with a new enum we've added that makes the conversion fail saying the builtin class was missing from FWD. There is something wrong with the Enums as we have them as after a fresh `gradle ant-all` now any OO conversion fails, probably due to the fact that because of reflection is using some enums and that is buried into LegacyClass it leads to that nasty StackOverflow error although I don't see any ContextLocal being used in neither lang or reflection packages.

I will probably just stop with conversion before we get the new enums in place :(

If you want I can change the skeleton enums since my conversion is not working either way.

#247 Updated by Marian Edu almost 4 years ago

OK, I have changed all enums in skeleton to use the standard OE definition, do you want that as an eclipse patch or how?

#248 Updated by Marian Edu almost 4 years ago

Marian Edu wrote:

OK, I have changed all enums in skeleton to use the standard OE definition, do you want that as an eclipse patch or how?

I've attached the patch (eclipse format) just in case.

#249 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

  1. What is the conversion support status of the items in #4384-1?

Greg, as far as I know everything should be fine for conversion but right now I'm not able to convert anything because of those enums so will come back with more details as soon as I get that one working.

#250 Updated by Constantin Asofiei almost 4 years ago

I've applied the skeleton patch and some additional to rev 93

#251 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

I've applied the skeleton patch and some additional to rev 93

So, what shall we do? Try to merge changes in 4231b in our working branch? This is actually a blocking issue right now as no conversion of OO objects works right now due to the fact that enums are used in reflection and hence class/object does not convert :(

#252 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

I've applied the skeleton patch and some additional to rev 93

This is a revision of what branch exactly? As far as I can see https://proj.goldencode.com/downloads/skeletons/repo/ is still at rev 90 :(

#253 Updated by Greg Shah almost 4 years ago

I've pushed the latest skeletons rev 93 to https://proj.goldencode.com/downloads/skeletons/repo/.

#254 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

I've pushed the latest skeletons rev 93 to https://proj.goldencode.com/downloads/skeletons/repo/.

Thanks, better now... I'll unbind back and continue with local repository.

What about conversion support, how we can get that into our branch to get enum support and fix conversion?

#255 Updated by Marian Edu almost 4 years ago

Ah, one question I've meant to ask before... in 4GL the compiler is less strict when it comes of longchar/character data types for methods. Meaning you can have one method defined with longchar parameter but you send a character instead, the compiler does not complain and at runtime it works just fine... works for output/return the same way, only runtime error might occur if the longchar returned is more than 32k.

As an example in StringStringMap there is only one method Put(character, longchar) but then you can call that using (character, character). What I did was to 'manually' add an override like if there were two methods defined in 4GL: (character, longchar) and (character, character) but this holds true for all OO classes so you might think of some other solution?

#256 Updated by Constantin Asofiei almost 4 years ago

Marian, I'm working on stabilizing 4231b conversion, and after that I'll work on integrating/testing your changes. I hope to get to this tomorrow.

About the character vs longchar arguments - do you have a simple testcase which shows this? The issue needs to be resolved at the conversion, to call the proper method.

#257 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian, I'm working on stabilizing 4231b conversion, and after that I'll work on integrating/testing your changes. I hope to get to this tomorrow.

OK, if there is anything I can help with let me know.

About the character vs longchar arguments - do you have a simple testcase which shows this? The issue needs to be resolved at the conversion, to call the proper method.

Did pushed some testcase right now - oo\longchar\test_char_longchar.p. You will see the two can't always be interchanged, for input you can send a character if method is defined with longchar but not the other way around (sending longchar for method that have character is a syntax error). For output is different, you an send a longchar variable as output to a method that is defined with character, use a character as output for a method that uses longchar is syntax error. Rule about input parameters applies to constructor as well. For return value you can assign the result to both longchar/character if the method return data type is one of the two, it will probably give runtime error if return value is larger than character and you assign to one, but this is the 'regular' data type automatic conversion done on assign so not really related to this.

#258 Updated by Constantin Asofiei almost 4 years ago

Marian, is the variable-sig.patch in 4384b? I want to start checking these and at least rebase 4384b with latest 4231b.

#259 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian, is the variable-sig.patch in 4384b? I want to start checking these and at least rebase 4384b with latest 4231b.

Yes it should be there already, I have some additional changes that I can push if you want to do the rebase... or we can wait with those until you get the rebase in place, we will commit in local git repo just in case something goes wrong after rebase :)

#260 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Yes it should be there already, I have some additional changes that I can push if you want to do the rebase... or we can wait with those until you get the rebase in place, we will commit in local git repo just in case something goes wrong after rebase :)

Yes, push everything you have at this time. I want to review first, and if we can't merge fully to 4231b at least pick up the safe parts use them.

#261 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Yes, push everything you have at this time. I want to review first, and if we can't merge fully to 4231b at least pick up the safe parts use them.

Done, pushed revision #114677.

#262 Updated by Constantin Asofiei almost 4 years ago

I've rebased 4384b rev 11477 from 4231b rev 11524, new 4384b rev is 11544.

Marian, sorry but for some FWD code I think we will have full control for now on, which is anything related to the enum implementation on which Greg is working on. This includes LegacyEnum, FlagsEnum, and anything else runtime-specific for enums. (Greg, please correct me if I'm wrong).

But what I'd like you to fix in 4384b are these enums in p2j.oo:

AccessMode
FlagsEnum
ParameterMode
HashAlgorithmEnum
LogLevelEnum
TransferEncodingEnum
UriEncodingTypeEnum
UriSchemeEnum

Look at UriEncodingTypeEnum and change all others to match this pattern.

I'm looking at the conversion issues now, related to LegacySignature for class vars/props.

Also, please re-review your changes in LegacyClass, LegacyEnum, FlagsEnum and make sure I haven't removed anything of importance (like parameter validation or something like that).

#263 Updated by Greg Shah almost 4 years ago

This includes LegacyEnum, FlagsEnum, and anything else runtime-specific for enums. (Greg, please correct me if I'm wrong).

Yes, I have these.

FlagsEnum

I'm editing this, is there anything for Marian to do?

HashAlgorithmEnum
LogLevelEnum
UriEncodingTypeEnum

All these should be done in 4231b.

#264 Updated by Constantin Asofiei almost 4 years ago

Greg Shah wrote:

FlagsEnum

I'm editing this, is there anything for Marian to do?

Hmm... I don't think so, but see my note in #4349.

HashAlgorithmEnum
LogLevelEnum
UriEncodingTypeEnum

All these should be done in 4231b.

Yes, only thing is missing are LegacySignature annotations for HashAlgorithmEnum and LogLevelEnum.

#265 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Constantin, this seems to work but you should better take a look at it before... attached the patch (eclipse format). Basically all properties/variables at class level should be annotated so we can use them in reflection. While I was at it thought serialisation info could be added to the 'signature' (serialize/hidden/name), while serializable/non-serializable flags works the serialize-name is not handled correctly - the keyword seems to be ignored and the string that follows is simply added as-is.
[...]
gets converted to
[...]

This simple var def converts fine after rebase. If you have another one which doesn't convert fine, please let me know.

Also, please make some changes, so that LegacySignature.serializable is a boolean flag, not an int flag. You can use java.bool_false or java.bool_true to create boolean literals.

#266 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Did pushed some testcase right now - oo\longchar\test_char_longchar.p. You will see the two can't always be interchanged, for input you can send a character if method is defined with longchar but not the other way around (sending longchar for method that have character is a syntax error). For output is different, you an send a longchar variable as output to a method that is defined with character, use a character as output for a method that uses longchar is syntax error. Rule about input parameters applies to constructor as well. For return value you can assign the result to both longchar/character if the method return data type is one of the two, it will probably give runtime error if return value is larger than character and you assign to one, but this is the 'regular' data type automatic conversion done on assign so not really related to this.

There's definitely a bug here, but not for conversion. We are doing things right there, with the outValue(wrap(character.class, new character(lValue, true))) (so the argument's at the call matches the real method targeted by 4GL). What is wrong is that there is a TODO in Text(Text value, boolean output) constructor (TODO: save a reference to the variable).

I was thinking just adding a new VariableAssigner(this, value); will work (similar to wrap, this will register the variable to be 'assigned back' at the time the method ends, to the actual value for the OUTPUT parameter). But the new character(lValue, true) is executed before the wrap call, so the register for lValue is done before the register for new character; if the registration is reversed, then the outValue's val parameter is copied to the new character instance, which in turn will be copied to the lValue variable. As things stand now, new character is copied into lValue, and after that val is copied into new character.

So I need to make some more in-depth changes, in the AbstractParameter support, to add some 'pending' assigners which will be registered after the wrap. Thanks for finding this bug.

#267 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Also, please make some changes, so that LegacySignature.serializable is a boolean flag, not an int flag. You can use java.bool_false or java.bool_true to create boolean literals.

Yeah, that was the first choice but then thought it might be a difference between specifying it (true/false) or not. It turns out SERIALIZABLE option is not visible through reflection and only used by the internal serialisation. Although you can only use SERIALIZABLE property in a SERIALIZABLE class, you have actually three options there: set it to true (SERIALIZABLE), to false (NON-SERIALIZABLE) or leave it as default - which is the value set at class level. Hence my change to use an int - defaults to unset (zero), 1 is set and -1 if unset... I can change it back to boolean and you see later when implementing serialisation this needs to be changed.

#268 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

Also, please make some changes, so that LegacySignature.serializable is a boolean flag, not an int flag. You can use java.bool_false or java.bool_true to create boolean literals.

Yeah, that was the first choice but then thought it might be a difference between specifying it (true/false) or not. It turns out SERIALIZABLE option is not visible through reflection and only used by the internal serialisation. Although you can only use SERIALIZABLE property in a SERIALIZABLE class, you have actually three options there: set it to true (SERIALIZABLE), to false (NON-SERIALIZABLE) or leave it as default - which is the value set at class level. Hence my change to use an int - defaults to unset (zero), 1 is set and -1 if unset... I can change it back to boolean and you see later when implementing serialisation this needs to be changed.

Argh, you are right, can't use boolean, and neither Boolean. We need an int... but please add some constants for these values, and not emit just 1 literal.

#269 Updated by Constantin Asofiei almost 4 years ago

Constantin Asofiei wrote:

We need an int... but please add some constants for these values, and not emit just 1 literal.

Or better yet, an actual enum with SERIALIZABLE, NON_SERIALIZABLE and DEFAULT.

#270 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Constantin Asofiei wrote:

We need an int... but please add some constants for these values, and not emit just 1 literal.

Or better yet, an actual enum with SERIALIZABLE, NON_SERIALIZABLE and DEFAULT.

Indeed, much cleaner... did pulled the changes so need to resolve conflicts first and see if we're not missing changes.

#271 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Look at UriEncodingTypeEnum and change all others to match this pattern.

Constantin, I see the getter methods are not used anymore but public properties with no LegacySignature annotation... should I annotate those like regular properties for name resolution (when this is different from the one in 4GL)? Otherwise what is the naming convention used by the conversion?

#272 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Constantin, I see the getter methods are not used anymore but public properties with no LegacySignature annotation... should I annotate those like regular properties for name resolution (when this is different from the one in 4GL)?

The enum createEnum will always know the legacy name. So no need for the annotations - you can skip them during conversion.

Otherwise what is the naming convention used by the conversion?

Best way is to write some tests which access the enum and see what Java name they use. And modify the FWD enum to use that name.

#273 Updated by Constantin Asofiei almost 4 years ago

Marian, the fix for #4384-266 is in 4384b rev 11545. This fixes the test_char_longchar.p test. Please check your StringStringMap usage, too, without relying on the additional method with character parameter.

#274 Updated by Greg Shah almost 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

Constantin, I see the getter methods are not used anymore but public properties with no LegacySignature annotation... should I annotate those like regular properties for name resolution (when this is different from the one in 4GL)?

The enum createEnum will always know the legacy name. So no need for the annotations - you can skip them during conversion.

Otherwise what is the naming convention used by the conversion?

Best way is to write some tests which access the enum and see what Java name they use. And modify the FWD enum to use that name.

See oo/enums/ for a good set of tests. I used these to document the spec for enums, so they are pretty complete.

#275 Updated by Greg Shah almost 4 years ago

Constantin: Right now we don't have any mechanism to overload @LegacyParameter signatures using Java literal types (e.g. String instead of CHARACTER), correct? It would be nice to reduce wrapping...

#276 Updated by Constantin Asofiei almost 4 years ago

Greg Shah wrote:

Constantin: Right now we don't have any mechanism to overload @LegacyParameter signatures using Java literal types (e.g. String instead of CHARACTER), correct? It would be nice to reduce wrapping...

What do you mean here? To call someMethod(1) instead of someMethod(new integer(1))? Something else?

#277 Updated by Marian Edu almost 4 years ago

Question about conversion of OO classes, in 4GL if there is any constructor defined the default no-parameters one is not available automatically anymore and had to be defined if required. FWD seems to always generate a default no-parameters constructor even if not specifically defined and there are other constructors defined. Is that a requirement - don't know, maybe used by legacy class registration or something else, if yes then we need to handle that in reflection and probably the only way will be to not annotate that one with LegacySignature.

#278 Updated by Greg Shah almost 4 years ago

Constantin: Right now we don't have any mechanism to overload @LegacyParameter signatures using Java literal types (e.g. String instead of CHARACTER), correct? It would be nice to reduce wrapping...

What do you mean here? To call someMethod(1) instead of someMethod(new integer(1))? Something else?

Yes, to call with non-wrapped String, int, boolean for OO 4GL method parameters.

#279 Updated by Greg Shah almost 4 years ago

To be clear, I'm thinking about the built-in classes here. For example, we could provide alternate versions of legacyEnum.getEnum which take String/long. I'm not suggesting that we generate overloads in converted code. This is not a high priority.

#280 Updated by Constantin Asofiei almost 4 years ago

Greg Shah wrote:

To be clear, I'm thinking about the built-in classes here. For example, we could provide alternate versions of legacyEnum.getEnum which take String/long. I'm not suggesting that we generate overloads in converted code.

For builtin classes, where we have full control, yes, we can do that I think pretty easy. The problem here is that we can't use LegacySignature annotations at these overloads, we can use it only at the 'official' BDT signatures.

How I see this would work: if the call is for a builtin method, then we can avoid wrapping the literals. We could do this early on, during parser where we resolve the target method, and if there is an equivalent with Java types, place an annotation at the method call. And then we either remove the wrapping annotation and/or avoid adding it, if the literal argument is for a OO method call with this annotation.

#281 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Question about conversion of OO classes, in 4GL if there is any constructor defined the default no-parameters one is not available automatically anymore and had to be defined if required. FWD seems to always generate a default no-parameters constructor even if not specifically defined and there are other constructors defined. Is that a requirement - don't know, maybe used by legacy class registration or something else, if yes then we need to handle that in reflection and probably the only way will be to not annotate that one with LegacySignature.

You mean the _constructor__ method in FWD, right? I think you are correct here, we shouldn't generate the default one if there is an explicit one defined.

Look in annotations/method_defs.rules, the check_ctors function and hasDefCtor flag. You may need another flag, to track if there is any explicit ctor defined. And avoid generating a default one if there is an explicit one.

#282 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

You mean the _constructor__ method in FWD, right? I think you are correct here, we shouldn't generate the default one if there is an explicit one defined.

Yes, that was it.

Look in annotations/method_defs.rules, the check_ctors function and hasDefCtor flag. You may need another flag, to track if there is any explicit ctor defined. And avoid generating a default one if there is an explicit one.

Ok, fixed that to skip default ctor if any explicitly defined (not static ones), no new flag needed but you can check it just in case... ah, darn, just realised didn't add the revision comment :(

#283 Updated by Marian Edu almost 4 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

Constantin Asofiei wrote:

We need an int... but please add some constants for these values, and not emit just 1 literal.

Or better yet, an actual enum with SERIALIZABLE, NON_SERIALIZABLE and DEFAULT.

Indeed, much cleaner... did pulled the changes so need to resolve conflicts first and see if we're not missing changes.

Added SerializeMode enum (visible, hidden and default) and used that instead. Fixed that so it is not added for events, looks like event definitions were on the same path :(

#284 Updated by Constantin Asofiei almost 4 years ago

Constantin Asofiei wrote:

Look in annotations/method_defs.rules, the check_ctors function and hasDefCtor flag. You may need another flag, to track if there is any explicit ctor defined. And avoid generating a default one if there is an explicit one.

The change is functionally correct, but the hasDefCtor var name no longer means what it used to mean (which is 'has default ctor'). Please remove the other usage at line 230, so it can mean 'has defined ctor'.

#285 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

The change is functionally correct, but the hasDefCtor var name no longer means what it used to mean (which is 'has default ctor'). Please remove the other usage at line 230, so it can mean 'has defined ctor'.

True, how about I rename it to hasInstanceCtor?

#286 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

True, how about I rename it to hasInstanceCtor?

Yes, even better.

#287 Updated by Marian Edu almost 4 years ago

Named events are used in some of the HTTP classes, I see there is conversion support for events. On subscribe/unsubscribe what is the method name to be used - the 4GL name or the name of the actual method in Java class? It might not be different, apart from case, but just to be sure here :)

#288 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Named events are used in some of the HTTP classes, I see there is conversion support for events. On subscribe/unsubscribe what is the method name to be used - the 4GL name or the name of the actual method in Java class? It might not be different, apart from case, but just to be sure here :)

Please use a simple class with an event and see how this converts in FWD. You will have some Java methods generated, to publish/subscribe/unsubscribe the event, and misc overloads for them. You will need all these in the skeleton implementation.

For the subscribe/unsubscribe, always use the legacy name as a string.

#289 Updated by Marian Edu almost 4 years ago

I'm going nuts over here, not the first time I have fun trying to figure out why an object can't be instantiated - so far was either a missing 'execute' method along the chain or some statics that were interfering with the way FWD is loading legacy classes. I have a situation with the RequestBuilder where a header is being added, depending on the header one of the specific header builders are being used. I was able to narrow down the issue to ContentTypeHeaderBuilder and made a simple test that tries to instantiate that class, in the code dynamic new is used but using the typed newInstance with ContentTypeHeaderBuilder.class doesn't work either.

def var oh as OpenEdge.Net.HTTP.ContentTypeHeaderBuilder.

oh = new OpenEdge.Net.HTTP.ContentTypeHeaderBuilder('ContentType') no-error.

message error-status:error skip valid-object(oh) view-as alert-box.

This is giving false twice, the object is not valid but no error message. Debugging it I can see the "constructor" in that class is being called. Inside newInstanceInternal the object looks fine after initializeLegacyObject, still right after that isValid returns false - the reference is not found in work area objects list... what is going on here? :(

#290 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

This is giving false twice, the object is not valid but no error message. Debugging it I can see the "constructor" in that class is being called. Inside newInstanceInternal the object looks fine after initializeLegacyObject, still right after that isValid returns false - the reference is not found in work area objects list... what is going on here? :(

Do you have the changes pushed to 4384b?

This usually happens because the object instance is not a 4GL-like var ... and gets GC'ed by FWD.

#291 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

This is giving false twice, the object is not valid but no error message. Debugging it I can see the "constructor" in that class is being called. Inside newInstanceInternal the object looks fine after initializeLegacyObject, still right after that isValid returns false - the reference is not found in work area objects list... what is going on here? :(

Do you have the changes pushed to 4384b?

Yes, did pushed everything just in case is something apparently not related to those builders.

This usually happens because the object instance is not a 4GL-like var ... and gets GC'ed by FWD.

What exactly do you mean by "not a 4GL-like var"? Oddly enough it works for DefaultHeaderBuilder which is the base class of both AuthorizationHeaderBuilder and ContentTypeHeaderBuilder, none of the latter can't be instantiated though :(

#292 Updated by Constantin Asofiei almost 4 years ago

Marian, a few issues:
  • I don't understand all the ObjectOps.registerClass calls - what was the reason you added these?
  • what's the return value for ControlFlowOps.initializeLegacyObject (the ok) var in newInstanceInternal? If is false, please debug into initializeLegacyObject and see where it returns false.

#293 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian, a few issues:
  • I don't understand all the ObjectOps.registerClass calls - what was the reason you added these?

Not sure I understand it either, something to do with dynamic instantiation that apparently need to have the class registered first... anyway, it was there so I've kept those.

  • what's the return value for ControlFlowOps.initializeLegacyObject (the ok) var in newInstanceInternal? If is false, please debug into initializeLegacyObject and see where it returns false.

That's the thing that initializeLegacyObject returned true still the object was already deleted... it turns out it was done in scopeFinished of the ProcedureManager, the reason is inside a constructor a "fluent" method (parametersDelimitedBy) was called (that returned this-object) and somehow the object was probably set for pending deletion :(

I can try to get around this by directly using setOption instead as that one returns logical so most probably will leave my instance alone but this is definitively not something that is compliant with how the 4GL work and it might well happen in other code base out there.

#294 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

I can try to get around this by directly using setOption instead as that one returns logical so most probably will leave my instance alone but this is definitively not something that is compliant with how the 4GL work and it might well happen in other code base out there.

Thanks for the findings. Yes, the reference is returned but not assigned to anything, so is marked as 'pending delete'. This might be something related to calling these APIs from within the c'tor - if the object is still instantiating, then don't mark it as pending delete.

I think ObjectOps.newInstanceInternal (the private one) needs to keep a registry of 'pending initialization' references, and the pendingAssign will be a no-op if the reference is registered as 'pending initialized'. There will be a set in ObjectOps.WorkArea, which has references added by newInstanceInternal before ControlFlowOps.initializeLegacyObject is called, and removed in the finally block, after that. Do you want to try to fix this?

#295 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

I think ObjectOps.newInstanceInternal (the private one) needs to keep a registry of 'pending initialization' references, and the pendingAssign will be a no-op if the reference is registered as 'pending initialized'. There will be a set in ObjectOps.WorkArea, which has references added by newInstanceInternal before ControlFlowOps.initializeLegacyObject is called, and removed in the finally block, after that. Do you want to try to fix this?

OK, did that, pushed changes (rev 11557), seems to work now thanks.

#296 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

OK, did that, pushed changes (rev 11557), seems to work now thanks.

You forgot a pop for pendingInitialized, in scopeFinished.

#297 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

OK, did that, pushed changes (rev 11557), seems to work now thanks.

You forgot a pop for pendingInitialized, in scopeFinished.

That one is done in a final block of newInstanceInternal, the method is endInitialization.

#298 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

Marian Edu wrote:

OK, did that, pushed changes (rev 11557), seems to work now thanks.

You forgot a pop for pendingInitialized, in scopeFinished.

That one is done in a final block of newInstanceInternal, the method is endInitialization.

I meant pendingInitialized.pop(), which needs to be done in scopeFinished(), as scopeStart() has the pendingInitialized.push().

#299 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

I meant pendingInitialized.pop(), which needs to be done in scopeFinished(), as scopeStart() has the pendingInitialized.push().

Right you are, will fix that.

Regarding previous use of registerClass, it turns out a legacy class must be registered before it became available otherwise getLegacyClass fails to find the class by name. I see you added stubs for getClass in ObjectOps, will it be ok if I put some meat on the bone there and use those methods instead? Probably move whatever logic is already in LegacyClass in there and let LegacyClass call into those new methods since almost all methods used there are from ObjectOps anyway.

#300 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Regarding previous use of registerClass, it turns out a legacy class must be registered before it became available otherwise getLegacyClass fails to find the class by name. I see you added stubs for getClass in ObjectOps, will it be ok if I put some meat on the bone there and use those methods instead? Probably move whatever logic is already in LegacyClass in there and let LegacyClass call into those new methods since almost all methods used there are from ObjectOps anyway.

Greg is working on enum and other stuff; so, Greg, do you have changes in either LegacyClass or ObjectOps.getClass?

#301 Updated by Greg Shah almost 4 years ago

My current changes in LegacyClass:

=== modified file 'src/com/goldencode/p2j/oo/lang/LegacyClass.java'
--- src/com/goldencode/p2j/oo/lang/LegacyClass.java     2020-05-03 20:30:03 +0000
+++ src/com/goldencode/p2j/oo/lang/LegacyClass.java     2020-05-11 20:21:52 +0000
@@ -16,6 +16,7 @@
 **                  execute methods).
 ** 008 CA  20200503 Added stubs for GetEnumNames, GetEnumValues, GetEnumValue, GetEnumName, IsEnum
 **                  and IsFlagsEnum.
+**     GES 20200511 Added protection against instantiation of legacy enum classes.
 */

 /*
@@ -534,6 +535,12 @@
    @LegacyResourceSupport(supportLvl = CVT_LVL_FULL|RT_LVL_BASIC)
    public object<? extends _BaseObject_> new_(object<? extends ParameterList> parms)
    {
+      // enums cannot be instantiated
+      if (LegacyEnum.failEnumInstantiation(cls))
+      {
+         return null;
+      }
+      
       ParameterList opl = parms.ref();
       // TODO: validate params?                                                                                                                                                                                                                
       String modes = opl.getModes();

I have many changes in ObjectOps, but none in ObjectOps.getClassInstance().

#302 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

My current changes in LegacyClass:

My change here is on getLegacyClass to call on ObjectOps one:

public static object<LegacyClass> getLegacyClass(String typeName)
   {
      return new object (ObjectOps.getLegacyClass(typeName).ref());
   }

I have many changes in ObjectOps, but none in ObjectOps.getClassInstance().

Apart from previous changes about pending initialization all I had to do is to implement getLegacyClass methods, no change done to getClassInstance right now so just used that as-is. Maybe some reverse mapping from Class to legacy type name might be useful at some point so we don't use resource annotation or SourceMapper all over again...

#303 Updated by Marian Edu almost 4 years ago

I have a set of changes to skeleton project, how should I make a pull request here? :)

I seems to have an issue with how class registration works here, maybe someone cares to explain that... on one of the class (StringStringMap) one constructor takes as input an object that implements an interface (IStringStringMap), the constructor looks like this:

   @LegacySignature(type = Type.CONSTRUCTOR, parameters = {
            @LegacyParameter(name = "poMap", type = "OBJECT", qualified = "openedge.core.collections.istringstringmap", mode = "INPUT") })
   @LegacyResourceSupport(supportLvl = CVT_LVL_FULL | RT_LVL_FULL)
   public void __core_collections_StringStringMap_constructor__(
            final object<? extends com.goldencode.p2j.oo.core.collections.IStringStringMap> _poMap)
   {
   ...
   }

When that is being used, at some point in ControlFlow.resolveLegacyEntry there is a check if the input parameters are of type object to see if the input parameter is valid - assignable from the object type defined in parameter qualified annotation. Problem is ObjectOps.resolveClass can't resolve that interface, the class file is there in skeleton and it does look like SourceMapper is being used but path returned is always null that makes impossible to use that constructor.

Now, the only solution I've could come up with is to register the interface class in a static ctor added to the StringStringMap just for that, somehow it just feels wrong but really don't know what is the way to go here so if anyone knows a better way let us know.

#304 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

When that is being used, at some point in ControlFlow.resolveLegacyEntry there is a check if the input parameters are of type object to see if the input parameter is valid - assignable from the object type defined in parameter qualified annotation. Problem is ObjectOps.resolveClass can't resolve that interface, the class file is there in skeleton and it does look like SourceMapper is being used but path returned is always null that makes impossible to use that constructor.

We might have a bug with the FWD's compatibility of loading legacy classes (and their super-classes/interfaces). Currently, they are loaded on the first-ever real access (like a new instance, static method call, getClass call, etc) and also registered when a var is declared of that type. I see that the ObjectOps.registerClass is being called when declaring an object var.

I think the issue is that we need to register all the super-classes and super-interfaces in ObjectOps.registerClass. Currently we register only the declaring class, which looks wrong.

As a side note, if you would have a var declared as IStringStringMap it will bypass this issue (as FWD will load the interface), but will not solve it.

#305 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

I have a set of changes to skeleton project, how should I make a pull request here? :)

Try bzr send -o skeleton.patch and attach it here. I want to see if it works applying bzr merge with it.

#306 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

I have a set of changes to skeleton project, how should I make a pull request here? :)

Try bzr send -o skeleton.patch and attach it here. I want to see if it works applying bzr merge with it.

Attached the patch, let me know if that works or not.

#307 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

I think the issue is that we need to register all the super-classes and super-interfaces in ObjectOps.registerClass. Currently we register only the declaring class, which looks wrong.

In this case was an interface that the class is implementing but I guess it can be any other class/interface that can be passed as input to the constructor and if somehow not already registered the constructor will fail.

As a side note, if you would have a var declared as IStringStringMap it will bypass this issue (as FWD will load the interface), but will not solve it.

Sure thing, and ObjectVar does the registration of the class in question so this is working but this is not really solving the real issue...

Did added a method in ObjectOps to register a class and all it's super classes and implemented interfaces, in case the qualified parameter is not already registered it goes and register the actual parameter class and then check again so problem solved. Just to avoid registering all tree will probably just add an override to say which type name we're looking for and stop when we find and register that one.

#308 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Just to avoid registering all tree will probably just add an override to say which type name we're looking for and stop when we find and register that one.

No reason to not register the full tree - just make sure to register only interfaces implementing _BaseObject_ and classes inheriting BaseObject. And the same logic applies - either LegacyResource annotation or lookup in SourceNameMapper.

#309 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Attached the patch, let me know if that works or not.

It worked, the changes are in rev 94.

Greg: please update the web skeleton project.

#310 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

Just to avoid registering all tree will probably just add an override to say which type name we're looking for and stop when we find and register that one.

No reason to not register the full tree - just make sure to register only interfaces implementing _BaseObject_ and classes inheriting BaseObject. And the same logic applies - either LegacyResource annotation or lookup in SourceNameMapper.

Changes committed in revision 11563, if you see any issues please let me know. It still feels odd to me to register everything once I've found what I'm interested in, there is a method that can register the whole hierarchy though. Otherwise the error handling there could probably be improved, there is no indication of what happened is something goes wrong there so debug is the only option :(

#311 Updated by Constantin Asofiei almost 4 years ago

I've committed the StatusCodeEnum and InternalEntry changes from 4384b to 4231b rev 11551, as these were required by a project.

#312 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Changes committed in revision 11563, if you see any issues please let me know.

I don't understand the history entry, Move getLegacyClass from LegacyClass, add class hierarchy registration. - I don't see any changes in LegacyClass.

It still feels odd to me to register everything once I've found what I'm interested in, there is a method that can register the whole hierarchy though.

Sooner or later these will be registered, when they are required. Doing this work all at once just helps limiting future work.

Otherwise the error handling there could probably be improved, there is no indication of what happened is something goes wrong there so debug is the only option :(

What do you mean here?

#313 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

Changes committed in revision 11563, if you see any issues please let me know.

I don't understand the history entry, Move getLegacyClass from LegacyClass, add class hierarchy registration. - I don't see any changes in LegacyClass.

The change was done before but forgot to add that note, I've moved the logic from LegacyClass.getLegacyClass in those stubs you've added in ObjectOps.

It still feels odd to me to register everything once I've found what I'm interested in, there is a method that can register the whole hierarchy though.

Sooner or later these will be registered, when they are required. Doing this work all at once just helps limiting future work.

Probably true only probably some of those were already registered, guess getAssignableClass can be changed to walk through all hierarchy instead of stopping when it finds the object we're interested in.

Otherwise the error handling there could probably be improved, there is no indication of what happened is something goes wrong there so debug is the only option :(

What do you mean here?

There are still cases when that method returns null instead of throwing an error, you end-up with an invalid object but no error is being set.

#314 Updated by Constantin Asofiei almost 4 years ago

Marian, please add full stubs for the ClientLibraryBuilder class. Currently I need especially the ServerNameIndicator method. Use UnimplementedFeature.missing to log a message that the method is not implemented yet. This is high priority.

#315 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian, please add full stubs for the ClientLibraryBuilder class. Currently I need especially the ServerNameIndicator method. Use UnimplementedFeature.missing to log a message that the method is not implemented yet. This is high priority.

Committed in rev 11564, some changes done to skeleton class as well.

#316 Updated by Constantin Asofiei almost 4 years ago

Thanks, I've committed 4384b rev 11564 to 4231b rev 11552.

#317 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Thanks, I've committed 4384b rev 11564 to 4231b rev 11552.

Constantin, I've missed the LegacySocketLibraryBuilder - that needs to add the abstract getter for Library, did push a new commit just now.

#318 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

Thanks, I've committed 4384b rev 11564 to 4231b rev 11552.

Constantin, I've missed the LegacySocketLibraryBuilder - that needs to add the abstract getter for Library, did push a new commit just now.

Committed to 4231b rev 11554

#319 Updated by Marian Edu almost 4 years ago

There is something unclear about how to call a ctor that has an array (indeterminate extent) input parameter - like JsonArray. The problem is in ObjectOps.newInstance using varargs and when a parameter with extent not yet fixed (character0) the args will be simply a zero size array hence the ctor with no parameters will be picked even if the mode is set to "I" leading to the 'mismatch parameters" error. If we wrap that character array in a Object array - `new Object[] { p1 }` then it works but just trying to see what is the right way to do it I wrote some code that instantiate the JsonArray from 4GL to see how the generated code looks like and much to my surprise an InputOutputExtentParameter is being used :(

Although the parameter is just INPUT I've tried to give that a shot only like that resolveLegacyEntry can't find any match for a ctor so this is clearly not working... what am I missing?

def var ae as Progress.Json.Objectmodel.JsonArray.
def var p as character extent.

ae = new  Progress.Json.Objectmodel.JsonArray(p).
ae.assign(ObjectOps.newInstance(JsonArray.class, "I", new InputOutputExtentParameter<character>()
         {
            public character[] getVariable()
            {
               return p;
            }

            public void setVariable(final character[] newRef)
            {
               p = newRef;
            }
         }));

#320 Updated by Constantin Asofiei almost 4 years ago

Marian, yes, for extent arguments FWD has some special ways of passing them as arguments. For dynamic extent, is even more problematic, as if the var has resized in the called method, we need to update the Java reference. That's why you see the inner class.

Also, for vars scoped to internal procedures, functions, methods, c'tors, etc, we need to use a 2-dimensional array, because:
  • we can't promote this as an instance var (as it will break recursive calls)
  • we still need to update the Java var to reference the new array

Fastest way is to write some simple programs which pass input/output/input-output args for dynamic and non-dynamic extent and use this paradigm in hand-written code. Note that there is a similar paradigm for output/input-output non-extent variables.

BTW, for the specific case you mentioned there, looks like there is a bug in FWD. The call should be like:

ControlFlowOps.invokeWithMode("proc0", "I", (Object) l);

for a call like this:
def var l as int extent.

run proc0(input l).

#321 Updated by Constantin Asofiei almost 4 years ago

Marian, I need to rebase and merge the 4384b changes to 4231b. Please commit all changes you have (and you consider stable) and let me know when I can start the rebase.

#322 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian, I need to rebase and merge the 4384b changes to 4231b. Please commit all changes you have (and you consider stable) and let me know when I can start the rebase.

Constantin, nothing 'stable' to be committed right now... we will have to 'stage' our changes in local git and then get them back once you've done the rebase. Let us know when it is done, we won't be pushing any changes until then.

#323 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

Marian, I need to rebase and merge the 4384b changes to 4231b. Please commit all changes you have (and you consider stable) and let me know when I can start the rebase.

Constantin, nothing 'stable' to be committed right now... we will have to 'stage' our changes in local git and then get them back once you've done the rebase. Let us know when it is done, we won't be pushing any changes until then.

OK, I'm starting the rebase. Note that after the merge, you will use the new 4384c branch.

#324 Updated by Marian Edu almost 4 years ago

Greg, we keep jumping from one dependency to another here so the list of classes that needs to be implemented keep on growing so we need some kind of decision to be made here. Apart the 'core' package (string, collections) that was used almost everywhere so it had to be implemented we're now looking at two main use cases:
- the HTTP client (used in 4GL to make HTTP requests)
- the Web Handler (for PASOE)

For the first one most probably the whole Net.HTTP package needs to be implemented along with Logging from Core, ultimately all those builders classes are used to make a HTTP call and that one requires the socket base HTTP client.

For second one there are fewer dependencies and Constantin might have been working on some of the classes or work on those right now so we have to know which one to tackle first. As it is now everything that was implemented (in our short list) in HTTP package is not really useful unless there is actually a client to be able to make those HTTP requests :(

#326 Updated by Greg Shah almost 4 years ago

It is OK to finish the web handler work first, if that is what you are asking.

As it is now everything that was implemented (in our short list) in HTTP package is not really useful unless there is actually a client to be able to make those HTTP requests :(

Are you saying that we need testcases here? Or are you saying that the existing OpenEdge.Net.Http* classes are not yet useful because we don't have enough implemented?

Igor: In regard to the work you did in #4124 to add our replacement implementations for OpenEdge.Net.Http* classes, what testcases did you use to test that work? Marian and Mihai have been filling in the gaps in these classes as documented in our customer application requirements from #4384-1.

#327 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

It is OK to finish the web handler work first, if that is what you are asking.

We were working more on the HTTP package, the question was more whether or not to work on the web handler or Constantin is already taking care of that in some other task/branch?

As it is now everything that was implemented (in our short list) in HTTP package is not really useful unless there is actually a client to be able to make those HTTP requests :(

Are you saying that we need testcases here?

We usually write testcases for everything to make sure the implementation matches the one in 4GL.

Or are you saying that the existing OpenEdge.Net.Http* classes are not yet useful because we don't have enough implemented?

Yes, unless the final HTTP client is implemented all those builders are useless since in the end one HTTP client must be created to make a HTTP request and the only implementation in 4GL is the socket based one.

Igor: In regard to the work you did in #4124 to add our replacement implementations for OpenEdge.Net.Http* classes, what testcases did you use to test that work? Marian and Mihai have been filling in the gaps in these classes as documented in our customer application requirements from #4384-1.

Our testcases are in oo/openedge/net/http.

#328 Updated by Constantin Asofiei almost 4 years ago

I've merged 4384b from 4231b rev 11566 - new rev 11609.

4384b rev 11609 was merged to 4231b rev 11567.

Greg: please create 4384c.

Marian: please update 4384b to have it as an archive.

#329 Updated by Eugenie Lyzenko almost 4 years ago

Constantin Asofiei wrote:

I've merged 4384b from 4231b rev 11566 - new rev 11609.

4384b rev 11609 was merged to 4231b rev 11567.

Greg: please create 4384c.

Marian: please update 4384b to have it as an archive.

Guys,

I need to do small commit into 4231b. Is it safe now? Or the branch is now frozen for merge operations?

#330 Updated by Constantin Asofiei almost 4 years ago

Eugenie Lyzenko wrote:

I need to do small commit into 4231b. Is it safe now? Or the branch is now frozen for merge operations?

You can use 4231b, is safe.

#331 Updated by Greg Shah almost 4 years ago

We were working more on the HTTP package, the question was more whether or not to work on the web handler or Constantin is already taking care of that in some other task/branch?

Any changes are already present in 4231b. The core parts are working, I think. If I recall correctly, we need more extensive tests in this area to get to a point where we have a complete implementation.

Constantin: Is that correct? Also, do you have a list of the things left to do (or to test or to find answers about) for WebHandler support?

Or are you saying that the existing OpenEdge.Net.Http* classes are not yet useful because we don't have enough implemented?

Yes, unless the final HTTP client is implemented all those builders are useless since in the end one HTTP client must be created to make a HTTP request and the only implementation in 4GL is the socket based one.

Understood. If there is no choice here, then keep going on this path. The code is actively used in more than one large customer application and we can expect many others needing this too. What do you think is the (rough estimate) timing for this?

#332 Updated by Greg Shah almost 4 years ago

Greg: please create 4384c.

This is now available in xfer.goldencode.com:/opt/fwd/4384c and was branched from 4231b revision 11568.

#333 Updated by Constantin Asofiei almost 4 years ago

Greg Shah wrote:

Constantin: Is that correct? Also, do you have a list of the things left to do (or to test or to find answers about) for WebHandler support?

Yes, all my work is in 4231b and is 'good enough' for the simplest cases, but it needs completed. The main WIP files are related to the HTTP request/response (especially misc APIs in web.WebResponse and WebResponseWriter) - more notes are in #3855-102 (and we should discuss the WebHandler related issues in #3855).

#334 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

Greg: please create 4384c.

This is now available in xfer.goldencode.com:/opt/fwd/4384c and was branched from 4231b revision 11568.

OK, moved to the new branch and merged our local changes but now we can't get the conversion to work anymore. It keeps on throwing errors from generateSoapWsdl - character to be escaped is missing. What are we missing? :)

#335 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

Understood. If there is no choice here, then keep going on this path. The code is actively used in more than one large customer application and we can expect many others needing this too. What do you think is the (rough estimate) timing for this?

We will go through all the things in that package, see what is already implemented in FWD and if/what are other dependencies outside of that package - I know OpenEdge.Core.Logging and Progress.Json are definitively being used :(

#336 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

OK, moved to the new branch and merged our local changes but now we can't get the conversion to work anymore. It keeps on throwing errors from generateSoapWsdl - character to be escaped is missing. What are we missing? :)

What's the stacktrace? I tried a simple conversion and it works with 4231b (without SOAP support).

#337 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

What's the stacktrace?

EXPRESSION EXECUTION ERROR:
---------------------------
srv.generateSoapWsdl()
    ^  { character to be escaped is missing }
---------------------------
Elapsed job time:  00:00:03.073
ERROR:
java.lang.RuntimeException: ERROR!  Active Rule:
-----------------------
      RULE REPORT      
-----------------------
Rule Type :   POST
Source AST:  null
Copy AST  :  null
Condition :  srv.generateSoapWsdl()
Loop      :  false
--- END RULE REPORT ---

    at com.goldencode.p2j.pattern.PatternEngine.run(PatternEngine.java:1079)
    at com.goldencode.p2j.convert.TransformDriver.processTrees(TransformDriver.java:569)
    at com.goldencode.p2j.convert.ConversionDriver.back(ConversionDriver.java:573)
    at com.goldencode.p2j.convert.TransformDriver.executeJob(TransformDriver.java:956)
    at com.goldencode.p2j.convert.ConversionDriver.main(ConversionDriver.java:1025)
    at testcases.Convert.main(Convert.java:22)
Caused by: com.goldencode.expr.ExpressionException: Expression execution error @1:5
    at com.goldencode.expr.Expression.execute(Expression.java:484)
    at com.goldencode.p2j.pattern.Rule.apply(Rule.java:497)
    at com.goldencode.p2j.pattern.Rule.executeActions(Rule.java:745)
    at com.goldencode.p2j.pattern.Rule.coreProcessing(Rule.java:712)
    at com.goldencode.p2j.pattern.Rule.apply(Rule.java:534)
    at com.goldencode.p2j.pattern.PatternEngine.applyGlobal(PatternEngine.java:1681)
    at com.goldencode.p2j.pattern.PatternEngine.run(PatternEngine.java:1046)
    ... 5 more
Caused by: java.lang.IllegalArgumentException: character to be escaped is missing
    at java.util.regex.Matcher.appendReplacement(Matcher.java:809)
    at java.util.regex.Matcher.replaceAll(Matcher.java:955)
    at java.lang.String.replaceAll(String.java:2223)
    at com.goldencode.p2j.pattern.ServiceSupport$Library.generateSoapWsdl(ServiceSupport.java:993)
    at com.goldencode.expr.CE9761.execute(Unknown Source)
    at com.goldencode.expr.Expression.execute(Expression.java:391)
    ... 11 more

I tried a simple conversion and it works with 4231b (without SOAP support).

This is on 4384c, aren't we supposed to use that one from now on?

#338 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

This is on 4384c, aren't we supposed to use that one from now on?

It works with 4384c rev 11568, too.

What program are you converting?

#339 Updated by Marian Edu almost 4 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

What's the stacktrace?

[...]

I tried a simple conversion and it works with 4231b (without SOAP support).

This is on 4384c, aren't we supposed to use that one from now on?

         String pkgroot = Configuration.getParameter("pkgroot");
         String output = Configuration.getParameter("output-root");
         String path = String.format("%s%s%s%s", output,
                                                 File.separator,
                                                 pkgroot.replaceAll("\\.", File.separator),
                                                 File.separator);

This is a NPE if not configured properly :(

#340 Updated by Constantin Asofiei almost 4 years ago

Argh, you are on windows, right? Please try this patch:

### Eclipse Workspace Patch 1.0
#P p2j
Index: src/com/goldencode/p2j/pattern/ServiceSupport.java
===================================================================
--- src/com/goldencode/p2j/pattern/ServiceSupport.java    (revision 2312)
+++ src/com/goldencode/p2j/pattern/ServiceSupport.java    (working copy)
@@ -1010,11 +1010,9 @@
       public void generateSoapWsdl()
       {
          String pkgroot = Configuration.getParameter("pkgroot");
+         pkgroot = Utils.replaceSeparator(pkgroot, ".", File.separator);
          String output = Configuration.getParameter("output-root");
-         String path = String.format("%s%s%s%s", output,
-                                                 File.separator,
-                                                 pkgroot.replaceAll("\\.", File.separator),
-                                                 File.separator);
+         String path = String.format("%s%s%s%s", output, File.separator, pkgroot, File.separator);

          for (SoapConfig cfg : soapConfigs.values())
          {

#341 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

This is a NPE if not configured properly :(

The pkgroot and output-root must always be there, so I don't see how a NPE is possible. I think the problem is that Windows has \ separator and replaceAll is not working (as this is not escaped properly). Please try the patch.

#342 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

This is a NPE if not configured properly :(

The pkgroot and output-root must always be there, so I don't see how a NPE is possible. I think the problem is that Windows has \ separator and replaceAll is not working (as this is not escaped properly). Please try the patch.

Yeah, that was it... didn't look at the exception so thought could be a NPE due to replaceAll call but hey, if you say that could never happen this must be true :(

#343 Updated by Constantin Asofiei almost 4 years ago

The correct line is:

pkgroot = pkgroot.replace('.', File.separatorChar);

instead of Utils.replaceSeparator(pkgroot, ".", File.separator);.

please use that. I'll commit it to 4231b, too.

#344 Updated by Constantin Asofiei almost 4 years ago

I've updated the standard.df on xfer testcases with the latest one from the Hotel GUI project.

#345 Updated by Marian Edu almost 4 years ago

Constantin Asofiei wrote:

I've updated the standard.df on xfer testcases with the latest one from the Hotel GUI project.

Most probably not related to this but since the last merge we can't start the server anymore, it fails to load the configuration file cfg/p2j.cfg.xml. The file is right there as it always was, I've couldn't find any changes that could be the cause for this but you might know better and save us some more debugging time. I've got as far as finding that configuration is seen as runtime and the configuration file is loaded as resource through the class loader instead of looking to the file system directly, one thing I've tried now is to put the deploy/lib/testcases.jar in build path since that one seems to include a configuration file. However, wonder if that change won't have further side effects on our environment :(

Is there a way to keep on using the configuration file from file system instead of going through the testcases.jar file? After all that one will probably imply that we need to rebuild everything instead of just running the conversion as before, that jar seems to include the classes generated for the project and in debug we've always used the classes directly without deploy.

#346 Updated by Constantin Asofiei almost 4 years ago

Marian Edu wrote:

Is there a way to keep on using the configuration file from file system instead of going through the testcases.jar file? After all that one will probably imply that we need to rebuild everything instead of just running the conversion as before, that jar seems to include the classes generated for the project and in debug we've always used the classes directly without deploy.

OK, I think I see what you mean - you are not using the standard server.sh to start the FWD server, but instead run it from Eclipse or something else, right?

In this case, you need to either:
  • empty the metadata#standard node in p2j.cfg.xml, don't use meta tables for the current tests and populate it only as needed:
          <metadata name="standard">
          </metadata>
    
  • add to the classpath the cfg/ and data/ folders.

The cause for this are some changes in FWD to automatically populate some meta tables - and you can bypass the problem by not including any meta tables in p2j.cfg.xml.

OTOH, if you don't have the cfg/ and data/ folders in the classpath, you will not be able to use dynamic queries/tables, either.

#347 Updated by Marian Edu almost 4 years ago

A list of not particularly related issues just for further reference:
- I18N, code page support not really matching the 4GL, most of our tests that involve some kind of code page conversion fails because of that
- copy-lob, various validations of source/target code page missing or different compared to 4GL
- memptr, set-size - on Windows when passing a negative number the value apparently gets set as xor between max unsigned int and the absolute value passed as input, since that is always higher than the max integer it should throw and error and in version 12 a new error number was added 19208 although if passing a positive value greater than the max integer (signed) it throws the 15747 one just like it is already in FWD. Oddly enough when trying to reproduce the behavior again this morning on 11.7.4 the size of memptr when using negative values remains zero, no idea if the same thing happens on *nix though.

All those are used in 4GL OO implementation so some of the tests that we wrote are not passing, still I think we're spending time debugging those cases while it should be handled in another task (if someone is not already working on it, I know we have some test cases for longchar/copy-lob/i18n).

#348 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

Understood. If there is no choice here, then keep going on this path. The code is actively used in more than one large customer application and we can expect many others needing this too. What do you think is the (rough estimate) timing for this?

Mihai did go through all those classes/interfaces in the HTTP package and added/updated the skeleton for it as well as some other needed classes from logging and alike. I will create a new patch for that and upload it here. First step will be to get conversion support so stubs for everything to match the 4GL implementation and then add the actual logic. This should be straight forward if base 4GL functionality used is already there, I'm thinking specifically about the client sockets here. Writing tests and implementation for everything on HTTP package will probably keep Mihai busy for 3-4 weeks as a rough estimate but it depends on how close the core 4GL functionality is supported :(

#349 Updated by Marian Edu almost 4 years ago

Attached the patch for skeleton changes, in Eclipse and Bazaar format... this might also include the previous changes, we probably need to pull changes from https://proj.goldencode.com/downloads/skeletons/repo/ after each patch we send is merged.

#350 Updated by Greg Shah almost 4 years ago

Marian Edu wrote:

Attached the patch for skeleton changes, in Eclipse and Bazaar format... this might also include the previous changes, we probably need to pull changes from https://proj.goldencode.com/downloads/skeletons/repo/ after each patch we send is merged.

I've applied the changes to the skeletons project, it is now at rev 97. I've updated the project on proj.goldencode.com. Please update your local copy.

#351 Updated by Greg Shah almost 4 years ago

Is 4384c in a good place to merge the changes into 4231b? If it is OK, tomorrow I want to get the merge done and then reset your branch.

#352 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

Is 4384c in a good place to merge the changes into 4231b? If it is OK, tomorrow I want to get the merge done and then reset your branch.

Everything is committed, net.http still needs some work to get the conversion passing first before we move to implement everything in it but we'll sync with the new branch once you do the merge.

#353 Updated by Greg Shah almost 4 years ago

I've merged all the changes from 4384c (revisions 11569 through 11579) into 4231b revision 11606.

I've created a new branch 4384d (see xfer.goldencode.com:/opt/fwd/4384d) from 4231b rev 11606.

#354 Updated by Marian Edu almost 4 years ago

Greg Shah wrote:

I've merged all the changes from 4384c (revisions 11569 through 11579) into 4231b revision 11606.

I've created a new branch 4384d (see xfer.goldencode.com:/opt/fwd/4384d) from 4231b rev 11606.

I had to remove a few unused imports in src/com/goldencode/p2j/persist/meta/MetadataManager.java.

+import org.aspectj.org.eclipse.jdt.internal.formatter.linewrap.*;
+import org.aspectj.weaver.ast.*;
+import org.hibernate.bytecode.instrumentation.internal.javassist.*;

Actually the offending one was org.aspectj.org.eclipse.jdt.internal.formatter.linewrap, if we need to add some extra dependencies to classpath please let us know but it might also be a left over from code assistant in Igor's IDE :)

#355 Updated by Greg Shah almost 4 years ago

Actually the offending one was org.aspectj.org.eclipse.jdt.internal.formatter.linewrap, if we need to add some extra dependencies to classpath please let us know but it might also be a left over from code assistant in Igor's IDE :)

Yes, these should not have been there. In 4231b rev 11609 these were removed.

#356 Updated by Marian Edu almost 4 years ago

Just making a note so don't forget about it, there is an issue with destructors when there is an error thrown from a class's ctor. In FWD all destructors are being called when the resource object is deleted and that happens if the ctor throws an error. All that is good only that the destructor of the class where the exception is thrown should not be called, this is how 4GL works. The problem is how the destructors stack is being constructed, every time a ctor is being called the framework look for a destructor in the same class and if it finds one it adds that to the destructors stack, problem is it does that even if the ctor that was called fails... to be continued :)

#357 Updated by Marian Edu almost 4 years ago

We have some issues with OO named events, one of the tests does not pass conversion: oo/openedge/net/http/filter/auth/authentication_request_filter/test_event_http_credential_req.p.

I've made a few tests for named events to see if those should be supported in FWD in oo/named_events and surprisingly those tests pass the conversion - the generated code is not completely right though but still.

Those are the files that can be used for file-cvt-list:

oo/named_events/EvtHandler.cls
oo/named_events/SelfSubscribe.cls
oo/named_events/OtherSubscribe.cls
oo/named_events/testSubscribe.p

oo/openedge/net/http/filter/auth/authentication_request_filter/AuthenticationRequestFilterStub.cls
oo/openedge/net/http/filter/auth/authentication_request_filter/EventsHome.cls
oo/openedge/net/http/filter/auth/authentication_request_filter/test_event_http_credential_req.p

Maybe a known issue, could even be fixed in some other branch so please let us know if we need to apply a patch or anything to fix that.
Thanks

#358 Updated by Constantin Asofiei over 3 years ago

Marian, I think this is your change, right?

     [exec] [ant:javac] p2j/src/com/goldencode/p2j/oo/net/Uri.java:73: warning: ThreadLocalCoders is internal proprietary API and may be removed in a future release
     [exec] [ant:javac] import sun.nio.cs.ThreadLocalCoders;

This is not a public API in the JRE. Can this be changed to something else?

#359 Updated by Marian Edu over 3 years ago

Attached the skeleton patch for OE12.2, some new classes added to Core and Net packages and some updates to existing ones. The skeleton is generated using reflection, normally we could assume 100% compatibility... the only thing that is missing are temp-tables/datasets defined in those classes. We also had to skip methods that takes buffer parameters (to one of those temp-tables), there is no way to know the table definitions unless we look at the code. If there are any client that use those data structures the only option will be to look at their code base and see what include file is used to get the definition. For a temp-table defined inline in the class there is no way we can tell what the structure is I'm afraid.

#360 Updated by Greg Shah over 3 years ago

If there are any client that use those data structures the only option will be to look at their code base and see what include file is used to get the definition. For a temp-table defined inline in the class there is no way we can tell what the structure is I'm afraid.

Understood and agreed. Looking at customer 4GL code is our normal process for such things.

#361 Updated by Greg Shah over 3 years ago

Is the patch made relative to revision 97?

#362 Updated by Marian Edu over 3 years ago

Greg Shah wrote:

Is the patch made relative to revision 97?

Yes, I did an update before but let me check something first... it looks like for interface inheritance reflection shows all properties/methods like being defined in the interface (DeclaredOnly doesn't seem to work as expected).

Let me see how our generator can be changed to address this :(

#363 Updated by Marian Edu over 3 years ago

Greg Shah wrote:

Is the patch made relative to revision 97?

Attached the fixed patch, this is done against revision 97.

#364 Updated by Greg Shah over 3 years ago

This patch was merged into the skeletons project as revision 98. I've pushed it to proj.goldencode.com as well.

#365 Updated by Marian Edu over 3 years ago

  • Related to Bug #4827: OO Conversion issue with method resolve (erasure) added

#366 Updated by Constantin Asofiei over 3 years ago

Marian Edu wrote:

We have some issues with OO named events, one of the tests does not pass conversion: oo/openedge/net/http/filter/auth/authentication_request_filter/test_event_http_credential_req.p.

I've made a few tests for named events to see if those should be supported in FWD in oo/named_events and surprisingly those tests pass the conversion - the generated code is not completely right though but still.

Those are the files that can be used for file-cvt-list:
[...]

Maybe a known issue, could even be fixed in some other branch so please let us know if we need to apply a patch or anything to fix that.
Thanks

Fixed in 3821c rev 11433

#367 Updated by Eugenie Lyzenko over 3 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

We have some issues with OO named events, one of the tests does not pass conversion: oo/openedge/net/http/filter/auth/authentication_request_filter/test_event_http_credential_req.p.

I've made a few tests for named events to see if those should be supported in FWD in oo/named_events and surprisingly those tests pass the conversion - the generated code is not completely right though but still.

Those are the files that can be used for file-cvt-list:
[...]

Maybe a known issue, could even be fixed in some other branch so please let us know if we need to apply a patch or anything to fix that.
Thanks

Fixed in 3821c rev 11433

Should I interrupt and restart customer application 3821c conversion with 11433 update? It is in beginning so we lost no more than hour at this time.

#368 Updated by Constantin Asofiei over 3 years ago

Eugenie Lyzenko wrote:

Should I interrupt and restart customer application 3821c conversion with 11433 update? It is in beginning so we lost no more than hour at this time.

No, these fixes are not related to that and there are 2 more commits to fix #4824 and #4749. Let this conversion run fully with the revision you started it and re-run again tomorrow.

#369 Updated by Greg Shah over 3 years ago

I've merged all pending changes from 4384d (revisions 11607 through 11625 inclusive) into 3821c revision 11449. Please note that I've made changes to src/com/goldencode/p2j/persist/meta/MetadataManager.java and src/com/goldencode/p2j/util/* to resolve the following problems:

  • Added history entries.
  • Changed copyright dates.
  • Added missing Javadoc
  • Removed recently added usage of org.apache.commons.*. We try not to add dependencies on new frameworks. This is one that we don't want to add.
  • Fixed problems with coding standards (see Coding Standards):
    • open block ({) should be on its own line
    • if( should be if (
    • alignment/indentation needs to be 3 spaces at each level
    • maximum 110 characters per line
    • moved private static members down to the section of the code where they belong and public static members up to their section

I've created 4384e (on xfer.goldencode.com:/opt/fwd/4384e) from 3821c rev 11449.

#370 Updated by Marian Edu over 3 years ago

Greg Shah wrote:

  • Removed recently added usage of org.apache.commons.*. We try not to add dependencies on new frameworks. This is one that we don't want to add.

Greg, that one is already set as dependency in gradle so we've just used what was already there. What we are using from that one is basically StringUtils (isEmpty, isBlank) and that was already used before (ClientPrincipal and SecurityPolicyManager from util). If you want to we can remove those from all other places but as said this is not a new dependency that we've added.

  • Fixed problems with coding standards (see Coding Standards):
    • open block ({) should be on its own line
    • if( should be if (
    • alignment/indentation needs to be 3 spaces at each level
    • maximum 110 characters per line

Sorry for that, when upgrading to OE12.2 we forgot to import the formatting rules :(

#371 Updated by Greg Shah over 3 years ago

that one is already set as dependency in gradle so we've just used what was already there. What we are using from that one is basically StringUtils (isEmpty, isBlank) and that was already used before (ClientPrincipal and SecurityPolicyManager from util). If you want to we can remove those from all other places but as said this is not a new dependency that we've added.

Yes, you're right that it is in there already. Along the way somewhere, someone put the reference in to a class or two and it "escaped" into the wider project. We try hard to eliminate references to 3rd party libraries unless the value added is clearly larger than the costs. That analysis was never done for this case. So I'm trying to remove these where I find them.

#372 Updated by Marian Edu over 3 years ago

Greg Shah wrote:

So I'm trying to remove these where I find them.

OK, will try to do the same. Thanks.

#373 Updated by Greg Shah over 3 years ago

I've merged all changes from 4384e revisions 11450 through 11472 into 3821c as revision 11523.

I've create a new 4384f branch on xfer.goldencode.com:/opt/fwd/4384f from 3821c rev 11523.

#374 Updated by Marian Edu over 3 years ago

Greg Shah wrote:

I've merged all changes from 4384e revisions 11450 through 11472 into 3821c as revision 11523.

I've create a new 4384f branch on xfer.goldencode.com:/opt/fwd/4384f from 3821c rev 11523.

Thanks Greg, we've made the switch to the new branch however now we can't start the server anymore. Something with the new 'Dialect', maybe we're missing something from directory.xml or anything. It throws an exception because it can't find the dialect for one of the databases during startup. We only have one database there (fwd), the temp one seems to be added automatically but that one is successfully registered. It fails on 'primary', apparently because of missing 'ORM' settings... what should we have there?

#375 Updated by Marian Edu over 3 years ago

Marian Edu wrote:

It fails on 'primary', apparently because of missing 'ORM' settings... what should we have there?

Hmm, changing the name from 'hibernate' to 'orm' seems to help... however the URL needs to be updated as well because the connection fails with Unsupported connection setting "MVCC". Removing that option from URL helped and now the server seems to be up and running... not sure if this is 'stable' enough though :(

#376 Updated by Greg Shah over 3 years ago

Sorry, I should have considered that. This version inlcudes the result of a 12-18 month effort to rewrite our persistence layer (see #4011). This code is a massive piece of work and it will certainly bring some regressions, though I'm hoping you are not affected. We are working through the regressions now.

I made the changes needed in the testcases project revisions 743 and 744. I did not test it yet. Can you please give it a try? The database will need to be re-imported as well as reconverting everything.

#377 Updated by Marian Edu over 3 years ago

Greg Shah wrote:

Can you please give it a try? The database will need to be re-imported as well as reconverting everything.

Seems to work fine with your version, thanks.

#378 Updated by Marian Edu over 3 years ago

Hi guys, I'm banging my head over here for some time already so thought maybe someone could know the cause and hopefully a remedy for my pain :(

In one of the methods in URI (decode) we throw an error (AppError) if the input is invalid but that does not seem to work, for whatever reason the instantiation of a new AppError instance does not succeed there, this is the stack trace:

java.lang.NullPointerException
        at com.goldencode.p2j.util.SharedVariableManager.scopeDeleted(SharedVariableManager.java:1703)
        at com.goldencode.p2j.util.ProcedureManager.delete(ProcedureManager.java:2092)
        at com.goldencode.p2j.util.ProcedureManager.delete(ProcedureManager.java:1942)
        at com.goldencode.p2j.util.ExternalProgramWrapper.delete(ExternalProgramWrapper.java:845)
        at com.goldencode.p2j.util.ObjectOps.loadClassInt(ObjectOps.java:1801)
        at com.goldencode.p2j.util.ObjectOps.loadClassInt(ObjectOps.java:1784)
        at com.goldencode.p2j.util.ObjectOps.loadClass(ObjectOps.java:1740)
        at com.goldencode.p2j.util.ObjectOps.newInstanceInternal(ObjectOps.java:847)
        at com.goldencode.p2j.util.ObjectOps.newInstance(ObjectOps.java:782)
        at com.goldencode.p2j.oo.lang.AppError.newInstance(AppError.java:129)

The reg variable there is indeed null, hence the NPE, but it does look like this is not expected so why would that happen? The referent (processed procedure) is a plain P.L.O which does look odd. The method we test is a instance level one but that in turns calls a static one, both methods uses function blocks with returnNormal and undoThrow.

Anyone recognize this behavior, something I need to do to fix it? :(
Thanks

#379 Updated by Marian Edu over 3 years ago

Marian Edu wrote:

Anyone recognize this behavior, something I need to do to fix it? :(

Args, the static constructor didn't had the externalProcedure block in it just the onBlockLevel statement... adding the block solved the issue. Guess I still don't have a clear idea when a method needs those extra blocks or we can skip that and use return/throw instead or returnNormal :(

#380 Updated by Constantin Asofiei over 3 years ago

Marian Edu wrote:

Marian Edu wrote:

Anyone recognize this behavior, something I need to do to fix it? :(

Args, the static constructor didn't had the externalProcedure block in it just the onBlockLevel statement... adding the block solved the issue. Guess I still don't have a clear idea when a method needs those extra blocks or we can skip that and use return/throw instead or returnNormal :(

As a general rule of thumb: any time you have FWD APIs being called from there (and here onBlockLevel is one of them), you need to use the BlockManager compatible APIs for that Java method. More, the c'tors (static or instance) and destructors are a special kind of method which always need that BlockManager API for them.

Otherwise, if for example you have a simple GETTER legacy Java method which just returns a value which is always valid/etc, you can avoid the BlockManager API.

#381 Updated by Marian Edu over 3 years ago

Is there a way to have those classes from the OO implementation registered so when we try to dynamically load one of those classes to have them available in SourceNameMapper? What we do in 4GL is to have those libraries (corelib, netlib) added to propath, how this could be solved in FWD?

There are a bunch of places in OO implementation where dynamic loading is needed, if no variable was already defined for that class then it is not yet registered and loading the class fails.

#382 Updated by Marian Edu over 3 years ago

I'm working on updating Core.ByteBucket to 12.2 and it looks like they are using now a Progress.IO.MemoryOutputStream to hold the actual binary data. The "Progress" package is reserved for PSC and that is really 'core' functionality that is available to anyone - no need to add any .pl in PROPATH. This is not implemented in FWD, the IO package, as much as it is there, is mostly 'STUB'.

Question is, do we need to implement those new 'core' classes or we just leave it using a list of bytes array as it is now? Validation of input parameters passed to ctors is done by the new class that throws SysError instances which normally we can't do from 4GL. If we leave it as is now do we update the errors to match or keep the assert as before?

Invalid value specified for parameter 'value' of method or constructor 'Progress.IO.MemoryOutputStream'. (18193)

#383 Updated by Greg Shah over 3 years ago

Question is, do we need to implement those new 'core' classes or we just leave it using a list of bytes array as it is now?

We do NOT need to replacate their internal object graph or classes as long as we deliver the same functionality/behavior.

If we leave it as is now do we update the errors to match

Yes, the errors should be updated so that they match the 4GL behavior even though we don't use the same internal classes.

#384 Updated by Marian Edu over 3 years ago

Greg Shah wrote:

Question is, do we need to implement those new 'core' classes or we just leave it using a list of bytes array as it is now?

We do NOT need to replacate their internal object graph or classes as long as we deliver the same functionality/behavior.

Just to be clear, those are not 'internals' at all. There are just 'protected' as in one can't have any classes in "Progress" package but other than that those are available for everyone to use... https://docs.progress.com/bundle/abl-reference/page/Progress.IO.MemoryOutputStream-class.html?&_ga=2.127186639.375102495.1601921771-548472360.1601921771

If we leave it as is now do we update the errors to match

Yes, the errors should be updated so that they match the 4GL behavior even though we don't use the same internal classes.

This is what we will do till those will be needed, thanks.

#385 Updated by Greg Shah over 3 years ago

I've merged all changes from 4384f into 3821c revision 11696. Consider 4384f dead. I have created a new branch 4384g from 3821c revision 11696.

#386 Updated by Constantin Asofiei over 3 years ago

Marian Edu wrote:

Is there a way to have those classes from the OO implementation registered so when we try to dynamically load one of those classes to have them available in SourceNameMapper? What we do in 4GL is to have those libraries (corelib, netlib) added to propath, how this could be solved in FWD?

There are a bunch of places in OO implementation where dynamic loading is needed, if no variable was already defined for that class then it is not yet registered and loading the class fails.

Can you give me an example? Is this related to reflection?

#387 Updated by Marian Edu over 3 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

Is there a way to have those classes from the OO implementation registered so when we try to dynamically load one of those classes to have them available in SourceNameMapper? What we do in 4GL is to have those libraries (corelib, netlib) added to propath, how this could be solved in FWD?

There are a bunch of places in OO implementation where dynamic loading is needed, if no variable was already defined for that class then it is not yet registered and loading the class fails.

Can you give me an example? Is this related to reflection?

No, nothing to do with reflection per-se... all 'registry' classes (DI containers of some sort) use this to inject specific implementations for a given interface/abstract class so when you register one service you have a method to give it a class name as input. Then get-class or Class.GetClass can be used to resolve that name to the actual class. In 4GL this is done by using the PROPATH just like for anything else, in FWD this seems to be constructed during conversion in some XML mapping file. In theory this might not be a problem if all classes that ever needs to be loaded like that are used somewhere in the application so the mapping is already available. However there are a bunch of classes/interfaces defined in PSC OO packages that are not really used directly by the client app so for those trying to use get-class will fail to resolve.

def var plc as Progress.Lang.Class.

plc = get-class('OpenEdge.Core.String').

If we run this the get-class will fail to resolve, the workaround we had to use for tests was to define a variable of that type and use it somehow (assign it to itself) so the variables are registered and then the class is resolved. In fact I thought that the complete XML mapping generated by conversion is loaded but it appears not to be the case, having tests on ByteBucket converted trying to resolve ByteBucket instead of String also fail at first. If I ran a test that register the ByteBucket before this then all is fine though :)

#388 Updated by Constantin Asofiei over 3 years ago

Marian, OK, I understand the issue. i think you can solve it yourself:
  • look at SymbolResolver.findConvertedLegacyClass, especially this code:
             Reflections reflections = new Reflections("com.goldencode.p2j.oo");
             Set<Class<? extends _BaseObject_>> legacyClasses = 
                reflections.getSubTypesOf(_BaseObject_.class);
             for (Class<? extends _BaseObject_> cls : legacyClasses)
             {
                LegacyResource lr = cls.getAnnotation(LegacyResource.class);
    

    which lists all 'legacy builtin classes' which have an implementation in FWD.
  • in a static constructor for ObjectOps constructor, use the Reflections API (as mentioned above) to list all 'legacy builtin classes' which have an implementation in FWD, and use ObjectOps.registerClassWorker(String, Class) to register it.

This should solve your issue.

#389 Updated by Marian Edu over 3 years ago

Constantin Asofiei wrote:

This should solve your issue.

Thanks for that, works like a charm :)

#391 Updated by Greg Shah over 3 years ago

When is a good time to merge 4384g back into 3821c?

#392 Updated by Marian Edu over 3 years ago

Greg Shah wrote:

When is a good time to merge 4384g back into 3821c?

Working on Class for invoke and ParameterList, find out results are different from using the CALL interface so we have to be careful with the part of code that is being reused... struggling with what run-time conversion is allowed and which isn't :(

I'll try to have that in a stable state today and push changes or we can wait till Friday to start fresh next week.

#393 Updated by Greg Shah over 3 years ago

Friday is fine.

#394 Updated by Marian Edu over 3 years ago

Greg, for the HTTP client in 4GL a plain client socket is used for making all requests while in FWD the Apache Http client was the natural choice. This, however, makes the implementation not 100% compatible and anything beside the main `execute` method in ABLSocketLibrary is not implemented and it can't work the same way as in 4GL.

Now, while the `ClientSocket` is implemented as an abstraction over the 4GL socket handle I would not go the 4GL way on this one and keep the Apache Http Client instead. This is really internal implementation and I doubt anyone is extending the `ABLSocketLibrary` but damn I'm known to be wrong before so it's your call. As far as I can tell the only thing that we will be missing is the debug information although we can somehow try to mimic that to some extent.

This brings me to another subject which is logging, this was more or less ignored until now as it was not listed in the top list. We did made a custom logger that spit out all logging messages in console and started to use that in tests for objects that support logging. Problem we see now is most of those objects output various messages if a logger is set. This might not be a priority so I didn't start reviewing previous tests to check output sent to the logger by various tests, we're trying to add the same logging information on objects we're currently implementing but this is not part of the unit test. We just look at what the 4GL generate, try to see where this is coming from and try to make it the same in FWD. Checking logger messages in a unit-test for a specific method will probably render the tests more confusing :(

Anyway, do you want that to be implemented now so we get back and test all objects that supports logging and try to make it the same as in 4GL or this is not really important at this point?

#395 Updated by Greg Shah over 3 years ago

This, however, makes the implementation not 100% compatible and anything beside the main `execute` method in ABLSocketLibrary is not implemented and it can't work the same way as in 4GL.

Is ABLSocketLibrary required here? Is there some public interface of the HTTP client that requries it? If it is not explicitly needed, then let's bypass it for now.

We do in fact have a full 4GL socket client. If needed we can implement the ABLSocketLibrary in a fully compatible manner using that facility. But if we can avoid it for some time, that is best.

Now, while the `ClientSocket` is implemented as an abstraction over the 4GL socket handle I would not go the 4GL way on this one and keep the Apache Http Client instead. This is really internal implementation I doubt anyone is extending the `ABLSocketLibrary` but damn I'm known to be wrong before so it's your call.

I agree, let's avoid it unless there is some customer code that requires it.

This brings me to another subject which is logging, this was more or less ignored until now as it was not listed in the top list. We did made a custom logger that spit out all logging messages in console and started to use that in tests for objects that support logging. Problem we see now is most of those objects output various messages if a logger is set.

If you are talking about the LOG-MANAGER support, we do have it on our list to finish in the next 3-4 months. See #3853. If you need this implemented, please go ahead with that. If it can wait, then let it wait. The HTTP support is more important to the functioning of the converted code. But if you need it it can be implemented now.

#396 Updated by Marian Edu over 3 years ago

Greg Shah wrote:

Is ABLSocketLibrary required here? Is there some public interface of the HTTP client that requries it? If it is not explicitly needed, then let's bypass it for now.

There is an interface IHttpClientLibrary and this is the default implementation registered. One can replace it with another implementation (using .net maybe) but the issue is they might just want to extend the default one :(

We do in fact have a full 4GL socket client. If needed we can implement the ABLSocketLibrary in a fully compatible manner using that facility. But if we can avoid it for some time, that is best.

All public methods does not involve any 4GL socket client, however some of the protected ones does have a ClientSocket (wrapper over a 4GL socket) as parameter so if anyone tries to extend the implementation by overriding some of those protected methods we're out of luck :(

Now, while the `ClientSocket` is implemented as an abstraction over the 4GL socket handle I would not go the 4GL way on this one and keep the Apache Http Client instead. This is really internal implementation I doubt anyone is extending the `ABLSocketLibrary` but damn I'm known to be wrong before so it's your call.

I agree, let's avoid it unless there is some customer code that requires it.

We will try to make it as compatible as possible for now while still using the HTTP client, as said I doubt there are many (if any) clients extending this implementation. It is possible but I very much doubt anyone actually does it so I think we can act only when that happens.

This brings me to another subject which is logging, this was more or less ignored until now as it was not listed in the top list. We did made a custom logger that spit out all logging messages in console and started to use that in tests for objects that support logging. Problem we see now is most of those objects output various messages if a logger is set.

If you are talking about the LOG-MANAGER support, we do have it on our list to finish in the next 3-4 months. See #3853. If you need this implemented, please go ahead with that. If it can wait, then let it wait. The HTTP support is more important to the functioning of the converted code. But if you need it it can be implemented now.

Not particularly although I'm sure there are some logger implementations that use the LOG-MANAGER system handle. The question now was how important it is now to have the log messages generated by various method in various classes that support logging implemented? Since we're not using the code for this but only test cases we don't know exactly what/when log messages are being generated whenever a condition is meet when a method is being executed. Since last week we've added a simple logger that records all those messages and for classes that we were testing/implementing since then we've tried to also replicate the same log messages as in 4GL. If we need to implement that to match the 4GL one including this logging facility then we need to review tests for classes that supports logging and then adjust the implementation as needed.

For the ABLSocketLibrary I expect there will be some connect/read/disconnect log messages for low-level socket events that we're probably going to miss for time being.

#397 Updated by Greg Shah over 3 years ago

but the issue is they might just want to extend the default one :(

If someone does this, we will implement a fully compatible approach at that time. I agree, this is not something of concern right now.

We will try to make it as compatible as possible for now while still using the HTTP client, as said I doubt there are many (if any) clients extending this implementation. It is possible but I very much doubt anyone actually does it so I think we can act only when that happens.

Agreed.

#398 Updated by Marian Edu over 3 years ago

Greg, there are definitively some bugs in the 4GL implementation that simple were not discovered yet... some of the old ones in 11.7 were found and fixed by PSC but there are still some that were not reported yet. Like a size that reports negative value or isn't reset on clear, arrays that are not resized and places where they don't test for valid objects to name a few. So, we're looking at the following options to make the test cases pass... either we remove those cases from the tests and we don't 'implement' the bug or we try to figure out what is actually causing the bug and try to replicate it exactly. The later is probably harder that implementing what we think the functionality should be, I'm looking now at one place where callback event handlers are added and it looks like being kept in an array that is not resized when one callback is removed and then adding it back cause havoc, the size is always increased, adding a callback seems to somehow rearrange the items and then whenever one entry in that array is left empty/invalid object the method that removes one callback is throwing error :)

I find it hard to implement this, not just because it's clearly a bug but without looking at the code I really don't know what they are doing there :(

I think for the negative size we've simply left the test case fail but didn't implemented in FWD, when the size was not reset on collection after clear I had to add one variable to keep the size and also forget to reset it but it just feels wrong :(

#399 Updated by Greg Shah over 3 years ago

Our extreme focus on compatibility is not absolute. There are many bugs in the OpenEdge implementation which we do not duplicate. These are the possible reasons for avoiding compatibility:

  • The bug causes the 4GL code to abend (e.g. a crash in the OpenEdge client executible).
  • The bug causes data corruption or is otherwise destructive without abending.
  • The bug causes a memory leak without changing what resources are in scope or are available.
  • The bug is profoundly harmful to the user's experience.
  • The bug appears random or is otherwise so inconsistent that it cannot be relied upon in code.

All of these cases have the following in common: we calculate that there is no advantage in 4GL code which would assume that this bug is implemented. In other words, if an application really depends upon this bug in order to process correctly, then we must implement the bug.

We prefer not to implement OE bugs. If you can see a way for 4GL to rely upon a bug for correct processing, then we would usually implement it. But even there we sometimes defer this implemention and record it in a list of "unimplemented quirks". The browse widget has many such quirks, see #2596.

This means I'm OK with you not implementing bugs BUT ONLY if the above conditions hold. So I want you to do the analysis for each such case and create a task about it. This task should have a recreate test (please put a snippet of 4GL code into the task where easily done so that the reader doesn't have to pull the testcases). It should document your reasoning for not implementing the bug. And we need a master task to hold the links to all of these unimplemented OO bugs.

#400 Updated by Greg Shah over 3 years ago

  • Related to Bug #5011: unimplemented OO 4GL quirks and bugs added

#401 Updated by Greg Shah over 3 years ago

  • Related to Bug #5010: OO Quirk - Core.Collections.EntrySet added

#403 Updated by Marian Edu over 3 years ago

There were some minor fixes to apply in skeleton for Collections and IO (streams) and I've also added everything from CCS and Core.Logging. Most probably out of scope right now but better to have those in there for later. There is also an utility procedure that can create the list of objects in a PL file (oo/dump_lib.p), dump that in 'discovery.txt' file that can be used then to create 4GL skeleton and discovery classes using reflection.

Attached the patch done against https://proj.goldencode.com/downloads/skeletons/repo/.

#404 Updated by Roger Borrello over 3 years ago

Marian Edu wrote:

There were some minor fixes to apply in skeleton for Collections and IO (streams) and I've also added everything from CCS and Core.Logging. Most probably out of scope right now but better to have those in there for later. There is also an utility procedure that can create the list of objects in a PL file (oo/dump_lib.p), dump that in 'discovery.txt' file that can be used then to create 4GL skeleton and discovery classes using reflection.

Attached the patch done against https://proj.goldencode.com/downloads/skeletons/repo/.

Will these updates be committed to bzr?

#405 Updated by Marian Edu over 3 years ago

Roger Borrello wrote:

Will these updates be committed to bzr?

No idea, we do not have access to that repository so always sent the changes as a patch up until now.

#406 Updated by Roger Borrello over 3 years ago

Marian Edu wrote:

No idea, we do not have access to that repository so always sent the changes as a patch up until now.

Understood. Greg, would you like me to patch Rev 98, and commit updates?

#407 Updated by Greg Shah over 3 years ago

would you like me to patch Rev 98, and commit updates?

Yes, please.

#408 Updated by Roger Borrello over 3 years ago

bzr commit -m "Rev #4384: There were some minor fixes to apply in skeleton for Collections and IO (streams) and I've also added everything from CCS and Core.Logging. Most probably out of scope right now but better to have those in there for later. There is also an utility procedure that can create the list of objects in a PL file (oo/dump_lib.p), dump that in 'discovery.txt' file that can be used then to create 4GL skeleton and discovery classes using reflection." 
Committing to: /home/rfb/secure/code/p2j_repo/skeleton/                                                                                                                               
modified oo4gl/Ccs/Common/Support/IHandleHolder.cls
modified oo4gl/Ccs/Common/Support/IPrimitiveHolder.cls
modified oo4gl/OpenEdge/Core/Collections/ICollection.cls
modified oo4gl/OpenEdge/Core/Collections/IList.cls
modified oo4gl/OpenEdge/Core/Collections/IListIterator.cls
modified oo4gl/OpenEdge/Logging/LogMessage.cls
modified oo4gl/OpenEdge/Logging/Logger.cls
modified oo4gl/OpenEdge/Logging/VoidLogger.cls
modified oo4gl/Progress/IO/InputStream.cls
modified oo4gl/Progress/IO/OutputStream.cls
Committed revision 99.

#409 Updated by Greg Shah over 3 years ago

Revision 99 pushed to https://proj.goldencode.com/downloads/skeletons/repo/.

I don't see oo/dump_lib.p in either skeletons or testcases projects.

#410 Updated by Greg Shah over 3 years ago

I've updated the table from #4384-1 using the status from the PDF.

Category Conversion Runtime Notes
openedge.core.bytebucket Full Full Hold
openedge.core.memptr Full Partial Hold
openedge.core.string Full Partial Hold
openedge.net.http.clientbuilder Full Full Closed
openedge.net.http.credentials Full Full Closed
openedge.net.http.filter.payload.binaryentitywriter Partial Partial Hold
openedge.net.http.filter.payload.messagewriter Full Full Closed
openedge.net.http.ihttpclientlibrary Full Full Closed
openedge.net.http.lib.clientlibrarybuilder Partial Partial New
openedge.net.http.requestbuilder Partial Partial Closed but there are no support levels listed in the PDF)
openedge.net.messagepart Full Full Closed
openedge.net.mimetypehelper Full Full Closed
openedge.net.multipartentity Full Full Closed
openedge.net.uri Full Full Closed
openedge.net.uriencodingtypeenum Full Full Closed
openedge.web.webhandler Full Partial ?
openedge.web.webresponse Full Partial ?
openedge.web.webresponsewriter Full Partial ?
progress.json.objectmodel.objectmodelparser Full Partial ?
progress.lang.apperror Full Partial ?
progress.lang.class Full Partial ?
progress.lang.parameterlist Full Basic ?
Table below is for help formatting tables:
Support Lvl
None
Stubs
Untested
Partial
Basic
Full (R)
Full

#411 Updated by Greg Shah over 3 years ago

Some questions:

  • For those items marked "Hold", is this due to the open OO bugs in FWD (many of which Constantin is working on)?
  • Has openedge.net.http.lib.clientlibrarybuilder not been worked at all yet?
  • Is the PDF missing support level updates for openedge.net.http.requestbuilder?
  • The items marked ? don't appear in the PDF. Are these not handled at all yet?

#412 Updated by Marian Edu over 3 years ago

Greg Shah wrote:

Some questions:

  • For those items marked "Hold", is this due to the open OO bugs in FWD (many of which Constantin is working on)?

Some of them because conversion issues reported, others because of I18N (all methods that takes a codepage as parameter fails to pass tests).

  • Has openedge.net.http.lib.clientlibrarybuilder not been worked at all yet?

Yes, tests were created and some functionality is there already as this is used when a HTTP request is made and we have such tests but the class itself was not formally tested, will take care of that and update the status.

  • Is the PDF missing support level updates for openedge.net.http.requestbuilder?

Yes, probably that was closed before I've added those additional custom fields on the project.

  • The items marked ? don't appear in the PDF. Are these not handled at all yet?

Class and ParameterList are in progress, Mihai added only items from OpenEdge package not from Progress :(
For OpenEdge.Web package as far as I know that was started by Constantin and we didn't touch those classes but I will check tomorrow to be sure.
For JSON there are tests that we've wrote sometime this spring, I did fixed some issues we've found during tests on NET package but those classes were not formally tested (not present in list also because Progress package was not considered when tasks were created in Open Project).

#413 Updated by Marian Edu about 3 years ago

The updated status below, will check with Constantin if we need to pick up the ones in Web package, I see we have some tests made for those though.

Category Conversion Runtime Notes
openedge.core.bytebucket Full Full Hold - codepage conversions
openedge.core.memptr Full Full Hold - codepage conversions
openedge.core.string Full Full Hold - codepage conversions
openedge.net.http.clientbuilder Full Full Closed
openedge.net.http.credentials Full Full Closed
openedge.net.http.filter.payload.binaryentitywriter Full Full Closed
openedge.net.http.filter.payload.messagewriter Full Full Closed
openedge.net.http.ihttpclientlibrary Full Full Closed
openedge.net.http.lib.clientlibrarybuilder Full Full Closed
openedge.net.http.requestbuilder Full Full Closed
openedge.net.messagepart Full Full Closed
openedge.net.mimetypehelper Full Full Closed
openedge.net.multipartentity Full Full Closed
openedge.net.uri Full Full Closed
openedge.net.uriencodingtypeenum Full Full Closed
openedge.web.webhandler Full Partial ?
openedge.web.webresponse Full Partial ?
openedge.web.webresponsewriter Full Partial ?
progress.json.objectmodel.objectmodelparser Full Partial In progress
progress.lang.apperror Full Full Closed
progress.lang.class Full Partial In progress
progress.lang.parameterlist Full Basic In progress

#414 Updated by Marian Edu about 3 years ago

Greg, we're working on Json parser and it's virtual impossible to make the error messages match the ones in 4GL - the parser in 4GL seems to report as offset the end of the invalid token while fasterxml fail safe right at start so we can't even get the whole token that is invalid. For an invalid object for instance the 4GL shows different messages if we use a number as the object's key name compared to when we use an unquoted string while fasterxml simply reports the first character saying double-quote was expected instead.

Since the error number is always the same and only the details part of the message is different I see two options here - we can just use the details from fasterxml or we can try to make it as close as possible using info from location/processor. I will go with the first approach, no real value added and imho the details from fasterxml are more helpful.

#415 Updated by Greg Shah about 3 years ago

I'm OK with this being a "known limitation". Please leave behind (in the Java code) a "TODO" comment with detailed description of the difference.

#416 Updated by Greg Shah about 3 years ago

Are you still blocked by bugs in our OO 4GL implementation? If not, should we merge 4384g into 3821c and then create a new 4384h branch?

Constantin: What is outstanding in the OO fixes? I think the following were open:

#4978 Static method call in base class
#4965 Parameter annotation - qualified
#5025 syserror, jsonerror...
#5029 OO constructor with array input parameter
#5035 Temp-Table index on P.L.O field
#5029 OO constructor with array input parameter

#417 Updated by Marian Edu about 3 years ago

Constantin, I have a question about WebRequest implementation in FWD. First that seems to be named RemoteWebRequest but there is no mapping used there and beside there is also a comment that say 'do not annotate this class' in the code. Am I right this is actually the WebRequest implementation? This only implements the IWebRequest interface so there is no point in casting it to an actual WebRequest but still this is very much possible in 4GL, any particular reason this is not annotated and somehow kept invisible? Since that one is only valid in a web handler environment there is no way to test it other than by running the SOAPUI tests, do you still need help in that area or we can consider the implementation complete (there are no levels markers so not sure what the status is)?

Thanks

#418 Updated by Constantin Asofiei about 3 years ago

Marian Edu wrote:

Constantin, I have a question about WebRequest implementation in FWD. First that seems to be named RemoteWebRequest but there is no mapping used there and beside there is also a comment that say 'do not annotate this class' in the code. Am I right this is actually the WebRequest implementation?

Yes, that is the WebRequest implementation when used from within the WebHandler.

... any particular reason this is not annotated and somehow kept invisible?

Hmm... can you instantiate the legacy RemoteRequest outside of the web handler environment? I was thinking about this, and not just 'completely hide it'.

Since that one is only valid in a web handler environment there is no way to test it other than by running the SOAPUI tests, do you still need help in that area or we can consider the implementation complete (there are no levels markers so not sure what the status is)?

What was noted in #3855-102 for WebHandler still stands. Look for UnimplementedFeature and // no-op comments - those for sure need review.

#419 Updated by Marian Edu about 3 years ago

Constantin Asofiei wrote:

Hmm... can you instantiate the legacy RemoteRequest outside of the web handler environment? I was thinking about this, and not just 'completely hide it'.

The class in 4GL has the default public ctor so one can simply create one WebRequest instance which is more or less just a wrapper on top of web-context/stream handles. As a matter of fact the default WebHandler methods does not get that request injected somehow, one has to create an instance of WebRequest to get info about web-context (it's an odd design I give you that but that's the way it is).

Since that one is only valid in a web handler environment there is no way to test it other than by running the SOAPUI tests, do you still need help in that area or we can consider the implementation complete (there are no levels markers so not sure what the status is)?

What was noted in #3855-102 for WebHandler still stands. Look for UnimplementedFeature and // no-op comments - those for sure need review.

I was looking at WebResponseWriter and WebHandler and there are still quite a few methods there left to be implemented. The WebResponseWriter in 4GL is actually exposing the web-stream handle that one can use it directly to write into it (again, maybe not the best decision given there are a bunch of write methods), in FWD that is always an invalid handle and output goes to the HttpServletResponse output stream - not clear why string/binary output is somehow kept in different buffers, in 4GL that's just a steam so one can throw into it both string/binary data and even mix those in any order. To make it 4GL compatible there should be a proper 'web' stream implementation like you have for file/dir/terminal... otherwise this can be left as partial but then our unit-tests that were just redirecting the web-stream to a file can't work.

#420 Updated by Marian Edu about 3 years ago

Constantin, the class must be annotated as as far as I know this is the only way to get access to the request inside a WebHandler - the methods there does not send the request/response as one would expect so the way it works is you need to create an instance of WebRequest and then WebResponse and WebResponseWriter :(

I will just add a mapping in common rules and leave the class name as-is unless you think it's best to simply rename it.

#421 Updated by Constantin Asofiei about 3 years ago

Marian, something is confusing - isn't a IWebRequest instance for HandleGet and such methods in WebHandler automatically injected as a parameter?

The current RemoteWebRequest implementation was that it is dependent on the HttpServletRequest instance, and one couldn't use/build it without this reference.

Are you saying that the web stream (actually a handle) is somehow injected in this instance? Do you have some simple tests about this? Or where I could read more?

For example, is the web stream automatically created by OpenEdge always, or it could be created explicitly, too?

Also, can you set this stream (handle) to a file, for example, in the WebRequest instance?

#422 Updated by Marian Edu about 3 years ago

Constantin Asofiei wrote:

Marian, something is confusing - isn't a IWebRequest instance for HandleGet and such methods in WebHandler automatically injected as a parameter?

Yes, but the IWebHandler interface does also have a HandleRequest method with no parameters where the WebRequest is usually created and it was not uncommon for developers to simply override that public method instead of the respective protected ones (get/post/delete...).

The current RemoteWebRequest implementation was that it is dependent on the HttpServletRequest instance, and one couldn't use/build it without this reference.

Yes, this is also true for 4GL - an instance of WebRequest when the web-context is not valid is not of much use either. I see you now 'inject' the web context into WebHandler from Agent and later move that down to the request using initialize method, maybe you can make that web context work area accessible so the WebRequest can try to access it like it does from 4GL. If not available in 4GL we are greeted with warning messages saying this is not available out of a Web environment.

Are you saying that the web stream (actually a handle) is somehow injected in this instance? Do you have some simple tests about this? Or where I could read more?

The web stream is for output, for request everything comes actually from web-context - https://documentation.progress.com/output/ua/OpenEdge_latest/index.html#page/dvref/web-context-system-handle.html. Progress has also a "compatibility" web handler that can be used with old webspeed procedures. All their WebHandler is more an OO wrapper on top of good old WebSpeed functionality :(

For example, is the web stream automatically created by OpenEdge always, or it could be created explicitly, too?

There is no 'web stream' per-se, one can direct (output to) any stream (even the default one) to "WEB" and then send any data into it as with any stream.

Also, can you set this stream (handle) to a file, for example, in the WebRequest instance?

Not in WebRequest, the stream is for response in WebResponseWriter - there is a public property stream handle that normally is sent to "WEB". It's more like a reborn of WebSpeed - https://knowledgebase.progress.com/sfc/servlet.shepherd/document/download/0694Q000009jv6aQAA

#423 Updated by Constantin Asofiei about 3 years ago

Greg Shah wrote:

Are you still blocked by bugs in our OO 4GL implementation? If not, should we merge 4384g into 3821c and then create a new 4384h branch?

Constantin: What is outstanding in the OO fixes? I think the following were open:

#4978 Static method call in base class

I don't have a better fix yet.

#4965 Parameter annotation - qualified

I need to check the test, is not WIP yet.

#5025 syserror, jsonerror...

Marian - did you manage to solve this?

#5029 OO constructor with array input parameter

This is WIP part of a larger set of changes related to extent properties, method returns, etc, which I need to stabilize and test. I think this is the higher priority now.

#5035 Temp-Table index on P.L.O field

Marian, is this still an issue? The problem here was that the tests were expecting the 'handle resource ID' (aka 'object ID') to be incremental and sort by this ID, when in FWD these are random.

#424 Updated by Marian Edu about 3 years ago

  • Related to Bug #5035: Temp-Table index on P.L.O field added

#425 Updated by Greg Shah about 3 years ago

I've pushed 3821c revision 11969 to xfer. We have merged 4397a (TT serialization and dataset fixes) and 1587b (CONTAINS operator rework and optimizations).

Please branch from it (bzr branch sftp://<userid>@xfer.goldencode.com/opt/fwd/3821c/) and then locally merge your 4384g changes into it. Once you are sure it is safe, you can bzr push --overwrite sftp://<userid>@xfer.goldencode.com/opt/fwd/4384g/.

From there I will merge 4384g into 3821c. Then I will create a new 4384h branch from the resulting 3821c.

#426 Updated by Marian Edu about 3 years ago

Greg Shah wrote:

I've pushed 3821c revision 11969 to xfer. We have merged 4397a (TT serialization and dataset fixes) and 1587b (CONTAINS operator rework and optimizations).

Please branch from it (bzr branch sftp://<userid>@xfer.goldencode.com/opt/fwd/3821c/) and then locally merge your 4384g changes into it. Once you are sure it is safe, you can bzr push --overwrite sftp://<userid>@xfer.goldencode.com/opt/fwd/4384g/.

From there I will merge 4384g into 3821c. Then I will create a new 4384h branch from the resulting 3821c.

Greg, unfortunately this is going nowhere... trying to push the result back into 4384g since yesterday always with the same result, the process just hangs more or less at the same place:

C:\Projects\goldencode\workspace-fwd\3821c>bzr push --overwrite sftp://medu@xfer.goldencode.com/opt/fwd/4384g/
Connected (version 2.0, client OpenSSH_7.2p2)
SSH medu@xfer.goldencode.com password:
Authentication (password) successful!
[chan 1] Opened sftp connection (server version 3)
Stole dead lock sftp://medu@xfer.goldencode.com/opt/fwd/4384g/.bzr/branch/lock held by Marian Edu <marian.edu@acorn.ro> on LAPTOP-AI42CPV5 (process #25408), acquired 8 minutes, 32 seconds ago.
  4603kB   108kB/s | Fetching revisions:Inserting stream:Estimate 3318/3450

The bazaar log file looks like this:

Sun 2021-01-31 18:15:43 +0200
0.072  bazaar version: 2.6b1
0.072  bzr arguments: [u'push', u'--overwrite', u'sftp://medu@xfer.goldencode.com/opt/fwd/4384g/']
0.075  looking for plugins in C:/Users/marian/AppData/Roaming/bazaar/2.0/plugins
0.078  looking for plugins in C:\Programs\Python27\lib\site-packages\bzrlib\plugins
0.093  encoding stdout as sys.stdout encoding 'cp437'
0.124  opening working tree 'C:/Projects/goldencode/workspace-fwd/3821c'
0.127  iter_all_entries scales with size of history.
Called from:
  File "C:\Programs\Python27\lib\site-packages\bzrlib\repofmt\pack_repo.py", line 1467, in reload_pack_names
    first_read = self.ensure_loaded()
  File "C:\Programs\Python27\lib\site-packages\bzrlib\repofmt\pack_repo.py", line 1087, in ensure_loaded
    for index, key, value in self._iter_disk_pack_index():
  File "C:\Programs\Python27\lib\site-packages\bzrlib\btree_index.py", line 1004, in iter_all_entries
    "iter_all_entries scales with size of history.")
0.862  falling back to default implementation
0.862  failed to load system host keys: [Errno 2] No such file or directory: 'C:\\Users\\marian/.ssh/known_hosts'
[10672] 2021-01-31 18:15:44.967 INFO: Connected (version 2.0, client OpenSSH_7.2p2)
[10672] 2021-01-31 18:17:36.736 INFO: Authentication (password) successful!
[10672] 2021-01-31 18:17:37.792 INFO: [chan 1] Opened sftp connection (server version 3)
120.942  iter_all_entries scales with size of history.
Called from:
  File "C:\Programs\Python27\lib\site-packages\bzrlib\repofmt\pack_repo.py", line 1472, in reload_pack_names
    orig_disk_nodes) = self._diff_pack_names()
  File "C:\Programs\Python27\lib\site-packages\bzrlib\repofmt\pack_repo.py", line 1338, in _diff_pack_names
    for index, key, value in self._iter_disk_pack_index():
  File "C:\Programs\Python27\lib\site-packages\bzrlib\btree_index.py", line 1004, in iter_all_entries
    "iter_all_entries scales with size of history.")
120.943  iter_all_entries scales with size of history.
Called from:
  File "C:\Programs\Python27\lib\site-packages\bzrlib\repofmt\pack_repo.py", line 1467, in reload_pack_names
    first_read = self.ensure_loaded()
  File "C:\Programs\Python27\lib\site-packages\bzrlib\repofmt\pack_repo.py", line 1087, in ensure_loaded
    for index, key, value in self._iter_disk_pack_index():
  File "C:\Programs\Python27\lib\site-packages\bzrlib\btree_index.py", line 1004, in iter_all_entries
    "iter_all_entries scales with size of history.")
138.930  Using fetch logic to copy between CHKInventoryRepository('file:///C:/Projects/goldencode/workspace-fwd/3821c/.bzr/repository/')(RepositoryFormat2a()) and CHKInventoryRepository('sftp://medu@xfer.goldencode.com/opt/fwd/4384g/.bzr/repository/')(RepositoryFormat2a())
138.931  fetching: <SearchResult search:(set(['marian.edu@acorn.ro-20210131101452-ui20dacrs58vsdlj']), ['marian.edu@acorn.ro-20210129083305-v2ee2arwyz4tcb9l', 'marian.edu@acorn.ro-20210129075908-2qg1cyp710m3onb0', 'marian.edu@acorn.ro-20210130112440-5l394ses22418a00', 'marian.edu@acorn.ro-20210129081344-34vgyb01m49mijnq', 'marian.edu@acorn.ro-20210130113003-q7t2yph9adhtnuit', ...], 335)>

I'm out of ideas here, anything else I can try?

#427 Updated by Greg Shah about 3 years ago

Use bzr send to package up the revision(s) in the new local branch of 3821c. Post the output here and I will apply them on xfer.

#428 Updated by Marian Edu about 3 years ago

Greg Shah wrote:

Use bzr send to package up the revision(s) in the new local branch of 3821c. Post the output here and I will apply them on xfer.

Attached the patch, from merged 3821c to our 4384g.

#429 Updated by Greg Shah about 3 years ago

This is the 3821c changes being put on top of 4384g. I'm looking to see the opposite patch. The idea is to start with a 3821c branch, merge in the changes from 4384g and then provide the bzr send output for just the 4384g additions (the specific revisions that were put on top of 3821c). This allows you to do the merge of the 4384g code and test it, but I can apply the changes here.

#430 Updated by Greg Shah about 3 years ago

To be clear: if we merge the recent changes from 3821c into 4384g, then the revision history of 4384g changes would be scrambled. It would interleave revisions from 3821c with 4384g in a way that makes it harder to reason about and merge later. This is why we use "rebasing" to keep all the changes for a given task branch "on top" of the revision history. It makes it easier to manage the changes in a task branch and merge them into trunk (or another branch as we are doing here).

#431 Updated by Marian Edu about 3 years ago

Greg Shah wrote:

To be clear: if we merge the recent changes from 3821c into 4384g, then the revision history of 4384g changes would be scrambled. It would interleave revisions from 3821c with 4384g in a way that makes it harder to reason about and merge later. This is why we use "rebasing" to keep all the changes for a given task branch "on top" of the revision history. It makes it easier to manage the changes in a task branch and merge them into trunk (or another branch as we are doing here).

Ok, I have started from 3821c and merge changes from 4384g into it then resolve conflicts, unbind and commit changes locally. I've should have made the patch against 3821c instead of 4384g, attached the patch:

bzr send sftp://medu@xfer.goldencode.com/opt/fwd/3821c/

#432 Updated by Greg Shah about 3 years ago

I have merged the 4384g changes as 3821c revision 11982.

I will create task branch 4384h from 3821c tomorrow, when Constantin checks in his changes from #5029.

#433 Updated by Greg Shah about 3 years ago

Branch 4384h was created from branch 3821c revision 11992. Please note that some changes from 4384g were modified to fix regressions in customer applications based on testing over this past week. In addition, several pending fixes to the OO 4GL support are included in this branch.

#434 Updated by Marian Edu about 3 years ago

Greg Shah wrote:

Branch 4384h was created from branch 3821c revision 11992. Please note that some changes from 4384g were modified to fix regressions in customer applications based on testing over this past week. In addition, several pending fixes to the OO 4GL support are included in this branch.

Constantin, after the merge it looks like we get a bunch of 'NoSuchElement' or 'NPE' exceptions, mostly starting somewhere in TransactionManager.popScope, on the client logs this points to ProcedureManager.scopeFinished... this leads to GPF and the client dies.

Now, there is a comment in ProcedureManager that mention some regression due to the add of hashCode/equals methods in BaseObject:

**     CA  20210104 Fixed a regression after adding BaseObject.equals/hashCode - replaced plain set with 
**                  identity set and a bug in resource delete.

Thing is it looks like I've got carried away when using legacyEquals in BaseObject.equals, that was when trying to implement collections and it looked like '==' was the same as 'equal' while in fact is not true. Same as in Java '=' in 4GL means the objects point to the same reference, while `equals` is a method that can be override and often strings are 'equals' while not holding the same reference while a 'cookie' is not even equals to itself because `equals` always returns false :(

Bref, the `equals` method in BaseObject does not need to use legacyEquals so I had to revert that... wonder if this is what is causing those errors after the merge :(

I did tried to keep the call to legacyEquals inside equals method but this doesn't change anything so, maybe I'm just chasing dead horses here.

Thanks

#435 Updated by Constantin Asofiei about 3 years ago

Marian, please give me an example where you need equals/hashCode in the collection implementations.

As a rule of thumb, in FWD runtime, each persistent procedure/OO instance is kept in various sets/maps using the identity equals/hashCode - see IdentityHashMap. This is because there is no way to make two distinct instances of an external program or legacy class equal, they are always 'distinct'.

For collections, this may be different. But I would discourage using equals/hashCode for this, if possible. Maybe a custom comparator or something else?

Are by any chance the instances where you see the NPE already deleted? Because any ObjectOps.asResource called on a deleted instance will return null.

#436 Updated by Marian Edu about 3 years ago

Constantin Asofiei wrote:

Marian, please give me an example where you need equals/hashCode in the collection implementations.

The use case was for ordering by 'resource-id' but then I guess a custom comparator would equally work. However, this is what I currently have in hashCode/equals of BaseObject, removing that altogether doesn't change anything and I still get the NoSuchElementException.

 @Override
   public int hashCode()
   {
      return handle.resourceId(ObjectOps.asResource(this)).intValue();
   }

   @Override
   public boolean equals(Object obj)
   {
      if (obj != null) {
         if (obj instanceof object)
            return this == ((object) obj).ref();
         if (obj instanceof _BaseObject_)
            return this == obj;
      }

      return super.equals(obj);
   } 

As a rule of thumb, in FWD runtime, each persistent procedure/OO instance is kept in various sets/maps using the identity equals/hashCode - see IdentityHashMap. This is because there is no way to make two distinct instances of an external program or legacy class equal, they are always 'distinct'.

Right, but for an object this means the reference is the same... two objects pointing to the same reference are equal right?

For collections, this may be different. But I would discourage using equals/hashCode for this, if possible. Maybe a custom comparator or something else?

Are by any chance the instances where you see the NPE already deleted? Because any ObjectOps.asResource called on a deleted instance will return null.

No idea, the exception is thrown from ProcedureManager.scopeFinished because thisProecdures stack is empty so the pop will throw.

java.util.NoSuchElementException
        at java.util.ArrayDeque.removeFirst(ArrayDeque.java:280)
        at java.util.ArrayDeque.pop(ArrayDeque.java:517)
        at com.goldencode.p2j.util.ProcedureManager$WorkArea.scopeFinished(ProcedureManager.java:4692)
        at com.goldencode.p2j.util.TransactionManager.processScopeNotifications(TransactionManager.java:7173)
        at com.goldencode.p2j.util.TransactionManager.popScope(TransactionManager.java:4484)
        at com.goldencode.p2j.util.TransactionManager.popScope(TransactionManager.java:1668)
        at com.goldencode.p2j.main.StandardServer.invoke(StandardServer.java:1770)
        at com.goldencode.p2j.main.StandardServer.standardEntry(StandardServer.java:581)
        at com.goldencode.p2j.main.StandardServerMethodAccess.invoke(Unknown Source)
        at com.goldencode.p2j.util.MethodInvoker.invoke(MethodInvoker.java:156)
        at com.goldencode.p2j.net.Dispatcher.processInbound(Dispatcher.java:783)
        at com.goldencode.p2j.net.Conversation.block(Conversation.java:422)
        at com.goldencode.p2j.net.Conversation.run(Conversation.java:232)
        at java.lang.Thread.run(Thread.java:745)

#437 Updated by Constantin Asofiei about 3 years ago

Marian Edu wrote:

Right, but for an object this means the reference is the same... two objects pointing to the same reference are equal right?

Correct.

No idea, the exception is thrown from ProcedureManager.scopeFinished because thisProecdures stack is empty so the pop will throw.

There may be another exception which is 'consumed' by this one... I mean, it may fail early, before this exception is encountered.

What test do you use? Can you isolate this in something simple?

#438 Updated by Marian Edu about 3 years ago

Constantin Asofiei wrote:

What test do you use? Can you isolate this in something simple?

This is the simplest one that is failing - oo/openedge/net/http/authenticated_request/test_constructor.p

I'm looking at other tests for the same class that seems to pass, one of 'builder' class (OpenEdge.Net.HTTP.Filter.Writer.SetHeaderMessageWriterBuilder) that has a static property was missing a static ctor but adding that didn't help either.

It always seems to fail inside the get method of BuilderRegistry, the return function statement there seems to cause this exception but the same method returns just fine a number of times before failing. The builder type in this case is 'com.goldencode.p2j.oo.net.http.IHttpMessageWriter' so it is the SetHeaderMessageWriterBuilder that uses that registry but the records in the registry seems fine and I still don't see why it throws error inside that get method before getting into the function body block :(

java.lang.NullPointerException
        at java.util.ArrayDeque.addFirst(ArrayDeque.java:228)
        at java.util.ArrayDeque.push(ArrayDeque.java:503)
        at com.goldencode.p2j.util.ProcedureManager$CalleeInfoImpl.push(ProcedureManager.java:5351)
        at com.goldencode.p2j.util.ProcedureManager$WorkArea.scopeStart(ProcedureManager.java:4618)
        at com.goldencode.p2j.util.TransactionManager.processScopeNotifications(TransactionManager.java:7137)
        at com.goldencode.p2j.util.TransactionManager.pushScope(TransactionManager.java:4325)
        at com.goldencode.p2j.util.TransactionManager.access$15(TransactionManager.java:4192)
        at com.goldencode.p2j.util.TransactionManager$TransactionHelper.pushScope(TransactionManager.java:8260)
        at com.goldencode.p2j.util.TransactionManager$TransactionHelper.pushScope(TransactionManager.java:8186)
        at com.goldencode.p2j.util.BlockManager.functionBlock(BlockManager.java:9029)
        at com.goldencode.p2j.util.BlockManager.function(BlockManager.java:981)
        at com.goldencode.p2j.util.BlockManager.function(BlockManager.java:949)
        at com.goldencode.p2j.oo.core.util.BuilderRegistry.get(BuilderRegistry.java:231)
        at com.goldencode.p2j.oo.net.http.HttpHeaderBuilder.lambda$6(HttpHeaderBuilder.java:258)
        at com.goldencode.p2j.util.Block.body(Block.java:604)
        at com.goldencode.p2j.util.BlockManager.processBody(BlockManager.java:8514)
        at com.goldencode.p2j.util.BlockManager.functionBlock(BlockManager.java:9056)
        at com.goldencode.p2j.util.BlockManager.function(BlockManager.java:919)
        at com.goldencode.p2j.util.BlockManager.function(BlockManager.java:891)
        at com.goldencode.p2j.oo.net.http.HttpHeaderBuilder.build(HttpHeaderBuilder.java:255)
        at com.goldencode.p2j.oo.net.http.HttpMessage.lambda$7(HttpMessage.java:270)
        at com.goldencode.p2j.util.Block.body(Block.java:604)
        at com.goldencode.p2j.util.BlockManager.processBody(BlockManager.java:8514)
        at com.goldencode.p2j.util.BlockManager.topLevelBlock(BlockManager.java:8213)
        at com.goldencode.p2j.util.BlockManager.internalProcedure(BlockManager.java:651)
        at com.goldencode.p2j.util.BlockManager.internalProcedure(BlockManager.java:628)
        at com.goldencode.p2j.oo.net.http.HttpMessage.setContentLength(HttpMessage.java:254)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.lambda$25(TestConstructor.java:391)
        at com.goldencode.p2j.util.ErrorManager.silentWorker(ErrorManager.java:3231)
        at com.goldencode.p2j.util.ErrorManager.silent(ErrorManager.java:620)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.lambda$20(TestConstructor.java:391)
        at com.goldencode.p2j.util.Block.body(Block.java:604)
        at com.goldencode.p2j.util.BlockManager.processBody(BlockManager.java:8514)
        at com.goldencode.p2j.util.BlockManager.topLevelBlock(BlockManager.java:8213)
        at com.goldencode.p2j.util.BlockManager.internalProcedure(BlockManager.java:576)
        at com.goldencode.p2j.util.BlockManager.internalProcedure(BlockManager.java:562)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.doTest(TestConstructor.java:367)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructorMethodAccess.invoke(Unknown Source)
        at com.goldencode.p2j.util.ControlFlowOps$InternalEntryCaller.invokeImpl(ControlFlowOps.java:8264)
        at com.goldencode.p2j.util.ControlFlowOps$InternalEntryCaller.invoke(ControlFlowOps.java:8235)
        at com.goldencode.p2j.util.ControlFlowOps.lambda$9(ControlFlowOps.java:6764)
        at com.goldencode.p2j.util.ControlFlowOps.invokeImpl(ControlFlowOps.java:6779)
        at com.goldencode.p2j.util.ControlFlowOps.invoke(ControlFlowOps.java:4062)
        at com.goldencode.p2j.util.ControlFlowOps.invokeImpl(ControlFlowOps.java:6358)
        at com.goldencode.p2j.util.ControlFlowOps.invokeImpl(ControlFlowOps.java:6261)
        at com.goldencode.p2j.util.ControlFlowOps.invoke(ControlFlowOps.java:1002)
        at com.goldencode.p2j.util.ControlFlowOps.invoke(ControlFlowOps.java:988)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.lambda$0(TestConstructor.java:42)
        at com.goldencode.p2j.util.Block.body(Block.java:604)
        at com.goldencode.p2j.util.BlockManager.processBody(BlockManager.java:8514)
        at com.goldencode.p2j.util.BlockManager.topLevelBlock(BlockManager.java:8213)
        at com.goldencode.p2j.util.BlockManager.externalProcedure(BlockManager.java:489)
        at com.goldencode.p2j.util.BlockManager.externalProcedure(BlockManager.java:460)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.execute(TestConstructor.java:38)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.goldencode.p2j.util.Utils.invoke(Utils.java:1548)
        at com.goldencode.p2j.main.StandardServer$MainInvoker.execute(StandardServer.java:2210)
        at com.goldencode.p2j.main.StandardServer.invoke(StandardServer.java:1646)
        at com.goldencode.p2j.main.StandardServer.standardEntry(StandardServer.java:581)
        at com.goldencode.p2j.main.StandardServerMethodAccess.invoke(Unknown Source)
        at com.goldencode.p2j.util.MethodInvoker.invoke(MethodInvoker.java:156)
        at com.goldencode.p2j.net.Dispatcher.processInbound(Dispatcher.java:783)
        at com.goldencode.p2j.net.Conversation.block(Conversation.java:422)
        at com.goldencode.p2j.net.Conversation.run(Conversation.java:232)
        at java.lang.Thread.run(Thread.java:745)
[02/08/2021 15:02:24 EET] (com.goldencode.p2j.util.TransactionManager:SEVERE) Abnormal end; original error:
java.lang.NullPointerException
        at java.util.ArrayDeque.addFirst(ArrayDeque.java:228)
        at java.util.ArrayDeque.push(ArrayDeque.java:503)
        at com.goldencode.p2j.util.ProcedureManager$CalleeInfoImpl.push(ProcedureManager.java:5351)
        at com.goldencode.p2j.util.ProcedureManager$WorkArea.scopeStart(ProcedureManager.java:4618)
        at com.goldencode.p2j.util.TransactionManager.processScopeNotifications(TransactionManager.java:7137)
        at com.goldencode.p2j.util.TransactionManager.pushScope(TransactionManager.java:4325)
        at com.goldencode.p2j.util.TransactionManager.access$15(TransactionManager.java:4192)
        at com.goldencode.p2j.util.TransactionManager$TransactionHelper.pushScope(TransactionManager.java:8260)
        at com.goldencode.p2j.util.TransactionManager$TransactionHelper.pushScope(TransactionManager.java:8186)
        at com.goldencode.p2j.util.BlockManager.functionBlock(BlockManager.java:9029)
        at com.goldencode.p2j.util.BlockManager.function(BlockManager.java:981)
        at com.goldencode.p2j.util.BlockManager.function(BlockManager.java:949)
        at com.goldencode.p2j.oo.core.util.BuilderRegistry.get(BuilderRegistry.java:231)
        at com.goldencode.p2j.oo.net.http.HttpHeaderBuilder.lambda$6(HttpHeaderBuilder.java:258)
        at com.goldencode.p2j.util.Block.body(Block.java:604)
        at com.goldencode.p2j.util.BlockManager.processBody(BlockManager.java:8514)
        at com.goldencode.p2j.util.BlockManager.functionBlock(BlockManager.java:9056)
        at com.goldencode.p2j.util.BlockManager.function(BlockManager.java:919)
        at com.goldencode.p2j.util.BlockManager.function(BlockManager.java:891)
        at com.goldencode.p2j.oo.net.http.HttpHeaderBuilder.build(HttpHeaderBuilder.java:255)
        at com.goldencode.p2j.oo.net.http.HttpMessage.lambda$7(HttpMessage.java:270)
        at com.goldencode.p2j.util.Block.body(Block.java:604)
        at com.goldencode.p2j.util.BlockManager.processBody(BlockManager.java:8514)
        at com.goldencode.p2j.util.BlockManager.topLevelBlock(BlockManager.java:8213)
        at com.goldencode.p2j.util.BlockManager.internalProcedure(BlockManager.java:651)
        at com.goldencode.p2j.util.BlockManager.internalProcedure(BlockManager.java:628)
        at com.goldencode.p2j.oo.net.http.HttpMessage.setContentLength(HttpMessage.java:254)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.lambda$25(TestConstructor.java:391)
        at com.goldencode.p2j.util.ErrorManager.silentWorker(ErrorManager.java:3231)
        at com.goldencode.p2j.util.ErrorManager.silent(ErrorManager.java:620)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.lambda$20(TestConstructor.java:391)
        at com.goldencode.p2j.util.Block.body(Block.java:604)
        at com.goldencode.p2j.util.BlockManager.processBody(BlockManager.java:8514)
        at com.goldencode.p2j.util.BlockManager.topLevelBlock(BlockManager.java:8213)
        at com.goldencode.p2j.util.BlockManager.internalProcedure(BlockManager.java:576)
        at com.goldencode.p2j.util.BlockManager.internalProcedure(BlockManager.java:562)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.doTest(TestConstructor.java:367)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructorMethodAccess.invoke(Unknown Source)
        at com.goldencode.p2j.util.ControlFlowOps$InternalEntryCaller.invokeImpl(ControlFlowOps.java:8264)
        at com.goldencode.p2j.util.ControlFlowOps$InternalEntryCaller.invoke(ControlFlowOps.java:8235)
        at com.goldencode.p2j.util.ControlFlowOps.lambda$9(ControlFlowOps.java:6764)
        at com.goldencode.p2j.util.ControlFlowOps.invokeImpl(ControlFlowOps.java:6779)
        at com.goldencode.p2j.util.ControlFlowOps.invoke(ControlFlowOps.java:4062)
        at com.goldencode.p2j.util.ControlFlowOps.invokeImpl(ControlFlowOps.java:6358)
        at com.goldencode.p2j.util.ControlFlowOps.invokeImpl(ControlFlowOps.java:6261)
        at com.goldencode.p2j.util.ControlFlowOps.invoke(ControlFlowOps.java:1002)
        at com.goldencode.p2j.util.ControlFlowOps.invoke(ControlFlowOps.java:988)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.lambda$0(TestConstructor.java:42)
        at com.goldencode.p2j.util.Block.body(Block.java:604)
        at com.goldencode.p2j.util.BlockManager.processBody(BlockManager.java:8514)
        at com.goldencode.p2j.util.BlockManager.topLevelBlock(BlockManager.java:8213)
        at com.goldencode.p2j.util.BlockManager.externalProcedure(BlockManager.java:489)
        at com.goldencode.p2j.util.BlockManager.externalProcedure(BlockManager.java:460)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.execute(TestConstructor.java:38)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.goldencode.p2j.util.Utils.invoke(Utils.java:1548)
        at com.goldencode.p2j.main.StandardServer$MainInvoker.execute(StandardServer.java:2210)
        at com.goldencode.p2j.main.StandardServer.invoke(StandardServer.java:1646)
        at com.goldencode.p2j.main.StandardServer.standardEntry(StandardServer.java:581)
        at com.goldencode.p2j.main.StandardServerMethodAccess.invoke(Unknown Source)
        at com.goldencode.p2j.util.MethodInvoker.invoke(MethodInvoker.java:156)
        at com.goldencode.p2j.net.Dispatcher.processInbound(Dispatcher.java:783)
        at com.goldencode.p2j.net.Conversation.block(Conversation.java:422)
        at com.goldencode.p2j.net.Conversation.run(Conversation.java:232)
        at java.lang.Thread.run(Thread.java:745)
[02/08/2021 15:02:24 EET] (com.goldencode.p2j.util.TransactionManager:SEVERE) Abnormal end; original error:
java.lang.NullPointerException
        at java.util.ArrayDeque.addFirst(ArrayDeque.java:228)
        at java.util.ArrayDeque.push(ArrayDeque.java:503)
        at com.goldencode.p2j.util.ProcedureManager$CalleeInfoImpl.push(ProcedureManager.java:5351)
        at com.goldencode.p2j.util.ProcedureManager$WorkArea.scopeStart(ProcedureManager.java:4618)
        at com.goldencode.p2j.util.TransactionManager.processScopeNotifications(TransactionManager.java:7137)
        at com.goldencode.p2j.util.TransactionManager.pushScope(TransactionManager.java:4325)
        at com.goldencode.p2j.util.TransactionManager.access$15(TransactionManager.java:4192)
        at com.goldencode.p2j.util.TransactionManager$TransactionHelper.pushScope(TransactionManager.java:8260)
        at com.goldencode.p2j.util.TransactionManager$TransactionHelper.pushScope(TransactionManager.java:8186)
        at com.goldencode.p2j.util.BlockManager.functionBlock(BlockManager.java:9029)
        at com.goldencode.p2j.util.BlockManager.function(BlockManager.java:981)
        at com.goldencode.p2j.util.BlockManager.function(BlockManager.java:949)
        at com.goldencode.p2j.oo.core.util.BuilderRegistry.get(BuilderRegistry.java:231)
        at com.goldencode.p2j.oo.net.http.HttpHeaderBuilder.lambda$6(HttpHeaderBuilder.java:258)
        at com.goldencode.p2j.util.Block.body(Block.java:604)
        at com.goldencode.p2j.util.BlockManager.processBody(BlockManager.java:8514)
        at com.goldencode.p2j.util.BlockManager.functionBlock(BlockManager.java:9056)
        at com.goldencode.p2j.util.BlockManager.function(BlockManager.java:919)
        at com.goldencode.p2j.util.BlockManager.function(BlockManager.java:891)
        at com.goldencode.p2j.oo.net.http.HttpHeaderBuilder.build(HttpHeaderBuilder.java:255)
        at com.goldencode.p2j.oo.net.http.HttpMessage.lambda$7(HttpMessage.java:270)
        at com.goldencode.p2j.util.Block.body(Block.java:604)
        at com.goldencode.p2j.util.BlockManager.processBody(BlockManager.java:8514)
        at com.goldencode.p2j.util.BlockManager.topLevelBlock(BlockManager.java:8213)
        at com.goldencode.p2j.util.BlockManager.internalProcedure(BlockManager.java:651)
        at com.goldencode.p2j.util.BlockManager.internalProcedure(BlockManager.java:628)
        at com.goldencode.p2j.oo.net.http.HttpMessage.setContentLength(HttpMessage.java:254)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.lambda$25(TestConstructor.java:391)
        at com.goldencode.p2j.util.ErrorManager.silentWorker(ErrorManager.java:3231)
        at com.goldencode.p2j.util.ErrorManager.silent(ErrorManager.java:620)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.lambda$20(TestConstructor.java:391)
        at com.goldencode.p2j.util.Block.body(Block.java:604)
        at com.goldencode.p2j.util.BlockManager.processBody(BlockManager.java:8514)
        at com.goldencode.p2j.util.BlockManager.topLevelBlock(BlockManager.java:8213)
        at com.goldencode.p2j.util.BlockManager.internalProcedure(BlockManager.java:576)
        at com.goldencode.p2j.util.BlockManager.internalProcedure(BlockManager.java:562)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.doTest(TestConstructor.java:367)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructorMethodAccess.invoke(Unknown Source)
        at com.goldencode.p2j.util.ControlFlowOps$InternalEntryCaller.invokeImpl(ControlFlowOps.java:8264)
        at com.goldencode.p2j.util.ControlFlowOps$InternalEntryCaller.invoke(ControlFlowOps.java:8235)
        at com.goldencode.p2j.util.ControlFlowOps.lambda$9(ControlFlowOps.java:6764)
        at com.goldencode.p2j.util.ControlFlowOps.invokeImpl(ControlFlowOps.java:6779)
        at com.goldencode.p2j.util.ControlFlowOps.invoke(ControlFlowOps.java:4062)
        at com.goldencode.p2j.util.ControlFlowOps.invokeImpl(ControlFlowOps.java:6358)
        at com.goldencode.p2j.util.ControlFlowOps.invokeImpl(ControlFlowOps.java:6261)
        at com.goldencode.p2j.util.ControlFlowOps.invoke(ControlFlowOps.java:1002)
        at com.goldencode.p2j.util.ControlFlowOps.invoke(ControlFlowOps.java:988)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.lambda$0(TestConstructor.java:42)
        at com.goldencode.p2j.util.Block.body(Block.java:604)
        at com.goldencode.p2j.util.BlockManager.processBody(BlockManager.java:8514)
        at com.goldencode.p2j.util.BlockManager.topLevelBlock(BlockManager.java:8213)
        at com.goldencode.p2j.util.BlockManager.externalProcedure(BlockManager.java:489)
        at com.goldencode.p2j.util.BlockManager.externalProcedure(BlockManager.java:460)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.execute(TestConstructor.java:38)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.goldencode.p2j.util.Utils.invoke(Utils.java:1548)
        at com.goldencode.p2j.main.StandardServer$MainInvoker.execute(StandardServer.java:2210)
        at com.goldencode.p2j.main.StandardServer.invoke(StandardServer.java:1646)
        at com.goldencode.p2j.main.StandardServer.standardEntry(StandardServer.java:581)
        at com.goldencode.p2j.main.StandardServerMethodAccess.invoke(Unknown Source)
        at com.goldencode.p2j.util.MethodInvoker.invoke(MethodInvoker.java:156)
        at com.goldencode.p2j.net.Dispatcher.processInbound(Dispatcher.java:783)
        at com.goldencode.p2j.net.Conversation.block(Conversation.java:422)
        at com.goldencode.p2j.net.Conversation.run(Conversation.java:232)
        at java.lang.Thread.run(Thread.java:745)
[02/08/2021 15:02:24 EET] (com.goldencode.p2j.util.TransactionManager:SEVERE) Abnormal end; original error:
java.lang.RuntimeException: invoke() of class com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor and  method doTest failed
        at com.goldencode.p2j.util.ControlFlowOps.invokeError(ControlFlowOps.java:7650)
        at com.goldencode.p2j.util.ControlFlowOps.invokeImpl(ControlFlowOps.java:6904)
        at com.goldencode.p2j.util.ControlFlowOps.invoke(ControlFlowOps.java:4062)
        at com.goldencode.p2j.util.ControlFlowOps.invokeImpl(ControlFlowOps.java:6358)
        at com.goldencode.p2j.util.ControlFlowOps.invokeImpl(ControlFlowOps.java:6261)
        at com.goldencode.p2j.util.ControlFlowOps.invoke(ControlFlowOps.java:1002)
        at com.goldencode.p2j.util.ControlFlowOps.invoke(ControlFlowOps.java:988)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.lambda$0(TestConstructor.java:42)
        at com.goldencode.p2j.util.Block.body(Block.java:604)
        at com.goldencode.p2j.util.BlockManager.processBody(BlockManager.java:8514)
        at com.goldencode.p2j.util.BlockManager.topLevelBlock(BlockManager.java:8213)
        at com.goldencode.p2j.util.BlockManager.externalProcedure(BlockManager.java:489)
        at com.goldencode.p2j.util.BlockManager.externalProcedure(BlockManager.java:460)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.execute(TestConstructor.java:38)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.goldencode.p2j.util.Utils.invoke(Utils.java:1548)
        at com.goldencode.p2j.main.StandardServer$MainInvoker.execute(StandardServer.java:2210)
        at com.goldencode.p2j.main.StandardServer.invoke(StandardServer.java:1646)
        at com.goldencode.p2j.main.StandardServer.standardEntry(StandardServer.java:581)
        at com.goldencode.p2j.main.StandardServerMethodAccess.invoke(Unknown Source)
        at com.goldencode.p2j.util.MethodInvoker.invoke(MethodInvoker.java:156)
        at com.goldencode.p2j.net.Dispatcher.processInbound(Dispatcher.java:783)
        at com.goldencode.p2j.net.Conversation.block(Conversation.java:422)
        at com.goldencode.p2j.net.Conversation.run(Conversation.java:232)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
        at java.util.ArrayDeque.addFirst(ArrayDeque.java:228)
        at java.util.ArrayDeque.push(ArrayDeque.java:503)
        at com.goldencode.p2j.util.ProcedureManager$CalleeInfoImpl.push(ProcedureManager.java:5351)
        at com.goldencode.p2j.util.ProcedureManager$WorkArea.scopeStart(ProcedureManager.java:4618)
        at com.goldencode.p2j.util.TransactionManager.processScopeNotifications(TransactionManager.java:7137)
        at com.goldencode.p2j.util.TransactionManager.pushScope(TransactionManager.java:4325)
        at com.goldencode.p2j.util.TransactionManager.access$15(TransactionManager.java:4192)
        at com.goldencode.p2j.util.TransactionManager$TransactionHelper.pushScope(TransactionManager.java:8260)
        at com.goldencode.p2j.util.TransactionManager$TransactionHelper.pushScope(TransactionManager.java:8186)
        at com.goldencode.p2j.util.BlockManager.functionBlock(BlockManager.java:9029)
        at com.goldencode.p2j.util.BlockManager.function(BlockManager.java:981)
        at com.goldencode.p2j.util.BlockManager.function(BlockManager.java:949)
        at com.goldencode.p2j.oo.core.util.BuilderRegistry.get(BuilderRegistry.java:231)
        at com.goldencode.p2j.oo.net.http.HttpHeaderBuilder.lambda$6(HttpHeaderBuilder.java:258)
        at com.goldencode.p2j.util.Block.body(Block.java:604)
        at com.goldencode.p2j.util.BlockManager.processBody(BlockManager.java:8514)
        at com.goldencode.p2j.util.BlockManager.functionBlock(BlockManager.java:9056)
        at com.goldencode.p2j.util.BlockManager.function(BlockManager.java:919)
        at com.goldencode.p2j.util.BlockManager.function(BlockManager.java:891)
        at com.goldencode.p2j.oo.net.http.HttpHeaderBuilder.build(HttpHeaderBuilder.java:255)
        at com.goldencode.p2j.oo.net.http.HttpMessage.lambda$7(HttpMessage.java:270)
        at com.goldencode.p2j.util.Block.body(Block.java:604)
        at com.goldencode.p2j.util.BlockManager.processBody(BlockManager.java:8514)
        at com.goldencode.p2j.util.BlockManager.topLevelBlock(BlockManager.java:8213)
        at com.goldencode.p2j.util.BlockManager.internalProcedure(BlockManager.java:651)
        at com.goldencode.p2j.util.BlockManager.internalProcedure(BlockManager.java:628)
        at com.goldencode.p2j.oo.net.http.HttpMessage.setContentLength(HttpMessage.java:254)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.lambda$25(TestConstructor.java:391)
        at com.goldencode.p2j.util.ErrorManager.silentWorker(ErrorManager.java:3231)
        at com.goldencode.p2j.util.ErrorManager.silent(ErrorManager.java:620)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.lambda$20(TestConstructor.java:391)
        at com.goldencode.p2j.util.Block.body(Block.java:604)
        at com.goldencode.p2j.util.BlockManager.processBody(BlockManager.java:8514)
        at com.goldencode.p2j.util.BlockManager.topLevelBlock(BlockManager.java:8213)
        at com.goldencode.p2j.util.BlockManager.internalProcedure(BlockManager.java:576)
        at com.goldencode.p2j.util.BlockManager.internalProcedure(BlockManager.java:562)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.doTest(TestConstructor.java:367)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructorMethodAccess.invoke(Unknown Source)
        at com.goldencode.p2j.util.ControlFlowOps$InternalEntryCaller.invokeImpl(ControlFlowOps.java:8264)
        at com.goldencode.p2j.util.ControlFlowOps$InternalEntryCaller.invoke(ControlFlowOps.java:8235)
        at com.goldencode.p2j.util.ControlFlowOps.lambda$9(ControlFlowOps.java:6764)
        at com.goldencode.p2j.util.ControlFlowOps.invokeImpl(ControlFlowOps.java:6779)
        at com.goldencode.p2j.util.ControlFlowOps.invoke(ControlFlowOps.java:4062)
        at com.goldencode.p2j.util.ControlFlowOps.invokeImpl(ControlFlowOps.java:6358)
        at com.goldencode.p2j.util.ControlFlowOps.invokeImpl(ControlFlowOps.java:6261)
        at com.goldencode.p2j.util.ControlFlowOps.invoke(ControlFlowOps.java:1002)
        at com.goldencode.p2j.util.ControlFlowOps.invoke(ControlFlowOps.java:988)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.lambda$0(TestConstructor.java:42)
        at com.goldencode.p2j.util.Block.body(Block.java:604)
        at com.goldencode.p2j.util.BlockManager.processBody(BlockManager.java:8514)
        at com.goldencode.p2j.util.BlockManager.topLevelBlock(BlockManager.java:8213)
        at com.goldencode.p2j.util.BlockManager.externalProcedure(BlockManager.java:489)
        at com.goldencode.p2j.util.BlockManager.externalProcedure(BlockManager.java:460)
        at com.goldencode.testcases.oo.openedge.net.http.authenticated_request.TestConstructor.execute(TestConstructor.java:38)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.goldencode.p2j.util.Utils.invoke(Utils.java:1548)
        at com.goldencode.p2j.main.StandardServer$MainInvoker.execute(StandardServer.java:2210)
        at com.goldencode.p2j.main.StandardServer.invoke(StandardServer.java:1646)
        at com.goldencode.p2j.main.StandardServer.standardEntry(StandardServer.java:581)
        at com.goldencode.p2j.main.StandardServerMethodAccess.invoke(Unknown Source)
        at com.goldencode.p2j.util.MethodInvoker.invoke(MethodInvoker.java:156)
        at com.goldencode.p2j.net.Dispatcher.processInbound(Dispatcher.java:783)
        at com.goldencode.p2j.net.Conversation.block(Conversation.java:422)
        at com.goldencode.p2j.net.Conversation.run(Conversation.java:232)
        at java.lang.Thread.run(Thread.java:745)

#439 Updated by Constantin Asofiei about 3 years ago

Marian, the root cause is REGISTRY.set(registry); instead of REGISTRY.get().assign(registry); in HttpHeaderBuilder.getRegistry.

This leaves the instance unreferenced, and gets deleted - place a breakpoint in ObjectResource.deleteSilent and you will see this.

Keep in mind that for static OO properties, you must not change the reference of the context-local variable - but instead create it once, and use assign to change its value, as any BDT instance is mutable. Please make sure any other usage like @REGISTRY.set(registry);@ is fixed, too.

#440 Updated by Marian Edu about 3 years ago

Constantin Asofiei wrote:

Marian, the root cause is REGISTRY.set(registry); instead of REGISTRY.get().assign(registry); in HttpHeaderBuilder.getRegistry.

Good catch Constantin, now I can go home and close the day :)

This leaves the instance unreferenced, and gets deleted - place a breakpoint in ObjectResource.deleteSilent and you will see this.

Keep in mind that for static OO properties, you must not change the reference of the context-local variable - but instead create it once, and use assign to change its value, as any BDT instance is mutable. Please make sure any other usage like @REGISTRY.set(registry);@ is fixed, too.

Understood, fixed those and works just fine now... question, what could have changed there cause some of those tests were already marked as passing, we had that AuthenticatedRequest on hold because of conversion issues and now I was trying all tests anyway just to make sure and those were not passing anymore :(

#441 Updated by Marian Edu about 3 years ago

Constantin, another thing that we've found is when using any instance level methods in LegacyClass we get a nice NPE thrown from ProcedureManager.CalleeInfoImpl.push (#5351), the legacy class (target) is not found in procedure stack. The cause is most probably the way the LegacyClass is instantiated - a standard java ctor instead of using ObjectOps.newInstance and 4GL style ctor. I think it's more or less the same use case as for system errors, should we change that to use the 4GL style ctor for LegacyClass or you handle that special case somehow to avoid the NPE?

Thanks

#442 Updated by Constantin Asofiei about 3 years ago

Marian, LegacyClass is missing legacy constructor method(s). Please add them.

If you debug into the newInstanceInternal(obj, LegacyClass.class, "Progress.Lang.Class", null); call in ObjectOps.getClassInstance, you will see that this will fail, and the instance will not be initialized.

#443 Updated by Constantin Asofiei about 3 years ago

Marian, I had to revert your object.setUnknown change which decremented the reference - only ObjectVar is allowed to do that. I'll have this in 3821c, and if you encounter problems because of this change, please check if the var definition shouldn't have been as ObjectVar.

#444 Updated by Marian Edu about 3 years ago

Constantin Asofiei wrote:

Marian, I had to revert your object.setUnknown change which decremented the reference - only ObjectVar is allowed to do that. I'll have this in 3821c, and if you encounter problems because of this change, please check if the var definition shouldn't have been as ObjectVar.

The reason for adding that is that when setting a variable to unknown if there are no other references the object will get garbage collected and one can see that because its destructor is being called. Now, this holds true for OO properties/variables as well and the conversion does not use any ObjectVar for those but simple object. Not sure it's even possible but changing from object to ObjectVar for all OO properties just to get the same behaviour is a lot of work :(

#445 Updated by Constantin Asofiei about 3 years ago

As long as you use TypeFactory.object or UndoableFactory.object to initialize a property/var, then reference counting will be performed, as this will create a ObjectVar instance. The point is to not initialize it via new object.

I don't mean to change the type of the property/var to ObjectVar, from object.

#446 Updated by Marian Edu about 3 years ago

Constantin Asofiei wrote:

As long as you use TypeFactory.object or UndoableFactory.object to initialize a property/var, then reference counting will be performed, as this will create a ObjectVar instance. The point is to not initialize it via new object.

It isn't, although I'm sure in Java code I've saw new object(ref) being used a number of times. Check out the quick test in `oo/constructor_destructor_study/test_set_unknown.p`. After reverting the change in object, when local variable is set to unknown then the destructor fire, when doing the same for the class property it does not and it looks like the property is instantiated with TypeFactory.object and it is indeed an ObjectVar.

#447 Updated by Constantin Asofiei about 3 years ago

Marian, the root cause is because the reference is incremented when the INPUT parameter is initialized in the property's setter, and is never decremented back when the setter is finished. I'm working on a fix.

#448 Updated by Constantin Asofiei about 3 years ago

Please use this patch. It will be in 3821c in the next couple of days.

### Eclipse Workspace Patch 1.0
#P p2j
Index: src/com/goldencode/p2j/util/ObjectOps.java
===================================================================
--- src/com/goldencode/p2j/util/ObjectOps.java    (revision 2664)
+++ src/com/goldencode/p2j/util/ObjectOps.java    (working copy)
@@ -2,7 +2,7 @@
 ** Module   : ObjectOps.java
 ** Abstract : Defines APIs to implement 4GL object-specific operations.
 **
-** Copyright (c) 2018-2020, Golden Code Development Corporation.
+** Copyright (c) 2018-2021, Golden Code Development Corporation.
 **
 ** -#- -I- --Date-- --------------------------------------Description---------------------------------------
 ** 001 CA  20181213 Created initial version.
@@ -44,6 +44,8 @@
 **                  BDT(Object) constructors for all sub-classes.
 **     ME  20201127 Throw error instead of showing it if cast fails.
 **     ME  20210128 Added cast/dynamic cast for object arrays.
+**     CA  20210215 An INPUT parameter at the property SETTER must be registered as pending, so its reference
+**                  can be tracked. 
 */

 /*
@@ -1503,7 +1505,22 @@
          // TODO: throw exception?
       }
    }
-   
+
+   /**
+    * When an INPUT object variable is initialized in the top-level block via {@link TypeFactory#object},
+    * it needs to be registered as 'pending'.  This will defer its registration with the 
+    * {@link WorkArea#definitions} until the top-level block starts.
+    * 
+    * @param    objects
+    *           The list of {@link object} definitions.
+    */
+   static void registerPending(Object... objects)
+   {
+      WorkArea wa = local.get();
+      
+      wa.pendingObjects.addAll(Arrays.asList(objects));
+   }
+
    /**
     * Mark this instance as a pending assignment.
     * 
@@ -2418,6 +2435,9 @@

       /** Map of legacy objects to their pseudo-resource. */
       private Map<_BaseObject_, ObjectResource> objects = new IdentityHashMap<>();
+      
+      /** Pending object definitions which need to be registered in the next scope. */
+      private Set<Object> pendingObjects = Collections.newSetFromMap(new IdentityHashMap<>()); 

       /** Variable definitions which are top-level block members. */
       private Deque<Set<Object>> definitions = new ArrayDeque<>();
@@ -2469,7 +2489,18 @@
              bt.equals(BlockType.TRIGGER)       ||
              bt.equals(BlockType.DATABASETRIGGER))
          {
-            definitions.push(Collections.EMPTY_SET);
+            if (!pendingObjects.isEmpty())
+            {
+               Set<Object> refs = Collections.newSetFromMap(new IdentityHashMap<>());
+               refs.addAll(pendingObjects);
+               definitions.push(refs);
+            }
+            else
+            {
+               definitions.push(Collections.EMPTY_SET);
+            }
+            
+            pendingObjects.clear();
          }
          else if (bt.equals(BlockType.EXTERNAL_PROC))
          {
Index: src/com/goldencode/p2j/util/TypeFactory.java
===================================================================
--- src/com/goldencode/p2j/util/TypeFactory.java    (revision 2664)
+++ src/com/goldencode/p2j/util/TypeFactory.java    (working copy)
@@ -2,7 +2,7 @@
 ** Module   : TypeFactory.java
 ** Abstract : defines APIs to create 4GL-compatible instances and initialize parameters.
 **
-** Copyright (c) 2016-2019, Golden Code Development Corporation.
+** Copyright (c) 2016-2021, Golden Code Development Corporation.
 **
 ** -#- -I- --Date-- ---------------------------------Description----------------------------------
 ** 001 CA  20160721 Created initial version.  Added APIs to create 4GL-compatible instances, with
@@ -20,6 +20,8 @@
 ** 007 CA  20190719 INPUT parameters must do reference counting always.  
 ** 008 CA  20190927 Added support for direct Java access from 4GL code.
 ** 008 ME  20201125 Register newly created object array with indeterminate extent as dynamic.
+**     CA  20210215 An INPUT parameter at the property SETTER must be registered as pending, so its reference
+**                  can be tracked. 
 */

 /*
@@ -136,8 +138,6 @@
    {
       T newVar = null;

-      // TODO: register the definition
-      
       // this needs to create a ObjectVar
       if (var instanceof object)
       {
@@ -158,6 +158,8 @@
          newVar = (T) var.deepCopy();
       }

+      ObjectOps.registerPending(newVar);
+
       return newVar;
    }

#449 Updated by Greg Shah about 3 years ago

I've added wiki documentation that lists our currently supported built-in OO classes and click on the "Supported Built-in OO 4GL Classes".

I generated this output using a tool I wrote which is not yet checked in. It uses reflection and our annotations to calculate the table. We can re-run it and refine it over time as needed.

Please review the list to see if there is anything obviously wrong.

Also, I wrote some warnings out about classes and methods with missing legacy annotations. These should probably be cleaned up.

WARNING: method getIndexInfoById of class class com.goldencode.p2j.oo.database.TempTableInfo doesn't have a LegacyResourceSupport annotation!
WARNING: method getIndexInfoById of class class com.goldencode.p2j.oo.database.TempTableInfo doesn't have a LegacyResourceSupport annotation!
WARNING: method getTempTablePeak of class class com.goldencode.p2j.oo.database.TempTableInfo doesn't have a LegacyResourceSupport annotation!
WARNING: method __database_TempTableInfo_constructor__ of class class com.goldencode.p2j.oo.database.TempTableInfo doesn't have a LegacyResourceSupport annotation!
WARNING: method getArchiveIndexStatistics of class class com.goldencode.p2j.oo.database.TempTableInfo doesn't have a LegacyResourceSupport annotation!
WARNING: method setArchiveIndexStatistics of class class com.goldencode.p2j.oo.database.TempTableInfo doesn't have a LegacyResourceSupport annotation!
WARNING: method getArchiveTableStatistics of class class com.goldencode.p2j.oo.database.TempTableInfo doesn't have a LegacyResourceSupport annotation!
WARNING: method setArchiveTableStatistics of class class com.goldencode.p2j.oo.database.TempTableInfo doesn't have a LegacyResourceSupport annotation!
WARNING: method getTempTableCount of class class com.goldencode.p2j.oo.database.TempTableInfo doesn't have a LegacyResourceSupport annotation!
WARNING: method getTableInfoById of class class com.goldencode.p2j.oo.database.TempTableInfo doesn't have a LegacyResourceSupport annotation!
WARNING: method getTableInfoById of class class com.goldencode.p2j.oo.database.TempTableInfo doesn't have a LegacyResourceSupport annotation!
WARNING: method getTableStatHistoryHandle of class class com.goldencode.p2j.oo.database.TempTableInfo doesn't have a LegacyResourceSupport annotation!
WARNING: method getIndexStatHistoryHandle of class class com.goldencode.p2j.oo.database.TempTableInfo doesn't have a LegacyResourceSupport annotation!
WARNING: method getTableInfoByPosition of class class com.goldencode.p2j.oo.database.TempTableInfo doesn't have a LegacyResourceSupport annotation!
WARNING: method getTableInfoByPosition of class class com.goldencode.p2j.oo.database.TempTableInfo doesn't have a LegacyResourceSupport annotation!
WARNING: method getVsthandle of class class com.goldencode.p2j.oo.database.TempTableInfo doesn't have a LegacyResourceSupport annotation!
WARNING: method getAdapter of class interface com.goldencode.p2j.oo.core.IAdaptable doesn't have a LegacyResourceSupport annotation!
WARNING: method get of class class com.goldencode.p2j.oo.reflect.Variable doesn't have a LegacyResourceSupport annotation!
WARNING: method get of class class com.goldencode.p2j.oo.reflect.Variable doesn't have a LegacyResourceSupport annotation!
WARNING: method get of class class com.goldencode.p2j.oo.reflect.Variable doesn't have a LegacyResourceSupport annotation!
WARNING: method get of class class com.goldencode.p2j.oo.reflect.Variable doesn't have a LegacyResourceSupport annotation!
WARNING: method getName of class class com.goldencode.p2j.oo.reflect.Variable doesn't have a LegacyResourceSupport annotation!
WARNING: method getDeclaringClass of class class com.goldencode.p2j.oo.reflect.Variable doesn't have a LegacyResourceSupport annotation!
WARNING: method set of class class com.goldencode.p2j.oo.reflect.Variable doesn't have a LegacyResourceSupport annotation!
WARNING: method set of class class com.goldencode.p2j.oo.reflect.Variable doesn't have a LegacyResourceSupport annotation!
WARNING: method set of class class com.goldencode.p2j.oo.reflect.Variable doesn't have a LegacyResourceSupport annotation!
WARNING: method set of class class com.goldencode.p2j.oo.reflect.Variable doesn't have a LegacyResourceSupport annotation!
WARNING: method getAccessMode of class class com.goldencode.p2j.oo.reflect.Variable doesn't have a LegacyResourceSupport annotation!
WARNING: method getIsStatic of class class com.goldencode.p2j.oo.reflect.Variable doesn't have a LegacyResourceSupport annotation!
WARNING: method getOriginatingClass of class class com.goldencode.p2j.oo.reflect.Variable doesn't have a LegacyResourceSupport annotation!
WARNING: method __reflect_Variable_constructor__ of class class com.goldencode.p2j.oo.reflect.Variable doesn't have a LegacyResourceSupport annotation!
WARNING: method getExtent of class class com.goldencode.p2j.oo.reflect.Variable doesn't have a LegacyResourceSupport annotation!
WARNING: method getDataTypeName of class class com.goldencode.p2j.oo.reflect.Variable doesn't have a LegacyResourceSupport annotation!
WARNING: method getDataType of class class com.goldencode.p2j.oo.reflect.Variable doesn't have a LegacyResourceSupport annotation!
WARNING: method remove of class class com.goldencode.p2j.oo.core.collections.MapBackedCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method contains of class class com.goldencode.p2j.oo.core.collections.MapBackedCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method containsAll of class class com.goldencode.p2j.oo.core.collections.MapBackedCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method removeAll of class class com.goldencode.p2j.oo.core.collections.MapBackedCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method retainAll of class class com.goldencode.p2j.oo.core.collections.MapBackedCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method add of class interface com.goldencode.p2j.oo.core.collections.IstringCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method remove of class interface com.goldencode.p2j.oo.core.collections.IstringCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method contains of class interface com.goldencode.p2j.oo.core.collections.IstringCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method add_1 of class interface com.goldencode.p2j.oo.core.collections.IstringCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method addArray of class interface com.goldencode.p2j.oo.core.collections.IstringCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method remove_1 of class interface com.goldencode.p2j.oo.core.collections.IstringCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method addArray_1 of class interface com.goldencode.p2j.oo.core.collections.IstringCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method contains_1 of class interface com.goldencode.p2j.oo.core.collections.IstringCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method retainAll_1 of class interface com.goldencode.p2j.oo.core.collections.IstringCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method removeAll_1 of class interface com.goldencode.p2j.oo.core.collections.IstringCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method addAll_1 of class interface com.goldencode.p2j.oo.core.collections.IstringCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method toStringArray of class interface com.goldencode.p2j.oo.core.collections.IstringCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method getValue of class interface com.goldencode.p2j.oo.core.collections.ImapEntry doesn't have a LegacyResourceSupport annotation!
WARNING: method getKey of class interface com.goldencode.p2j.oo.core.collections.ImapEntry doesn't have a LegacyResourceSupport annotation!
WARNING: method setValue of class interface com.goldencode.p2j.oo.core.collections.ImapEntry doesn't have a LegacyResourceSupport annotation!
WARNING: method getProperty of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getProperty of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getInterfaces of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getMethods of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getMethods of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getConstructors of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getConstructors of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getMethod of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getMethod of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getConstructor of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getConstructor of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getProperties of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getProperties of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method isGeneric of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method isSerializable of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method isIndexed of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getVariables of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getVariables of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getVariable of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getVariable of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method setPropertyValue of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method setPropertyValue of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method setPropertyValue of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method setPropertyValue of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getEvent of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getEvent of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getEvents of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: method getEvents of class class com.goldencode.p2j.oo.lang.LegacyClass doesn't have a LegacyResourceSupport annotation!
WARNING: class class com.goldencode.p2j.oo.web.RemoteWebRequest doesn't have a LegacyResourceSupport annotation!
WARNING: method findBufferUseObject of class class com.goldencode.p2j.oo.core.collections.AbstractTtcollection doesn't have a LegacyResourceSupport annotation!
WARNING: method getName of class class com.goldencode.p2j.oo.reflect.Parameter doesn't have a LegacyResourceSupport annotation!
WARNING: method getExtent of class class com.goldencode.p2j.oo.reflect.Parameter doesn't have a LegacyResourceSupport annotation!
WARNING: method getDataTypeName of class class com.goldencode.p2j.oo.reflect.Parameter doesn't have a LegacyResourceSupport annotation!
WARNING: method getDataType of class class com.goldencode.p2j.oo.reflect.Parameter doesn't have a LegacyResourceSupport annotation!
WARNING: method __reflect_Parameter_constructor__ of class class com.goldencode.p2j.oo.reflect.Parameter doesn't have a LegacyResourceSupport annotation!
WARNING: method getMode of class class com.goldencode.p2j.oo.reflect.Parameter doesn't have a LegacyResourceSupport annotation!
WARNING: method getPosition of class class com.goldencode.p2j.oo.reflect.Parameter doesn't have a LegacyResourceSupport annotation!
WARNING: method getParameters of class class com.goldencode.p2j.oo.reflect.Legacy4GLMethod doesn't have a LegacyResourceSupport annotation!
WARNING: method publish_httpCredentialRequest of class class com.goldencode.p2j.oo.net.http.filter.auth.AuthenticationRequestFilter doesn't have a LegacyResourceSupport annotation!
WARNING: method subscribe_httpCredentialRequest of class class com.goldencode.p2j.oo.net.http.filter.auth.AuthenticationRequestFilter doesn't have a LegacyResourceSupport annotation!
WARNING: method subscribe_httpCredentialRequest of class class com.goldencode.p2j.oo.net.http.filter.auth.AuthenticationRequestFilter doesn't have a LegacyResourceSupport annotation!
WARNING: method unsubscribe_httpCredentialRequest of class class com.goldencode.p2j.oo.net.http.filter.auth.AuthenticationRequestFilter doesn't have a LegacyResourceSupport annotation!
WARNING: method unsubscribe_httpCredentialRequest of class class com.goldencode.p2j.oo.net.http.filter.auth.AuthenticationRequestFilter doesn't have a LegacyResourceSupport annotation!
WARNING: method add of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method add of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method remove of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method remove of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method get of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method isEmpty of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method contains of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method subList of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method toArray of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method iterator of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method addAll of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method addAll of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method set of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method getSize of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method containsAll of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method removeAll of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method retainAll of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method listIterator of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method listIterator of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method clear_ of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method addArray of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method addArray of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method toTable of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method indexOf_ of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method lastIndexOf_ of class interface com.goldencode.p2j.oo.core.collections.Ilist doesn't have a LegacyResourceSupport annotation!
WARNING: method read of class class com.goldencode.p2j.oo.json.objectmodel.JsonArray doesn't have a LegacyResourceSupport annotation!
WARNING: method read of class class com.goldencode.p2j.oo.json.objectmodel.JsonArray doesn't have a LegacyResourceSupport annotation!
WARNING: method addNumber of class class com.goldencode.p2j.oo.json.objectmodel.JsonArray doesn't have a LegacyResourceSupport annotation!
WARNING: method __json_objectmodel_JsonArray_constructor__static__ of class class com.goldencode.p2j.oo.json.objectmodel.JsonArray doesn't have a LegacyResourceSupport annotation!
WARNING: method getSize of class class com.goldencode.p2j.oo.net.http.HttpHeaderCollection doesn't have a LegacyResourceSupport annotation!
WARNING: method addParameter of class class com.goldencode.p2j.oo.net.http.HttpHeaderBuilder doesn't have a LegacyResourceSupport annotation!
WARNING: method getValue_1 of class interface com.goldencode.p2j.oo.core.IobjectArrayHolder doesn't have a LegacyResourceSupport annotation!
WARNING: method resizeValue of class interface com.goldencode.p2j.oo.core.IobjectArrayHolder doesn't have a LegacyResourceSupport annotation!
WARNING: method lengthOfValue of class interface com.goldencode.p2j.oo.core.IobjectArrayHolder doesn't have a LegacyResourceSupport annotation!
WARNING: method setCharacterEncoding of class interface com.goldencode.p2j.oo.net.http.IhttpMessage doesn't have a LegacyResourceSupport annotation!
WARNING: method setContentMd5 of class interface com.goldencode.p2j.oo.net.http.IhttpMessage doesn't have a LegacyResourceSupport annotation!
WARNING: method write_1 of class class com.goldencode.p2j.oo.net.http.filter.payload.MultipartBodyWriter doesn't have a LegacyResourceSupport annotation!
WARNING: method getResponse of class class com.goldencode.p2j.oo.net.http.ResponseBuilder doesn't have a LegacyResourceSupport annotation!
WARNING: method getMessage of class interface com.goldencode.p2j.oo.net.http.IHttpMessageWriter doesn't have a LegacyResourceSupport annotation!
WARNING: method remove of class interface com.goldencode.p2j.oo.core.collections.IlistIterator doesn't have a LegacyResourceSupport annotation!
WARNING: method hasNext of class interface com.goldencode.p2j.oo.core.collections.IlistIterator doesn't have a LegacyResourceSupport annotation!
WARNING: method previousIndex of class interface com.goldencode.p2j.oo.core.collections.IlistIterator doesn't have a LegacyResourceSupport annotation!
WARNING: method hasPrevious of class interface com.goldencode.p2j.oo.core.collections.IlistIterator doesn't have a LegacyResourceSupport annotation!
WARNING: method previous of class interface com.goldencode.p2j.oo.core.collections.IlistIterator doesn't have a LegacyResourceSupport annotation!
WARNING: method nextIndex of class interface com.goldencode.p2j.oo.core.collections.IlistIterator doesn't have a LegacyResourceSupport annotation!
WARNING: method next_ of class interface com.goldencode.p2j.oo.core.collections.IlistIterator doesn't have a LegacyResourceSupport annotation!
WARNING: method __net_http_HttpMessage_destructor__ of class class com.goldencode.p2j.oo.net.http.HttpMessage doesn't have a LegacyResourceSupport annotation!
WARNING: method getParameters of class class com.goldencode.p2j.oo.reflect.LegacyConstructor doesn't have a LegacyResourceSupport annotation!
WARNING: method getDecoratedHttpResponse of class class com.goldencode.p2j.oo.net.http.HttpResponseDecorator doesn't have a LegacyResourceSupport annotation!
WARNING: method encode of class class com.goldencode.p2j.oo.net.Uri doesn't have a LegacyResourceSupport annotation!
WARNING: method parse of class class com.goldencode.p2j.oo.net.Uri doesn't have a LegacyResourceSupport annotation!
WARNING: method getSchemePartIdx of class class com.goldencode.p2j.oo.net.Uri doesn't have a LegacyResourceSupport annotation!
WARNING: method getAuthorityPartIdx of class class com.goldencode.p2j.oo.net.Uri doesn't have a LegacyResourceSupport annotation!
WARNING: method getPathPartIdx of class class com.goldencode.p2j.oo.net.Uri doesn't have a LegacyResourceSupport annotation!
WARNING: method getQueryPartIdx of class class com.goldencode.p2j.oo.net.Uri doesn't have a LegacyResourceSupport annotation!
WARNING: method getFragmentPartIdx of class class com.goldencode.p2j.oo.net.Uri doesn't have a LegacyResourceSupport annotation!
WARNING: method setUser of class class com.goldencode.p2j.oo.net.Uri doesn't have a LegacyResourceSupport annotation!
WARNING: method __net_Uri_constructor__ of class class com.goldencode.p2j.oo.net.Uri doesn't have a LegacyResourceSupport annotation!
WARNING: method setQueryMap_1 of class class com.goldencode.p2j.oo.net.Uri doesn't have a LegacyResourceSupport annotation!
WARNING: method setAuthority of class class com.goldencode.p2j.oo.net.Uri doesn't have a LegacyResourceSupport annotation!
WARNING: method __reflect_Property_constructor__ of class class com.goldencode.p2j.oo.reflect.Property doesn't have a LegacyResourceSupport annotation!

#450 Updated by Constantin Asofiei about 3 years ago

Branch 4384i was created from branch 3821c revision 12052.

Marian: please review revision 12051, it fixes some compilation issues.

#451 Updated by Constantin Asofiei about 3 years ago

Marian, you've made some changes to JsonConstruct and the read(TableParameter) method is now gone.

This code no longer compiles:

oJsonArray:read(temp-table tt1:handle).

as it converts to:
oJsonArray.ref().read(new TableParameter(tempTable(tt1)));

and there is no read(TableParameter) anywhere in JsonArray or its parents.

#452 Updated by Marian Edu about 3 years ago

Constantin Asofiei wrote:

Marian, you've made some changes to JsonConstruct and the read(TableParameter) method is now gone.

This code no longer compiles:
[...]
as it converts to:
[...]

and there is no read(TableParameter) anywhere in JsonArray or its parents.

The `read` methods are not present in JsonConstruct and there is no read method that takes a table-handle parameter either but simple handle. The conversion issue is probably because of the skeleton changes that needs to be pushed in bazaar... I've tried now to pull and pack a patch but I get this funny error...

bzr pull https://proj.goldencode.com/downloads/skeletons/repo/ -Ossl.cert_reqs=none
Not checking SSL certificate for proj.goldencode.com
https://proj.goldencode.com/downloads/skeletons/repo is permanently redirected to https://proj.goldencode.com/downloads/skeletons/repo/
Transferred: 669kB (119.4kB/s r:662kB w:7kB)
bzr: ERROR: bzrlib.errors.DivergedBranches: These branches have diverged. Use the missing command to see how.
Use the merge command to reconcile them.

#453 Updated by Constantin Asofiei about 3 years ago

Marian, please use the skeleton checkout from xfer, /opt/fwd/skeleton to create the patch. That is at revision 99.

#454 Updated by Marian Edu about 3 years ago

Constantin Asofiei wrote:

Marian, please use the skeleton checkout from xfer, /opt/fwd/skeleton to create the patch. That is at revision 99.

Attached the patch, for whatever reason it doesn't let me pull as it keeps on saying the branches have diverted and I should merge but that doesn't work either... anyway, hope this works.

#455 Updated by Constantin Asofiei about 3 years ago

bzr merge is not working. Please unbind your skeleton project, bind to the xfer project, run bzr update and after that use bzr send to create the patch.

#456 Updated by Marian Edu about 3 years ago

Constantin Asofiei wrote:

bzr merge is not working. Please unbind your skeleton project, bind to the xfer project, run bzr update and after that use bzr send to create the patch.

bind, update, unbind, commit, send... wouldn't be easier to just keep it bound and use commit? :)

#457 Updated by Constantin Asofiei about 3 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

bzr merge is not working. Please unbind your skeleton project, bind to the xfer project, run bzr update and after that use bzr send to create the patch.

bind, update, unbind, commit, send... wouldn't be easier to just keep it bound and use commit? :)

Sorry, the first version worked, I was using the wrong file...

#458 Updated by Constantin Asofiei about 3 years ago

Marian, the signature for JsonArray:read as documented at https://docs.progress.com/bundle/openedge-abl-reference-117/page/Read-method-JsonArray.html#rfi1424920923256 has a TABLE-HANDLE parameter. Are you saying that this really is a HANDLE and not a TABLE-HANDLE?

I ask this because in FWD I have an explicit rule which emits a TableParameter for a temp-table tt1:handle argument, in case of skeleton API calls. And there are other cases of TABLE-HANDLE parameter in skeleton APIs, like method public void ToTable ( output table-handle p1): in AbstractTTCollection.

#459 Updated by Constantin Asofiei about 3 years ago

I have a fix for the jsonarray:read(handle) case - the conversion rules will emit the TableParameter for builtin OO method calls only if the parameter at the method definition is a TABLE-HANDLE.

See 3821c rev 12085.

#460 Updated by Marian Edu about 3 years ago

Constantin Asofiei wrote:

Marian, the signature for JsonArray:read as documented at https://docs.progress.com/bundle/openedge-abl-reference-117/page/Read-method-JsonArray.html#rfi1424920923256 has a TABLE-HANDLE parameter. Are you saying that this really is a HANDLE and not a TABLE-HANDLE?

So does the doc for OE12.2 but reflection doesn't agree, the method parameter is simply handle and this does not compile.

DEF TEMP-TABLE tt FIELD a AS CHAR.
DEF VAR htt  AS HANDLE.
DEF VAR oarr AS PROGRESS.Json.ObjectModel.JsonArray.

htt = TEMP-TABLE tt:HANDLE.
oarr:READ(TABLE-HANDLE htt).

I ask this because in FWD I have an explicit rule which emits a TableParameter for a temp-table tt1:handle argument, in case of skeleton API calls. And there are other cases of TABLE-HANDLE parameter in skeleton APIs, like method public void ToTable ( output table-handle p1): in AbstractTTCollection.

Yes, there are methods that have a table-handle parameter and those are used when the parameter is sent as table-handle or table. However one can have methods (with same name) that takes input as handle, table-handle or dataset-handle and then depending on what the input is and the actual object structure the right method will be pick at runtime:

class Toto: 

    def temp-table tt field a as char.
    def dataset ds for tt.

    method public  void test (htt as handle):
        message 'handle' view-as alert-box.
    end.

    method public  void test (table-handle htt):
        message 'table-handle' view-as alert-box.
    end.

    method public  void test (table for tt):
        message 'table' view-as alert-box.
    end.

    method public  void test (dataset for ds):
        message 'dataset' view-as alert-box.
    end.

    method public  void test (dataset-handle htt):
        message 'dataset-handle' view-as alert-box.
    end. 
end class.
def temp-table tt field a as char.
def dataset ds for tt.

def temp-table tt1 field a as int.
def dataset ds1 for tt1.

def var hdl as handle no-undo.
def var obj as Toto.

obj = new Toto().
hdl = temp-table tt:handle.

obj:test(hdl).
obj:test(table-handle hdl).
obj:test(table tt).

hdl = temp-table tt1:handle.
obj:test(table-handle hdl).
obj:test(table tt1).

hdl = dataset ds:handle.

obj:test(hdl).
obj:test(dataset-handle hdl).
obj:test(dataset ds).

hdl = dataset ds1:handle.

obj:test(dataset-handle hdl).
obj:test(dataset ds1).

If temp-table/dataset structure match then the table/dataset methods are used otherwise it pick the table-handle/dataset-handle.

#461 Updated by Greg Shah about 3 years ago

  • Related to deleted (Bug #5010: OO Quirk - Core.Collections.EntrySet)

#462 Updated by Greg Shah about 3 years ago

Marian: I've updated this table (last changes were from #4384-413), but the only change seems to be related to openedge.web.webresponse. Are there any others we can close off?

Category Conversion Runtime Notes
openedge.core.bytebucket Full Full Hold - codepage conversions
openedge.core.memptr Full Full Hold - codepage conversions
openedge.core.string Full Full Hold - codepage conversions
openedge.net.http.clientbuilder Full Full Closed
openedge.net.http.credentials Full Full Closed
openedge.net.http.filter.payload.binaryentitywriter Full Full Closed
openedge.net.http.filter.payload.messagewriter Full Full Closed
openedge.net.http.ihttpclientlibrary Full Full Closed
openedge.net.http.lib.clientlibrarybuilder Full Full Closed
openedge.net.http.requestbuilder Full Full Closed
openedge.net.messagepart Full Full Closed
openedge.net.mimetypehelper Full Full Closed
openedge.net.multipartentity Full Full Closed
openedge.net.uri Full Full Closed
openedge.net.uriencodingtypeenum Full Full Closed
openedge.web.webhandler Full Partial ?
openedge.web.webresponse Full Full Closed
openedge.web.webresponsewriter Full Partial ?
progress.json.objectmodel.objectmodelparser Full Partial In progress
progress.lang.apperror Full Full Closed
progress.lang.class Full Partial In progress
progress.lang.parameterlist Full Basic In progress

#463 Updated by Greg Shah about 3 years ago

Is 4384i in a good state for the changes to be merged back into 3821c? I know we have fixes in 3821c that you may want to pick up, or have you already applied them as patches?

#464 Updated by Marian Edu about 3 years ago

Greg Shah wrote:

Is 4384i in a good state for the changes to be merged back into 3821c? I know we have fixes in 3821c that you may want to pick up, or have you already applied them as patches?

Everything is committed in 4384i so we can merge those if needed, the patches were applied partially as Eclipse didn't managed to find the patch segment for one file and for others there were conflicts with our local changes so those will have to be resolved during merge.

#465 Updated by Greg Shah about 3 years ago

I've just pushed 3821c revision 12170 to xfer.

Please pull it down and rebase 4384i from that revision. Then post the bzr send patch here. Constantin will merge it into 3821c and then create a 4384j from that revision.

#466 Updated by Marian Edu about 3 years ago

Greg Shah wrote:

I've just pushed 3821c revision 12170 to xfer.

Please pull it down and rebase 4384i from that revision. Then post the bzr send patch here. Constantin will merge it into 3821c and then create a 4384j from that revision.

Attached the patch after merge.

#467 Updated by Constantin Asofiei about 3 years ago

merged 4384i patch to 3821c rev 12172.

Created branch 4384j from 3821c rev 12172.

#468 Updated by Marian Edu about 3 years ago

Constantin Asofiei wrote:

merged 4384i patch to 3821c rev 12172.

Created branch 4384j from 3821c rev 12172.

Constantin, looks like when merging ErrorManager I've somehow managed to add the duplicate method getInvalidParameterError :(

#469 Updated by Constantin Asofiei about 3 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

merged 4384i patch to 3821c rev 12172.

Created branch 4384j from 3821c rev 12172.

Constantin, looks like when merging ErrorManager I've somehow managed to add the duplicate method getInvalidParameterError :(

Yes, I've removed the one from 3554 in 3821c 12173. Remove it too from your version.

#470 Updated by Greg Shah almost 3 years ago

There are a few things left on hold in .net package - mostly related to 'WEB-CONTEXT' system handle that is used for Webspeed environment together with 'WEB' system stream that can also be used to write out any output back into a web request. As it was implemented now in FWD the WebRequest is not compatible with the 4GL one, Constantin is simply injecting the http response stream and request data into it using the ctor while in 4GL there is a default ctor and data is taken from those system handle/web stream. It might work as-is for some cases, at least partial, without having those objects implemented we can't really go any further and make it more compatible with the 4GL one.

Do these items affect these:

  • openedge.web.webhandler
  • openedge.web.webresponsewriter
  • progress.json.objectmodel.objectmodelparser

Our top priority is finishing the runtime support for these 3 classes.

The dynamic method invoke and reflection is the last item open, for invoke some work was done but there are so many cases there so that's not complete as for reflection that is mostly at STUB level.

Is this the work that is pending for:

  • progress.lang.class
  • progress.lang.parameterlist

We do indeed need to complete these as well.

#471 Updated by Marian Edu almost 3 years ago

Greg Shah wrote:

There are a few things left on hold in .net package - mostly related to 'WEB-CONTEXT' system handle that is used for Webspeed environment together with 'WEB' system stream that can also be used to write out any output back into a web request. As it was implemented now in FWD the WebRequest is not compatible with the 4GL one, Constantin is simply injecting the http response stream and request data into it using the ctor while in 4GL there is a default ctor and data is taken from those system handle/web stream. It might work as-is for some cases, at least partial, without having those objects implemented we can't really go any further and make it more compatible with the 4GL one.

Do these items affect these:

  • openedge.web.webhandler
  • openedge.web.webresponsewriter
  • progress.json.objectmodel.objectmodelparser

The ObjectModelParser as well as other JSON related classes should be completed - well, need to add the serialize-name and the buffer validation but that is corner case, most of the time there is no active transaction/current record not saved when data is serialised.

Our top priority is finishing the runtime support for these 3 classes.

The dynamic method invoke and reflection is the last item open, for invoke some work was done but there are so many cases there so that's not complete as for reflection that is mostly at STUB level.

Is this the work that is pending for:

  • progress.lang.class
  • progress.lang.parameterlist

We do indeed need to complete these as well.

Including reflection, or just the dynamic invoke?

#472 Updated by Greg Shah almost 3 years ago

openedge.web.webhandler
openedge.web.webresponsewriter

What is needed to finish these? These have highest priority.

It is still not clear to me if the WEB-CONTEXT implementation is needed for these.

Including reflection, or just the dynamic invoke?

Yes, but dynamic invoke should be done first.

#473 Updated by Marian Edu almost 3 years ago

Greg Shah wrote:

openedge.web.webhandler
openedge.web.webresponsewriter

What is needed to finish these? These have highest priority.

It is still not clear to me if the WEB-CONTEXT implementation is needed for these.

For those normally the 'web stream' is needed, problem is with WebResponseWriter that has a public stream handle property that one can use to write directly into although it is recommended to use the various `write` methods available. Maybe we can create a stream handle over the HttpServletResponse's OutputStream?

#474 Updated by Constantin Asofiei almost 3 years ago

Marian, I think the 'web stream' has the entire message which would be sent over the socket to the HTTP response (including status, headers, cookies, body, etc).

Look at this simple test:

DEFINE VARIABLE oResponse AS OpenEdge.Net.HTTP.IHttpResponse NO-UNDO.
DEFINE VARIABLE oWriter   AS OpenEdge.Web.WebResponseWriter  NO-UNDO.

oResponse  = NEW OpenEdge.Web.WebResponse().
oWriter = NEW OpenEdge.Web.WebResponseWriter(oResponse).

output stream-handle owriter:webstream to b.txt.
owriter:write("abcdef").
output stream-handle owriter:webstream close.

which will emit this to b.txt:
HTTP/1.1 200 OK

abcdef

The HttpServletResponse.getOutputStream will be only for the body, not the entire response message.

Am I misunderstanding something how the webstream should behave?

#475 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

Marian, I think the 'web stream' has the entire message which would be sent over the socket to the HTTP response (including status, headers, cookies, body, etc).

Correct.

The HttpServletResponse.getOutputStream will be only for the body, not the entire response message.

Am I misunderstanding something how the webstream should behave?

Not really, but as said because the darn stream is a public property one can append anything to it directly instead of using the public write methods :(

But then one can always open another stream to "WEB" to achieve the same result, I'm thinking more of the webspeed compatibility web handler. Anyway, in FWD we might as well drop that public property as it will never be valid unless we do a wrapper on top of the servlet output stream (be it only for the body).

#476 Updated by Greg Shah almost 3 years ago

What do we need to do to properly implement a compatible WEB-STREAM stream-handle? Unless absolutely needed, I don't want to do something that is just a partial/incompatible version which we then need to replace later.

#477 Updated by Marian Edu almost 3 years ago

Greg Shah wrote:

What do we need to do to properly implement a compatible WEB-STREAM stream-handle? Unless absolutely needed, I don't want to do something that is just a partial/incompatible version which we then need to replace later.

It's probably something similar to what exist for output to 'terminal', when one open output to 'WEB' it means the web-stream. This normally only works in webspeed/pasoe agent environment but as Constantin showed the stream can just be redirected to a file and this is what we doo for testing as well. Point is, it's just like another stream so one can use export/put with it.

#478 Updated by Constantin Asofiei almost 3 years ago

Adding a setHeader after the write call is a no-op - the header is discarded.

owriter:write("abcdef").
oresponse:setheader(new OpenEdge.Net.HTTP.HttpHeader("xxx", "yyy")).

If you move it before the write, the header is there:

HTTP/1.1 200 OK

xxx: yyy

abcdef

More, if you call owriter:open(), then output stream-handle owriter:webstream to b.txt. will not redirect the stream - as it's already open. It may be kept only in some internal storage.

Marian, I think to find out how this web stream works, we need tests which use headers, cookies, status line, write, etc combinations, to see how it affects the web-stream. My assumption is that once a write is done, the status line/headers sections are flushed to the stream, and any other usage is just stored in the internal collections (but can they be accessed? what if the headers are removed? status line changed?).

#479 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

Marian, I think to find out how this web stream works, we need tests which use headers, cookies, status line, write, etc combinations, to see how it affects the web-stream. My assumption is that once a write is done, the status line/headers sections are flushed to the stream, and any other usage is just stored in the internal collections (but can they be accessed? what if the headers are removed? status line changed?).

You are right but that is for the WebResponseWriter not the web-stream, the web-stream is just a stream that as long as it was open you can dump data into it. The WebResponseWriter it does write the 'preamble' (there is also a protected method with that name) before any write and that output the status line then all the response headers (and cookies) if any, so altering the response (status code, headers, cookies) afterwards it does not affect the data already streamed and data can only be appended to the 'body'. So it's not as it was implemented with internal collections and only output data on flush, once one try to write some data that is going to be in the body so the preamble is written at that point.

#480 Updated by Marian Edu almost 3 years ago

Since for our tests we're using a custom WebResponseWriter that redirects the web-stream to a file in open we can't really use those tests in FWD - the WebHandler.getHttpResponse is returning null for non 'web requests'. Wonder how we could test the implementation in this case?

#481 Updated by Marian Edu almost 3 years ago

Marian Edu wrote:

Since for our tests we're using a custom WebResponseWriter that redirects the web-stream to a file in open we can't really use those tests in FWD - the WebHandler.getHttpResponse is returning null for non 'web requests'. Wonder how we could test the implementation in this case?

I guess we need to somehow setup the 'appsrv' environment in FWD and only rely on SoapUI tests for WebHandler and indirectly other classes in Web package like WebResponseWriter. Any advice on how we can get that setup?

#482 Updated by Marian Edu almost 3 years ago

Constantin, since the WebHandler is the one that you initialize and already expose the "response" from there for the WebResponseWriter then why not doing the same for the "request" and then annotate the WebRequest normally so we can go the 4GL way instead of an "internal" only RemoteWebRequest as-is now?

#483 Updated by Constantin Asofiei almost 3 years ago

Marian Edu wrote:

Marian Edu wrote:

Since for our tests we're using a custom WebResponseWriter that redirects the web-stream to a file in open we can't really use those tests in FWD - the WebHandler.getHttpResponse is returning null for non 'web requests'. Wonder how we could test the implementation in this case?

I guess we need to somehow setup the 'appsrv' environment in FWD and only rely on SoapUI tests for WebHandler and indirectly other classes in Web package like WebResponseWriter. Any advice on how we can get that setup?

In revision 1042 of the testcases project, I've made some changes:
  • re-generated the certificates (I was missing appserver_agent and some others). I've made some changes to install_spawner.cmd, too.
  • enabled SOAP and made some other changes for conversion and runtime
  • I've added to file-cvt-list.txt.soap.rest.webhandler all the files I use to test from SoapUI

If you can access the Web client from Windows (a.k.a. you can run install_spawner.cmd) and if you configure the directory.xml with the proper values, then you should be able to run the SoapUI tests. Just set the service endpoint to i.e. https://localhost:7443/web for WebHandler, https://localhost:7443/rest/goldencodeService for REST, https://localhost:7443/ws for SOAP.

If you have problems, please let me know.

#484 Updated by Constantin Asofiei almost 3 years ago

Marian Edu wrote:

Constantin, since the WebHandler is the one that you initialize and already expose the "response" from there for the WebResponseWriter then why not doing the same for the "request" and then annotate the WebRequest normally so we can go the 4GL way instead of an "internal" only RemoteWebRequest as-is now?

My problem with this idea is method definitions like this in WebHandler: HandleGet( input poRequest as OpenEdge.Web.IWebRequest ).

What is the concrete/runtime type for the poRequest variable? Is it some internal type from OpenEdge framework? That's why I was reluctant in annotating the RemoteWebRequest, because I don't know to what (if any) it would map in the legacy OpenEdge framework. If you need to annotate its methods, I think is safe; but RemoteWebRequest is still 'for internal purposes only' for now.

About the WebStream - in 4GL, if you can deploy the FwdHandler to OpenEdge/etc, and call it via SoapUI/web browser/etc:
  • what is the WebStream:TYPE attribute?
  • what other attributes/methods are allowed for the WebStream handle?
  • you mention the WriteHttpPreamble method - my assumption is that this is called when the WebStream is opened (via WebResponseWriter.open() or OUTPUT statement), and it 'flushes' all the headers/etc (the http preamble) to the stream. I have no idea how OUTPUT statement knows to call the WriteHttpPreamble method, in 4GL.
  • from the looks of it, WebStream writes directly to the socket (when deployed/and called from the web), and that's why its stream can be redirected to a file. In FWD, we don't have access to the socket for the HTTP response, so we can't easily 'flush to the socket' the http preamble.
  • to make something generic, and allow the WebStream to act as a generic stream (which can be used by OUTPUT statement), we would need to decouple the HttpServletResponse instance from the WebResponseWriter and move it to the WebStream. But - we need to determine exactly what and when is written to this stream. Because we would need two versions:
    • if the WebHandler is called from the real web (and WebStream has a HttpServletResponse instance), then WebStream needs to use that to write the stuff (and correctly write to the HttpServletResponse associated instance)
    • if the WebStream is redirected to a file, then everything needs to be 'written by hand', and here I mean the entire http preamble, headers, cookies, the body, etc - in other words, the http response message will need to be formatted according to specs and flushed to this file.

#485 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

Marian Edu wrote:

Constantin, since the WebHandler is the one that you initialize and already expose the "response" from there for the WebResponseWriter then why not doing the same for the "request" and then annotate the WebRequest normally so we can go the 4GL way instead of an "internal" only RemoteWebRequest as-is now?

My problem with this idea is method definitions like this in WebHandler: HandleGet( input poRequest as OpenEdge.Web.IWebRequest ).

Those are all protected methods that normally are being called from HandleRequest, and is there that the webRequest instance get's instantiated - yeah, agreed is not the best design and those should be somehow injected by the 'appsrv agent' but they just took the easy path and reuse the WEB-CONTEXT and WEB-STREAM handles they already had since Webspeed time.

What is the concrete/runtime type for the poRequest variable? Is it some internal type from OpenEdge framework?

Normally it's the default WebRequest but one can override HandleRequest of the handler and come up with its own implementation - either extend the 'internal' one or simply implement the whole contract. In practice no one really does that since there is no other/better way to get the 'web request' information, one can extend that for authentication/audit/logging or mock-up web requests for unit testing (this what we're doing as well).

That's why I was reluctant in annotating the RemoteWebRequest, because I don't know to what (if any) it would map in the legacy OpenEdge framework. If you need to annotate its methods, I think is safe; but RemoteWebRequest is still 'for internal purposes only' for now.

I'm not keen in annotating anything, just this will clearly not be compatible with the 4GL implementation but it's definitively your call.

About the WebStream - in 4GL, if you can deploy the FwdHandler to OpenEdge/etc, and call it via SoapUI/web browser/etc:

No need to call it through the appsrv in 4GL, simply extending the WebRequest we can ran unit tests on it.

  • what is the WebStream:TYPE attribute?

STREAM

  • what other attributes/methods are allowed for the WebStream handle?

Its just a STREAM, there aren't many attributes and no methods there... it can simply be used in OUTPUT/INPUT/EXPORT/PUT statements just like any other stream.

  • you mention the WriteHttpPreamble method - my assumption is that this is called when the WebStream is opened (via WebResponseWriter.open() or OUTPUT statement), and it 'flushes' all the headers/etc (the http preamble) to the stream. I have no idea how OUTPUT statement knows to call the WriteHttpPreamble method, in 4GL.

Don't confuse the method in WebResponseWriter with the mere STREAM implementation, the later is just a simple STREAM and has no knowledge of preamble/headers/cookies. It's developer's responsibility to serialize data into it in a way it make sense - aka, if you simply put/export 'hello world' into it the stream will not automatically 'flush' the HTTP header or anything. Problem is no one ever does this as it won't get a valid HTTP response a web browser can digest, even in Webspeed one must call output-headers before sending any body data into the stream.

  • from the looks of it, WebStream writes directly to the socket (when deployed/and called from the web), and that's why its stream can be redirected to a file. In FWD, we don't have access to the socket for the HTTP response, so we can't easily 'flush to the socket' the http preamble.

I don't think you need that, just a little bit smarter output stream is needed to handle the header lines and then stream the body directly into the response output stream.

  • to make something generic, and allow the WebStream to act as a generic stream (which can be used by OUTPUT statement), we would need to decouple the HttpServletResponse instance from the WebResponseWriter and move it to the WebStream. But - we need to determine exactly what and when is written to this stream. Because we would need two versions:
    • if the WebHandler is called from the real web (and WebStream has a HttpServletResponse instance), then WebStream needs to use that to write the stuff (and correctly write to the HttpServletResponse associated instance)
    • if the WebStream is redirected to a file, then everything needs to be 'written by hand', and here I mean the entire http preamble, headers, cookies, the body, etc - in other words, the http response message will need to be formatted according to specs and flushed to this file.

Yeah but this is what you already do in OUTPUT TO statement for TERMINAL for instance, it's yet another special case that need to be handled.

OUTPUT TO 'WEB'.
PUT 'Hello'.

Will not create a 'WEB' file to output data into as normally but will redirect the output the the 'web stream'. The way it works in 4GL if you're not in a web environment when doing that the output just goes to /dev/null or something - no error is being raised unlike when accessing the WEB-CONTEXT system handle which do raise error when done outside of web environment.

#486 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

If you can access the Web client from Windows (a.k.a. you can run install_spawner.cmd) and if you configure the directory.xml with the proper values, then you should be able to run the SoapUI tests. Just set the service endpoint to i.e. https://localhost:7443/web for WebHandler, https://localhost:7443/rest/goldencodeService for REST, https://localhost:7443/ws for SOAP.

If you have problems, please let me know.

Constantin, no luck with that install_spawner.cmd script... it still do not complete without errors. What I did was to install `make` (GNU), `gcc` (MinGW) and `ant` binary to be able to run this from outside of Eclipse environment but still something is missing. When trying to execute `ant-native` target on FWD project from Eclipse it gives me this:

ant-native:
     [exec] gcc -c C:\Projects\goldencode\workspace-fwd\goldencode-fwd/src/native/library.c -o library.o -DWIN_TARGET -DWORD_SIZE_32 -IC:\Programs\OpenEdge\11.7.4\DLC\jdk\jre/../include -IC:\Programs\OpenEdge\11.7.4\DLC\jdk\jre/../include/win32 -IC:\Projects\goldencode\workspace-fwd\goldencode-fwd/src/native -Wall
     [exec] C:\Projects\goldencode\workspace-fwd\goldencode-fwd/src/native/library.c:66:17: fatal error: ffi.h: No such file or directory
     [exec]  #include <ffi.h>
     [exec]                  ^
     [exec] compilation terminated.
     [exec] make: *** [library.o] Error 1

Executing the script gives me two somehow contradictory messages - first failed then successful but still no spawner.exe created in deploy/spawner:

C:\Projects\goldencode\workspace-fwd\testcases>install_spawner.cmd
C:\Projects\goldencode\workspace-fwd\testcases>set fspawn=C:\Projects\goldencode\workspace-fwd\testcases\deploy\spawner
C:\Projects\goldencode\workspace-fwd\testcases>rd /s /q C:\Projects\goldencode\workspace-fwd\testcases\deploy\spawner
C:\Projects\goldencode\workspace-fwd\testcases>mkdir C:\Projects\goldencode\workspace-fwd\testcases\deploy\spawner
C:\Projects\goldencode\workspace-fwd\testcases>set pwd=C:\Projects\goldencode\workspace-fwd\testcases
C:\Projects\goldencode\workspace-fwd\testcases>cd p2j
C:\Projects\goldencode\workspace-fwd\testcases\p2j>set ANT_OPTS="-Xmx4g" 
C:\Projects\goldencode\workspace-fwd\testcases\p2j>call gradlew.bat jar native

> Task :buildVersion
Fetching repository name and branch from bzr info...
org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'bzr''
WARN: Unable to resolve repository name. Make sure you build from a supported bzr repository location or the property repo is defined in version.properties.
WARN: Unable to resolve branch name. Make sure you build from a supported bzr repository location or the property branch is defined in version.properties.
Fetching revision number from bzr revno...
org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'bzr''
WARN: Unable to resolve revision number. Make sure you build from a supported bzr repository location or the property rev is defined in version.properties.
Product version: 4.0.0_undefined_undefined_undefined

> Task :ant-aspectj
[ant:iajc] warning at C:\Projects\goldencode\workspace-fwd\testcases\p2j\build\classes!com\goldencode\util\LoggingAspect.class::0 advice defined in com.goldencode.util.LoggingAsp
[ant:iajc] warning at C:\Projects\goldencode\workspace-fwd\testcases\p2j\build\classes!com\goldencode\p2j\aspects\LoadLegacyClassAspect.class::0 advice defined in com.goldencode.
otMatch]

> Task :ant-native FAILED
[ant:echo]

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ant-native'.
> exec returned: 2

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.6.4/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 52s
33 actionable tasks: 31 executed, 2 up-to-date
Buildfile: C:\Projects\goldencode\workspace-fwd\testcases\build.xml

deploy.prepare:
     [copy] Copying 19 files to C:\Projects\goldencode\workspace-fwd\testcases\deploy\lib

BUILD SUCCESSFUL
Total time: 0 seconds
The system cannot find the file specified.
        1 file(s) copied.
        1 file(s) copied.
        1 file(s) copied.

#487 Updated by Constantin Asofiei almost 3 years ago

Marian, see Client_Installation_Windows for what is required to build the native part.

I think only libffi is required for a client install, not build - see Install_libffi_for_FWD_Client_Execution and Building_FWD_From_Source.

I've also attached the 64bit p2j.dll and spawn.exe which is compatible with your branch. If you use this approach, copy libffi to c:\windows\system32 and change the call gradlew.bat jar native to call gradlew.bat jar.

Also, go through Spawner_Setup_and_Configuration to see how to setup spawn.ini.

#488 Updated by Constantin Asofiei almost 3 years ago

Marian Edu wrote:

My problem with this idea is method definitions like this in WebHandler: HandleGet( input poRequest as OpenEdge.Web.IWebRequest ).

Those are all protected methods that normally are being called from HandleRequest, and is there that the webRequest instance get's instantiated - yeah, agreed is not the best design and those should be somehow injected by the 'appsrv agent' but they just took the easy path and reuse the WEB-CONTEXT and WEB-STREAM handles they already had since Webspeed time.

OK, so now it makes sense, RemoteWebRequest really is the equivalent for the WebRequest OE class. So now I can finally agree and RemoteWebRequest should be annotated to match OpenEdge.Web.WebRequest.

What is the concrete/runtime type for the poRequest variable? Is it some internal type from OpenEdge framework?

Normally it's the default WebRequest but one can override HandleRequest of the handler and come up with its own implementation - either extend the 'internal' one or simply implement the whole contract. In practice no one really does that since there is no other/better way to get the 'web request' information, one can extend that for authentication/audit/logging or mock-up web requests for unit testing (this what we're doing as well).

Thanks. At this time, I don't see how to match easily the WEB-STREAM and WEB-CONTEXT streams in FWD. So for now, I think we need to work around them.

  • you mention the WriteHttpPreamble method - my assumption is that this is called when the WebStream is opened (via WebResponseWriter.open() or OUTPUT statement), and it 'flushes' all the headers/etc (the http preamble) to the stream. I have no idea how OUTPUT statement knows to call the WriteHttpPreamble method, in 4GL.

Don't confuse the method in WebResponseWriter with the mere STREAM implementation, the later is just a simple STREAM and has no knowledge of preamble/headers/cookies. It's developer's responsibility to serialize data into it in...

My problem is that in the test I posted at #4374-474, the 4GL developer does nothing 'special' to write the preamble - but I think OE does it automatically when the first write method is called (as without a write, the preamble is not flushed). So at least that's good some good news - HttpServletResponse will not allow to add headers/etc after the body starts to be written. But we need to test what happens if a header is set after the body starts to be written.

Will not create a 'WEB' file to output data into as normally but will redirect the output the the 'web stream'. The way it works in 4GL if you're not in a web environment when doing that the output just goes to /dev/null or something - no error is being raised unlike when accessing the WEB-CONTEXT system handle which do raise error when done outside of web environment.

Thanks, this is good to now. I'll continue thinking how to map the web-stream in FWD...

#489 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

Marian, see Client_Installation_Windows for what is required to build the native part.

I think only libffi is required for a client install, not build - see Install_libffi_for_FWD_Client_Execution and Building_FWD_From_Source.

I've already had libffi DLL in System32, however the header file is not something that I have at hand hence the build of native 'spawner' fails.

I've also attached the 64bit p2j.dll and spawn.exe which is compatible with your branch. If you use this approach, copy libffi to c:\windows\system32 and change the call gradlew.bat jar native to call gradlew.bat jar.

OK, p2j.ddl we already had and looks like the spawn.exe had to be 'deployed' to P2J/build/native folder and it will be moved by the installed in testcases/deploy/spawner folder.

Also, go through Spawner_Setup_and_Configuration to see how to setup spawn.ini.

Easiest is to simply use the unencrypted passwd as I'm the only one using the computer anyway so just left the spawn.ini alone for now and added the password in clear text.

What I did:
- update the spawner node in clientConfig to = ../spawner/spawn.exe (it was looking for it on deploy/server)
- set the systemUser to a newly created user id in appserver_process/clientConfig
- added the systemPassword (clear text) in appserver_process/clientConfig
- reenable encryption when starting the server (else it was throwing an error when trying to load a trust certificate somewhere in 'get spawner')

All those lead me one step further, at times, but still I'm not able to start the server with the appsrv enabled. It now gives an 'address already in use' on socket bind for that appsrv port (7443) but there is no other process listening on that port number. Tried to change the number, even restart the computer just to make sure nothing was left lingering to no avail.

Feels like compiling linux drivers back the old days when compiling the kernel was often a prerequisite :(

Apr 16, 2021 2:03:08 PM com.goldencode.p2j.main.StandardServer bootstrap
INFO: FWD version undefined Server starting initialization.
[04/16/2021 14:03:09 EEST] (SecurityManager:INFO) {main} Loaded 1 CA   certificates, 0 objects ignored
[04/16/2021 14:03:09 EEST] (SecurityManager:INFO) {main} Loaded 4 peer certificates, 0 objects ignored
[04/16/2021 14:03:09 EEST] (SecurityManager:INFO) {main} Loaded auth-mode object
[04/16/2021 14:03:09 EEST] (SecurityManager:INFO) {main} Loaded 5 groups, 0 objects ignored
[04/16/2021 14:03:09 EEST] (SecurityManager:INFO) {main} Loaded 3 processes, 0 objects ignored
[04/16/2021 14:03:09 EEST] (SecurityManager:INFO) {main} Loaded 10 users, 0 objects ignored
[04/16/2021 14:03:09 EEST] (SecurityManager:INFO) {main} Loaded 8 resource plugins, 0 failed
[04/16/2021 14:03:09 EEST] (SecurityManager:WARNING) {main} No custom server extension defined in P2J directory
[04/16/2021 14:03:09 EEST] (SecurityManager:WARNING) {main} No custom client extension defined in P2J directory
[04/16/2021 14:03:09 EEST] (SecurityManager:INFO) {main} Loaded 1 ACLs for resource type <remoteentrypoint>
[04/16/2021 14:03:09 EEST] (SecurityManager:INFO) {main} Loaded 6 ACLs for resource type <system>
[04/16/2021 14:03:09 EEST] (SecurityManager:INFO) {main} Loaded 1 ACLs for resource type <entrypoint>
[04/16/2021 14:03:09 EEST] (SecurityManager:INFO) {main} Loaded 14 ACLs for resource type <admin>
[04/16/2021 14:03:09 EEST] (SecurityManager:INFO) {main} Loaded 1 ACLs for resource type <trustedspawner>
[04/16/2021 14:03:09 EEST] (SecurityManager:INFO) {main} Loaded 27 ACLs for resource type <net>
[04/16/2021 14:03:09 EEST] (SecurityManager:INFO) {main} Loaded 6 ACLs for resource type <directory>
[04/16/2021 14:03:09 EEST] (SecurityManager:INFO) {main} Loaded 3 ACLs for resource type <remotelaunchoption>
[04/16/2021 14:03:09 EEST] (SecurityManager:WARNING) {main} Security audit log is disabled
Could not instrument class com/goldencode/p2j/net/DispatcherMethodAccess: null.
Could not instrument class com/goldencode/p2j/net/SessionManagerMethodAccess: null.
Could not instrument class com/goldencode/p2j/net/RouterSessionManagerMethodAccess: null.
[04/16/2021 14:03:09 EEST] (SecurityManager:INFO) {00000000:00000001:standard} No exported entry points defined in the P2J directory
Could not instrument class com/goldencode/p2j/ui/LogicalTerminalMethodAccess: null.
Could not instrument class com/goldencode/p2j/util/ErrorManagerMethodAccess: null.
Could not instrument class com/goldencode/p2j/main/StandardServerMethodAccess: null.
Could not instrument class com/goldencode/p2j/util/AppServerManagerMethodAccess: null.
Could not instrument class com/goldencode/p2j/util/AppServerLauncherMethodAccess: null.
Could not instrument class com/goldencode/p2j/main/ProcessClientSpawnerMethodAccess: null.
Could not instrument class com/goldencode/p2j/main/ClientBuilderMethodAccess: null.
Could not instrument class com/goldencode/p2j/main/BrokerManagerMethodAccess: null.
Could not instrument class com/goldencode/p2j/util/ServerPropertiesDaemonMethodAccess: null.
Could not instrument class com/goldencode/p2j/directory/DirectoryMethodAccess: null.
[04/16/2021 14:03:11 EEST] (com.goldencode.p2j.persist.ConversionPool:INFO) Runtime conversion pool initialized in 1682 ms.
[04/16/2021 14:03:11 EEST] (com.goldencode.p2j.persist.TemporaryDatabaseManager:INFO) Using public (shared) temporary database.
[04/16/2021 14:03:11 EEST] (com.goldencode.p2j.persist.DatabaseManager:INFO) Using H2 database version 1.4.200 (2019-10-14)
[04/16/2021 14:03:11 EEST] (com.goldencode.p2j.persist.meta.MetadataManager:INFO) Metadata server modules: [Myconnection, Connect, Index, DatabaseFeature, Sequence, FieldTrig, Lock, Field, Area, Usertablestat, Tenant, Filelist, FileTrig, File, IndexField, Startup, Db]
[04/16/2021 14:03:11 EEST] (com.goldencode.p2j.persist.DatabaseManager:INFO) Database local/_temp/primary initialized in 2 ms.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Projects/goldencode/workspace-fwd/goldencode-fwd/build/lib/slf4j-simple-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Projects/goldencode/workspace-fwd/goldencode-fwd/build/lib/slf4j-jdk14-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
3 [MLog-Init-Reporter] INFO com.mchange.v2.log.MLog - MLog clients using slf4j logging.
37 [main] INFO com.mchange.v2.c3p0.C3P0Registry - Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? true; trace: 10]
111 [main] INFO com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1hge2ybag1ol0zqf1pfnje6|40239b34, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> org.h2.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1hge2ybag1ol0zqf1pfnje6|40239b34, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:h2:mem:_meta_fwd;db_close_delay=-1;mv_store=false;query_cache_size=1024;, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
[04/16/2021 14:03:12 EEST] (com.goldencode.p2j.persist.DatabaseManager:INFO) Database local/fwd/primary initialized in 0 ms.
[04/16/2021 14:03:12 EEST] (com.goldencode.p2j.util.TransactionManager:WARNING) Multiple registration of 'fwd' database.
[04/16/2021 14:03:12 EEST] (com.goldencode.p2j.persist.orm.PooledDataSourceProvider:WARNING) Can't find a setter for the specified c3p0 parameter c3p0.validate
303 [main] INFO com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 2, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1hge2ybag1ol0zqf1pfnje6|620f7a39, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> org.h2.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1hge2ybag1ol0zqf1pfnje6|620f7a39, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:h2:../db/fwd;DB_CLOSE_DELAY=-1;MV_STORE=FALSE, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 900, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 20, maxStatements -> 0, maxStatementsPerConnection -> 100, minPoolSize -> 4, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
305 [main] WARN com.mchange.v2.resourcepool.BasicResourcePool - Bad pool size config, start 3 < min 4. Using 4 as start.
[04/16/2021 14:03:12 EEST] (com.goldencode.p2j.persist.Persistence:INFO) UDF version for db local/fwd/primary is FWD version undefined
Duplicate database Settings for local/fwd/dirty
466 [main] INFO com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1hge2ybag1ol0zqf1pfnje6|69c6e5, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> org.h2.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1hge2ybag1ol0zqf1pfnje6|69c6e5, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:h2:mem:fwd;db_close_delay=-1;mv_store=false;query_cache_size=1024;, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
Could not instrument class com/goldencode/testcases/dmo/_meta/MetaConnect__Impl__MethodAccess: null.
Could not instrument class com/goldencode/testcases/dmo/_meta/MetaMyconnection__Impl__MethodAccess: null.
Could not instrument class com/goldencode/testcases/dmo/_meta/MetaDbMethodAccess: null.
[04/16/2021 14:03:12 EEST] (com.goldencode.p2j.persist.meta.MetadataManager:INFO) Persisting record for the metatable MetaDb__Impl__
Could not instrument class com/goldencode/testcases/dmo/_meta/MetaFileMethodAccess: null.
Could not instrument class com/goldencode/testcases/dmo/_meta/MetaFieldMethodAccess: null.
Could not instrument class com/goldencode/testcases/dmo/_meta/MetaIndexMethodAccess: null.
Could not instrument class com/goldencode/testcases/dmo/_meta/MetaIndexFieldMethodAccess: null.
[04/16/2021 14:03:12 EEST] (com.goldencode.p2j.persist.meta.MetadataManager:INFO) Persisting record for the metatable MetaFilelist__Impl__
Could not instrument class com/goldencode/testcases/dmo/_meta/MetaFileTrigMethodAccess: null.
Could not instrument class com/goldencode/testcases/dmo/_meta/MetaStartupMethodAccess: null.
[04/16/2021 14:03:12 EEST] (com.goldencode.p2j.persist.meta.MetadataManager:INFO) Persisting record for the metatable MetaStartup__Impl__
[04/16/2021 14:03:12 EEST] (com.goldencode.p2j.persist.meta.MetadataManager$SystemTable:INFO) Populating [_Database-Feature]
Could not instrument class com/goldencode/p2j/persist/orm/BaseRecordMethodAccess: null.
Could not instrument class com/goldencode/testcases/dmo/_meta/MetaDatabaseFeatureMethodAccess: null.
[04/16/2021 14:03:12 EEST] (com.goldencode.p2j.persist.meta.MetadataManager$SystemTable:INFO) Populated [_Database-Feature] in 15 ms
[04/16/2021 14:03:12 EEST] (com.goldencode.p2j.persist.meta.MetadataManager$SystemTable:INFO) Populating [_Sequence]
[04/16/2021 14:03:12 EEST] (com.goldencode.p2j.persist.meta.MetadataManager:INFO) No sequences were detected for fwd database.
[04/16/2021 14:03:12 EEST] (com.goldencode.p2j.persist.meta.MetadataManager$SystemTable:INFO) Populated [_Sequence] in 0 ms
[04/16/2021 14:03:12 EEST] (com.goldencode.p2j.persist.meta.MetadataManager$SystemTable:INFO) Populating [_File]
3470 [main] INFO org.reflections.Reflections - Reflections took 2449 ms to scan 2 urls, producing 14 keys and 50 values 
[04/16/2021 14:03:15 EEST] (com.goldencode.p2j.persist.meta.MetadataManager:WARNING) Unknown index field [f_ext] for table [TestWords]
[04/16/2021 14:03:15 EEST] (com.goldencode.p2j.persist.meta.MetadataManager:WARNING) Unknown index field [f_ext] for table [Ttwid]
[04/16/2021 14:03:15 EEST] (com.goldencode.p2j.persist.meta.MetadataManager$SystemTable:INFO) Populated [_File] in 2916 ms
[04/16/2021 14:03:15 EEST] (com.goldencode.p2j.persist.meta.MetadataManager:INFO) Metaschema database local/fwd/meta ready
[04/16/2021 14:03:15 EEST] (com.goldencode.p2j.persist.meta.MetadataManager:INFO) Caching 10 template record ids
Could not instrument class com/goldencode/p2j/persist/DatabaseManager$DatabaseConfigFetcherMethodAccess: null.
Could not instrument class com/goldencode/p2j/persist/remote/LockManagerMultiplexerMethodAccess: null.
Could not instrument class com/goldencode/p2j/util/RemoteMultiplexerMethodAccess: null.
Could not instrument class com/goldencode/p2j/persist/remote/DirtyShareMultiplexerMethodAccess: null.
Could not instrument class com/goldencode/p2j/persist/remote/IdentityManagerMultiplexerMethodAccess: null.
[04/16/2021 14:03:15 EEST] (com.goldencode.p2j.persist.Persistence:INFO) Persistence services ready
Could not instrument class com/goldencode/p2j/aspects/ltw/MethodTraceController$ImplMethodAccess: null.
[04/16/2021 14:03:16 EEST] (SecurityManager:INFO) {00000000:00000006:standard} Loaded 1 CA   certificates, 0 objects ignored
[04/16/2021 14:03:16 EEST] (SecurityManager:INFO) {00000000:00000006:standard} Loaded 4 peer certificates, 0 objects ignored
[04/16/2021 14:03:16 EEST] (SecurityManager:INFO) {00000000:00000006:standard} Loaded auth-mode object
[04/16/2021 14:03:16 EEST] (SecurityManager:INFO) {00000000:00000006:standard} Loaded 5 groups, 0 objects ignored
[04/16/2021 14:03:16 EEST] (SecurityManager:INFO) {00000000:00000006:standard} Loaded 3 processes, 0 objects ignored
[04/16/2021 14:03:16 EEST] (SecurityManager:INFO) {00000000:00000006:standard} Loaded 10 users, 0 objects ignored
[04/16/2021 14:03:16 EEST] (SecurityManager:INFO) {00000000:00000006:standard} Loaded 8 resource plugins, 0 failed
[04/16/2021 14:03:16 EEST] (SecurityManager:WARNING) {00000000:00000006:standard} No custom server extension defined in P2J directory
[04/16/2021 14:03:16 EEST] (SecurityManager:WARNING) {00000000:00000006:standard} No custom client extension defined in P2J directory
[04/16/2021 14:03:16 EEST] (SecurityManager:INFO) {00000000:00000006:standard} Loaded 1 ACLs for resource type <remoteentrypoint>
[04/16/2021 14:03:16 EEST] (SecurityManager:INFO) {00000000:00000006:standard} Loaded 6 ACLs for resource type <system>
[04/16/2021 14:03:16 EEST] (SecurityManager:INFO) {00000000:00000006:standard} Loaded 1 ACLs for resource type <entrypoint>
[04/16/2021 14:03:16 EEST] (SecurityManager:INFO) {00000000:00000006:standard} Loaded 14 ACLs for resource type <admin>
[04/16/2021 14:03:16 EEST] (SecurityManager:INFO) {00000000:00000006:standard} Loaded 1 ACLs for resource type <trustedspawner>
[04/16/2021 14:03:16 EEST] (SecurityManager:INFO) {00000000:00000006:standard} Loaded 27 ACLs for resource type <net>
[04/16/2021 14:03:16 EEST] (SecurityManager:INFO) {00000000:00000006:standard} Loaded 6 ACLs for resource type <directory>
[04/16/2021 14:03:16 EEST] (SecurityManager:INFO) {00000000:00000006:standard} Loaded 3 ACLs for resource type <remotelaunchoption>
[04/16/2021 14:03:16 EEST] (SecurityManager:WARNING) {00000000:00000006:standard} Security audit log is disabled
[04/16/2021 14:03:16 EEST] (SecurityManager:WARNING) {00000000:00000006:standard} Security Cache generation 1 created.
4294 [main] INFO org.eclipse.jetty.util.log - Logging initialized @8178ms to org.eclipse.jetty.util.log.Slf4jLog
[04/16/2021 14:03:16 EEST] (com.goldencode.p2j.ui.DesktopSettingsManager:WARNING) webClient/login-form container is not defined in the directory.
Could not instrument class com/goldencode/p2j/main/WebHandlerMethodAccess: null.
4433 [main] WARN org.eclipse.jetty.server.handler.ContextHandler - o.e.j.s.h.ContextHandler@367e0b0e{/,null,UNAVAILABLE} contextPath ends with /
4438 [main] WARN org.eclipse.jetty.server.handler.ContextHandler - o.e.j.s.h.ContextHandler@2a20332b{/,null,UNAVAILABLE} contextPath ends with /
4757 [main] INFO org.reflections.Reflections - Reflections took 253 ms to scan 1 urls, producing 93 keys and 851 values 
[04/16/2021 14:03:17 EEST] (com.goldencode.p2j.util.SourceNameMapper:SEVERE) Could not find a LegacyService annotation in com.goldencode.testcases.appsrv.api.table_.TableExtent!
[04/16/2021 14:03:17 EEST] (com.goldencode.p2j.util.SourceNameMapper:SEVERE) Could not find a LegacyService annotation in com.goldencode.testcases.appsrv.api.NotFoundRenamed!
[04/16/2021 14:03:17 EEST] (com.goldencode.p2j.util.SourceNameMapper:SEVERE) Could not find a LegacyService annotation in com.goldencode.testcases.appsrv.api.table_.PipeTableExtent!
[04/16/2021 14:03:17 EEST] (com.goldencode.p2j.util.SourceNameMapper:SEVERE) Could not find a LegacyService annotation in com.goldencode.testcases.appsrv.api.table_.TableBefore!
[04/16/2021 14:03:17 EEST] (com.goldencode.p2j.util.SourceNameMapper:SEVERE) Could not find a LegacyService annotation in com.goldencode.testcases.appsrv.api.dataset.DatasetIoBaseType!
5062 [main] INFO org.eclipse.jetty.server.Server - jetty-9.4.22.v20191022; built: 2019-10-22T13:37:13.455Z; git: b1e6b55512e008f7fbdf1cbea4ff8a6446d1073b; jvm 1.8.0_101-b13
5102 [main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.h.ContextHandler@2a20332b{/web,null,AVAILABLE}
5102 [main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.h.ContextHandler@367e0b0e{/ws,null,AVAILABLE}
5102 [main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.h.ContextHandler@58178b69{/rest/goldencodeService,null,AVAILABLE}
5149 [main] INFO org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP Support for /admin, did not find org.eclipse.jetty.jsp.JettyJspServlet
5161 [main] INFO org.eclipse.jetty.server.session - DefaultSessionIdManager workerName=node0
5161 [main] INFO org.eclipse.jetty.server.session - No SessionScavenger set, using defaults
5164 [main] INFO org.eclipse.jetty.server.session - node0 Scavenging every 660000ms
5191 [main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.w.WebAppContext@1fbd0850{/admin,file:///C:/Projects/goldencode/workspace-fwd/goldencode-fwd/bin/com/goldencode/p2j/admin/,AVAILABLE}{adminapp}
5278 [main] INFO org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@7d2d5625{SSL,[ssl, http/1.1]}{0.0.0.0:7443}
5278 [main] INFO org.eclipse.jetty.server.Server - Started @9163ms
Could not instrument class com/goldencode/p2j/main/WebClientRegistrarMethodAccess: null.
[04/16/2021 14:03:17 EEST] (SessionManager.listen():WARNING) {00000000:00000001:standard} INSECURE sockets in use!
7826 [main] INFO org.eclipse.jetty.server.AbstractConnector - Stopped ServerConnector@7d2d5625{SSL,[ssl, http/1.1]}{0.0.0.0:7443}
7826 [main] INFO org.eclipse.jetty.server.session - node0 Stopped scavenging
7828 [main] INFO org.eclipse.jetty.server.handler.ContextHandler - Stopped o.e.j.w.WebAppContext@1fbd0850{/admin,file:///C:/Projects/goldencode/workspace-fwd/goldencode-fwd/bin/com/goldencode/p2j/admin/,UNAVAILABLE}{adminapp}
7828 [main] INFO org.eclipse.jetty.server.handler.ContextHandler - Stopped o.e.j.s.h.ContextHandler@58178b69{/rest/goldencodeService,null,UNAVAILABLE}
7828 [main] INFO org.eclipse.jetty.server.handler.ContextHandler - Stopped o.e.j.s.h.ContextHandler@367e0b0e{/ws,null,UNAVAILABLE}
7828 [main] INFO org.eclipse.jetty.server.handler.ContextHandler - Stopped o.e.j.s.h.ContextHandler@2a20332b{/web,null,UNAVAILABLE}
java.net.BindException: Address already in use: bind
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at java.nio.channels.ServerSocketChannel.bind(ServerSocketChannel.java:157)
    at com.goldencode.p2j.net.RouterSessionManager.createServerSocket(RouterSessionManager.java:1406)
    at com.goldencode.p2j.net.RouterSessionManager.listen(RouterSessionManager.java:665)
    at com.goldencode.p2j.main.StandardServer.bootstrap(StandardServer.java:1045)
    at com.goldencode.p2j.main.ServerDriver.start(ServerDriver.java:485)
    at com.goldencode.p2j.main.CommonDriver.process(CommonDriver.java:444)
    at com.goldencode.p2j.main.ServerDriver.process(ServerDriver.java:1)
    at com.goldencode.p2j.main.ServerDriver.main(ServerDriver.java:863)
    at testcases.Server.main(Server.java:24)

#490 Updated by Constantin Asofiei almost 3 years ago

The 'address already in use' is for the FWD server socket - is not related to 7443 port. What command do you use to start it?

#491 Updated by Constantin Asofiei almost 3 years ago

If you haven't already, try netstat -an to see what open ports you have.

#492 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

The 'address already in use' is for the FWD server socket - is not related to 7443 port. What command do you use to start it?

deploy/server/server.cmd

or from eclipse with this

ArrayList<String> opts = new ArrayList<String>();

      opts.add("server.xml");
      opts.add("net:connection:secure=true");
      opts.add("net:server:secure_port=3333");
      opts.add("net:server:insecure_port=3433");
      opts.add("directory:xml:filename=directory.xml");
      //opts.add("process:arch:single=true");

      Thread.currentThread()
               .setContextClassLoader(new com.goldencode.p2j.classloader.MultiClassLoader(
                        Thread.currentThread().getContextClassLoader()));
      ServerDriver.main(opts.toArray(new String[opts.size()]));

#493 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

The 'address already in use' is for the FWD server socket - is not related to 7443 port. What command do you use to start it?

Right, guess was confused by the previous messages with port 7443 (or the lack of port number in error message of bind)... either way it looks like Progress DevStudio is using port ranges 3333-3433, when using insecure connection that was not an issue. Changed settings in PSDOE and now the server starts, well kinda, there are still some error messages:

ERROR: API        = SetCurrentDirectoryW
       error code = 2
       message    = The system cannot find the file specified.

ERROR: API        = CreateProcessWithLogonW
       error code = 267
       message    = The directory name is invalid.

Had to log in with that new user account to get the home folder created, maybe some access issues? I do see Jetty listening on 7443 now, will see if it accepts any requests from SoapUI project...

#494 Updated by Constantin Asofiei almost 3 years ago

The 'workingDir' must exist and be accessible and writeable by whatever 'systemUser' you've setup in the directory.

#495 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

The 'workingDir' must exist and be accessible and writeable by whatever 'systemUser' you've setup in the directory.

OK, the working folder was set to 'testcases' folder and permission has been granted to the user account set up for it. Those error messages are gone now, still the spawner doesn't work (I think).

[04/19/2021 09:02:07 EEST] (org.eclipse.jetty.webapp.WebInfConfiguration:WARNING) Can't generate resourceBase as part of webapp tmp dir name: java.lang.NullPointerException
[04/19/2021 09:02:07 EEST] (SessionManager.listen():WARNING) {00000000:00000001:standard} INSECURE sockets in use!
[04/19/2021 09:02:07 EEST] (SessionManager.listen():INFO) {00000000:00000001:standard} Server ready
[04/19/2021 09:02:37 EEST] (ClientSpawner.spawn():SEVERE) {00000000:00000017:standard} Failed spawn with exit code: -1073741515
[04/19/2021 09:04:37 EEST] (AppServerLauncher:INFO) Appserver 'app_server' could not be started!

Now, that's a pretty large exit code but it's not zero so it's probably bad :)

Is there a 'directory.xml' file that works so I could try to 'adapt' it to my environment?

#496 Updated by Marian Edu almost 3 years ago

Argh, JNI... added jvm.dll to PATH and now this:

[04/19/2021 09:25:54 EEST] (SessionManager.listen():INFO) {00000000:00000001:standard} Server ready
[04/19/2021 09:25:57 EEST] (AppServerLauncher:INFO) Appserver 'app_server' was started successfully!

Let's see where this leads...

#497 Updated by Marian Edu almost 3 years ago

https://localhost:7443/web/fwdHandler gives this:

HTTP/1.1 404 Not Found
Date: Mon, 19 Apr 2021 06:32:39 GMT
Content-Length: 39
Server: Jetty(9.4.22.v20191022)

Can't find service for path /fwdHandler

From config page I've found this "To access a web service endpoint, use the secure port for the server followed by the service path, like https://localhost:7443/web/path/to/service, where path/to/service is an explicit path for a certain web service."

What that path should be given the FwdHandler is right into 'com.goldencode.testcases' folder, is there any mapping file that need to be updated - in OE the web handlers are maintained in a kind of 'routes' definition file, something equivalent in FWD?

#498 Updated by Constantin Asofiei almost 3 years ago

The endpoints in SoapUI were set as these:
  • https://localhost:7443/web for the web handler
  • https://localhost:7443/rest/goldencodeService for REST
  • for SOAP, WSAUrl was set to https://localhost:7443/ws.

#499 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

The endpoints in SoapUI were set as these:
  • https://localhost:7443/web for the web handler

Yep, this what I'm looking for right now but as said this only leads to 404 not found error page from Jetty.

Neither https://localhost:7443/web nor https://localhost:7443/web/fwdHandler does not work - same error "Can't find service for path" where path is "/" or "/fwdHandler". Nothing in server.log, a bunch of log files created in spawner's working folder (*_apppserver_process.log) but are all empty :(

#500 Updated by Constantin Asofiei almost 3 years ago

Did you convert using the file-cvt-list.txt.soap.rest.webhandler list? Are you using testcases revision 1042 or later? As I've made some changes (in 1041 and 1042) in p2j.cfg.xml, directory.xml.template, certificates and others - please review these and make sure they are integrated with your project.

I've just tested and the https://localhost:7443/web/fwdHandler/666 works fine even from browser. SoapUI the same, works OK.

#501 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

Did you convert using the file-cvt-list.txt.soap.rest.webhandler list?

Yes I did, as said the converted FwdHandler java class is in testcases/src/com/goldencode/testcases.

Are you using testcases revision 1042 or later? As I've made some changes (in 1041 and 1042) in p2j.cfg.xml, directory.xml.template, certificates and others - please review these and make sure they are integrated with your project.

I was using #1402, did an update just now and got to #1403.
The only differences I have there are the propath (added ${P2J_HOME}/oo at the end) and opsys (have that set to WIN32) in cfg/p2j.cfg.xml

In deploy/server/directory.xml I have updated [os-user], [spawner-path], [client-start-dir] and added systemPassword and then are a bunch of changes that looks like due to an automatic update whenever the server is started (like that xml file is being used as storage not just configuration).

I've just tested and the https://localhost:7443/web/fwdHandler/666 works fine even from browser. SoapUI the same, works OK.

Not for me, greeted with 404 not found by Jetty no matter what I'm trying there and couldn't find any log file that could shed some light on what could be wrong there :(

#502 Updated by Constantin Asofiei almost 3 years ago

The differences you see in directory.xml after each FWD server start are because of some temporary accounts being re-generated randomly.

Please upload your fwdhandler.java.

#503 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

Please upload your fwdhandler.java.

Looking for this?

@LegacyService(name = "oepas1.goldencode.web", type = "WEBHANDLER", paths = 
{
   @LegacyWebPath(path = "/fwdHandler/{id}/{value}", order = 1),
   @LegacyWebPath(path = "/fwdHandler/{id}", order = 2),
   @LegacyWebPath(path = "/fwdHandler", order = 3)
})

That oepas1.goldencode.web looks quite suspicious :)

#504 Updated by Constantin Asofiei almost 3 years ago

Yes, that's the reason I think. The file-cvt-list.txt.soap.rest.webhandler I mentioned uses the ./FwdHandler.cls file and this exists in the root of the testcases project - this is what I get converted and works. Please do the same.

Also, the name_map.xml should have a line like this:

  <class-mapping jname="FwdHandler" ooname="FwdHandler" pname="FwdHandler.cls" with-services="true"/>

#505 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

Yes, that's the reason I think. The file-cvt-list.txt.soap.rest.webhandler I mentioned uses the ./FwdHandler.cls file and this exists in the root of the testcases project - this is what I get converted and works. Please do the same.

Also, the name_map.xml should have a line like this:
[...]

That's exactly what I did... attached the handler java file and the name_map xml.

#506 Updated by Constantin Asofiei almost 3 years ago

Actually, the oepas1.goldencode.web name is from the webhandlers.properties file, so that is OK. I've uploaded to xfersrv01:/tmp/testcases.jar the jar I'm using - please test and see if it works for you.

Otherwise, please start the FWD server in debug mode, attach to it for debugging, place a breakpoint in p2j.main.WebServiceHandler method handle at line 240, access the https://localhost:7443/web/fwdHandler/666 url and see what this method is doing.

The services map should not be empty and candidates list should contain only one instance.

#507 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

Actually, the oepas1.goldencode.web name is from the webhandlers.properties file, so that is OK. I've uploaded to xfersrv01:/tmp/testcases.jar the jar I'm using - please test and see if it works for you.

Otherwise, please start the FWD server in debug mode, attach to it for debugging, place a breakpoint in p2j.main.WebServiceHandler method handle at line 240, access the https://localhost:7443/web/fwdHandler/666 url and see what this method is doing.

The services map should not be empty and candidates list should contain only one instance.

Ok, if I start the server from command prompt the services map is empty so no candidates hence the 'not found' error. I'm doing that from testcases/deploy/server by running server.cmd, if I'm trying to launch it from testcases root folder like deploy\server\server.cmd it starts and stop - class not found in server.log.

If I start the server from Eclipse then the services map is fine, the candidates filters the right entry but then the "app_server" is not started from that environment and it just keep on doing something (probably attempt to connect to appsrv???) and do not send back any response.

It gives that in console output:
[04/19/2021 12:56:09 EEST] (AppServerLauncher:INFO) Appserver 'app_server' could not be started!

Stepping through AppServerLauncher it looks like the spawner process terminate with an zero exit code but then the Launcher succes is still null after wait-for so something must be wrong there. The app server name, user and password seems to be the right ones as set in configuration file so I'm really lost here :(

This is the java file used to start the server...

   public static void main(String[] args)
   {
      ArrayList<String> opts = new ArrayList<String>();

      opts.add("server.xml");
      opts.add("net:connection:secure=true");
      opts.add("net:server:secure_port=3533");
      opts.add("net:server:insecure_port=3433");
      opts.add("directory:xml:filename=directory.xml");
      //opts.add("process:arch:single=true");

      Thread.currentThread()
               .setContextClassLoader(new com.goldencode.p2j.classloader.MultiClassLoader(
                        Thread.currentThread().getContextClassLoader()));
      ServerDriver.main(opts.toArray(new String[opts.size()]));
   }

#508 Updated by Constantin Asofiei almost 3 years ago

The FWD server must be started from deploy/server, and if you start it from Eclipse, you must use the p2j.jar in your classpath (before the src/ folder). Your problem I think is because testcases.jar is not in your classpath for some reason, and the services map is empty. Is this enabled in your directory.xml?

      <node class="container" name="webHandler">
          <node class="boolean" name="enabled">
            <node-attribute name="value" value="TRUE"/>
          </node>
          <node class="string" name="appserver">
            <node-attribute name="value" value="app_server"/>
          </node>
          <node class="string" name="alias">
            <node-attribute name="value" value="appserver_agent"/>
          </node>
        </node>

#509 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

The FWD server must be started from deploy/server, and if you start it from Eclipse, you must use the p2j.jar in your classpath (before the src/ folder). Your problem I think is because testcases.jar is not in your classpath for some reason, and the services map is empty. Is this enabled in your directory.xml?
[...]

OK, did ran the 'jar' target and recreate the 'testcases.jar' and now it does find the right candidate but even if the exit code of spawner seems to be zero it still leads to the same error

[04/19/2021 15:29:30 EEST] (AppServerLauncher:INFO) Appserver 'app_server' could not be started!

Argh, writing this did remember the p2j.dll gets deleted with the whole content of the 'lib' folder so re-deploying that seems to have solved the issue... the appsrv is started and rest request works, hurray :)

#510 Updated by Marian Edu almost 3 years ago

Constantin, we have an issue with the conversion for tests that uses Progress.Lang.ParameterList.setParameter method. The last parameter can actually be just about anything, it is annotated with type BDT (base data type???) and it looks like it the conversion does not accept passing in an extent variable.

It gives "No param_index annotation found"... hmm, looking at it in our tests we also use set-parameter on a CALL handle because there are differences between the CALL interface and the method's Invoke, need to see if the later is annotated as it looks like the error might come from those calls.

#511 Updated by Marian Edu almost 3 years ago

Marian Edu wrote:

It gives "No param_index annotation found"... hmm, looking at it in our tests we also use set-parameter on a CALL handle because there are differences between the CALL interface and the method's Invoke, need to see if the later is annotated as it looks like the error might come from those calls.

Indeed, commenting out all calls to the set-parameter on the call handle makes the conversion complete without errors. That method is annotated in the CallResource interface with LegacyMethod not the usual LegacySignature we know so really no idea if this needs to be fixed by adding some annotation or you can simply handle it during conversion.

#512 Updated by Constantin Asofiei almost 3 years ago

Marian, please point me to the test which fails.

#513 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

Marian, please point me to the test which fails.

oo/progress/lang/parameter_list/test_method_set_parameter_class_type_mismatch.p, it fails only when set-parameter is used on CALL handle with extent variables (character or P.L.O).

#514 Updated by Constantin Asofiei almost 3 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

Marian, please point me to the test which fails.

oo/progress/lang/parameter_list/test_method_set_parameter_class_type_mismatch.p, it fails only when set-parameter is used on CALL handle with extent variables (character or P.L.O).

I don't see call:set-parameter used here.

#515 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

I don't see call:set-parameter used here.

There should be plenty of calls like hCall:set-parameter in that file, hCall is a handle and there is a `create call hCall` statement as well.

#516 Updated by Marian Edu almost 3 years ago

Marian Edu wrote:

There should be plenty of calls like hCall:set-parameter in that file, hCall is a handle and there is a `create call hCall` statement as well.

My bad, probably not pushed those changes... did extracted those in a separate test oo/progress/lang/parameter_list/test_method_call_set_parameter_class_type_mismatch.p and pushed that in bazaar (#1048).

#517 Updated by Marian Edu almost 3 years ago

I'm working on dynamic invoke (class/method/ctor) - right now trying to close ParameterList - and one aspect we're testing there is the 'dynamic data type conversion'... this is already hard to 'catch' by simply testing all options but basically we're using assign method to validate the value. The issue I've stumbled upon now is with handle's assign method where although it's being said this is used for polymorphic/dynamic assign the error thrown for invalid data type there is not 5729 like for other base data types but 223 which is in fact a compile type error not something that can occur at run time...

Question, was that done on purpose, is there a catch or I can just replace that with BaseDataType.incompatibleTypesOnConversion?

#518 Updated by Greg Shah almost 3 years ago

was that done on purpose, is there a catch or I can just replace that with BaseDataType.incompatibleTypesOnConversion

That change was made by Marius in rev 10551. It was indeed in relation to POLY cases and DYNAMIC-FUNCTION() but I suspect he just mis-understood the compile error for a runtime error. I think it is probably safe to change it.

#519 Updated by Greg Shah almost 3 years ago

I'm working on dynamic invoke (class/method/ctor) - right now trying to close ParameterList

Are the WebHandler changes complete? I'd like to get them merged back into 3821c.

#520 Updated by Marian Edu almost 3 years ago

Greg Shah wrote:

I'm working on dynamic invoke (class/method/ctor) - right now trying to close ParameterList

Are the WebHandler changes complete? I'd like to get them merged back into 3821c.

Yes, everything from web package should be ready - well, what we had planned for: there are some compatibility and 'business entity' handlers as well as some extra classes I don't remember right now.

We're not working this Monday but on Tuesday we can switch to the new branch - although those should be already available in bazaar so you can do this before if need be and I'll stage local changes in our local git repo.

#521 Updated by Greg Shah almost 3 years ago

there are some compatibility and 'business entity' handlers as well as some extra classes I don't remember right now.

Please create a new task (with suitable details) for this remaining work.

#522 Updated by Marian Edu almost 3 years ago

Greg, did you merged that already and created a new branch that we need to pick-up or not just yet? I have local changes related for @LegacyClass so wonder if we can keep on pushing those to the existing branch or we stage those till a new one became available?

#523 Updated by Greg Shah almost 3 years ago

It is not merged yet. I just pushed the latest 3821c to xfer (rev 12362). Please post the bzr send of the merged result, we will merge it here and create a new branch for you.

#524 Updated by Marian Edu almost 3 years ago

Greg Shah wrote:

It is not merged yet. I just pushed the latest 3821c to xfer (rev 12362). Please post the bzr send of the merged result, we will merge it here and create a new branch for you.

Attached the 'patch', please let us know when the new branch is available or have any issues with the patch.

Thanks

#525 Updated by Greg Shah almost 3 years ago

Branch 4384j was merged into branch 3821c as revision 12363.

Created new branch 4384k from 3821c rev 12363. The new branch is on xfer.

#526 Updated by Marian Edu almost 3 years ago

Greg Shah wrote:

Branch 4384j was merged into branch 3821c as revision 12363.

Created new branch 4384k from 3821c rev 12363. The new branch is on xfer.

Something changed there in variable scope handling, was debugging that yesterday a whole day only to find out the tests that were previously passing are failing now. This does not really solve my initial issue but since the test I was working on was using one of those 'registry' classes that have a static variable for DI I thought to run another test that is using a similar builder and was passing just fine before. It's probably the third time we change the way we initialize those darn registries - first we were doing it on ContextLocal's initialValue method but that was failing at the time because the class loading/instantiation was failing at that point. Then we moved to lazy-loading so we don't instantiate the variable in initialValue but when we need it we check if valid and if not we do the instantiation there. Problem here is things were working at a time in one way and then stopped working - using REGISTRY.set was find initially, then Constantin said we should not reset that but use REGISTRY.get with a local variable and then assign the new instance to that one. Then the variable had to be moved out of the function block, now the same code does not work anymore - the REGISTRY variable is only valid in that function block and then the next time we get it is again invalid now??? Moving back to a previous approach when we do not use assign method but mere assignment of REGISTRY.get to a local variable seems to work now.

 object<? extends BuilderRegistry> registry = TypeFactory.object(BuilderRegistry.class);

      return function(BodyWriterRegistry.class, "Registry", object.class, new Block((Body) () -> {

        registry.assign(REGISTRY.get());

versus

      return function(BodyWriterRegistry.class, "Registry", object.class, new Block((Body) () -> {

         object<? extends BuilderRegistry>  registry = REGISTRY.get();

At this point I don't really know if those classes that we've closed are still really passing the tests.

Back to my original issue, in one of those 'registry' classes - StatusCodeWriterBuilder - it was throwing a NPE when trying to instantiate the registry. Oddly the error come from getLegacyClass, more precisely when loadClass is being called for LegacyClass and since we were working on that thought it might be because of those changes. Since that was working fine for other tests it must be something related to the variable scope handling - there are lots of places when entries are pushed or pulled from various queues with no error handling which often leads to NullPointerException or NoSuchElementExcetion and you have no idea what is actually causing that. A variable scope that is to narrow seems to be the case sometimes but it won't hurt to actually catch those and throw a more meaningful error message instead.

Changing the way the registry is instantiated leads me to an NPE in scopeStart for a simple method like NullHeader.getValue that is merely returning an null character. Not very helpful, in fact the issue came from the same static variable scope for the NullHeader property of HttpHeader.

Point is, this is not only time consuming and frustrating to debug - unless maybe you know exactly what those queues/arrays are used for and what is the actual cause of those unhandled exceptions - if more meaningful messages can be used instead maybe we get some notification when some potentially breaking changes occurs :(

Now, I can't go back and convert/run all the tests one by one to see if everything still works and to what extend - what is the correct way of lazy-loading a static variable? Is it the previous version that was working fine before the last merge or the 'new' one (albeit that was flagged as bad practice before)?

#527 Updated by Marian Edu almost 3 years ago

Trying some 4GL code for the same and how it gets converted guess the easiest is to simply not use any 'local' variable but use REGISTRY.get instead all the time...

 if (!NULL.get()._isValid())
 {     
    NULL.get().assign(ObjectOps.newInstance(NullHeader.class));
 }

 returnNormal(NULL.get());

#528 Updated by Constantin Asofiei almost 3 years ago

Marian, some findings:
  • for a static OO method, the BlockManager.function first argument must be the class (instead of 'this') - same for internalProcedure. In HttpHeader.getNullHeader, there is this:
          return function(null, "NullHeader", object.class, new Block((Body) () -> 
    

    where it should be:
          return function(HttpHeader.class, "NullHeader", object.class, new Block((Body) () -> 
    

    Otherwise, the legacy class will not be loaded before the method is actually executed. I'm trying to build a tool to automatically analyse 'p2j.oo' and see where 'null' is passed instead of the class.
  • why I say to not call .set on the ContextLocal - that is because in initialValue it needs to be initialized via TypeFactory.object. This creates a ObjectVar instance, which allows counting of the object's references. If you do this:
    nullHeader = ObjectOps.newInstance(NullHeader.class);
    NULL.set(nullHeader);
    

    then NULL will be a plain object for which references are not counted - so the instance may be deleted when it should not.
    There are only three cases where .set is called:
    com.goldencode.p2j.oo.core.LegacyString.empty()
    com.goldencode.p2j.oo.net.http.HttpHeader.getNullHeader()
    com.goldencode.p2j.oo.net.FileTypeRegistry.getRegistry()
    

    These need to be fixed to use '.get().assign()' instead.

#529 Updated by Constantin Asofiei almost 3 years ago

I found only 4 cases which have null, and need to have this set to the class:

com.goldencode.p2j.oo.core.Memptr.getEmpty()
com.goldencode.p2j.oo.net.http.ClientBuilder.getRegistry()
com.goldencode.p2j.oo.net.http.CookieJarBuilder.getRegistry()
com.goldencode.p2j.oo.net.http.HttpHeader.getNullHeader()

Also, these getters must at least call ObjectOps.load(Uri.class), as they are not using BlockManager.function:

com.goldencode.p2j.oo.net.Uri.getSchemePartIdx()
com.goldencode.p2j.oo.net.Uri.getAuthorityPartIdx()
com.goldencode.p2j.oo.net.Uri.getPathPartIdx()
com.goldencode.p2j.oo.net.Uri.getQueryPartIdx()
com.goldencode.p2j.oo.net.Uri.getFragmentPartIdx()
com.goldencode.p2j.oo.net.Uri.encodePath(com.goldencode.p2j.util.character)
com.goldencode.p2j.oo.net.Uri.parse(com.goldencode.p2j.util.character)

Is the above tangential with the tests which fail for you?

#530 Updated by Greg Shah almost 3 years ago

We are about to push a new revision of 3821c to xfer. This will include a large number of changes to the OO built-ins due to the recent changes from #5296.

Marian: Can you do the following today?

  • Rebase 4384k from 3821c (probably revision 12542).
  • Confirm your changes are OK on that version.
  • Post the patch for merge back into 3821c.
  • Document the status of the work from #4384-1 (the last update was from #4384-462).

Constantin will take that patch, merge into 3821c and create a new task branch 4384l.

#531 Updated by Greg Shah almost 3 years ago

We will notify here when the proper version of 3821c is available on xfer.

#532 Updated by Greg Shah almost 3 years ago

3821c revision 12542 is now available on xfer.

#533 Updated by Marian Edu almost 3 years ago

Greg Shah wrote:

3821c revision 12542 is now available on xfer.

Attached the patch for the 4384k merge. Let me know when we need to switch to the new branch.

#534 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

Marian, some findings:
  • for a static OO method, the BlockManager.function first argument must be the class (instead of 'this') - same for internalProcedure. In HttpHeader.getNullHeader, there is this:
    [...]
    where it should be:
    [...]
    Otherwise, the legacy class will not be loaded before the method is actually executed.

That must be true, we've saw some of those 'weird' cases ourselves but as a rule of thumb I don't change any code unless needed to, it was there like that and somehow seemed to work anyway... it was just different from how the skeleton conversion looks like.

  • why I say to not call .set on the ContextLocal - that is because in initialValue it needs to be initialized via TypeFactory.object. This creates a ObjectVar instance, which allows counting of the object's references. If you do this:
    [...]
    then NULL will be a plain object for which references are not counted - so the instance may be deleted when it should not.
    There are only three cases where .set is called:
    [...]
    These need to be fixed to use '.get().assign()' instead.

Yes, we did changed that set to use assign before but what we did was to use a local variable and that stopped working at some point. Something to do with the variable scope clean-up probably :(

         object<? extends BuilderRegistry> registry = REGISTRY.get();

         if (!registry._isValid())
         {
            registry.assign(ObjectOps.newInstance(BuilderRegistry.class, "I", 
                     ObjectOps.getLegacyClass(MessageWriter.class)));

            initializeRegistry(registry);
         }

         returnNormal(registry);

compared with

         if (!REGISTRY.get()._isValid())
         {
            REGISTRY.get().assign(ObjectOps.newInstance(BuilderRegistry.class, "I", 
                     ObjectOps.getLegacyClass(MessageWriter.class)));

            initializeRegistry(REGISTRY.get());
         }

         returnNormal(REGISTRY.get());

#535 Updated by Marian Edu almost 3 years ago

Argh, now that I'm looking at it, it does look like the issue we had with the static 'registry' is the same as what we see when we return a variable defined inside of the procedure/block function... that is not valid on the other side, some kind of clean-up procedure is deleting it's references and somehow FWD sees that as being invalid. Defining the variable outside of the function/procedure block seems to fix the issue. I don't know what changed that made this stop working, nor question the fact this implementation is the right one but this situation might be present in a number of cases inside OO code that was not 'generated' using skeleton conversion. Maybe something can be done so the local variable being used as return value is not 'deleted' anymore - unless the return value isn't assigned to anything after all.

#536 Updated by Constantin Asofiei almost 3 years ago

I'm reviewing your patch now, and these constructs (which were fixed) explain what you see:

            object<? extends _BaseObject_> client = ObjectOps
                     .newInstance(decoratorType.ref().getType(), "I", p2);

You are saving a 'ObjectOps.newInstance' reference 'as-is' - this will not allow FWD to track references or see it as 'assigned'. So it will delete it as soon as possible.

I don't recall exactly what was fixed or changed related to reference tracking, but in any case, the correct way is to define a new var via TyepFactory and use assign. If previously FWD didn't delete this 'unassigned' reference, that was wrong.

#537 Updated by Marian Edu almost 3 years ago

Trying to convert some of the tests made for reflection we see the POLY behavior is not implemented for properties/variables get/set methods. In skeleton the return/input parameters are defined as P.L.O although those can be also any base data type like integer, character... Its probably the same approach as for the Class.invoke method and that case seems to be handled by conversion rules. Should that be working already, maybe something we're doing wrong there?

Trying to convert those two files gives a class not found error:

oo/progress/reflect/property/set_data_type/test_setter_character.p
oo/progress/reflect/property/set_data_type/SetDataType.cls

EXPRESSION EXECUTION ERROR:
---------------------------
nameinfo = loadConvertedClass(fname, false)
           ^  { Can not find class associated with null }
---------------------------
Elapsed job time:  00:00:04.869
ERROR:
com.goldencode.p2j.pattern.TreeWalkException: ERROR!  Active Rule:
-----------------------
      RULE REPORT      
-----------------------
Rule Type :   WALK
Source AST:  [ Set ] BLOCK/PROCEDURE/BLOCK/ASSIGNMENT/EXPRESSION/OBJECT_INVOCATION/OO_METH_VOID/ @226:10 {983547512819}
Copy AST  :  [ Set ] BLOCK/PROCEDURE/BLOCK/ASSIGNMENT/EXPRESSION/OBJECT_INVOCATION/OO_METH_VOID/ @226:10 {983547512819}
Condition :  nameinfo = loadConvertedClass(fname, false)
Loop      :  false
--- END RULE REPORT ---

    at com.goldencode.p2j.pattern.PatternEngine.run(PatternEngine.java:1070)
    at com.goldencode.p2j.convert.TransformDriver.processTrees(TransformDriver.java:576)
    at com.goldencode.p2j.convert.ConversionDriver.back(ConversionDriver.java:565)
    at com.goldencode.p2j.convert.TransformDriver.executeJob(TransformDriver.java:985)
    at com.goldencode.p2j.convert.ConversionDriver.main(ConversionDriver.java:1024)
    at testcases.Convert.main(Convert.java:22)
Caused by: com.goldencode.expr.ExpressionException: Expression execution error @1:12 [OO_METH_VOID id=983547512819]
    at com.goldencode.p2j.pattern.AstWalker.walk(AstWalker.java:275)
    at com.goldencode.p2j.pattern.AstWalker.walk(AstWalker.java:210)
    at com.goldencode.p2j.pattern.PatternEngine.apply(PatternEngine.java:1633)
    at com.goldencode.p2j.pattern.PatternEngine.processAst(PatternEngine.java:1531)
    at com.goldencode.p2j.pattern.PatternEngine.processAst(PatternEngine.java:1479)
    at com.goldencode.p2j.pattern.PatternEngine.run(PatternEngine.java:1034)
    ... 5 more
Caused by: com.goldencode.expr.ExpressionException: Expression execution error @1:12
    at com.goldencode.expr.Expression.execute(Expression.java:484)
    at com.goldencode.p2j.pattern.Rule.apply(Rule.java:497)
    at com.goldencode.p2j.pattern.Rule.executeActions(Rule.java:745)
    at com.goldencode.p2j.pattern.Rule.coreProcessing(Rule.java:712)
    at com.goldencode.p2j.pattern.Rule.apply(Rule.java:534)
    at com.goldencode.p2j.pattern.Rule.executeActions(Rule.java:745)
    at com.goldencode.p2j.pattern.Rule.coreProcessing(Rule.java:712)
    at com.goldencode.p2j.pattern.Rule.apply(Rule.java:534)
    at com.goldencode.p2j.pattern.Rule.executeActions(Rule.java:745)
    at com.goldencode.p2j.pattern.Rule.coreProcessing(Rule.java:712)
    at com.goldencode.p2j.pattern.Rule.apply(Rule.java:534)
    at com.goldencode.p2j.pattern.RuleContainer.apply(RuleContainer.java:585)
    at com.goldencode.p2j.pattern.RuleSet.apply(RuleSet.java:1)
    at com.goldencode.p2j.pattern.AstWalker.walk(AstWalker.java:262)
    ... 10 more
Caused by: java.lang.ClassNotFoundException: Can not find class associated with null
    at com.goldencode.p2j.uast.SymbolResolver.loadConvertedClass(SymbolResolver.java:1992)
    at com.goldencode.p2j.pattern.CommonAstSupport$Library.loadConvertedClass(CommonAstSupport.java:625)
    at com.goldencode.expr.CE6768.execute(Unknown Source)
    at com.goldencode.expr.Expression.execute(Expression.java:391)
    ... 23 more

#538 Updated by Constantin Asofiei almost 3 years ago

Marian Edu wrote:

Greg Shah wrote:

3821c revision 12542 is now available on xfer.

Attached the patch for the 4384k merge. Let me know when we need to switch to the new branch.

Greg, can we push 3821c/12557 to xfer? The patch doesn't compile and I'd like to have 4384k rebased first and a new patch created.

#539 Updated by Constantin Asofiei almost 3 years ago

Marian Edu wrote:

Trying to convert some of the tests made for reflection we see the POLY behavior is not implemented for properties/variables get/set methods. In skeleton the return/input parameters are defined as P.L.O although those can be also any base data type like integer, character... Its probably the same approach as for the Class.invoke method and that case seems to be handled by conversion rules. Should that be working already, maybe something we're doing wrong there?

You mean the Progress.Reflect.Property and Progress.Reflect.Variable? These are not implemented in FWD yet.

For the invoke method in Progress.Lang.Class and Progress.Lang.Method, the 'patch' is in ClassDefinition.annotateMethodCall:1580 (this is for the parser):

            if (mdat.name.equalsIgnoreCase("invoke") && 
                (mdat.container.name.equalsIgnoreCase("progress.lang.class") || 
                 mdat.container.name.equalsIgnoreCase("progress.reflect.method")))
            {
               // set the node's type to OO_METH_POLY
               node.putAnnotation("oldtype", (long) node.getType());
               node.setType(OO_METH_POLY);
            }

For the conversion, there is also ExpressionConversionWorker.expressionType:1955:

                  if (oldtype == OO_METH_CLASS && source.getText().equalsIgnoreCase("invoke"))
                  {
                     String defClass = (String) source.getAnnotation("found-in-cls");
                     if ("Progress.Lang.Class".equalsIgnoreCase(defClass) || 
                         "progress.reflect.method".equalsIgnoreCase(defClass))
                     {
                        jcls = "BaseDataType";
                     }
                     break;
                  }

Both cases need to be aware of the Property and Variable APIs which are POLY.

#540 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

You mean the Progress.Reflect.Property and Progress.Reflect.Variable? These are not implemented in FWD yet.

Yes, so no reason to worry just yet... will put those on hold for time being.

#541 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

Greg, can we push 3821c/12557 to xfer? The patch doesn't compile and I'd like to have 4384k rebased first and a new patch created.

Fixed the merge error, attached the new patch.

#542 Updated by Constantin Asofiei almost 3 years ago

Marian Edu wrote:

Constantin Asofiei wrote:

Greg, can we push 3821c/12557 to xfer? The patch doesn't compile and I'd like to have 4384k rebased first and a new patch created.

Fixed the merge error, attached the new patch.

There are some regressions related to CALL. I need to fix them before being able to merge the patch.

What tests did you use for these changes?

#543 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

There are some regressions related to CALL. I need to fix them before being able to merge the patch.

There were are somehow large number of conflicts in that class and right now not sure if the tests we were running still work or not before we switch to the new branch and rebuild.

What tests did you use for these changes?

Mainly those from oo/progress/lang/class/invoke folder.

#544 Updated by Constantin Asofiei almost 3 years ago

Marian, I think we should try to automate running the tests on the xfer repository.

For example: I see that you are using a testapi.log file name, which is the same for all tests. I assume any errors can be found here? The file is in append mode (so if multiple tests are ran previous results don't get lost) and I think it would help if the program name is emitted there, too - to make it easier to identify what file failed.

Except this, I think it would work to use a RUN path/to/some/test.p and have a single 'runner' program per-folder (or multiple folders with common tests), so we can run a test suite in a single call, and not have to run each program one-by-one.

For example, can you confirm that this sequence of RUN statements would work fine in OpenEdge, for the oo/progress/lang/class/invoke folder (and append here the log file)?

RUN oo/progress/lang/class/invoke/runtime_conversion/test_invoke_input.p.
RUN oo/progress/lang/class/invoke/runtime_conversion/test_invoke_input_output.p.
RUN oo/progress/lang/class/invoke/runtime_conversion/test_invoke_output.p.
RUN oo/progress/lang/class/invoke/static/test_invoke_io_mode.p.
RUN oo/progress/lang/class/invoke/static/test_invoke_extent.p.
RUN oo/progress/lang/class/invoke/static/test_invoke.p.
RUN oo/progress/lang/class/invoke/static/test_invoke_err_param_mode.p.
RUN oo/progress/lang/class/invoke/static/test_invoke_err_invalid_method.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_temp_table_output_errors.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_temp_table_inputoutput_errors.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_input_errors.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_handle_output.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_inputoutput.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_handle_output_bind.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_table_handle_inputoutput.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_table_handle_inputoutput_by_ref.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_handle_output_by_ref.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_table_handle_errors.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_handle_errors.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_temp_table_output_by_ref.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_table_handle_input_bind.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_handle_input.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_table_handle_output_by_ref.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_inputoutput_by_ref.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_input.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_handle_input_by_ref.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_handle_inputoutput_by_ref.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_handle_inputoutput.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_temp_table_input_errors.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_inputoutput_errors.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_output_errors.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_temp_table_input_by_ref.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_temp_table_output.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_table_handle_input.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_output_by_ref.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_table_handle_output_bind.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_table_handle_input_by_ref.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_handle_input_bind.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_table_handle_output.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_temp_table_input.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_output.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_temp_table_inputoutput_by_ref.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_dataset_input_by_ref.p.
RUN oo/progress/lang/class/invoke/tt_ds_hdl/test_invoke_temp_table_inputoutput.p.
RUN oo/progress/lang/class/invoke/instance/test_invoke_io_mode.p.
RUN oo/progress/lang/class/invoke/instance/test_invoke_extent.p.
RUN oo/progress/lang/class/invoke/instance/test_invoke.p.
RUN oo/progress/lang/class/invoke/instance/test_invoke_err_param_mode.p.
RUN oo/progress/lang/class/invoke/instance/test_invoke_err_invalid_method.p.

#545 Updated by Greg Shah almost 3 years ago

can we push 3821c/12557 to xfer?

Done.

#546 Updated by Marian Edu almost 3 years ago

Constantin Asofiei wrote:

Marian, I think we should try to automate running the tests on the xfer repository.

For example: I see that you are using a testapi.log file name, which is the same for all tests. I assume any errors can be found here? The file is in append mode (so if multiple tests are ran previous results don't get lost) and I think it would help if the program name is emitted there, too - to make it easier to identify what file failed.

Yes, we can add that info into the log file.

Except this, I think it would work to use a RUN path/to/some/test.p and have a single 'runner' program per-folder (or multiple folders with common tests), so we can run a test suite in a single call, and not have to run each program one-by-one.

We used to do that only there are tests that take quite some time to run (from memory whenever we had to work with memory pointers, I think especially when filling those byte by byte) so we ended-up running each test one by one. Same for conversion, its better too keep the list of files to be converted to the minimum :(

For example, can you confirm that this sequence of RUN statements would work fine in OpenEdge, for the oo/progress/lang/class/invoke folder (and append here the log file)?

That looks fine to me, we did had some utility to create those 'test suite' procedures... have too check if that is still available in testcases and see if we can ran that to generate test suites for each folders.

#547 Updated by Constantin Asofiei almost 3 years ago

4384k was merged to 3821c/12558. 3821c/12559 fixes some regressions.

Created 4384l from 3821c/12559.

#548 Updated by Greg Shah over 2 years ago

Status updated from Marian:

As suggested by Constantin we've re-generate all test scripts to run everything under a particular folder - in our case the 'oo' one - and we had to fix tests that we're 'polluting' the environment (static registries that needed to be returned back to defaults, clean-up cookies and such). Now we can run those tests after each merge as integration tests and see if there are changes that might make the tests to fail so we can fix implementation as needed. We have an issue with flags enums I've reported and for reflection variables/properties the conversion does not yet support 'poly' data type so not much we can do in that area. There are only a few things left to implement in HTTP client support, things that does not work exactly as in 4GL that I need to close and then there are some extra classes added in 'core' package - primitive handlers, more collections that could be implemented once we close the dynamic 'invoke' in Class.

#549 Updated by Marian Edu over 2 years ago

Going through all tests to see if still passing, update implementation as needed (other changes did impact the test results it seems) and in the process will list here the remaining issues/todo:
  • Missing implementation for newly added classes - I will generate stubs for all those and postpone implementation for when needed.
    1. Core.Collections: Stack, ObjectStack, List, LinkedList, ClassClassMap, StringCollection
    2. Core.Assertion: AssertArray, AssertError, AssertFile, AssertJson
  • SERIALIZABLE keyword should probably be used by conversion to make the class implement Serializable so we can later use for testing if (legacy) class is 'serializable'
  • Maybe already solved in another branch but we still have conversion issues with wrong method getting pick-up, especially when the input parameter is not a local variable but directly instantiated when calling the method - oo/openedge/net/http/cookie_collection/test_method_to_cookie_array.p for instance, when passing a `new String` to the add method the conversion incorrectly pick the add_1 (Cookie) instead of the correct one (Object).

#550 Updated by Greg Shah over 2 years ago

  • SERIALIZABLE keyword should probably be used by conversion to make the class implement Serializable so we can later use for testing if (legacy) class is 'serializable'

See #4658. Is this needed right now or can we defer it?

  • Maybe already solved in another branch but we still have conversion issues with wrong method getting pick-up, especially when the input parameter is not a local variable but directly instantiated when calling the method - oo/openedge/net/http/cookie_collection/test_method_to_cookie_array.p for instance, when passing a `new String` to the add method the conversion incorrectly pick the add_1 (Cookie) instead of the correct one (Object).

I'm working on this in #4350. I'm very far along but there is still work to go before I can check it in. Let me know if this is different from what you need.

#551 Updated by Marian Edu over 2 years ago

Greg Shah wrote:

  • SERIALIZABLE keyword should probably be used by conversion to make the class implement Serializable so we can later use for testing if (legacy) class is 'serializable'

See #4658. Is this needed right now or can we defer it?

As far as I can see the isSerializable is implemented now to check if class implement Serializable, the tests fails now but when solved in conversion all should be good so can be deferred.

  • Maybe already solved in another branch but we still have conversion issues with wrong method getting pick-up, especially when the input parameter is not a local variable but directly instantiated when calling the method - oo/openedge/net/http/cookie_collection/test_method_to_cookie_array.p for instance, when passing a `new String` to the add method the conversion incorrectly pick the add_1 (Cookie) instead of the correct one (Object).

I'm working on this in #4350. I'm very far along but there is still work to go before I can check it in. Let me know if this is different from what you need.

Looks like it, for now I've updated the 4GL code to use a local variable instead of passing the new object instance as parameter and this seems to make it pick-up the right method.

// this does not work, it picks a less generic method instead although there is none that takes a String as input
myMethod(new String("test")).

// using a local variable seems to help
define variable oVar as P.L.O.
oVar = new String("test").
myMethod(oVar).

#552 Updated by Marian Edu over 2 years ago

I see a bunch of unexpected errors being thrown when we ran all tests for OpenEdge.Core.Memptr, #1005 (Procedure xxx passed parameters to OpenEdge.Core.Memptr, which did not expect any.)

Funny thing is if we ran the tests that 'fails' individually then no error is being thrown, trying to debug it it comes from a 'cached' value in ControlFlowOps for '__lang_BaseObject_destructor__' which for whatever reason has the returnValue set to UNEXPECTED_PARAM. This happens in validArguments when caller has "Memptr" as instance, "__lang_BaseObject_destructor__" as methodName but modes is null and args is empty so afraid this doesn't make sense to me... anyone might know what we do wrong here? :(

#553 Updated by Constantin Asofiei over 2 years ago

What 3821c revision are you on? We had some issues with destructors which were not being called at all, fixed in ObjectOps with this history entry:

**     CA  20210804 Fixed a problem with caching available destructors - 'clsWithDtor' must have as key the 
**                  object's defining class paired with the destructor name (which may be from a super-class).

#554 Updated by Marian Edu over 2 years ago

Constantin Asofiei wrote:

What 3821c revision are you on? We had some issues with destructors which were not being called at all, fixed in ObjectOps with this history entry:
[...]

Nope, last history entry I see there is from 20210330.

The problem seems to be a destructor is being called although damn me, there is no 'destructor' (lang_BaseObject_destructor) at all in BaseObject :(

#555 Updated by Constantin Asofiei over 2 years ago

Please try this patch and see if anything changes:

=== modified file 'src/com/goldencode/p2j/util/ObjectOps.java'
--- old/src/com/goldencode/p2j/util/ObjectOps.java      2021-03-30 06:56:24 +0000
+++ new/src/com/goldencode/p2j/util/ObjectOps.java      2021-08-04 18:54:26 +0000
@@ -50,6 +50,8 @@
 **     CA  20210322 asResource(LegacyEnum) will always return an ObjectResource instance (and a resource ID
 **                  computed), so temp-table fields can refer enums. 
 **     ME  20210330 Added convenient increment/decrement methods for object references.
+**     CA  20210804 Fixed a problem with caching available destructors - 'clsWithDtor' must have as key the 
+**                  object's defining class paired with the destructor name (which may be from a super-class).
 */

 /*
@@ -2502,7 +2504,7 @@
       private Deque<Set<_BaseObject_>> pendingInitialized = new ArrayDeque<>();

       /** Indicate if a class has a destructor or not. */
-      private Map<Class<? extends _BaseObject_>, Boolean> clsWithDtor = new IdentityHashMap<>();
+      private Map<String, Boolean> clsWithDtor = new IdentityHashMap<>();

       /**
        * Initialize by registering this instance for scope notifications.
@@ -2709,11 +2711,12 @@
        */
       private boolean hasDestructor(Class<? extends _BaseObject_> cls, String dname)
       {
-         return clsWithDtor.computeIfAbsent(cls, (acls) -> 
+         String key = cls.getName() + "." + dname;
+         return clsWithDtor.computeIfAbsent(key, (k) -> 
          {
             try
             {
-               acls.getMethod(dname);
+               cls.getMethod(dname);
                return true;
             }
             catch (Throwable t)

#556 Updated by Marian Edu over 2 years ago

Argh, think we need to get to a newer revision as this might be the cause for more other errors we see because the object instances are not being deleted due to this issue (ObjectOps.delete leaves the reference set).

#557 Updated by Marian Edu over 2 years ago

Constantin Asofiei wrote:

Please try this patch and see if anything changes:

Better, thanks a bunch :)

#558 Updated by Greg Shah over 2 years ago

I think we've definitely made many fixes that may affect you. Let's go through the rebase + merge process and then get you a new 4384m branch. Any cleanup needed from testing can go there.

What do you think?

#559 Updated by Marian Edu over 2 years ago

Greg Shah wrote:

I think we've definitely made many fixes that may affect you. Let's go through the rebase + merge process and then get you a new 4384m branch. Any cleanup needed from testing can go there.

What do you think?

OK, 3821c is now on #12922... should I start merging with that and make a patch or wait for a new revision?

#560 Updated by Greg Shah over 2 years ago

It is safe to go ahead and make a patch using 12922. We'll merge that back quickly and get you a new branch.

#561 Updated by Marian Edu over 2 years ago

Greg Shah wrote:

It is safe to go ahead and make a patch using 12922. We'll merge that back quickly and get you a new branch.

Attached the patch to 4384l.

#562 Updated by Constantin Asofiei over 2 years ago

Marian, my only issue is that in oo.core.Assert you've replaced ObjectOps.load(Assert.class); with ObjectOps.load(AssertObject.class); - the ObjectOps.load at the beginning of a converted static OO method is required for the class to which the method belongs. Otherwise, if this is the very first usage of this legacy class, it will not be loaded by FWD.

OTOH, the legacy classes are always loaded by FWD runtime, if not already loaded, when a top-level block is executed, so is not really needed.

I've merged 4384l to 3821c rev 12934.

#563 Updated by Greg Shah over 2 years ago

Task branch 4384m has been created from 3821c revision 12935. This is available on xfer (/opt/fwd/4384m/).

#564 Updated by Greg Shah over 2 years ago

Marian: In 4384m, would you please resolve these javadoc errors.

[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/ByteBucket.java:225: warning - @param argument "defaultCapacity" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/ByteBucket.java:264: warning - @param argument "initialSize" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/ByteBucket.java:286: warning - @param argument "_p1" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/ByteBucket.java:286: warning - @param argument "_p2" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/ByteBucket.java:444: warning - @param argument "_size" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/ByteBucket.java:553: warning - @param argument "_size" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/ByteBucket.java:571: warning - @param argument "_pos" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/ByteBucket.java:571: warning - @param argument "_size" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/ByteBucket.java:591: warning - @param argument "_pos" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/ByteBucket.java:591: warning - @param argument "_size" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/ByteBucket.java:591: warning - @param argument "_targetCP" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/ByteBucket.java:747: warning - @param argument "data" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/ByteBucket.java:876: warning - @param argument "_data" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/ByteBucket.java:876: warning - @param argument "_targetCP" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/ByteBucket.java:974: warning - @param argument "pos" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/ByteBucket.java:974: warning - @param argument "len" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/ByteBucket.java:974: warning - @return tag cannot be used in method with void return type.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/core/util/ConfigBuilder.java:426: warning - @return tag has no arguments.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/json/JsonError.java:132: warning - @param argument "_msg" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/json/JsonError.java:132: warning - @param argument "_num" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/json/JsonParserError.java:137: warning - @param argument "_msg" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/json/JsonParserError.java:137: warning - @param argument "_num" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/json/objectmodel/JsonObject.java:1524: warning - @return tag cannot be used in method with void return type.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/json/objectmodel/JsonObject.java:1543: warning - @return tag cannot be used in method with void return type.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/json/objectmodel/JsonObject.java:1566: warning - @return tag cannot be used in method with void return type.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/logging/ISupportLogging.java:107: warning - @param argument "logger." is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/Uri.java:1695: warning - @param argument "_pData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/ContentTypeHeader.java:132: warning - @param argument "_name" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/ContentTypeHeader.java:151: warning - @param argument "_name" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/ContentTypeHeader.java:151: warning - @param argument "_val" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/ContentTypeHeader.java:169: warning - @param argument "_val" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/Cookie.java:416: warning - @param argument "_p1" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/HttpMessage.java:632: warning - @param argument "extp1" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/HttpMessage.java:690: warning - @param argument "extp1" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/auth/AuthenticationRequestFilter.java:414: warning - @param argument "poData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/auth/AuthenticationRequestFilter.java:430: warning - @param argument "pcData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/auth/AuthenticationRequestFilter.java:444: warning - @param argument "phData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/auth/AuthenticationRequestFilter.java:459: warning - @param argument "pcData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/auth/AuthenticationRequestFilter.java:474: warning - @param argument "pmData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/payload/BinaryBodyWriter.java:242: warning - @param argument "poData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/payload/FormDataBodyWriter.java:155: warning - @param argument "pcData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/payload/FormDataBodyWriter.java:180: warning - @param argument "poData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/payload/HtmlBodyWriter.java:162: warning - @param argument "poData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/payload/JsonBodyWriter.java:235: warning - @param argument "_pData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/payload/JsonEntityWriter.java:346: warning - @param argument "poData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/payload/JsonEntityWriter.java:480: warning - @param argument "poError" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/payload/MessageWriter.java:142: warning - @param argument "poLogger" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/payload/MessageWriter.java:193: warning - @param argument "poEntity" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/payload/MultipartBodyWriter.java:206: warning - @param argument "poData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/payload/MultipartEntityWriter.java:138: warning - @param argument "boundary" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/payload/MultipartEntityWriter.java:192: warning - @param argument "poData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/payload/MultipartEntityWriter.java:237: warning - @param argument "ptr" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/payload/StringEntityWriter.java:275: warning - @param argument "poData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/payload/XmlBodyWriter.java:318: warning - @param argument "poData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/payload/XmlEntityWriter.java:297: warning - @param argument "poData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/status/AuthorizationStatusFilter.java:171: warning - @param argument "poData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/status/AuthorizationStatusFilter.java:197: warning - @param argument "pcData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/status/AuthorizationStatusFilter.java:218: warning - @param argument "phData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/status/AuthorizationStatusFilter.java:233: warning - @param argument "pcData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/status/AuthorizationStatusFilter.java:254: warning - @param argument "pmData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/status/RedirectStatusFilter.java:136: warning - @param argument "poMessage" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/status/RedirectStatusFilter.java:177: warning - @param argument "poData" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/status/RedirectStatusFilter.java:361: warning - @param argument "logger." is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/writer/BodyWriterBuilder.java:118: warning - @param argument "poPart" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/writer/BodyWriterBuilder.java:167: warning - @param argument "poMessage" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/writer/BodyWriterBuilder.java:215: warning - @param argument "pcContentType" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/writer/EntityWriterBuilder.java:120: warning - @param argument "poPart" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/writer/EntityWriterBuilder.java:154: warning - @param argument "poMessage" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/writer/EntityWriterBuilder.java:188: warning - @param argument "pcContentType" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/writer/MessageWriterBuilder.java:279: warning - @param argument "poMessage" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/writer/MessageWriterBuilder.java:279: warning - @param argument "poRegistry" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/writer/MessageWriterBuilder.java:314: warning - @param argument "poRegistry" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/writer/MessageWriterBuilder.java:356: warning - @param argument "poEntity" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/writer/SetHeaderMessageWriterBuilder.java:174: warning - @param argument "poMessage" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/writer/SetHeaderMessageWriterBuilder.java:174: warning - @param argument "poHeader" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/net/http/filter/writer/VoidMessageWriterBuilder.java:138: warning - @param argument "poRegistry" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/web/RemoteWebRequest.java:677: warning - @param argument "poHeaders" is not a parameter name.
[ant:javadoc] ...3821c/src/com/goldencode/p2j/oo/web/RemoteWebRequest.java:1316: warning - @param argument "poCookies" is not a parameter name.

#565 Updated by Marian Edu over 2 years ago

Greg Shah wrote:

Marian: In 4384m, would you please resolve these javadoc errors.

[...]

Greg, we can certainly do that only that seemed the norm since we've started... the parameter name always starts with an underscore and then a local variable is made using initInput (unless another method is being called directly). It might look odd to see a parameter name like that in javadoc but we just go ahead and fix the warnings.

#566 Updated by Greg Shah over 2 years ago

Vladimir on our team has resolved the javadoc errors in 3821c rev 12945. You don't need to do this in 4384m.

#567 Updated by Marian Edu over 2 years ago

Greg Shah wrote:

Vladimir on our team has resolved the javadoc errors in 3821c rev 12945. You don't need to do this in 4384m.

OK then, I've reverted my changes just to avoid potential conflicts later on.

#568 Updated by Marian Edu over 2 years ago

I'm getting an error when trying to start the server after last merge:

Invalid value "en_US_iso88591_fwd_basic" for parameter "collation"; SQL statement:
set collation "en_US_iso88591_fwd_basic"

Something that we need to update in an xml config file or something else?

#569 Updated by Constantin Asofiei over 2 years ago

You are using H2, right? Copy the build/lib/fwdspi.jar to the JRE's ext folder and delete the previous p2jspi.jar.

#570 Updated by Marian Edu over 2 years ago

Marian Edu wrote:

I'm getting an error when trying to start the server after last merge:
[...]

Something that we need to update in an xml config file or something else?

That was thrown for "_temp" database so adding a new node entry for it seems to have solved the issue, at least the server starts now.

<node class="container" name="_temp">
   <node class="container" name="p2j">
      <node class="string" name="embedded-collation">
         <node-attribute name="value" value="en_US_P2J"/>
      </node>
   </node>
</node>

#571 Updated by Greg Shah over 2 years ago

Ovidiu: Please apply the changes needed to work with fwdspi.jar in the new testcases project.

#572 Updated by Marian Edu over 2 years ago

Also after conversion now all using Progress.Lang.*. statements gets converted to import com.goldencode.testcases.oo.progress.lang.*;... it should probably be just import com.goldencode.p2j.oo.lang.*; instead.

#573 Updated by Greg Shah over 2 years ago

all using Progress.Lang.*. statements gets converted to import com.goldencode.testcases.oo.progress.lang.*;

A simple testcase does not recreate the issue:

using progress.lang.*.

def var o as object.
o = new object().

message o.

Can you point me to a testcase that recreates this?

#574 Updated by Ovidiu Maxiniuc over 2 years ago

Greg Shah wrote:

Ovidiu: Please apply the changes needed to work with fwdspi.jar in the new testcases project.

Done. Committed revision 1130.

#575 Updated by Marian Edu over 2 years ago

Greg Shah wrote:

all using Progress.Lang.*. statements gets converted to import com.goldencode.testcases.oo.progress.lang.*;

A simple testcase does not recreate the issue:

[...]

Can you point me to a testcase that recreates this?

I was converting everything from oo/openedge/core, for instance oo/openedge/core/collections/CloneableString.cls had that wrong import after conversion.

After updating to rev #1130 and running the conversion gain those nasty imports went away, looks like 'organize imports' was applied so only the imports actually used are being kept. Something from build.xml probably cause the shell scripts to start the server most probably have nothing to do with conversion. Anyway, it's working now.

#576 Updated by Greg Shah over 2 years ago

I can't reproduce it with oo/openedge/core/collections/CloneableString.cls either. If you see this again, let us know.

#577 Updated by Marian Edu over 2 years ago

Probably not that important but thought to mention it as deviation anyway.

When chaining method/properties access on an invalid object in 4GL there are two errors being throw, beside the #3135 (invalid object) that is being thrown by FWD (when accessing the object's ref)there is also the #10068 (lead attributes in a chained-attribute expression must be type handle or a user defined type and valid).

DEF VAR o AS OpenEdge.Core.String.

o:Clone():ToString() NO-ERROR.
MESSAGE error-status:NUM-MESSAGES SKIP error-status:GET-MESSAGE(1)
SKIP error-status:GET-MESSAGE(2)VIEW-AS ALERT-BOX.

#578 Updated by Greg Shah over 2 years ago

  • Related to Bug #5691: deviation in error generation for invalid method/property chaining added

#579 Updated by Greg Shah over 2 years ago

Probably not that important but thought to mention it as deviation anyway.

Recorded as a separate bug #5691.

#580 Updated by Greg Shah over 2 years ago

  • Related to Feature #5729: implement polymorphic reflection support for properties and variables added

#581 Updated by Marian Edu about 2 years ago

  • Assignee changed from Mihai Popescu-Tiganea to Marian Edu

#583 Updated by Marian Edu about 2 years ago

Attached the patch to merge changes in 4384m branch back into 3821c. There are changes in antlr grammar and rules to add a generic _BDT_ poly data type, this can be used in Progress internal classes that can take any parameter (primitive or object) - otherwise this is not possible in 4GL.

Other than that there are some fixes for variable definition inside method blocks.

#584 Updated by Marian Edu about 2 years ago

Marian Edu wrote:

Attached the patch to merge changes in 4384m branch back into 3821c. There are changes in antlr grammar and rules to add a generic _BDT_ poly data type, this can be used in Progress internal classes that can take any parameter (primitive or object) - otherwise this is not possible in 4GL.

Other than that there are some fixes for variable definition inside method blocks.

Fixed one issue from #6056 in new patch.

#585 Updated by Greg Shah about 2 years ago

I don't see any changes in the patch for progress.g.

#586 Updated by Marian Edu about 2 years ago

Greg Shah wrote:

I don't see any changes in the patch for progress.g.

Still, there should be some starting at line 3108 in the patch file... mind you the patch (send) was done against current 3281c revision on xref. The changes there are adding support for package private/protected visibility and the 'poly' data type.

#587 Updated by Greg Shah about 2 years ago

Code Review 3821c.4384m.patch

I've applied the change to a local branch. Some thoughts:

1. In literals.rules line 400, the addition of or classname.equals("Object") seems like it can never be true. The or classname.equals("BaseDataType") code on line 393 should already exclude this case.

2. In progress.g, please mark the new KW_POLY token and the new Keyword(... KW_POLY, ...) with this comment: // FWD extension, not real 4GL!.

3. In progress.g, we keep all keywords to KW_ + up to 8 characters. This means KW_PK_PROTECTD should be something like KW_PKG_PROT and KW_PK_PRIVATE should be something like KW_PKG_PRIV.

4. In progress.g, the new Keyword("_BDT_" , 0, KW_POLY , false), should be located at the top of the keyword list since we alphabetize by the keyword itself, not the KW_ token type. In addition:

  • "_BDT_" should be specified in the lowercase "_bdt_"
  • I find it a little confusing that KW_POLY is not "poly" or "polymorphic" but is "_bdt_".

5. Several of the OO builtins are missing a history entry.

#588 Updated by Marian Edu about 2 years ago

Greg Shah wrote:

Code Review 3821c.4384m.patch

I've applied the change to a local branch. Some thoughts:

1. In literals.rules line 400, the addition of or classname.equals("Object") seems like it can never be true. The or classname.equals("BaseDataType") code on line 393 should already exclude this case.

I think you're right, that was used before the new 'poly' virtual data type was added... I will take it out, see no reason for it either.

2. In progress.g, please mark the new KW_POLY token and the new Keyword(... KW_POLY, ...) with this comment: // FWD extension, not real 4GL!.

Will do.

3. In progress.g, we keep all keywords to KW_ + up to 8 characters. This means KW_PK_PROTECTD should be something like KW_PKG_PROT and KW_PK_PRIVATE should be something like KW_PKG_PRIV.

Understood.

4. In progress.g, the new Keyword("_BDT_" , 0, KW_POLY , false), should be located at the top of the keyword list since we alphabetize by the keyword itself, not the KW_ token type. In addition:

  • "_BDT_" should be specified in the lowercase "_bdt_"
  • I find it a little confusing that KW_POLY is not "poly" or "polymorphic" but is "_bdt_".

"poly" or "polymorphic" can be a valid 4GL class name, used the underscore to make sure isn't valid 4GL data type... it might well have been "_poly_", thought base data type could work too :(

5. Several of the OO builtins are missing a history entry.

Will look over those, might have been skip when merging when there were conflicts especially in the file header.

#589 Updated by Greg Shah about 2 years ago

  • I find it a little confusing that KW_POLY is not "poly" or "polymorphic" but is "_bdt_".

"poly" or "polymorphic" can be a valid 4GL class name, used the underscore to make sure isn't valid 4GL data type... it might well have been "_poly_", thought base data type could work too :(

You aren't wrong that _bdt_ makes sense to anyone working with the internals of FWD. It is a good point about polymorphic being a valid 4GL class name. Go ahead with _bdt_.

#590 Updated by Marian Edu about 2 years ago

Fixed issues as per-review, attached the new patch.

#591 Updated by Constantin Asofiei about 2 years ago

Marian, review about the patch:
  • ObjectModelParser,HttpClient,BodyWriterBuilder - they have no actual change, only the header added. is there something missing?
  • I see you've fixed several cases where object var = ObjectOps.newInstance was used within the block, to define a legacy var and assign it as var.assign(ObjectOps.newInstance). I think there are a few more places where this needs to be fixed (like StringKeyedMap, RequestBuilder and maybe more). Please do a Java method reference search for com.goldencode.p2j.util.ObjectOps.newInstance in Eclipse and see if there is any other place which needs fixing. This can be a low priority.
  • what was the intent to fix with the _bdt_ changes? Is it the support for legacy reflection via LegacyMethod and such?

#592 Updated by Greg Shah about 2 years ago

Fixed issues as per-review, attached the new patch.

No objections.

#593 Updated by Marian Edu about 2 years ago

Constantin Asofiei wrote:

Marian, review about the patch:
  • ObjectModelParser,HttpClient,BodyWriterBuilder - they have no actual change, only the header added. is there something missing?

I've removed those, think you've already did some fixes for variable definition outside of the block so the merge was merely keeping my pointless header comment :(

  • I see you've fixed several cases where object var = ObjectOps.newInstance was used within the block, to define a legacy var and assign it as var.assign(ObjectOps.newInstance). I think there are a few more places where this needs to be fixed (like StringKeyedMap, RequestBuilder and maybe more). Please do a Java method reference search for com.goldencode.p2j.util.ObjectOps.newInstance in Eclipse and see if there is any other place which needs fixing. This can be a low priority.

We've only seen issued with variables that were used as output (return or output parameter), will try to go over the code and fix the rest that are only used internally if you think this could make a difference.

  • what was the intent to fix with the _bdt_ changes? Is it the support for legacy reflection via LegacyMethod and such?

Yes, this is the equivalent of Java's object for cases where 4GL actually accepts anything - primitive or object. This avoid the need of multiple overrides in skeleton source code, this is also the place where the _bdt_ data type will ever be used (normally ony in Progress "internal" package).

#594 Updated by Greg Shah about 2 years ago

Marian: I've thought about the _bdt_ vs KW_POLY some more. Please change all references to _bdt_ to _polymorphic_. I think this is more consistent and should be less likely to conflict with a valid class name.

#595 Updated by Marian Edu about 2 years ago

Greg Shah wrote:

Marian: I've thought about the _bdt_ vs KW_POLY some more. Please change all references to _bdt_ to _polymorphic_. I think this is more consistent and should be less likely to conflict with a valid class name.

Will do, the skeleton must be updated as well... will prepare a patch for it.

#596 Updated by Marian Edu about 2 years ago

Attached the patch to merge remaining changes in 4384 back in 3821c, will make a patch for skeleton after that. I was trying to convert some classes from 'skeleton' but it looks like that is not possible, at least not anymore as I'm sure we've ran conversions on some of those during work on OO implementation - it now gives an error related to the basepath in rel_pkg_path:

EXPRESSION EXECUTION ERROR:
---------------------------
throwException(err)
^  { Invalid basepath! basepath = .; pkg = skeleton/oo4gl/Progress/Lang; [BLOCK id <6176162971649> 0:0] }
---------------------------
EXPRESSION EXECUTION ERROR:
---------------------------
relpkg = execLib("rel_pkg_path")
         ^  { Expression execution error @1:1 }

Is there a way to get around this? Not sure if we've converted files right from the 'skeleton' folder or we generated those files using reflection in oo/skeleton and then converted from there but that was how we've done it when new methods/properties had to be added.

#597 Updated by Constantin Asofiei about 2 years ago

There are some regressions in the patch:
  • invoke is emitted instead of invokeStandalone - this is required as OE 'knows' if the OO call is supposed to be on the right-side of the assignment (i.e. it's mandatory to return something)
  • a POLY invocation used as an argument to another OO call, function, etc, must be emitted as invoked dynamically. Otherwise, as the conversion can't cast the OO call's return type, it will fail at java compile.

I'm looking how to fix these.

#598 Updated by Constantin Asofiei about 2 years ago

Some changes in ExpressionConversionWorker and ClassDefinition, which were explicitly marking 'invoke' methods as POLY need to be kept until the skeleton changes are in place. Look for this comment:

// TODO: once the sekeletons are updated to use POLY keyword for return type, remove this

I'm reconverting and will commit tomorrow if everything is OK.

#599 Updated by Marian Edu about 2 years ago

Constantin Asofiei wrote:

Some changes in ExpressionConversionWorker and ClassDefinition, which were explicitly marking 'invoke' methods as POLY need to be kept until the skeleton changes are in place. Look for this comment:

Please find attached skeleton patch.

#600 Updated by Constantin Asofiei about 2 years ago

I've committed the patch with the changes in #4384-598 to 3821c/13613.

Next I'll test the skeleton patch without the changes in #4384-598 and if is OK, will commit them.

#601 Updated by Constantin Asofiei about 2 years ago

The final changes for 4384m are in 3821c/13617 and the skeleton patch is in rev 103

All projects must be reconverted fully, using skeleton revision 103.

#602 Updated by Greg Shah about 2 years ago

  • Status changed from WIP to Closed

Marian: Please document the final status of this task in the format of #4384-462.

#603 Updated by Marian Edu about 2 years ago

Greg Shah wrote:

Marian: Please document the final status of this task in the format of #4384-462.

I'm having issues getting the tests to run, I get a stack overflow error when an error is thrown. That happens in
ErrorManager.recordForLegacyThrow, if there was already an error thrown in the WorkArea (that is saved in wa.legacyError) then the new error message is supposed to be added to that one only that the SysError isn't valid. The reference is set so it's just a context issue, shouldn't errors be 'untracked' so always valid if the reference is set?

#604 Updated by Constantin Asofiei about 2 years ago

Marian Edu wrote:

Greg Shah wrote:

Marian: Please document the final status of this task in the format of #4384-462.

I'm having issues getting the tests to run, I get a stack overflow error when an error is thrown. That happens in
ErrorManager.recordForLegacyThrow, if there was already an error thrown in the WorkArea (that is saved in wa.legacyError) then the new error message is supposed to be added to that one only that the SysError isn't valid. The reference is set so it's just a context issue, shouldn't errors be 'untracked' so always valid if the reference is set?

Please point me to a test which shows this.

#605 Updated by Marian Edu about 2 years ago

Constantin Asofiei wrote:

Please point me to a test which shows this.

oo/json/array/get_date.p

making LegacyError untracked solves the stack overflow error but maybe it's to drastic and you can handle that more nicely, the error is a system error thrown during data conversion (invalid date).

#606 Updated by Constantin Asofiei about 2 years ago

Marian, the root cause is that there is a catch (Exception) in some p2j.oo code. This will catch a ConditionException and raise another one. But this is not correct, you can't consume ConditionException's.

For example, for the get_date.p program, the solution is to catch and re-throw the ConditionException. If you change the log-err-obj code to see the class of the caught exception in OE, you will see that in this case (parsing 2020-15-15 date) it is a SysError exception being caught, and not a JsonError.

### Eclipse Workspace Patch 1.0
#P p2j
Index: src/com/goldencode/p2j/oo/json/objectmodel/JsonArray.java
===================================================================
--- src/com/goldencode/p2j/oo/json/objectmodel/JsonArray.java    (revision 3391)
+++ src/com/goldencode/p2j/oo/json/objectmodel/JsonArray.java    (working copy)
@@ -3320,7 +3320,11 @@
       {
          res = converter.apply(val);
       }
-      catch(Exception ex)
+      catch (ConditionException ce)
+      {
+         throw ce;
+      }
+      catch (Exception ex)
       {
          log.log(Level.WARNING, "", ex);
          returnError(ObjectOps.newInstance(JsonError.class));

These are all the occurrences of catch (Exception) I found in the p2j.oo code. Please review them and fix them as mentioned above.

com.goldencode.p2j.oo.io.FileInputStream._checkOpen()
com.goldencode.p2j.oo.json.objectmodel.JsonArray.addNumber(integer, character[])
   getElementImpl(integer, String, int, Function<Object, BaseDataType>, Supplier<BaseDataType>)
   setNumber(integer, character)
com.goldencode.p2j.oo.json.objectmodel.JsonArray.JsonConstruct.write(character, logical, character)
   write(handle, logical, character)
   write(longchar, logical, character)
   write(memptr, logical, character)
   writeFile(character, logical, character)
   writeStream(character, logical, character)
com.goldencode.p2j.oo.json.objectmodel.JsonObject.getPropertyImpl(character, String, int, Function<Object, BaseDataType>, Supplier<BaseDataType>)
com.goldencode.p2j.oo.json.objectmodel.ObjectModelParser.parse(character)
   parse(handle)
   parse(longchar)
   parse(memptr)
   parseFile(character)
com.goldencode.p2j.oo.net.http.Cookie.parse(character)
com.goldencode.p2j.oo.net.http.lib.sockets.LegacySocketLibrary.execute(object<? extends IhttpRequest>, object<? extends IhttpResponse>)
com.goldencode.p2j.oo.web.RemoteWebRequest.getEntity()
com.goldencode.p2j.oo.web.WebResponseWriter.flush()
   write(character)
   write(longchar)
   write(memptr, int64, int64)

BTW, get_date.p can't complete in OE, it stops with some exception being thrown, even if I comment out the two lines with invalid date.

#607 Updated by Marian Edu about 2 years ago

Constantin Asofiei wrote:

Marian, the root cause is that there is a catch (Exception) in some p2j.oo code. This will catch a ConditionException and raise another one. But this is not correct, you can't consume ConditionException's.

You're right, the conversion errors should be thrown as-is so there is really no need to have a catch block there. Maybe the code in ErrorManager.recordForLegacyThrow could be updated to handle situation like this and avoid stack overflow, making a note in the log would be a nicer approach although fail-first works all the time as well :)

These are all the occurrences of catch (Exception) I found in the p2j.oo code. Please review them and fix them as mentioned above.

Will do, maybe some of those are needed... have to run some tests and see if a fix is needed, catch&throw looks odd :(

BTW, get_date.p can't complete in OE, it stops with some exception being thrown, even if I comment out the two lines with invalid date.

Yes, probably a wrong commit with one last call made without no-error :(

#608 Updated by Marian Edu almost 2 years ago

Attached a skeleton patch for Progress.Security classes.

#609 Updated by Greg Shah almost 2 years ago

Constantin: Please apply the patch to the skeleton project and push to xfer and proj.goldencode.com (see Object-Oriented Skeleton Classes).

#610 Updated by Constantin Asofiei almost 2 years ago

Greg Shah wrote:

Constantin: Please apply the patch to the skeleton project and push to xfer and proj.goldencode.com (see Object-Oriented Skeleton Classes).

Done, skeleton rev 104.

#611 Updated by Igor Skornyakov almost 2 years ago

Constantin Asofiei wrote:

Greg Shah wrote:

Constantin: Please apply the patch to the skeleton project and push to xfer and proj.goldencode.com (see Object-Oriented Skeleton Classes).

Done, skeleton rev 104.

Plase note that 4GL programs using these 4GL classes will be converted with this patch but the Java code will not compile because of the missing classes. I'm not sure how urgent is to provide at least formal stubs.

#612 Updated by Greg Shah almost 2 years ago

Igor Skornyakov wrote:

Constantin Asofiei wrote:

Greg Shah wrote:

Constantin: Please apply the patch to the skeleton project and push to xfer and proj.goldencode.com (see Object-Oriented Skeleton Classes).

Done, skeleton rev 104.

Plase note that 4GL programs using these 4GL classes will be converted with this patch but the Java code will not compile because of the missing classes. I'm not sure how urgent is to provide at least formal stubs.

If it is required for your current work, then please add the stubs.

#613 Updated by Igor Skornyakov almost 2 years ago

Greg Shah wrote:

If it is required for your current work, then please add the stubs.

So far I have several dozens of tests that do not require this to work with. After I will finish with them I will add the stubs.

#614 Updated by Eugenie Lyzenko almost 2 years ago

Igor Skornyakov wrote:

Constantin Asofiei wrote:

Greg Shah wrote:

Constantin: Please apply the patch to the skeleton project and push to xfer and proj.goldencode.com (see Object-Oriented Skeleton Classes).

Done, skeleton rev 104.

Plase note that 4GL programs using these 4GL classes will be converted with this patch but the Java code will not compile because of the missing classes. I'm not sure how urgent is to provide at least formal stubs.

Igor,

The question. If I update to this version for big customer project, and convert it the generated Java code will not be compiled, right?

In this case I have to avoid update at this time.

#615 Updated by Constantin Asofiei almost 2 years ago

The question. If I update to this version for big customer project, and convert it the generated Java code will not be compiled, right?

You can convert safely any customer project, the update to the skeleton project just adds a few more classes, there is no change to the existing code. No customer project is using (yet) these classes.

#616 Updated by Eugenie Lyzenko almost 2 years ago

Constantin Asofiei wrote:

The question. If I update to this version for big customer project, and convert it the generated Java code will not be compiled, right?

You can convert safely any customer project, the update to the skeleton project just adds a few more classes, there is no change to the existing code. No customer project is using (yet) these classes.

So the converted code will be successfully compiled?

#617 Updated by Constantin Asofiei almost 2 years ago

Eugenie Lyzenko wrote:

Constantin Asofiei wrote:

The question. If I update to this version for big customer project, and convert it the generated Java code will not be compiled, right?

You can convert safely any customer project, the update to the skeleton project just adds a few more classes, there is no change to the existing code. No customer project is using (yet) these classes.

So the converted code will be successfully compiled?

Yes.

#618 Updated by Eugenie Lyzenko almost 2 years ago

Constantin Asofiei wrote:

Eugenie Lyzenko wrote:

Constantin Asofiei wrote:

The question. If I update to this version for big customer project, and convert it the generated Java code will not be compiled, right?

You can convert safely any customer project, the update to the skeleton project just adds a few more classes, there is no change to the existing code. No customer project is using (yet) these classes.

So the converted code will be successfully compiled?

Yes.

Not sure if it is related or not but now we have regression in compiling the converted code. Please see the respective task record.

#619 Updated by Galya B 15 days ago

  • Related to Bug #8383: Some JsonObject methods create a LOG-MANAGER record in silent added

Also available in: Atom PDF