Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.security.auth.login.config file in path with space

Tags:

java

jaas

When I execute

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 an absolute path does not change anything.

Thanks for ideas!

like image 975
stracktracer Avatar asked Nov 04 '22 11:11

stracktracer


1 Answers

The value needs to be contained in quotes (use escaped quotes):

System.setProperty("java.security.auth.login.config", "\"" + ejbLoginConfig + "\"");
like image 66
Triple Lutz Avatar answered Nov 15 '22 10:11

Triple Lutz