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@a7e2060
log debug: com.mycompany.ecm.impl.DocPermisionService - ***** Receive request getPermissionList ******
http client request: POST http://com.mycompany.rule:8090/ruleengine-jax-rs/ruleengine/api/queryPermissionByGroup
log trace: com.mycompany.ecm.server.AlfrescoImpl - Starting doQuery session =Session 6570 ... ome','LifeInsuranceCertificate') server = com.mycompany.ecm.server.AlfrescoImpl@4f6b501
http client request: POST http://ecm.mycompany:80/alfresco/api/-default-/public/cmis/versions/1.1/atom/query
log warn: com.mycompany.ecm.config.CmisSessionInterceptor - Request with URI = /ecm-alfresco-jax-rs/ecm/losdoc/query process in 0 seconds
Request 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.SessionImpl
Resource 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.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.