[Security & JAAS/JBoss] - LdapExtLoginModule && PartialResultException
by jc7442
I try to use LdapExtLoginModue to authenticate over a windows active directory.
For some of my users I have a very strange exception:
[url]Exception in thread "main" javax.security.auth.login.FailedLoginException: Password Incorrect/Password Required
at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:213)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at Main.main(Main.java:41)
Caused by: javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name 'dc=fr,dc=mycompany,dc=net'
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2763)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2737)
at com.sun.jndi.ldap.LdapNamingEnumeration.getNextBatch(LdapNamingEnumeration.java:129)
at com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreImpl(LdapNamingEnumeration.java:198)
at com.sun.jndi.ldap.LdapNamingEnumeration.hasMore(LdapNamingEnumeration.java:171)
at org.jboss.security.auth.spi.LdapExtLoginModule.rolesSearch(LdapExtLoginModule.java:421)
at org.jboss.security.auth.spi.LdapExtLoginModule.createLdapInitContext(LdapExtLoginModule.java:348)
at org.jboss.security.auth.spi.LdapExtLoginModule.validatePassword(LdapExtLoginModule.java:229)
at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:210)
... 11 more[/url]
When the login module tries to get the role of the authenticated user, the roleSearch method failed. I go through this method with a debugger.
ctxt.search return a NamingEnumeration that contains 1 element, a while iterate over the enumeration. Exception is thrown in the while when the hasMore method is invoked for the second time.
I have patch the code to replace hasMore with hasMoreElements. That fiw my problem.
Finally I replace in searchRole and bindDNAuthentication methods the hasMore() by hasMoreElements().
I'm not able to understand why hasMore method throws an exception for some of my config and not for others.
Is that a bug in the LdapExtLoginModule ???
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012887#4012887
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012887
19Â years, 2Â months
[JBoss jBPM] - Want to get All leaving Transition
by umeshsinha
Hi All JBMP Gurus,
I'm very new to JBMP, infact just 8-9 days old.
My problem is I'm not able to get the all leaving transition of any node.
I have a process definition like below.
<process-definition>
<start-state name='start'>
</start-state>
<end-state name='end' />
</process-definition>
After reaching at state 'one' I tried to get the all leaving transition just by calling processInstance.getRootToken().getNode().getLeavingTransions().
But I'm getting null. I went through the doc provided by JBPM and I guess according to this I should get a list of all transition starting from this node.
I also tried to find something useful according to my standard on this forum but failed to get one.
Seeks somebody help.
Thanks in advance
With Regards
Umesh
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012886#4012886
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012886
19Â years, 2Â months
[JBoss Seam] - HibernateEntityHome vs EntityHome
by baz
Hello,
Are there any difference between these two?
For example:
I have generated, with seam-gen, a short app containing one Entityclass called person..
Here is the generated code for the Home object:
@Name("personHome")
| public class PersonHome extends EntityHome<Person>{
| @RequestParameter
| Long personId;
|
| @Override
| public Object getId() {
| if (personId==null) {
| return super.getId();
| } else {
| return personId;
| }
| }
|
| @Override @Begin
| public void create() {
| super.create();
| }
| }
Now i wanted to use HibernateEntityHome. The generated files were included in a working app with a hibernatesession. Then i modified the sources to match the new environment. The only intended change to the above file was to change EntityHome to HibernateEntityHome.
But this results in an exception. (Session is null)
After an non intended change the class read like so:
@Name("personHome")
| public class PersonHome extends HibernateEntityHome<Person>{
| @RequestParameter
| Long personId;
|
| @In(create = true) private Session bazDatabase;
| @Override
| public Session getSession(){return bazDatabase; }
|
| @Override
| public Object getId() {
| if (personId==null) {
| return super.getId();
| } else {
| return personId;
| }
| }
|
| @Override @Begin
| public void create() {
| super.create();
| }
| }
1. Why is the entity manager implicit and the hibernatesession is not?
2. Why must i specify create="true"? I have set auto-creat="true" on the database
3. Is it possible to make the session implicit?
4. how?
Ciao Carsten
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012885#4012885
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012885
19Â years, 2Â months