12-19-2014 08:47 AM
public void readContent(String docId){
…
// Create nodeRef
NodeRef nodeRef = new NodeRef("workspace://SpacesStore/" + docId);
try {
ContentReader contentReader = cService.getReader(nodeRef, ContentModel.PROP_CONTENT);
InputStream is = contentReader.getContentInputStream();
} catch (Exception e) {
e.printStackTrace();
}
…
}
<bean id="webscript.mywebscript.post" class="org.alfresco.module.MyModel.webscripts.DesktopForm" parent="webscript">
<property name="contentService">
<ref bean="ContentService" />
</property>
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="gconfigs">
<ref bean="generalConfigService" />
</property>
</bean>
net.sf.acegisecurity.BadCredentialsException: Bad credentials presented
at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.getUserFromBackend(DaoAuthenticationProvider.java:393)
at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.authenticate(DaoAuthenticationProvider.java:225)
at net.sf.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:159)
at net.sf.acegisecurity.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:49)
at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:372)
at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.alfresco.repo.model.ml.MLContentInterceptor.invoke(MLContentInterceptor.java:91)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy31.getReader(Unknown Source)
at org.alfresco.module.myModule.webscripts.EmConAux.signCert(EmConAux.java:538)
at org.alfresco.module.myModule.webscripts.DesktopSign.executeImpl(DesktopSign.java:79)
at org.alfresco.web.scripts.DeclarativeWebScript.executeImpl(DeclarativeWebScript.java:209)
at org.alfresco.web.scripts.DeclarativeWebScript.executeImpl(DeclarativeWebScript.java:223)
at org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:70)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:305)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:390)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:273)
at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:261)
at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:139)
at org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:662)
12-19-2014 09:35 AM
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.