directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Sand <rs...@idfconnect.com>
Subject GeneralizedTime attribute
Date Wed, 30 Mar 2016 04:23:34 GMT
Hi all - using the latest SDK and Apache Directory, I'm having trouble 
populating a GeneralizedTime attribute. Any help appreciated, thanks!

My code:

GeneralizedTime gt = new GeneralizedTime(new 
SimpleDateFormat(BasicChecker.DATEFORMAT).parse(license.getExpiration()));
entry.add(AdminService.LS_ATTR_START, gt.toGeneralizedTime());

When I run this, I get an exception:

016-03-30 00:06:14.407 [main] DEBUG 
org.glassfish.jersey.server.ServerRuntime$Responder - An exception 
mapping did not successfully produce and processed a response. Logging 
the exception propagated to the container.
org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException: 
INVALID_ATTRIBUTE_SYNTAX: failed for MessageType : ADD_REQUEST
Message ID : 21
     Add Request :
Entry
     dn[n]: cn=10001,ou=Licenses,dc=ls,dc=sand,dc=idfconnect,dc=lan
     objectclass: lsLicense
     member:
     postalCode: 19803
     lsNotices: Copyright IDF Connect, Inc.
     lsLicensee: IDF Connect, Inc.
     c: US
     lsStartTimestamp: 20131231050000.000Z
     lsStartTimestamp: 20160101050000.000Z
     lsType: Development
     street: 2207 Concord Ave. #359
     l: Wilmington
     st: Delaware
     lsBinding: 127.0.0.1
: ERR_04447_CANNOT_NORMALIZE_VALUE Cannot normalize the wrapped value 
ERR_04473_NOT_VALID_VALUE Not a valid value '20131231050000.000Z' for 
the AttributeType 'attributetype ( 1.3.6.1.4.1.2552.3.5 NAME 
'lsStartTimestamp'
     DESC 'the start timestamp of the license'
     EQUALITY generalizedTimeMatch
     ORDERING generalizedTimeOrderingMatch
     SYNTAX 1.3.6.1.4.1.1466.115.121.1.53
     USAGE userApplications )'
     at 
org.apache.directory.api.ldap.model.message.ResultCodeEnum.processResponse(ResultCodeEnum.java:2130)
     at 
org.apache.directory.ldap.client.api.LdapNetworkConnection.add(LdapNetworkConnection.java:838)
     at 
com.idfconnect.license.server.core.IssuedLicense.create(IssuedLicense.java:255)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAcces

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message