Author Topic: Logical Volume Manager GUI not starting  (Read 11742 times)

mauro

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: +3/-0
    • View Profile
Logical Volume Manager GUI not starting
« on: April 21, 2020, 06:53:46 pm »
Hi all, after sometime not having the need to open the LVM by its program icon (in the System Setup folder), today i wanted to have a look on it, but it did not start in WPS.
Then tried in the OS2 command prompt and found:
[C:\]lvmgui
JAVAI.dll not found via JAVA_HOME=C:\APPS\OpenJDK\, so setting JA
11\BIN\..
Unable to initialize threads: cannot find class java/lang/Thread

Said that  from last time I had run it successfully, I meantime installed OpenJDK, now reading the command answer for what is specifically missing, I simply copied JAVAI.ddl from the old JAVA11\BIN directory to the C:\APPS\OpenJDK\ one, but the answer is still same not finding that dll.

Do you have suggestions on how to recover the situation?
Thank you much

ivan

  • Hero Member
  • *****
  • Posts: 1603
  • Karma: +20/-0
    • View Profile
Re: Logical Volume Manager GUI not starting
« Reply #1 on: April 21, 2020, 07:25:08 pm »
Hi mauro,

Attached is a screen grab of the LVMGUI program object on my computer check yours is the same and also check the lvmgui.cmd file just in case it has become garbled (you may need to adjust something to fit your setup).

Pete

  • Hero Member
  • *****
  • Posts: 1352
  • Karma: +11/-0
    • View Profile
Re: Logical Volume Manager GUI not starting
« Reply #2 on: April 21, 2020, 07:45:03 pm »
Hi mauro

To use lvmgui with openjdk  the config.sys Path needs to have this line

  J:\Java\openjdk\bin;

Change the Drive and Path  to match your system

Obviously a reboot is required after editing config.sys


Optionally: As java11 is not used for anything these days - apart from maybe some very old java apps - I suggest getting rid of java11.

This is done fairly simply by selecting Computer -> Install/Remove -> Installed Features and uninstalling.


Regards

Pete

« Last Edit: April 21, 2020, 07:49:21 pm by Pete »

Lars

  • Hero Member
  • *****
  • Posts: 1367
  • Karma: +70/-0
    • View Profile
Re: Logical Volume Manager GUI not starting
« Reply #3 on: April 21, 2020, 08:02:32 pm »
I assume you are using eComStation:

Peter's advice might not be the best because the help will not properly work with the newer java.

1) make sure that you DO NOT have JAVA11 listed anywhere in your config.sys
2) check that you have a file \os2\install\syspath.dat, it should look about like this (it might be longer and it might contain different drive letters and paths):
E:\DMISL\syslevel.dmi
E:\OS2\JAVA\Java11\bin\syslevel.jav
E:\OS2\JAVA\java11\Swing\syslevel.swr
E:\TCPIP\bin\syslevel.dbx
E:\TCPIP\bin\syslevel.iak
E:\TCPIP\bin\syslevel.tcp
make sure that the java11 related paths properly point to your installation of Java11
3) make sure that these files exist in \ecs\bin:
lvmgui.cmd
jvm_find.cmd
jvm_lang.cmd


Finally, make sure that you start the app via \ecs\bin\lvmgui.cmd lvmgui and that it starts from \ecs\bin (which the program object should have properly set).


Lars

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1355
  • Karma: +26/-0
    • View Profile
Re: Logical Volume Manager GUI not starting
« Reply #4 on: April 21, 2020, 09:14:42 pm »
So it looks like sometime back in 2014 I implemented a little change to the lvmgui.cmd here. I literally specified the exactly Java 1.60 file to run as follows (pasting just the pertinent section of the code):

Code: [Select]
/* if not in classpath, try to construct from default location */
if found=0 then do
  newpath=stream(SysBootDrive()'\OS2\JAVAAPPS\LVMGUI.ZIP','c','query exists')
  if newpath='' then exit
  cp = '-classpath' newpath';'classpath0';'
  end

/* save current dir, cd to lvmgui.zip dir, invoke java */
currdir= directory()
newdir = directory(strip(filespec('drive',newpath)filespec('path',newpath),'t','
\'))
'@g:\java160\jre\bin\java.exe' cp progname parameters ' >nul'
/* say rc */
/* restore state and exit */
currdir = directory(currdir)
if loaded=1 then call SysDropFuncs
Exit 0

As you can see I am running JRE 1.60 here and my CLASSPATH statement is completely commented out in CONFIG.SYS.

Pete

  • Hero Member
  • *****
  • Posts: 1352
  • Karma: +11/-0
    • View Profile
Re: Logical Volume Manager GUI not starting
« Reply #5 on: April 21, 2020, 11:56:03 pm »
Hi All

As I rarely bother with the java lvmgui I had not noticed the screwup with the Help failing to display correctly.
So, sorry for not quite getting it right.

Thanks to Lars for pointing this out - I take it you are seeing problems with the Help as well Dariusz?


Regards

Pete

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1355
  • Karma: +26/-0
    • View Profile
Re: Logical Volume Manager GUI not starting
« Reply #6 on: April 22, 2020, 05:38:50 am »
...Thanks to Lars for pointing this out - I take it you are seeing problems with the Help as well Dariusz?...

Yup, HELP window contents is all made up of '?' characters with a few numbers tossed in for a good measure. I honesty use the "factory" GUI LVM very little as well, I prefer the CLI anyways or Alex Taylor's excellent LVMPM, which is a full PM application.
« Last Edit: April 22, 2020, 05:26:58 pm by Dariusz Piatkowski »

Lars

  • Hero Member
  • *****
  • Posts: 1367
  • Karma: +70/-0
    • View Profile
Re: Logical Volume Manager GUI not starting
« Reply #7 on: April 22, 2020, 04:46:58 pm »
There was another reason apart from the failing help:

I always try to avoid hacking REXX scripts or code that I have not written (unless that is exactly the intention, like, for example, for the USB drivers) and I always assume that people are not familiar with any script or programming languages.

If possible, I use a documented way of fixing things. If that is not possible, I revert back to trial and error.

I have been bitten too many times by things I had changed in my system a long time ago but forgotten about and which all of a sudden conflict with changes I have done recently.

Pete

  • Hero Member
  • *****
  • Posts: 1352
  • Karma: +11/-0
    • View Profile
Re: Logical Volume Manager GUI not starting
« Reply #8 on: April 22, 2020, 05:04:42 pm »
Hi Lars

No need to "hack" lvm.cmd if you add the openjdk Path to config.sys as mentioned previously.


Regards

Pete

mauro

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: +3/-0
    • View Profile
Re: Logical Volume Manager GUI not starting
« Reply #9 on: April 22, 2020, 08:00:31 pm »
Hi mauro

To use lvmgui with openjdk  the config.sys Path needs to have this line

  J:\Java\openjdk\bin;

Change the Drive and Path  to match your system

Obviously a reboot is required after editing config.sys


Optionally: As java11 is not used for anything these days - apart from maybe some very old java apps - I suggest getting rid of java11.

This is done fairly simply by selecting Computer -> Install/Remove -> Installed Features and uninstalling.


Regards

Pete

Hi Pete, I started to apply the suggested change in config.sys also deleting the reference pointing to JAVA11, and rebooted.
Now, LVMGUI recalled by OS2 commands windows appears/works (great, thank you!) , but still nothing happens by clicking on the object icon. I then also applied the properties editing suggested by Ivan, but no changes.
In the images below I show what my LVM icon object properties Program tag contains, and what are the object in the C:\OS2\JAVAAPPS referred folder.
I'm running OS2 Warp 4.52.
Thank you

Pete

  • Hero Member
  • *****
  • Posts: 1352
  • Karma: +11/-0
    • View Profile
Re: Logical Volume Manager GUI not starting
« Reply #10 on: April 22, 2020, 11:05:01 pm »
Hi mauro

The Properties need modifying:

Copy ivans setup from his uploaded Logical_00.jpg image but set the Working directory to the location of lvmgui.cmd - possibly \os2...

I cannot remember the contents of lvmgui.cmd as supplied with OS/2 so have uploaded my copy of lvmgui.cmd as lvmgui.txt


Regards

Pete

mauro

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: +3/-0
    • View Profile
Re: Logical Volume Manager GUI not starting
« Reply #11 on: April 23, 2020, 10:57:30 am »
Hi mauro

The Properties need modifying:

Copy ivans setup from his uploaded Logical_00.jpg image but set the Working directory to the location of lvmgui.cmd - possibly \os2...

I cannot remember the contents of lvmgui.cmd as supplied with OS/2 so have uploaded my copy of lvmgui.cmd as lvmgui.txt


Regards

Pete

Thanks Pete, my LVMGUI.CMD properties only shows C:\OS2\LVMGUI.CMD string in "Path and filename" field, the other two below are empty.  Nothing happens after adding the values suggested by Ivan in there.
I paste here below its script content. Then I also attach the captured snapshot of the output message after clicking on the object, while it still works fine if invoked in OS2 command window

* IBM CONFIDENTIAL
 * OCO Source Materials
 * (c) Copyright IBM Corp. 1998
 *
 * The source code for this program is not published or otherwise divested of
 * its tradesecrets, irrespective of what has been deposited with the U.S.
 * Copyright Office.
 *
 * Functions: Front end to invoke Java version of LVMGUI interface
 *  Change Activity: 8/19/98 initial version  slp
 *                   8/10/01 java 1.3 and misc fixes  sle
 */
progname = 'lvmgui'
cp = ''
parse arg parameters

If RxFuncQuery('SysLoadFuncs') Then Do
  Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  Call SysLoadFuncs
  loaded=1
  End

/* search classpath for 'lvmgui.zip' */
found = 0
classpath0 = translate(value('classpath',,'OS2ENVIRONMENT'))
classpath = classpath0';'
do while (found = 0) & (length(classpath) > 0)
  classpath = overlay(' ',classpath,pos(';',classpath))
  parse var classpath  newpath  classpath
  found = pos('LVMGUI.ZIP',newpath)
end
/* if not in classpath, try to construct from default location */
if found=0 then do
  newpath=stream(SysBootDrive()'\OS2\JAVAAPPS\LVMGUI.ZIP','c','query exists')
  if newpath='' then exit
  cp = '-classpath' newpath';'classpath0';'
  end

/* save current dir, cd to lvmgui.zip dir, invoke java */
currdir= directory()
newdir = directory(strip(filespec('drive',newpath)filespec('path',newpath),'t','\'))
'@java' cp progname parameters ' >nul'
/* say rc */
/* restore state and exit */
currdir = directory(currdir)
if loaded=1 then call SysDropFuncs
Exit 0

Pete

  • Hero Member
  • *****
  • Posts: 1352
  • Karma: +11/-0
    • View Profile
Re: Logical Volume Manager GUI not starting
« Reply #12 on: April 23, 2020, 12:11:29 pm »
Hi mauro



Thanks Pete, my LVMGUI.CMD properties only shows C:\OS2\LVMGUI.CMD string in "Path and filename" field, the other two below are empty.  Nothing happens after adding the values suggested by Ivan in there.



Maybe I was not clear in my previous message or maybe I am misunderstanding the above...

it is not the lvmgui.cmd Properties that need modifying it is the Logical Volume Management object in System Setup that needs modifying.

The only difference between the Properties shown in ivans image and the Properties on your system will be the Working directory which is the location of lvmgui.cmd


Looking at your lvmgui.cmd file it is a bit different to the lvmgui.txt file which is my current lvmgui.cmd renamed to txt to allow it to be uploaded here.

Not being a rexx script expert I cannot spot any problem in your lvmgui.cmd file and if it works from the command line it should work when started by the Logical Volume Management object - unless there is something wrong with the Logical Volume Management object Properties.


If you do have the Logical Volume Management object properties set correctly then it may be worth trying the lvmgui.txt script.

Copy lvmgui.cmd to lvmgui.cmd.IBM to make a backup of the original file
Delete lvmgui.cmd
Copy lvmgui.txt to lvmgui.cmd

The Properties for lvmgui.cmd should have the Path and file name showing the current Drive:\Directory\lvmgui.cmd,
 replace the Drive:\Directory with the location on your system, and no other entries on the Program page.
On the Menu page check that Open as is set as Program.

Does this lvmgui.cmd then work OK from the command line?

Does starting from the Logical Volume Management object work?


Regards

Pete

mauro

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: +3/-0
    • View Profile
Re: Logical Volume Manager GUI not starting
« Reply #13 on: April 23, 2020, 04:15:36 pm »
Hi mauro




Maybe I was not clear in my previous message or maybe I am misunderstanding the above...

it is not the lvmgui.cmd Properties that need modifying it is the Logical Volume Management object in System Setup that needs modifying.
The only difference between the Properties shown in ivans image and the Properties on your system will be the Working directory which is the location of lvmgui.cmd

yes, I first did the attempt on my Logical Volume Manager object as previolusly said ("I then also applied the properties editing suggested by Ivan"), and the difference shown was not only in the Working Directory locating the lvmgui.cmd which I setted with the actual for my case, but also in Path and File Name field which contained java.exe in my case vs lvmgui.cmd in his case. All possible values replacement brought no improvements.

Quote


Looking at your lvmgui.cmd file it is a bit different to the lvmgui.txt file which is my current lvmgui.cmd renamed to txt to allow it to be uploaded here.

......................

Copy lvmgui.cmd to lvmgui.cmd.IBM to make a backup of the original file
Delete lvmgui.cmd
Copy lvmgui.txt to lvmgui.cmd
The Properties for lvmgui.cmd should have the Path and file name showing the current Drive:\Directory\lvmgui.cmd,
 replace the Drive:\Directory with the location on your system, and no other entries on the Program page.
On the Menu page check that Open as is set as Program.

Does this lvmgui.cmd then work OK from the command line?

ok, as made all this, lvmgui does not work anymore not even recalled in the command prompt window, this is the answer returned:

[C:\OS2]lvmgui
     5 +++   Parse Value Jvm_find('LVM') With java_exe java_dir class_pa
ir lvm_java_dir;
REX0043: Error 43 running C:\OS2\LVMGUI.CMD, line 5: Routine not found

Quote

Does starting from the Logical Volume Management object work?

Regards

Pete

of course it does not.
I try to revert the fix proposal from another view but admit from now that this could be the tipical idiot question: wouldn't it be simplest creating a one-line script .cmd object containing the running command equal to the well working command the OS2 window prompt?  Then such file object should work with a double click and finally replace the not-working object in OS2 System Setup

ivan

  • Hero Member
  • *****
  • Posts: 1603
  • Karma: +20/-0
    • View Profile
Re: Logical Volume Manager GUI not starting
« Reply #14 on: April 23, 2020, 10:31:06 pm »
Hi mauro,

If you are using an unmodified OS/2 v4.52 then you will need to use java11 that came with the install rather than openjdk6.  At least that is how it worked on my OS/2 v4.52 install.  I will check if I have the disk image of that install and see if anything shows up.