GluuFederation / oxTrust

Gluu Server UI for managing authentication, authorization and users.
https://gluu.org/docs/ce
MIT License
134 stars 60 forks source link

Gluu 4.0 QA | oops error on Attributes LDIF Export #1807

Closed sahilIT2020 closed 5 years ago

sahilIT2020 commented 5 years ago

Describe the issue

Getting OOPs error on exporting LDIF attributes

Steps To Reproduce

Steps to reproduce the behavior:

  1. Go to Configuration > Import/Export Attribute LDIF
  2. Select Birthdate, Country and Display Name
  3. Click Export

Expected behavior

Should export attribute in ldif file

Actual behavior

Getting OOPs error

Desktop (please complete the following information):

oxtrust logs

2019-09-03 23:40:02,170 INFO  [qtp105704967-69] [org.gluu.oxtrust.action.AttributeInventoryAction] (AttributeInventoryAction.java:202) - the selections are : 3
2019-09-03 23:40:02,170 ERROR [qtp105704967-69] [org.gluu.oxtrust.action.AttributeInventoryAction] (AttributeInventoryAction.java:213) -
Failure : org.apache.commons.lang.NotImplementedException: Current Persistence mechanism not allows to export data to LDIF!

2019-09-03 23:40:02,195 TRACE [qtp105704967-69] [org.gluu.oxtrust.exception.GlobalExceptionHandler] (GlobalExceptionHandler.java:58) - STREAM
java.lang.IllegalStateException: STREAM
        at org.eclipse.jetty.server.Response.getWriter(Response.java:729) ~[?:?]
        at com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java:851) ~[javax.faces-2.2.16.jar:2.2.16]
        at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:785) ~[javax.faces-2.2.16.jar:2.2.16]
        at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:785) ~[javax.faces-2.2.16.jar:2.2.16]
        at com.sun.faces.application.view.FaceletViewHandlingStrategy.createResponseWriter(FaceletViewHandlingStrategy.java:1206) ~[javax.faces-2.2.16.jar:2.2.16]
        at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:403) ~[javax.faces-2.2.16.jar:2.2.16]
        at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134) ~[javax.faces-2.2.16.jar:2.2.16]
        at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) ~[javax.faces-2.2.16.jar:2.2.16]
        at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) ~[javax.faces-2.2.16.jar:2.2.16]
        at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) ~[javax.faces-2.2.16.jar:2.2.16]
        at org.omnifaces.viewhandler.OmniViewHandler.renderView(OmniViewHandler.java:119) ~[omnifaces-2.6.9.jar:2.6.9]
        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) ~[javax.faces-2.2.16.jar:2.2.16]
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [javax.faces-2.2.16.jar:2.2.16]
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) [javax.faces-2.2.16.jar:2.2.16]
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659) [javax.faces-2.2.16.jar:2.2.16]
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:868) [jetty-servlet-9.4.19.v20190610.jar:9.4.19.v20190610]
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623) [jetty-servlet-9.4.19.v20190610.jar:9.4.19.v20190610]
syntrydy commented 5 years ago

@sahiliamsso this is couchbase right?

sahilIT2020 commented 5 years ago

Yes

sahilIT2020 commented 5 years ago

I am also getting issue on import attributes using ldif image

ldif file

gluuAttributeName: nickname1
gluuSAML1URI: urn:mace:dir:attribute-def:nickname1
gluuSAML2URI: urn:oid:1.3.6.1.4.1.48710.1.3.319
gluuAttributeViewType: [user, admin]
displayName: Nickname1
objectClass: gluuAttribute
description: Casual name of the End-User that may or may not be the same as the given_name.For instance, a nickname value of Mike might be returned alongside a given_name value of Michael.
dn: inum=5EC61,ou=attributes,o=gluu
inum: 5EC61
oxAuthClaimName: nickname1
urn: http://openid.net/specs/openid-connect-core-1_0.html/StandardClaims/nickname
gluuAttributeEditType: [user, admin]
gluuAttributeOrigin: gluuPerson
gluuAttributeType: string
gluuStatus: active
sahilIT2020 commented 5 years ago

@syntrydy Have you fixed import issue as well as mentioned above?

syntrydy commented 5 years ago

of course

sahilIT2020 commented 5 years ago

@syntrydy - When I try to import the exported file with additional changes, it gives error

2019-09-23 21:49:33,006 INFO  [qtp105704967-14] [org.gluu.persist.ldap.impl.LdifDataUtility] (LdifDataUtility.java:305) - Malformed ldif record null
2019-09-23 21:49:33,006 ERROR [qtp105704967-14] [org.gluu.persist.ldap.impl.LdifDataUtility] (LdifDataUtility.java:306) - Malformed ldif record
com.unboundid.ldif.LDIFException: The first line of the entry starting at or near line number 1 did not begin with 'dn:'.
        at com.unboundid.ldif.LDIFReader.decodeChangeRecord(LDIFReader.java:2446) ~[unboundid-ldapsdk-4.0.5.jar:4.0.5]
        at com.unboundid.ldif.LDIFReader.readChangeRecordInternal(LDIFReader.java:1708) ~[unboundid-ldapsdk-4.0.5.jar:4.0.5]
        at com.unboundid.ldif.LDIFReader.readChangeRecord(LDIFReader.java:1301) ~[unboundid-ldapsdk-4.0.5.jar:4.0.5]
        at org.glu

On moving dn=.. to first line, then I am able to import the file successfully. However I can't see any option to delete attribute after import successful image