Architecting, installing and maintaining your SAS environment

The Java child process terminated unexpectedly. Failed to attach Java VM

Reply
Occasional Contributor
Posts: 5

The Java child process terminated unexpectedly. Failed to attach Java VM

I am running SAS 9.4 M3 on Windows 10 x64. Everything installs properly but I get this message in the log at startup and while analytics works properly, ODS graphics (obviously dependent on Java) do not. Not sure what to do. Have updated the private JRE to the latest version and have downloaded all available hotfixes. 

Frequent Contributor
Posts: 134

Re: The Java child process terminated unexpectedly. Failed to attach Java VM

Posted in reply to jjjllhhlk

 

ERROR: The Java proxy is not responding.
ERROR: The Java proxy's JNI call to start the VM failed.
ERROR: Java failed to start during the SAS startup.

As far as I know, this messages relate to a little-known pre-requisite of SAS on Windows : 8.3 short naming must be enabled on the NTFS partition where SAS Foundation is installed.

 

 

NOTE: As a SAS system requirement, the 8.3 filename convention must remain enabled.

 

source : https://support.sas.com/kb/44/853.html

 

Try running in your sas session :

 

 

Proc options option=JREOPTIONS; 
run;

The Java.class.path is assigned using the old 8.3 (also called "8dot3" in Microsoft plaintalk) convention : 8 characterss max. length with ~ as suffix separator.

 

display your sasroot : %put %sysget(SASROOT);

 

then try to run inside a CMD.exe the following command :

 

C:\users> DIR /X <SASROOT>

If the penultimate colum, is empty then 8.3 short names are disabled.

 

See also :

https://support.microsoft.com/en-us/help/121007/how-to-disable-8.3-file-name-creation-on-ntfs-partit...

 

You must have (local) admin privilege in order to run fsutil.

Super User
Posts: 7,762

Re: The Java child process terminated unexpectedly. Failed to attach Java VM

Oh, the joys of working with CP/M 64 ....

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 5

Re: The Java child process terminated unexpectedly. Failed to attach Java VM

Hi

Thank you so much for your reply and helping me. Unfortunately, the column is not empty and Windows is apparently creating the 8.3 nomenclature properly (See attachment). Anything else I can do?


screen sas.png
Frequent Contributor
Posts: 134

Re: The Java child process terminated unexpectedly. Failed to attach Java VM

Posted in reply to jjjllhhlk

The Note no. 44853 I mentioned above may give you further hints to go on.

 

I suppose that the following code issues some errors as well :

 

Proc JAVAINFO; RUN;

Try to test the Private JRE provided with SAS Foundation.

 

This note gives you the new JAVAHOME used internally with SAS :

 

https://support.sas.com/kb/48/548.html

 

 

SAS Technical Support could be the next one to ask !

 

PS. a very "sensitive" Firewall/Security software might be reluctant to let SAS process launch Java.exe sub-processes. Please, check also with the corresponding logs/trace if its available.

Frequent Contributor
Posts: 134

Re: The Java child process terminated unexpectedly. Failed to attach Java VM

[ Edited ]

On second glance, I noticed on your screen shot that some of your SAS Foundation folders were dated back to March 2015 (?).

 

- Is your SAS installation a M2 or a M3 release ? Support of SAS 9.4 on Windows 10 began with M3 release, which

was shipped by August/September 2015 if not later (as far as I can remember).

 

https://support.sas.com/supportos/list

 

Correspondingly, it seems that JRE 1.7 support on Windows 10 was introduced by Oracle with update release 085 :

 

http://www.oracle.com/technetwork/java/javase/config-417990.html

 

FYI, on a SAS M3 release at my office, the SAS Private JRE installed has an update release 076 (gasp!).

 

Try display yours with

 

<SAS PRIVATE JRE HOME>\bin\java.exe -version

 

 16th, March UPDATE

 

a SAS note explaining the recourse to 8.3 short names in this case :

 

https://support.sas.com/kb/17/004.html

 

 

The problem is caused by the spaces that are included in the location of
the SAS .jar files.  Some of the JRE options in the SAS config file
include paths that contain spaces, and these paths do not resolve
properly in the JAVA compiler.

The -JREOPTIONS uses !SASROOT, which contains a space by default.

To avoid the SAS crashes, alter the SASROOT variable as follows:

[replace long names with 8.3 short names]

Trusted Advisor
Posts: 1,312

Re: The Java child process terminated unexpectedly. Failed to attach Java VM

Posted in reply to jjjllhhlk

Hello @jjjllhhlk,

 

what is the full path to your SASHome directory? Something like D:\Program Files\SASHome?

 

Could you please check if you have the short names enabled also in the intermediate folders, such as "Program Files"? I often can see that the installer creates first Program Files, or it is created already before enabling 8.3 naming convention, and then 8.3name is enabled, and then SAS is installed.... with the problem that "Program Files" stays in long name, without a mapped short name and then SAS Foundation eventually crashes because, whilst all SAS components are on 8.3, the full path to the SAS components stay with just a long name, and "Program Files" paths get corrupted.

Occasional Contributor
Posts: 5

Re: The Java child process terminated unexpectedly. Failed to attach Java VM

Posted in reply to JuanS_OCS

So 2 things. In my private JRE folder, there is NO java.exe. There is a javac.exe. So it seems that SAS is not installing the JRE despite showing a checkmark on the item during the install process. And second, yes, 8.3 is enabled throughout-- I just checked. Is there a way to manually install the private JRE?

Cheers

SAS Employee
Posts: 102

Re: The Java child process terminated unexpectedly. Failed to attach Java VM

Posted in reply to jjjllhhlk

SASPrivateJavaRuntimeEnvironment\9.4\jre\bin is where you'll find java, javac is the compiler and not part of the jre (and why it's a level higher) 

Occasional Contributor
Posts: 5

Re: The Java child process terminated unexpectedly. Failed to attach Java VM

Yes, I meant the bin folder. It only contains javac.exe and not java.exe or anything else for that matter

SAS Employee
Posts: 102

Re: The Java child process terminated unexpectedly. Failed to attach Java VM

Posted in reply to jjjllhhlk

You're seeing javac.exe in the 9.4\jre\bin directory? or 9.4\bin?

Occasional Contributor
Posts: 5

Re: The Java child process terminated unexpectedly. Failed to attach Java VM

Ok you are right. I feel like a daft.

I ran the version check on that and this is what it said:

 

java version "1.7.0_131"
Java(TM) SE Runtime Environment (build 1.7.0_131-b12)
Java HotSpot(TM) 64-Bit Server VM (build 24.131-b12, mixed mode)

New Contributor
Posts: 2

Re: The Java child process terminated unexpectedly. Failed to attach Java VM

Posted in reply to jjjllhhlk

I have the same problem with the same version and build. What was your final resolution? 

Regular Learner
Posts: 1

Re: The Java child process terminated unexpectedly. Failed to attach Java VM

Posted in reply to jjjllhhlk

Hi. I have the same problem, I can not run the java environment when I started SAS 9.4 in W10. I tried to check the 8dot3 directories and update, install and reinstall java and SAS, but without results. Please help me. Cheers!

Super User
Posts: 3,250

Re: The Java child process terminated unexpectedly. Failed to attach Java VM

If you upgraded to Win 10 Creator's Update which was officially released back in Apr 2017 then this is your likely problem:

 

https://communities.sas.com/t5/SAS-Procedures/windows10-about-SAS9-4-ERROR-The-Java-child-process-te...

 

SAS is working on this issue as a high priority but no totally reliable fix is yet available - unless you are prepared to revert to an earlier Win 10 version.

Ask a Question
Discussion stats
  • 14 replies
  • 2640 views
  • 9 likes
  • 8 in conversation