-
1. Re: spring ldap in as7
oourfali Jul 13, 2011 6:48 AM (in response to oourfali)I did some research + debugging, and I saw that the response control is not created at all.
The error comes when the method getResultsControl of the LdapContext is called, and it returns null.
I think it is some kind of configuration, or class loading issue, that prevents it from happenning.
If anyone managed to make spring ldap work properly when using paged queries in as7 then I'd be happy to hear about it.
Again, in 5.1 it worked properly.
Thank you,
Oved
-
2. Re: spring ldap in as7
dlofthouse Jul 13, 2011 7:48 AM (in response to oourfali)If the class you can not find it a javax class try updating your Manifest for the war with the following dependency: -
Dependencies: javax.api
-
3. Re: spring ldap in as7
oourfali Jul 13, 2011 8:06 AM (in response to dlofthouse)It is looking in the response classed for an instance of the class javax.naming.ldap.PagedResultsResponseControl, but it doesn't find it because the response control array is empty.
I tried to add javax.api to the manifest file (both in the jar that uses it, and in the ear manifest), but it didn't work.
I don't know if he doesn't find this class, or maybe another error is being "swallowed", causing it not to create the response control, and then to fail when looking for an instance of it.
btw, I also tried to add a system module that contains javax.naming.ldap, and add a dependency on it, but it also didn't work.
Thank you for your help,
Oved
-
4. Re: spring ldap in as7
qixunyuan Jul 18, 2011 2:45 AM (in response to oourfali)do you resolved the problem, right now, I also want to do the same thing with you.
-----
I want to set up the CDI service for the ldap access.
-
5. Re: spring ldap in as7
oourfali Jul 18, 2011 3:00 AM (in response to qixunyuan)Not yet.
I moved on to other issues I had.
In case you'll have it working I'd be happy to hear how.
I suspect something in my configuration or environment is wrong, or it is a class loading issue that is maybe caught and thus it is hidden from me.
-
6. Re: spring ldap in as7
oourfali Oct 17, 2011 4:40 AM (in response to oourfali)Hey,
I came back to this issue now, and I found the following bug https://issues.jboss.org/browse/AS7-2085
It is a blocker for 7.0.2.Final.
When is it planned to be released?
Thank you,
Oved
-
7. Re: spring ldap in as7
oourfali Oct 17, 2011 10:47 AM (in response to oourfali)Well, I saw that it was released, but the problem wasn't fixed.
Does anyone know when is this issue planned to be fixed?
-
8. Re: spring ldap in as7
yuanqixun Oct 17, 2011 8:47 PM (in response to oourfali)1 of 1 people found this helpfulHello,everyone,this bug is jboss7.x's problem, I debug into jboss's source code, I fixed it, you should recompile the module:org.jboss.as.naming
the problem is caused by class org.jboss.as.naming.NamingContext.java this following code:
---------------------
static {
try {
NamingManager.setObjectFactoryBuilder(ObjectFactoryBuilder.INSTANCE);
} catch(Throwable t) {
ROOT_LOGGER.failedToSet(t, "ObjectFactoryBuilder");
}
}--------------------
you can comment it and rebuild this module, and spring-ldap will run ok.I don't know the reason.
good luck.
-
9. Re: spring ldap in as7
oourfali Oct 23, 2011 7:47 AM (in response to yuanqixun)It indeed solves the problem.
I wonder if that's indeed the correct fix to do.
Hopefully someone from the jboss team will check it out.
Thank you!
Oved
-
10. Re: spring ldap in as7
davidwery Oct 25, 2011 10:40 AM (in response to yuanqixun)Thanks for the fix Yuan! Don't you have the compiled version of the org.jboss.as.naming module? I'm lazy to rebuild it :-)
David
-
11. Re: spring ldap in as7
oourfali Oct 25, 2011 11:24 AM (in response to davidwery)The module and index file are attached.
Built about a week ago with the latest commits.
Enjoy :-)
-
jboss-as-naming-7.0.2.Final.jar 146.7 KB
-
12. Re: spring ldap in as7
yuanqixun Oct 25, 2011 11:27 PM (in response to davidwery)I'm sorry, I'm very busy recently,I attached the source and binary file.
-
jboss-as-naming-7.0.2.Final.jar 143.7 KB
-
13. Re: spring ldap in as7
jaikiran Oct 25, 2011 11:58 PM (in response to yuanqixun)Looking at this thread and the referenced JIRA, I don't really understand what the issue is. I can see that the Spring configuration/runtime is running into some issue but I can't find much details in this thread or the JIRA. Could one of you please post the exact details including the exception stacktrace and also a reproducible application?
-
14. Re: spring ldap in as7
oourfali Oct 26, 2011 12:39 PM (in response to jaikiran)I'll try to create a small reproduction application.
Basically, the problem is that when trying to query an LDAP directory using Spring LDAP each query results in:
org.springframework.ldap.core.ObjectRetrievalException: Binding did not contain any object.
Yuan found out that remarking the code:
static { try { NamingManager.setObjectFactoryBuilder(ObjectFactoryBuilder.INSTANCE); } catch(Throwable t) { ROOT_LOGGER.failedToSet(t, "ObjectFactoryBuilder"); } } Solves the problem, but not sure it is the correct fix.