1830940 Members
1932 Online
110017 Solutions
New Discussion

JAVA on OpenVMS V7.2-1

 
JaMeS_311
Advisor

JAVA on OpenVMS V7.2-1

Hello everyone,

We have an alpha 800 running OVMS V7.2-1. I am trying to install a UPS shutdown agent that runs on JAVA.

I have installed JAVA 1.1.8-5 from hp/Compaq's website and installed all the patches listed on the same pages.

I copied the .jar file supplied with the UPS, changed its format to STMLF and executed the commands illustrated in the attached file.

The server is in fact loading all the class files required and a window opens saying that the server actually connected to the UPS (over the network). However, when I remove the input power to the UPS, it gives a sequence of warnings (pop-up windows) and then the whole process is terminated as shown in the last part of the file.

Does anyone have a clue of what could be the cause? I do not have any experience with JAVA, so I'm not in a position to state whether it is a JAVA configuration issue or else the application's compatibility with OVMS.

10x,
JaMeS
17 REPLIES 17
Willem Grooters
Honored Contributor

Re: JAVA on OpenVMS V7.2-1

James,

What version of JAVA is required to run the UPS's software? Check the requirements of this software.
It may well be that 1.1.8 is too old, and that you'll need a higher version. For your VMS version, that would be 1.2.2-3 (according the download page). If the software requires a higher JAVA version, you're out of luck for this VMS release.

Willem
Willem Grooters
OpenVMS Developer & System Manager
JaMeS_311
Advisor

Re: JAVA on OpenVMS V7.2-1

The version specified for the software is 1.1.8. It was developed using this version.

Is there a way to check the source of the problem; i.e. JAVA or VMS or Application?

JaMeS
Willem Grooters
Honored Contributor

Re: JAVA on OpenVMS V7.2-1

On some point either jGuardGui has found the power on UPS is off, or you have pushed a screen button to do that. The log shows that jGuardGUI has found some problem in processing this, or another warning:


[Loaded java/awt/Canvas.class from
/dka0/sys0/syscommon/java/lib/JDK118_CLASSES.
ZIP]
jGuard error executing the warning command.
[Loaded java/awt/Event.class from
/dka0/sys0/syscommon/java/lib/JDK118_CLASSES.Z
IP]





jGuard error executing the warning command.
jGuard error executing the warning command.
jGuard error executing the warning command.


Now, Java finds something is referenced but not yet initialized, wronly initialized or even missing in some thread:


[Loaded java/lang/NullPointerException.class from
/dka0/sys0/syscommon/java/lib/
JDK118_CLASSES.ZIP]


but others simply continue:


jGuard error executing the warning command.
jGuard error executing the warning command.
jGuard error executing the warning command.
jGuard error executing the warning command.
jGuard error executing the warning command.
jGuard error executing the warning command.
jGuard error executing the warning command.


Suddenly, there IS a sever problem (I think)


SIGBUS 10* bus error


and from there, Java runs into severe trouble, ending in some ACCESS VIOLATION.

I don't know where this message comes from, jGuardGUI is a obvious suspect but I woulkdn't be tvery surprised if it came from the JAVA RTE.

My guess, given this output, is that something is broken in jGuardGUI, causing severe problems in JAVA. You should contact your UPS-manufacturer (if he supplied the software).
On the other hand: there has been an issue on p(osix)threads for which a patch exists. I don't know if this patch applies to VMS 7.2-1, but you should check and if it DOES apply, you should install it.


Willem
Willem Grooters
OpenVMS Developer & System Manager
Willem Grooters
Honored Contributor

Re: JAVA on OpenVMS V7.2-1

Additional.
I searched google on this SIGBUS signal - as I expected it's some Unix exception which is hardly explained - as seems to be quite usual in that environment. It's a quite severe problem, it seems....
So I tend to suspect the JAVA runtime to be in error soemwhere, but that may well be caused by the Java application or a problem with pthread handling within VMS.

Willem
Willem Grooters
OpenVMS Developer & System Manager
JaMeS_311
Advisor

Re: JAVA on OpenVMS V7.2-1

Willem,

Another detail that could be important is that I've installed the SDK only. Does it help to install the JRE as well?

Also, should I try upgrading JAVA to 1.2.2 ?!

JaMeS
Willem Grooters
Honored Contributor

Re: JAVA on OpenVMS V7.2-1

SDK (Software Development Kit) implies RTE (Run Time Environment, Virtual Machine (amongst others)). So if you installed SDK, RTE will be installed as well.

An update to 1.2.2 is just one of the options. But be sure to have ALL required ECO's installed (and active - you may need a reboot...) _before_attempting to run a program requireing them. See the relasenotes (which are _included_ in the package, so you'll need to download it anyway).

Willem
Willem Grooters
OpenVMS Developer & System Manager
JaMeS_311
Advisor

Re: JAVA on OpenVMS V7.2-1

I've installed another patch (VMS721_LIBRTL-V0400) and now i'm at the point where the UPS starts the countdown to initiate the shutdown procedure (see it on the gui) and then get an error from the same process stating that it cannot execute the command I've given her. It stops there, but does not terminate as before.

Could it be that the application (or JAVA) has some problems to interact with the VMS command interpreter?!

JaMeS
Willem Grooters
Honored Contributor

Re: JAVA on OpenVMS V7.2-1


I've installed another patch (VMS721_LIBRTL-V0400) ...


As I stated before, there are some issues with threads. The patch that addresses these is vms721_pthread_0400. are you sure that one is installed?

Willem

Willem Grooters
OpenVMS Developer & System Manager
JaMeS_311
Advisor

Re: JAVA on OpenVMS V7.2-1

The patches that i installed prior to installing JAVA are:

VMS721_UPDATE-V0300
VMS721_ACRTL-V0400
VMS721_PTHREAD-V0400

I've installed the one below afterwards:

VMS721_LIBRTL-V0400

As I said above, the application is running and it communicates with the UPS and starts the shutdown process when power to the UPS is removed. It also starts the countdown I gave it to start shutting down the server. Then when it comes to EXECUTE the shutdown command, it gives an error and stops there.

I tried to give it other dummy commands such as type a file or write something to screen but still it does not execute it. I even removed the command and left the shutdown field blank. It still gives an error!

Then I thought it could be related to priviliges. I execute the command from the system account and it is not identified by VMS as a subprocess!

$ show process _fta7: /subprocess
Willem Grooters
Honored Contributor

Re: JAVA on OpenVMS V7.2-1

Patches seem Ok to me.

Am I right that now there is a problem in actually executing a program or procedure (note that SHUTDOWN actually is a DCL-procedure). Since this is a Java program, that could be the problem. I don't know if Java allows you to run another executable. Java runs in it's own context that _might_ cause a problem.
One way to find out: let the JAVA program do something 'internal' - NOT an image but some DCL command (make up a commandprodedure that does 'something' that does not involve IO, for instance just assigning some value to a symbol, or adding. If that is Ok, try to write something to the terminal (write sys$output), get data (inquire, read sys$command...). invoke another procedure, and, finally, run some image. Just to see what is accepted.
Some further information would be helpful: What error do you get when things go wrong (quite precise, please). Another source of information can be accounting (often neglected as a source of info). If you have the system for yourself, enable image accounting, run your program and disable image accounting after that (since that takes up huge amounts of diskspace!)

Willem
Willem Grooters
OpenVMS Developer & System Manager
JaMeS_311
Advisor

Re: JAVA on OpenVMS V7.2-1

I tried to give simple commands such as write to output but the outcome is always the same.

I enabled accounting and logged the output of the process (see attached file).

As for the fact that the command is a DCL procedure, I start java as follows:

$ define java$use_dcl 1
$ @java$setup
Setting up symbols for DCL command line usage...
JAVA$FILENAME_CONTROLS now set to: -1
$

Jan van den Ende
Honored Contributor

Re: JAVA on OpenVMS V7.2-1

James,

you specified your shutdown command as:
@SYS$SYSTEM:SHUTDOWN
but _THAT_ enters an interactive question-and-answer sequence!
You should also specify the associated patameters.
If you look in SYS$MANAGER:LOGIN.COM (and I hope you did not take 'm out!) you will find symbols set up for SHUTDOWN and for REBOOT.
USsethe symbols for SHUTDOWN in your JAVAscript command, and try again.
No guaratee, but you MIGHT fare one better!

hth


Jan
Don't rust yours pelled jacker to fine doll missed aches.
Craig A Berry
Honored Contributor

Re: JAVA on OpenVMS V7.2-1

Also run AUTHORIZE and check MAXJOBS, MAXACCTJOBS, and PRCLM for the account you are running the agent from. It's possible Java is trying to spawn a subprocess but you have a resource setting that does not allow subprocesses. Or it's theoretically possible you could be out of process slots on the system.

A more robust solution might be to wrap some JNI around LIB$DO_COMMAND and avoid subprocess creation altogether.
Willem Grooters
Honored Contributor

Re: JAVA on OpenVMS V7.2-1

James,

Just make a commandprocdure like this:

$ a=1
$loop:
$ if a .gt. 10 then goto endloop
$ a=a+1
$! show symbol a
$! NOTE PREVIOUS LINE: IS COMMENT!!!!
$ goto loop
$endloop:
$ exit

and have that executed ("@")
(be sure to have verification OFF (set noverify). If even that fails, JAVA won't except anything like this.
If is does, uncomment show symbol line and retry. If that fails, it's an IO problem.

Jan has given another point. SHUTDOWN as given is interactive and again, this may fail! What you could do is wrap the whole thing up in a commandprcedure like:

$ define/user sys$input sys$command
$ shutdown
one per line,
as like entered them on the screen>
$
and try.

You could do what Graig gave out but this will require programming in some language. DCL doesn't give you this option.

Willem
Willem Grooters
OpenVMS Developer & System Manager
Jan van den Ende
Honored Contributor

Re: JAVA on OpenVMS V7.2-1

James,

I got the params now.

@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN YES NO LATER NO NONE

Mind: 0 = ZERO, not Oh
If the system is in a cluster then NONE must be replaced. If your cluster is all on one power-grid (all nodes get the same UPS signal at the same time) then replace "NONE" by "CLUSTER_SHUTDOWN"; if different parts of your cluster have separate grids, then replace "NONE" by "REMOVE_NODE".

You could also always give "REMOVE_NODE".
That way, your cluster shutdown WILL hang at the final stage for the last node, until powerfail crashes it. But in a VMS environment that is only a minor nuisance (eg, shadowed systemdisk will need shadowcopy now), but all your applics WILL have been ran down as specified by SYSHUTDWN. (of course you will need to have that in order!)

Jan
Don't rust yours pelled jacker to fine doll missed aches.
JaMeS_311
Advisor

Re: JAVA on OpenVMS V7.2-1

Jan,

At first I thought that it could be the interactive nature of the shutdown command. Therefore I created a file with all the parameters required to completely shutdown the system. It doesn't execute.

Willem,

I created a file as suggested above but still doesn't work.

Is there a way to track what java is doing and hopefully detect where it is getting stuck? The /verbose qualifier doesn't help me much...
Willem Grooters
Honored Contributor

Re: JAVA on OpenVMS V7.2-1

James,

Just learned from a spin-off (JAVA and DCL) that you may have to omit "@" in the command. Try that for a start (and use the cammandprocedure Jan suggested).

As Martin Zinser suggested in that thread, it will NOT work in 1.2.2, so upgrading is NO solution in this case. My expectation is that it has been documented in 1.2.2 but did exist earlier (in 1.1.8). But just try it without "@" first....

Willem
Willem Grooters
OpenVMS Developer & System Manager