Project

General

Profile

Embedded Hotel Demo

Added by John Speak almost 6 years ago

Hi, I'm trying to get the demo running and hit issues on my Windows environment with the embedded mode (Swing GUI works fine), but I get invalid password and cannot start the embedded server there, I checked and my JRE path matches the solution provided on one of the other issues I found when searching for this error.

I then decided to give the pre-built image a try to compare the configs to see what I might be doing wrong, but even on that, I get the same error from ./start_embeddedserver.sh as I get from start_embedded_server.cmd on my windows box:

c:\projects\hotel\embedded\run>start_embedded_server.cmd

Configuration
---------------------------------------------
p2jhost = localhost
p2jport = -1
p2jks = null
p2jksalias = null
p2jkspw = null
p2jkepw = null
p2jts = null
p2jtsalias = null
p2jtspw = null
webport = 8080
webks = null
webksalias = null
webkspw = null
webkepw = null

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/projects/hotel/p2j/build/lib/slf4j-jdk14-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/projects/hotel/p2j/build/lib/slf4j-simple-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/projects/hotel/embedded/build/lib/slf4j-jdk14-1.6.1.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.JDK14LoggerFactory]
Aug 02, 2018 11:02:10 AM org.eclipse.jetty.util.log.Log initialized
INFO: Logging initialized @5027ms
KeyStore load failure (NULL_FILENAME).

If I run ./embedded_server_cfg_launch.sh then localhost:8443 then it starts serving pages but trying to login as hotel/hotel or fwd/fwd I just get:

"Could not connect to the FWD server!"

After seeing the null values, I tried to search for the documentation and within the embedded folder found a readme to do setting a certificate (figured that was only for publishing to a full website which I don't really need for localhost testing) but at this point I am struggling.

I don't know where this is referring to since I don't have a security/accounts/processes folder (in explorer/file manager or eclipse). I'm brand new to the technologies involved here and I'm not super linux savvy so apologies in advance if this is 'implicit knowledge' or if I've somehow skipped over an instruction when trying to follow along with the tutorial documentation. This is the bit I can't work out:

There must be a process account in the directory that represents the application making a
connection to the P2J server. Added the account to the directory (in /security/accounts/processes/):

<node class="process" name="P2J_PROCESS_ACCOUNT_NAME">
<node-attribute name="enabled" value="TRUE"/>
<node-attribute name="description" value="My Description"/>
<node-attribute name="master" value="FALSE"/>
<node-attribute name="server" value="FALSE"/>
<node-attribute name="alias" value="P2J_PROCESS_ACCOUNT_NAME"/>
</node>
Substitute a proper account name in for P2J_PROCESS_ACCOUNT_NAME.

I haven't done any of the steps in this document.

Is I load the .vmi and want to run the embedded website what steps would you recommend out of the box? I figure I can then reverse engineer that into my windows environment once I have a working environment (I want it to work with windows ultimately)

Thanks in advance!


Replies (9)

RE: Embedded Hotel Demo - Added by Constantin Asofiei almost 6 years ago

Hello John,

You don't need to reconfigure any web certificates - these are already configured in the downloaded Hotel GUI project.

Some questions:
  1. the start_embedded_server.cmd should have all the settings set - if you edit it, you should see lines like -p2jkspw Ks70hcwSAU01#YmL*_LTz7LH0SUKKl5K2!yb. So, what Windows OS version are you using? There might be a problem on how Windows runs this file.
  2. have you ran prepare_hotel.cmd prior to project conversion? After you run this, everything should be configured, without you having to edit any file. As a side note, when you read There must be a process account in the directory or paths like /security/accounts/processes/, these refer to the deploy/server/directory.xml file; but you shouldn't need to make manual edits for the Hotel GUI demo.
  3. you mention you get "Could not connect to the FWD server!" when you run the .sh file - did you start the FWD server to, beside the embedded web server (you need to start the FWD server to use the any of the FWD Web clients - Embedded or Virtual Desktop).
To summarize, if you already have the converted Hotel GUI, please try the following commands:
  • prepare_hotel.cmd - to configure the Hotel GUI app
  • install_spawner.cmd - this creates some files necessary for the FWD Web clients
  • start the FWD server - go to deploy\server and run server.cmd
  • start the embedded web server
    - go to embedded\ folder and run ant all
    - go to embedded\run and execute embedded_server_cfg_launch.sh (as this one looks like it works for you)
  • import the root CA into your browser.
  • try the FWD Virtual Desktop client - go to https://localhost:7443/gui, enter your Windows OS username/password, and after that it should get you to the Hotel GUI app.
  • try the FWD Embedded Web client - go to https://localhost:8443 and use hotel/hotel as username/password to login in Hotel GUI

RE: Embedded Hotel Demo - Added by John Speak almost 6 years ago

The first point isn't true in my windows environment, even after following your summary. I did however get it to run in the ubuntu image environment, so thank you so for your help! I think I'm going to try re-run my setup on another windows box now I've had a first run through and see if I can get it running there and in parallel use the ubuntu box to play with the conversion piece of the puzzle now. I appreciate your very quick reply (& sorry for my slow one!).

RE: Embedded Hotel Demo - Added by Constantin Asofiei almost 6 years ago

John Speak wrote:

The first point isn't true in my windows environment, even after following your summary.

John, you need to use embedded_server_cfg_launch.cmd and not start_embedded_server.cmd, as embedded_server_cfg_launch.cmd (and .sh) contains all the needed certificate setup. Don't know how I missed this.

RE: Embedded Hotel Demo - Added by John Speak over 5 years ago

I set up a new VM and got this working, I think it was a mix of the JRE path and SPI files combined with my VM's user not having a password set before running the prepare command. Now I'm up and running in windows which is great!

I did a quick test, one of the main reasons for trying fwd was to get the benefits of a Web UI layer on top of some legacy progress code without an entire rewrite from scratch.

One of the key benefits I could see was doing some selenium test scripts (we've been hitting some limitations with TestComplete, e.g cost + time to develop).

In the Demo Hotel app, the entire progress application can't be interacted with from my quick record and playback test.

I haven't gotten around to pushing my own .r code into it yet as I wanted to see how it coped on the demo project before spending too much effort.

Is what I am facing with selenium a known limitation that you're aware of?

RE: Embedded Hotel Demo - Added by Greg Shah over 5 years ago

I did a quick test, one of the main reasons for trying fwd was to get the benefits of a Web UI layer on top of some legacy progress code without an entire rewrite from scratch.

This makes sense. We have many customers with this same interest. Most large 4GL applications have thousands of screens. The PSC modernization approach is all manual. Splitting the UI from the business logic and then writing a new replacement front end is impractical for any non-trivial application.

Our idea is to use automation to shift the existing GUI into web and then to evolve it into a first class web UI by:

  • Upgrading the existing 4GL widgets with an enhanced mode that takes a modern approach. Setting a flag in the runtime configuration can switch all widgets in the entire application into that enhanced mode. See #3261 for our work on enhanced browse. An early version of this is included in FWD v3.2 which was just released. We will be implementing enhancements for all existing widgets but decided to start with browse since it is so important to existing GUI applications.
  • Add new 4GL widgets (that don't exist in OpenEdge) to enable new forms of interaction. Tree controls, tabs, toolbars, 2D graphics, data visualization and others are being planned. New 4GL syntax will allow the existing application to be easily enhanced to use these, but of course they will only work in FWD, not in OpenEdge.
  • Leverage our theming support to plug in a modern look and feel. Right now we are working on that in #3684 where we are basing the approach on Material Design which is a very modern web look.
  • Implement true dynamic layout so that the absolute positioning/fixed size 4GL approach is eliminated. Some of this can be done automatically and some will be through 4GL syntax enhancements. We will implement media queries and the ability to choose layouts for frames and windows so that they respond properly based on the device being used. For example, on a wide desktop screen a frame might display in multiple columns but on a tall narrow phone screen the same frame should display as a single column. This is being worked right now in #3269.

We don't think the Progress approach (of throwing away your existing GUI screens) makes any sense. With FWD all the screens survive and migrate to the web. Then the high value screens (a small percentage of the overall number of screens) can be evolved and enhanced while the majority of the screens (low value) don't need to be touched. We call this the problem of the long tail:

The screens on the left (green part) are high value and so work on those will be a good investment. The screens in the long tail (yellow/right side) are rarely used and any time spent on rewriting those is just a pure waste. Our idea is to enable focus on the high value while not losing the screens in the long tail.

One of the key benefits I could see was doing some selenium test scripts (we've been hitting some limitations with TestComplete, e.g cost + time to develop).

In the Demo Hotel app, the entire progress application can't be interacted with from my quick record and playback test.

...

Is what I am facing with selenium a known limitation that you're aware of?

Yes, it is currently not going to work. We have considered an approach where we implement a Selenium plugin that has direct hooks into our runtime to allow it to drive input and capture output. This will require some development work, but the result will be very good.

I haven't gotten around to pushing my own .r code into it yet as I wanted to see how it coped on the demo project before spending too much effort.

I will post tomorrow with some more thoughts in regard to this. I think it is important to shift to FWD v3.2 because we've made many improvements to the GUI support and more. Please note that we don't run .r code directly. We convert from 4GL source code and the result compiles and runs.

For any non-trivial amount of code, it is highly recommended to go through an assessment. It will save quite a bit of time. I will explain more tomorrow.

long_tail.png (21.9 KB)

RE: Embedded Hotel Demo - Added by Greg Shah over 5 years ago

Before you get deep into the process of trying your own 4GL code, I recommend reading the Understanding Conversion Projects chapter of our Conversion Handbook.

The sections on Assessments and on Proof of Concept are especially useful for understanding the best way to go about the early parts of a conversion project. Following this guidance can save you a great deal of time.

The rest of the Conversion Handbook provides more detail on the specifics of getting code parsed, converted and compiled.

RE: Embedded Hotel Demo - Added by John Speak over 5 years ago

Thanks for all the info, I guess the answer to no on the selenium pretty much kiboshes this whole thing for me, since that was my primary driver. Should have asked before I spent time getting the environment set up 😭. Never mind, if you ever add this support please let me know. Back to the drawing board looking into other options for better automated test options for OpenEdge than testcompletr I guess!

RE: Embedded Hotel Demo - Added by Greg Shah over 5 years ago

Don't lose hope just yet. Adding support for this is a good option and we have thought about it in some detail. Tomorrow I will document details of our test automation plan.

RE: Embedded Hotel Demo - Added by Greg Shah over 5 years ago

In regard to testing with Selenium, I'd like to point you to the following:

1. We have previously done an extensive amount of work with automated testing. We built the Automated Test Harness to support testing of ChUI 4GL applications specifically because there were no suitable tools for that purpose. I'm not suggesting that you would use the Harness (though it is open source and thus available to you). Rather, I'm just highlighting that we know quite a bit on this topic and have implemented some useful technology already. We use this today for automated testing of FWD.

2. We have plans to implement a driver for Selenium that will enable full automated testing of converted 4GL GUI in the web. The details are documented in #3704. I think this is exactly what you were looking for. Hopefully the details there explain why it is not currently working.

It is trivial to add the #3704 work into a conversion project where Golden Code works with your company on moving your application to web. With all the benefits of moving off of OpenEdge (massive cost savings, technical advantages, database choice, full web UI...) there are substantial reasons for you to work with FWD. We will enable the automated testing as part of any such project.

    (1-9/9)