hallo leute!
ich versuche zur zeit über jldap einem eintrag bestimmte attribute hinzuzufügen. verwendet wird ein netware novell server version 6.5, und der zugriff erfolgt über die novell api jldap.
mein problem:
wenn ich bestimmte attribute dem ldapentry hinzufüge, und diesen anschließend dem verzeichnis hinzufügen will, tritt eine ldapexception mit der meldung "Object Class Violation (65)" auf.
die folgenden attribute sind davon betroffen:
die objektklassen habe ich meiner meinung nach korrekt hinzugefügt aber seht selbst:
hier noch der stacktrace:
LDAPException: Object Class Violation (65) Object Class Violation
LDAPException: Server Message: NDS error: illegal attribute (-608)
LDAPException: Matched DN:
at com.novell.ldap.LDAPResponse.getResultException(Unknown Source)
at com.novell.ldap.LDAPResponse.chkResultCode(Unknown Source)
at com.novell.ldap.LDAPConnection.chkResultCode(Unknown Source)
at com.novell.ldap.LDAPConnection.add(Unknown Source)
at com.novell.ldap.LDAPConnection.add(Unknown Source)
at daten.vergleich.Vergleich.hinzu(Vergleich.java:383)
at daten.vergleich.Vergleich.ausfuehren(Vergleich.java:292)
at gui.Hauptfenster$27.actionPerformed(Hauptfenster.java:1731)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
bitte um eure hilfe!
ich versuche zur zeit über jldap einem eintrag bestimmte attribute hinzuzufügen. verwendet wird ein netware novell server version 6.5, und der zugriff erfolgt über die novell api jldap.
mein problem:
wenn ich bestimmte attribute dem ldapentry hinzufüge, und diesen anschließend dem verzeichnis hinzufügen will, tritt eine ldapexception mit der meldung "Object Class Violation (65)" auf.
die folgenden attribute sind davon betroffen:
- loginShell
gidNumber
uidNumber
ndsHomeDirectory
homeDirectory
die objektklassen habe ich meiner meinung nach korrekt hinzugefügt aber seht selbst:
Code:
String loginname = login.getLogin();
String vorname = login.getFeld(vnamespalte);
String zuname = login.getFeld(nachnamespalte);
//String id = login.getFeld(idspalte);
String pwd = login.getPasswort();
LDAPAttributeSet set = new LDAPAttributeSet();
String dn = login.getDN();
set.add(new LDAPAttribute("givenName", vorname));
set.add(new LDAPAttribute("fullName", zuname + " " + vorname));
set.add(new LDAPAttribute("Language", "Deutsch"));
set.add(new LDAPAttribute("sn", zuname));
set.add(new LDAPAttribute("passwordRequired", "TRUE"));
set.add(new LDAPAttribute("passwordMinimumLength", "5"));
set.add(new LDAPAttribute("passwordAllowChange", "TRUE"));
set.add(new LDAPAttribute("objectClass", "inetOrgPerson"));
set.add(new LDAPAttribute("objectClass", "organizationalPerson"));
set.add(new LDAPAttribute("objectClass", "person"));
set.add(new LDAPAttribute("objectClass", "top"));
set.add(new LDAPAttribute("objectClass", "ndsLoginProperties"));
set.add(new LDAPAttribute("objectClass", "posixAccount"));
set.add(new LDAPAttribute("loginScript", "rem"));
set.add(new LDAPAttribute("loginMaximumSimultaneous", "1"));
set.add(new LDAPAttribute("loginDisabled", "FALSE"));
set.add(new LDAPAttribute("uid", loginname));
//set.add(new LDAPAttribute("loginShell", "/bin/bash")); Hier fangen die Probleme an
//set.add(new LDAPAttribute("gidNumber", "100"));
//set.add(new LDAPAttribute("uidNumber", id));
//set.add(new LDAPAttribute("ndsHomeDirectory", "cn=HOM1_H3,ou=SERVER,o=HTL#0#06"));
//set.add(new LDAPAttribute("homeDirectory", "/home/" + login));
set.add(new LDAPAttribute("cn", loginname));
set.add(new LDAPAttribute("userpassword", pwd));
LDAPEntry ent = new LDAPEntry(dn, set);
try
{
con.add(ent);
}
catch (LDAPException e)
{
System.out.println("Problem: " + loginname);
e.printStackTrace();
}
hier noch der stacktrace:
LDAPException: Object Class Violation (65) Object Class Violation
LDAPException: Server Message: NDS error: illegal attribute (-608)
LDAPException: Matched DN:
at com.novell.ldap.LDAPResponse.getResultException(Unknown Source)
at com.novell.ldap.LDAPResponse.chkResultCode(Unknown Source)
at com.novell.ldap.LDAPConnection.chkResultCode(Unknown Source)
at com.novell.ldap.LDAPConnection.add(Unknown Source)
at com.novell.ldap.LDAPConnection.add(Unknown Source)
at daten.vergleich.Vergleich.hinzu(Vergleich.java:383)
at daten.vergleich.Vergleich.ausfuehren(Vergleich.java:292)
at gui.Hauptfenster$27.actionPerformed(Hauptfenster.java:1731)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
bitte um eure hilfe!