Daily Log for #alfresco IRC Channel

Alfresco discussion and collaboration. Stick around a few hours after asking a question.

Official support for Enterprise subscribers: support.alfresco.com.

Joining the Channel:

Join in the conversation by getting an IRC client and connecting to #alfresco at Freenode. Our you can use the IRC web chat.

More information about the channel is in the wiki.

Getting Help

More help is available in this list of resources.

Daily Log for #alfresco

2019-01-03 04:09:42 GMT <grendal_prime> ok i just had a realization...i dont know that it is actually a bug...but well check this out

2019-01-03 04:12:25 GMT <grendal_prime> If i create a document in like libreoffice and the save it using cmis protocol to my alfresco 5.1 server i then open the document for online editing using zlk plugin well it does not record the version history. However if i create a document on my workstation and then use the upload document feature of share, it will then start tracking version history correctly.

2019-01-03 10:26:29 GMT <fwu2018> hello! I wish a great 2019 for everyone!

2019-01-03 11:38:46 GMT <fwu2018> Can anyone help on this. Im almost sure this used to work before.

2019-01-03 11:38:54 GMT <fwu2018> Im trying this on the javascript console:

2019-01-03 11:39:03 GMT <fwu2018> var ctx = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext();

2019-01-03 11:39:05 GMT <fwu2018> var authorityService = ctx.getBean("authorityService");

2019-01-03 11:39:09 GMT <fwu2018> but I get this:

2019-01-03 11:39:35 GMT <fwu2018> org.springframework.extensions.webscripts.WebScriptException: 00030137 Wrapped Exception (with status template): 00038538842 Failed to execute script 'Javascript Console Script': Invalid bean definition with name 'authorityService' defined in class path resource [alfresco/authority-services-context.xml]: Can only specify arguments for the getBean method when referring to a prototype bean definition

2019-01-03 11:40:23 GMT <fwu2018> is there some change in Alfresco or some configuration that make this code break?

2019-01-03 11:44:53 GMT <AFaust> There was a change somewhere in early 5.x due to an upgrade of Rhino library. It typically is safer to specify the interface of the bean in addition to the name.

2019-01-03 11:45:39 GMT <AFaust> All my uses of getBean via JavaScript Console always look like this: ctxt.getBean('userRegistrySynchronizer', Packages.org.alfresco.repo.security.sync.UserRegistrySynchronizer);

2019-01-03 11:46:28 GMT <AFaust> Also... try to stick to the public beans, i.e. "AuthorityService" instead of "authorityService"

2019-01-03 11:49:08 GMT <fwu2018> AFaust, the public bean is not working, also.

2019-01-03 11:49:19 GMT <fwu2018> However, your first example seems to be working indeed

2019-01-03 11:49:49 GMT <fwu2018> but im almost sure the way I was doing worked before.

2019-01-03 11:50:19 GMT <fwu2018> where I can find the packages for the other beans, so I can get them as you are doing?

2019-01-03 11:50:51 GMT <AFaust> Yes, it worked before on older Alfresco versions.

2019-01-03 11:51:16 GMT <fwu2018> yes, it should be related with the Alfresco versions.

2019-01-03 11:51:32 GMT <AFaust> But the upgrade to the Rhino library in 5.x changed method resolution for the JavaScript <-> Java interoperability that affects methods with variable argument lists

2019-01-03 11:52:30 GMT <AFaust> In some cases the old way may still work, but the variant with the additional interface will always work (both older and newer Alfresco versions)

2019-01-03 11:52:49 GMT <fwu2018> ok

2019-01-03 11:52:56 GMT <AFaust> As with regards to "find the packages for the other beans" => check Alfresco Java APIs...

2019-01-03 11:54:32 GMT <AFaust> i.e. via https://dev.alfresco.com/resource/docs/java/

2019-01-03 11:54:33 GMT <alfbot> Title:Alfresco 5.3.a-SNAPSHOT API (at dev.alfresco.com)

2019-01-03 11:55:07 GMT <AFaust> you should typically look for the interfaces of specific beans, i.e. the AuthorityService interface in your case

2019-01-03 11:55:25 GMT <AFaust> and than use the full class name with package + class name

2019-01-03 11:56:00 GMT <AFaust> https://dev.alfresco.com/resource/docs/java/org/alfresco/service/cmr/security/AuthorityService.html

2019-01-03 11:56:01 GMT <alfbot> Title:AuthorityService (Alfresco 5.3.a-SNAPSHOT API) (at dev.alfresco.com)

2019-01-03 11:56:58 GMT <fwu2018> AFaust, great help, thank you! It is working again.

End of Daily Log

The other logs are at http://esplins.org/hash_alfresco