04-03-2008 10:26 AM
boolean exist = personService.personExists(this.userName);
04-04-2008 05:14 AM
04-04-2008 05:56 AM
15:20:33,793 ERROR [[localhost].[/alfresco].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
net.sf.acegisecurity.AccessDeniedException: Access Denied
at org.alfresco.repo.security.permissions.impl.acegi.ACLEntryAfterInvocationProvider.decide(ACLEntryAfterInvocationProvider.java:299)
at org.alfresco.repo.security.permissions.impl.acegi.ACLEntryAfterInvocationProvider.decide(ACLEntryAfterInvocationProvider.java:196)
at net.sf.acegisecurity.afterinvocation.AfterInvocationProviderManager.decide(AfterInvocationProviderManager.java:107)
at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.afterInvocation(AbstractSecurityInterceptor.java:329)
at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:82)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:241)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
at $Proxy48.getPerson(Unknown Source)
at org.fortify.web.bean.user.FortifyForgotPassword.forgotpwd(FortifyForgotPassword.java:172)
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 org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
at javax.faces.component.UICommand.broadcast(UICommand.java:109)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:595)
04-04-2008 06:15 AM
public void forgotpwd() {
String sTempUserName = this.userName;
getAuthenticationService().authenticateAsGuest();
if (this.userName != null && this.userName.length() != 0) {
System.out.println("Username got :" + sTempUserName);
if (getPersonService().personExists(sTempUserName)) {
NodeRef person = getPersonService().getPerson(sTempUserName);
String address = (String) nodeService.getProperty(person,
ContentModel.PROP_EMAIL);
if (address != null && address.length() != 0) {
// recipients.add(address);
System.out.println("Email Address is :" + address);
}
}
}
}
04-04-2008 07:58 AM
public void setUp(){
FacesContext context = FacesContext.getCurrentInstance();
ServiceRegistry serviceRegistry = Repository.getServiceRegistry(context);
AuthenticationService authenticationService = serviceRegistry.getAuthenticationService();
String username=authenticationService.getCurrentUserName();
this.username=username;
System.out.println(username+" \t—> from AuthCheck!!!!!!!!!");
UserTransaction tx = null;
try
{
//Start the transaction. Why this is required for such a simple operation is beyond me.
TransactionService txs = (TransactionService) FacesContextUtils.getRequiredWebApplicationContext(context).getBean("transactionComponent");
tx = txs.getUserTransaction();
tx.begin();
PersonService personService = (PersonService)FacesContextUtils.getRequiredWebApplicationContext(context).getBean("personService");
NodeService nodeService = (NodeService)FacesContextUtils.getRequiredWebApplicationContext(context).getBean("nodeService");
PersonService ps = serviceRegistry.getPersonService();
System.out.println("\t"+ ps.getUserIdentifier(username));
NodeRef nr = personService.getPerson(username);
String firstName = (String)nodeService.getProperty(nr, ContentModel.PROP_FIRSTNAME);
String lastName = (String)nodeService.getProperty(nr, ContentModel.PROP_LASTNAME);
System.out.println(firstName +" " +lastName+ " From the Repo!!!!!!!!!!!");
tx.commit();
}catch (Exception err)
{
try { if (tx != null) {tx.rollback();}
}
catch (Exception tex) {tex.printStackTrace();}
err.printStackTrace();
}
finally {
//Normally I'd end the transaction, but it doesn't seem to feature such a method.
}
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.