The java.security.auth.login.config file in the path with a space

When i do

System.setProperty("java.security.auth.login.config", ejbLoginConfig); 

using ejbLoginConfig = "../conf/weblogicdomain.conf" and my client is in a path containing spaces, I get a ClassNotFoundException for my EJB call:

 Caused by: java.lang.ClassNotFoundException: my.app.MyFassade at weblogic.ejb.container.deployer.RemoteBizIntfClassLoader.getClassBytes(RemoteBizIntfClassLoader.java:151) ... 

If I move everything to a path without spaces, it works. Using the absolute path does not change anything.

Thanks for the ideas!

+4
source share
1 answer

The value must be enclosed in quotation marks (use escaped quotation marks):

 System.setProperty("java.security.auth.login.config", "\"" + ejbLoginConfig + "\""); 
+1
source

Source: https://habr.com/ru/post/1381692/


All Articles