Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Glassfish error while creating a LDAP realm: "Invalid property syntax, "=" in value

I'm trying to create a LDAP realm in Glassfish 4.0 (build 89) but every time I tried so far, the following error occurred:

"Invalid property syntax, "=" in value: base-dn=\[...]"

Screenshot (Imgur)

I tried using different browsers and reinstalled Glassfish in Netbeans. The strange thing is that a friend of mine could copy my base-dn and it worked.

Thanks in advance!

like image 200
riffel Avatar asked Jan 09 '23 22:01

riffel


2 Answers

This seems to be a bug in Glassfish 4.0. It throws this error if a property contains an equals sign (=).
See the following JIRA Issues:

  • GLASSFISH-20744 Problems saving property values for Realms
  • GLASSFISH-20693 - Cannot create com.sun.enterprise.security.auth.realm.ldap.LDAPRealm in GlassFish Server Open Source Edition 4.0 (build 89)
  • GLASSFISH-16198 Admin UI requires LDAP search filter values to be double-quoted

This error doesn't occur in GlassFish 3.x, this may be the reason that it worked when your friend tried it.

Workaround: As a workaround you can just take some value without an equals sign, like e.g. abc and save that. This should successfully create the LDAP realm. Then click on the created realm to edit the property. Now you can replace abc with the desired value (and it can also contains equals signs), save again and you are done.

like image 155
unwichtich Avatar answered Jan 12 '23 11:01

unwichtich


You have to remove al dc= like this:

Before:

dc=hello,dc=world

After:

hello, world

Then, you can save it. When it is effectively saved, you can edit it and let it in the correct form dc=hello,dc=world

This works for me

like image 42
Giovanni Benussi Avatar answered Jan 12 '23 10:01

Giovanni Benussi