As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Hi everyone,
I'm using Alfresco 5.2 - community version with cmis on Java 8. Recently, on log file some time miss error:
http client request: GET http://ecm.mycompany/alfresco/api/-default-/public/cmis/versions/1.1/atom?repositoryId=-default-spring controller: com.mycompany.ecm.restapi.LosDocRestApi.query()log info: com.mycompany.ecm.restapi.LosDocRestApi - ****** Receive query request with d ... roupName=null, mandatory=0] losdocapi = com.mycompany.ecm.restapi.LosDocRestApi@a7e2060log debug: com.mycompany.ecm.impl.DocPermisionService - ***** Receive request getPermissionList ******http client request: POST http://com.mycompany.rule:8090/ruleengine-jax-rs/ruleengine/api/queryPermissionByGrouplog trace: com.mycompany.ecm.server.AlfrescoImpl - Starting doQuery session =Session 6570 ... ome','LifeInsuranceCertificate') server = com.mycompany.ecm.server.AlfrescoImpl@4f6b501http client request: POST http://ecm.mycompany:80/alfresco/api/-default-/public/cmis/versions/1.1/atom/querylog warn: com.mycompany.ecm.config.CmisSessionInterceptor - Request with URI = /ecm-alfresco-jax-rs/ecm/losdoc/query process in 0 secondsRequest with URI = /ecm-alfresco-jax-rs/ecm/losdoc/query process in 0 seconds Resource leaked (acquired during the transaction and not released): org.apache.chemistry.opencmis.client.runtime.SessionImplResource leaked
I've check CPU, RAM, DISK on Alfresco server, everything still good. So someone can give me some help?
Are you including Basic Auth credentials in your invocation?
Yes,
This is my code
private void configureSessionFactory() { if (sessionFactory == null) { this.parameters = new HashMap<String, String>();
// user credentials parameters.put(SessionParameter.USER, username); parameters.put(SessionParameter.PASSWORD, password);
// connection settings parameters.put(SessionParameter.ATOMPUB_URL, repoUrl); parameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
// Create session factory this.sessionFactory = (SessionFactoryImpl) SessionFactoryImpl.newInstance(); } } private void getRepository() { configureSessionFactory(); List<Repository> repositories = sessionFactory.getRepositories(parameters); this.repository = repositories.get(0); }
public Session createSession() throws Exception { log.debug("try to create session"); if (repository == null) { throw new RepositoryUnavailableException(lastException); } return repository.createSession(); }
You can try to create the session just after getting the repository reference:
cmis-associations-alfresco/CmisService.java at master · aborroy/cmis-associations-alfresco · GitHub
Dear Angel Borroy,
Thanks for your reply. You mean that I have to change my code from:
parameters.put(SessionParameter.ATOMPUB_URL, atompubUrl); parameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
To
parameters.put(SessionParameter.BROWSER_URL, browserUrl); parameters.put(SessionParameter.BINDING_TYPE, BindingType.BROWSER.value());
And, other question, which binding type (BROWSER, ATOMPUB) is better about performance?
Once again, many thanks your help.