problem starting tomcat with jdk-12.0.1 and tomcat 8

729 views
Skip to first unread message

dan haig

unread,
May 29, 2019, 11:54:27 AM5/29/19
to xtf-...@googlegroups.com
Morning Hepcats,

Just got a new Mac after 11 years(!) on my original here. After installing java yotta and trying to fire up tomcat, I got the following:


Error: Could not create the Java Virtual Machine.

Error: A fatal exception has occurred. Program will exit.

-Djava.endorsed.dirs=/Users/danhaig/IntelexRepo/past_masters/trunk/xtf/tomcat/endorsed is not supported. Endorsed standards and standalone APIs

in modular form will be supported via the concept of upgradeable modules.

Error: Could not create the Java Virtual Machine.

Error: A fatal exception has occurred. Program will exit.



...So, I looked around for anything like a clue as to what one would need to do to get around this, and came up very short. I'm guessing I'm not the first to encounter this - any suggestions?


Thanks,

dan

Steven D. Majewski

unread,
May 29, 2019, 12:13:38 PM5/29/19
to xtf-user@googlegroups.com List

[1] I have JDK 11 & 12 on my Mac, but mostly due to laziness, I’m still running tomcat under JDK 8. 
But laziness aside, I’ve been seeing issues with trying to run some other java apps with JDK 11 or 12, 
So it might be worth downgrading.   You can have several versions in /Library/Java/JavaVirtualMachines, 
And  set JAVA_HOME to choose. I have several:

$ ls /Library/Java/JavaVirtualMachines/
1.6.0.jdk/          jdk-12.0.1.jdk/     jdk1.8.0_201.jdk/
jdk-11.0.3.jdk/     jdk1.8.0_191.jdk/   openjdk-12.0.1.jdk/

I even had to keep 1.6.0 around to be able to run Oxygen 10, which is the latest I could use to debug XTF stylesheets, 
Although now I’ve been adding  @use-when guards around all of the external function calls so that I can use a current 
Version of Oxygen. 


[2] What is in endorsed/ directory that you need ? That’s not part of the usual tomcat startup or XTF config AKAIK.
What happens if you remove that requirement in your tomcat config/startup ? 

[3] What version tomcat ?  ( I’m running 7, and no issues with XTF, although I had to update code for another web app that did upload and validation to my XTF site. The uploader API in tomcat utils changed and broke my old app. 
( I have no obvious conclusion based on Tomcat version, but just another variable to check off. ) 

[ Also: I’m using Tomcat 7 and JDK 8 on my Mac to match what’s running on our production servers.  ]

— Steve M. 

--
You received this message because you are subscribed to the Google Groups "XTF Users List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtf-user+u...@googlegroups.com.
To post to this group, send email to xtf-...@googlegroups.com.
Visit this group at https://groups.google.com/group/xtf-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/xtf-user/CAEQVUyrqOBW9hcsrwmsN3u0Gf3fpTtNmR6LE%3DTDhhPYthZYfFg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

dan haig

unread,
May 29, 2019, 1:07:55 PM5/29/19
to xtf-...@googlegroups.com
Hey thanks Steve. I put my tomcat version (8) in the subject, shoulda put it in body of mail, it's tomcat 8. I guess I can try to dial stuff back as you suggest, I was just giddy with modernity.... 

As for your "[2] What is in endorsed/ directory that you need ? " - I didn't add that in, I didn't need anything, it's just what came out when I fired it up. I've seen all sorts of suggestions online that made no sense to me. Mainly along the lines of:


"To fix this error, remove the lib/endorsed directory, or unset the java.endorsed.dirs system property."

There is no such dir, and "unsetting"  the system property, uh, what? 

.d


Steven D. Majewski

unread,
May 29, 2019, 2:25:30 PM5/29/19
to xtf-user@googlegroups.com List

Do you have any environment variables like JAVA_ENDORSED_DIRS or ENDORSED_PROP set ?  :  ‘env | grep ENDORSED’ 

The tomcat startup files are checking for these and other environment variables. 
Maybe you had this set in a .bash file that got migrated to the new Mac ?  
( I assume that if it’s a new Mac, you have a clean install of tomcat and haven’t changed any of the startup scripts or tomcat/bin/setenv.sh ) 

My tomcat’s (7) RUNNING.txt file has this note in it’s description of the directories included in the distribution:

 * endorsed - Libraries that override standard "Endorsed Standards"
              libraries provided by JRE. See Classloading documentation
              in the User Guide for details.
              No longer supported with Java 9.

              By default this "endorsed" directory is absent.


I don’t think I’ve had to use the endorsed directory feature since Java 1.6 or earlier. 
I think where I did have to use it, it had something to do with updating the Java XML libraries, so that makes me think it might have been something that was once required long ago. 

— Steve. 



dan haig

unread,
May 30, 2019, 11:53:01 AM5/30/19
to xtf-...@googlegroups.com
Hey Steve, thanks again - so no, I had not changed any environment variables, and perhaps more to the point there is no tomcat/bin/setenv.sh file. This is the apache-tomcat-8.0.30 we have in our subversion repository along with all our other XTF everything, so no it is not a fresh install on a fresh computer.

I went into catalina.sh and commented out the endorsed.dirs stuff where I found it, for an experiment, and that certainly eliminated the previously reported error related to that, but now it is telling me that my tomcat directory does not exist. So that's fun.

Anyway, I'll keep pursuing along the lines you've suggested, and will provide any solutions I may come across for posterity.

Cheers,
Dan



Reply all
Reply to author
Forward
0 new messages