Comments (8)
Rob Winch said:
olivergierke There appears to be an issue with Spring LDAP's repository support and the integration with Spring Data REST. I followed the migration guide but it appears there is something missing? Any chance you can try out the sample project at https://github.com/voidengineer/spring-data-gosling-ldap and provide clues as to what is wrong?
from spring-ldap-migrate-issues.
Sören Chittka said:
I do not want to be impatient, but are there any news on this?
This bug currently keeps us from using Spring Data Gosling.
from spring-ldap-migrate-issues.
Rob Winch said:
Thanks for the bump. I've pinged the Spring Data Team directly and they are taking a look.
from spring-ldap-migrate-issues.
Rob Winch said:
I'm wondering if you can clarify something for me.
Are you attempting to access Spring LDAP through Spring Data REST?
or
Are you attempting to access some other backend (i.e. JPA) through Spring Data REST and happen to also use Spring LDAP (but do not expose Spring LDAP via REST)?
The reason I am asking is that when I attempt to actually use Spring Data REST backed by Spring LDAP (even in the fowler release) I get the following error:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1526)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1482)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: PersistentEntity must not be null!
at org.springframework.util.Assert.notNull(Assert.java:112)
at org.springframework.data.rest.webmvc.PersistentEntityResource$Builder.<init>(PersistentEntityResource.java:155)
at org.springframework.data.rest.webmvc.PersistentEntityResource$Builder.<init>(PersistentEntityResource.java:137)
at org.springframework.data.rest.webmvc.PersistentEntityResource.build(PersistentEntityResource.java:129)
at org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler.wrap(PersistentEntityResourceAssembler.java:105)
at org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler.toResource(PersistentEntityResourceAssembler.java:84)
at org.springframework.data.rest.webmvc.AbstractRepositoryRestController.entitiesToResources(AbstractRepositoryRestController.java:121)
at org.springframework.data.rest.webmvc.AbstractRepositoryRestController.toResources(AbstractRepositoryRestController.java:83)
at org.springframework.data.rest.webmvc.RepositoryEntityController.getCollectionResource(RepositoryEntityController.java:202)
... 45 more
The error is actually somewhat hidden and is viewed as a 500 with the following DEBUG log:
2015-10-26 11:37:28.769 DEBUG 76895 --- [nio-8080-exec-3] .m.m.a.ExceptionHandlerExceptionResolver : Resolving exception from handler [public org.springframework.hateoas.Resources<?> org.springframework.data.rest.webmvc.RepositoryEntityController.getCollectionResource(org.springframework.data.rest.webmvc.RootResourceInformation,org.springframework.data.rest.webmvc.support.DefaultedPageable,org.springframework.data.domain.Sort,org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler) throws org.springframework.data.rest.webmvc.ResourceNotFoundException,org.springframework.web.HttpRequestMethodNotSupportedException]: java.lang.IllegalArgumentException: PersistentEntity must not be null!
2015-10-26 11:37:28.770 DEBUG 76895 --- [nio-8080-exec-3] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'repositoryRestExceptionHandler'
2015-10-26 11:37:28.771 DEBUG 76895 --- [nio-8080-exec-3] .m.m.a.ExceptionHandlerExceptionResolver : Invoking @ExceptionHandler method: org.springframework.http.ResponseEntity<org.springframework.data.rest.webmvc.support.ExceptionMessage> org.springframework.data.rest.webmvc.RepositoryRestExceptionHandler.handleMiscFailures(java.lang.Exception)
If I use Spring MVC instead of Spring Data REST it works (since Spring MVC does not try to apply the hypermedia). See my fork for a complete example https://github.com/rwinch/spring-data-gosling-ldap/tree/embedded-ldap
from spring-ldap-migrate-issues.
Rob Winch said:
Possibly related to DATAREST-473 (i.e. we can disable Spring LDAP repository from being exported to prevent he error).
from spring-ldap-migrate-issues.
Sören Chittka said:
In fact in the real application I am exposing JPA repositories via Spring Data Rest.
Spring LDAP is only used in a background job for access to our ActiveDirectory. It is not exported over HTTP in any way.
I already tried to annotate the LDAP repository with @RepositoryRestResource(exported = false), but that did not help.
But I imagine there might be usecases where I want to export Spring LDAP repositories with Spring Data Rest. So it would be nice, if that worked.
from spring-ldap-migrate-issues.
Rob Winch said:
It seems to me like there are two things going on here:
- It appears at the moment you need the ability to disable Spring LDAP repositories from being exported as a REST repository. This is a duplicate of DATAREST-473. For this reason, I will be closing this issue as a duplicate of it.
- In the future, you might want an enhancement to Spring LDAP to support being exported as a REST endpoint. I have created LDAP-342
from spring-ldap-migrate-issues.
Rob Winch said:
I should add that by making the LDAP repository package scope it should prevent it from being exported. This might be a viable workaround for you.
from spring-ldap-migrate-issues.
Related Issues (20)
- LDAP-324: Update to Gradle 2.3
- LDAP-325: Update poms
- LDAP-326: Run Spring IO Checks Against Latest Snapshot
- LDAP-327: Correct spring-ldap-core-tiger module name in README HOT 1
- LDAP-328: DirtiesContext for Integration Tests where Order Matters
- LDAP-329: Update Dependency Versions
- LDAP-330: Support for Spring Data Commons 1.10 (Fowler)
- LDAP-331: Reference Not Deployed
- LDAP-332: Update to Gradle 2.4
- LDAP-333: Support Spring Data Gosling
- LDAP-334: Support Spring Platform 2.0
- LDAP-335: NoClassDefFoundError: RepositoryConfigurationExtension
- LDAP-336: Remove usage of internal class sun.misc.BASE64Encoder. HOT 2
- LDAP-337: Allow project to be build with Java 8. HOT 1
- LDAP-338: support property placeholders for (integer) properties in ldap xml configuration
- LDAP-339: Upgrade Spring Data Commons to 1.11 for upcoming Spring Data 3.4 (Gosling) release
- LDAP-340: Upgrade ApacheDS to 1.5.7
- LDAP-342: Support Spring Data REST
- LDAP-343: DirContextAdapter incorrectly throws IllegalArgumentException when adding Name attributes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-ldap-migrate-issues.