java - Unable to login to AD account with given password -


we have set accounts users temporary passwords. user receives password through email , suppose able log in it. have since fixed our previous problem of our passwords not meeting ad requirements , using defaults testing. here error receive in console. please let me know if there else can supplied. thanks:

console

2014-09-10 13:25:32,685 [ajp-0.0.0.0-8009-4] error com.util.adutil - error building user attributes     java.lang.numberformatexception: input string: "exampletest"         @ java.lang.numberformatexception.forinputstring(numberformatexception.java:65) @ java.lang.integer.parseint(integer.java:492)     @ java.lang.integer.parseint(integer.java:527)     @ com.example.publicwebsite.example.account.util.adutil.buildaccount(adutil.java:742)     @ com.example.publicwebsite.example.account.util.adutil.searchforusers(adutil.java:841)     @ com.example.publicwebsite.example.account.util.accountutil.searchforusers(accountutil.java:157)     @ org.apache.jsp.public_.example.admin.searchactiveaccountsjson_jsp._jspservice(searchactiveaccountsjson_jsp.java:77)     @ org.apache.jasper.runtime.httpjspbase.service(httpjspbase.java:70)     @ javax.servlet.http.httpservlet.service(httpservlet.java:717)     @ org.apache.jasper.servlet.jspservletwrapper.service(jspservletwrapper.java:369)     @ org.apache.jasper.servlet.jspservlet.servicejspfile(jspservlet.java:322)     @ org.apache.jasper.servlet.jspservlet.service(jspservlet.java:249)     @ javax.servlet.http.httpservlet.service(httpservlet.java:717)     @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:290)     @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:206)     @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:235)     @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:191)     @ org.jboss.web.tomcat.security.securityassociationvalve.invoke(securityassociationvalve.java:183)     @ org.apache.catalina.authenticator.authenticatorbase.invoke(authenticatorbase.java:442)     @ org.jboss.web.tomcat.security.jacccontextvalve.invoke(jacccontextvalve.java:95)     @ org.jboss.web.tomcat.security.securitycontextestablishmentvalve.process(securitycontextestablishmentvalve.java:126)     @ org.jboss.web.tomcat.security.securitycontextestablishmentvalve.invoke(securitycontextestablishmentvalve.java:70)     @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:127)     @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:102)     @ org.jboss.web.tomcat.service.jca.cachedconnectionvalve.invoke(cachedconnectionvalve.java:158)     @ org.jboss.web.tomcat.service.sso.clusteredsinglesignon.invoke(clusteredsinglesignon.java:692)     @ org.apache.catalina.valves.accesslogvalve.invoke(accesslogvalve.java:566)     @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:109)     @ org.jboss.web.tomcat.service.request.activerequestresponsecachevalve.internalprocess(activerequestresponsecachevalve.java:74)     @ org.jboss.web.tomcat.service.request.activerequestresponsecachevalve.invoke(activerequestresponsecachevalve.java:47)     @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:330)     @ org.apache.coyote.ajp.ajpprocessor.process(ajpprocessor.java:437)     @ org.apache.coyote.ajp.ajpprotocol$ajpconnectionhandler.process(ajpprotocol.java:385)     @ org.apache.tomcat.util.net.jioendpoint$worker.run(jioendpoint.java:451)     @ java.lang.thread.run(thread.java:745) 

here link our previous question:

how reset password in ad, getting ldp operationnotsupported error

java

usercreation

...  ldapcontext = new initialdircontext(ldapenv);         attributes attributes = new basicattributes(true);         attribute objclasses = new basicattribute("objectclass");         objclasses.add("top");         objclasses.add("user");         objclasses.add("person");         objclasses.add("organizationalperson");          attribute cn = new basicattribute("cn", "" + userid);         attribute description = new basicattribute("description", "user account");         attribute distinguishedname = new basicattribute("name", "" + userid);         attribute firstname = new basicattribute("givenname", fname);         attribute lastname = new basicattribute("sn", lname);         attribute mail = new basicattribute("mail", email);         attribute organization = new basicattribute("department", org);         attribute phonenumber = new basicattribute("homephone", pnumber);         attribute samaccountname = new basicattribute("samaccountname", "" + userid);         attribute name = new basicattribute("distinguishedname", createdn("" + userid,usersou));          attribute objectcategory = new basicattribute("objectcategory", userscategorydn);          attribute accountcontrol = new basicattribute("useraccountcontrol", "512");         attribute password = new basicattribute("unicodepwd", formatpassword(temporarypassword));             logger.info("userscat" + userscategorydn);          attributes.put(objclasses);          attributes.put(cn);         attributes.put(description);         attributes.put(distinguishedname);         attributes.put(firstname);         attributes.put(lastname);          attributes.put(mail);         attributes.put(organization);         attributes.put(phonenumber);         attributes.put(samaccountname);         attributes.put(name);         attributes.put(objectcategory);         attributes.put(accountcontrol);         attributes.put(password);          account.setpassword(temporarypassword);  ... 

**formatpassword function article encode:

http://www.ramblingtech.com/will_not_perform-error-from-ad-on-password-change-using-java/

i don't know java, stacktrace seems can't convert exampletest number.

on line 742 of adutil.java-class call parseint has problem parsing exampletest integer. without actual code further investigation bit far fetched.

hope helps though


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -