Project

General

Profile

Support #9730

Run hotel_gui in Windows 11

Added by Lorian Sandu over 1 year ago. Updated over 1 year ago.

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

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:

History

#1 Updated by Lorian Sandu over 1 year ago

I am trying to run the hotel_gui in Windows 11.

The revision of hotel_gui i am using is 375 (latest).

When i run prepare_hotel.cmd it fails with The system cannot find the file deploy\server\directory_db_h2.xml.template. because there is no directory_db_h2.xml.template in the /deploy/server

I managed to pass the error with this change in prepare_template.cmd, since there is only directory_db.xml.template:

=== modified file 'prepare_template.cmd'
--- old/prepare_template.cmd    2023-09-01 00:55:00 +0000
+++ new/prepare_template.cmd    2025-03-04 09:18:14 +0000
@@ -225,7 +225,7 @@
 set dbnamesx=%dbnames%
 set "dbname=" 
 set dirfile=deploy\server\directory.xml
-set dbtemp=deploy\server\directory_db_%dbtype%.xml.template
+set dbtemp=deploy\server\directory_db.xml.template
 :nextdb1
 SETLOCAL DISABLEDELAYEDEXPANSION
 for /F "tokens=1* delims=," %%a in ("%dbnamesx%") do (

I ran again prepare_hotel.cmd and got this error :

c:\projects\hotel_gui>prepare_hotel.cmd
class 'container' name ''
java.lang.RuntimeException: class 'container' name ''
        at com.goldencode.p2j.directory.XmlRemapperIO.readNode(XmlRemapperIO.java:310)
        at com.goldencode.p2j.directory.XmlRemapperIO.load(XmlRemapperIO.java:169)
        at com.goldencode.p2j.directory.XmlRemapper.load(XmlRemapper.java:159)
        at com.goldencode.p2j.directory.RamRemapper.bind(RamRemapper.java:250)
        at com.goldencode.p2j.directory.DirectoryCopy.copy(DirectoryCopy.java:280)
        at com.goldencode.p2j.directory.DirectoryCopy.main(DirectoryCopy.java:1552)
Caused by: java.lang.RuntimeException: class 'container' name 'server'
        at com.goldencode.p2j.directory.XmlRemapperIO.readNode(XmlRemapperIO.java:310)
        at com.goldencode.p2j.directory.XmlRemapperIO.readNode(XmlRemapperIO.java:306)
        ... 5 more
Caused by: java.lang.RuntimeException: class 'container' name 'default'
        at com.goldencode.p2j.directory.XmlRemapperIO.readNode(XmlRemapperIO.java:310)
        at com.goldencode.p2j.directory.XmlRemapperIO.readNode(XmlRemapperIO.java:306)
        ... 6 more
Caused by: java.lang.RuntimeException: wrong attribute 'value' in class 'integer' node 'adminPort'
        at com.goldencode.p2j.directory.XmlRemapperIO.readNode(XmlRemapperIO.java:288)
        at com.goldencode.p2j.directory.XmlRemapperIO.readNode(XmlRemapperIO.java:306)
        ... 7 more

My guess is that prepare_hotel.cmd is a bit outdated and doesn't work properly with the latest revisions of hotel.

#2 Updated by Lorian Sandu over 1 year ago

Good news!

I was able to run the hotel app on Windows 11 ✅✅

Since the prepare_hotel.cmd was not working properly, i had to manually modify these files and replace the placeholders:

  • /cfg/p2j.cfg.xml
  • build.properties
  • directory.xml
    Important thing here: the separator needs to be \
     <node class="string" name="file-separator">
       <node-attribute name="value" value="\"/>
  • server.xml

Some other important changes :
build.xml : clean-e4gl command was running a .sh script which is not possible on windows :

=== modified file 'build.xml'
--- build.xml   2025-02-06 14:48:21 +0000
+++ build.xml   2025-03-04 13:22:40 +0000
@@ -889,16 +889,8 @@
       </delete>
       <delete dir="${dist.home}"/>
    </target>
-
-   <!-- Delete embedded 4GL files created by pre-processing of HTML files -->
-   <target name="clean-e4gl" description="Clean files with the /*E4GL-W*/ or /*E4GL-I*/ markers (exclude ADE and possenet)">
-      <exec executable="sh" failonerror="true">
-         <arg value="-c" />
-         <arg value="find ${app.4gl.src} -type f -name '*.w' ${e4gl-noclean} -exec grep -l ${e4gl.pattern} {} \; -exec rm -f {} +" />
-      </exec>
-   </target>
-
-   <target name="clean.convert" depends="clean-e4gl" description="Remove all generated files from the conversion process." >
+
+   <target name="clean.convert" description="Remove all generated files from the conversion process." >
       <delete includeemptydirs="true" failonerror="false">
          <fileset dir="${basedir}/src" 
             includes="**/*" 

#4 Updated by Roger Borrello over 1 year ago

Thank you for noting these, Lorian. This is a task of mine, which hasn't been given enough attention. I ran into trouble with the jq json handling on Windows, and had to move to another task. Please monitor the #8104 related task for template updates. The build.xml additions will need to be ported, as we do have to retain files that have the marker mentioned in the ${e4gl.pattern} regex.

Also available in: Atom PDF