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

2017-05-22 06:45:56 GMT <yreg> Good morning Channel !

2017-05-22 08:34:39 GMT <Loftux> Is there a SDK3 sample somewhere on how to add a Module that builds a complete war (inluding all amp dependencies)?

2017-05-22 08:51:44 GMT <angelborroy> Loftux https://community.alfresco.com/docs/DOC-6855-alfresco-sdk-30-beta-user-guide

2017-05-22 08:51:46 GMT <alfbot> Title: Alfresco SDK 3.0 Beta User Guide | Alfresco Community (at community.alfresco.com)

2017-05-22 08:56:28 GMT <Loftux> angelborroy: Just found that, and it says that complete war gets build, but for me it does not (testing with mvn clean install). Any other mvn command that you need to use? Or a flag?

2017-05-22 08:57:02 GMT <angelborroy> Nope, just sharing this resource

2017-05-22 08:57:06 GMT <angelborroy> I haven’t tried it

2017-05-22 09:06:14 GMT <Loftux> "mvn clean install alfresco:run" does create war files, but not sure if that is the way to go. You don't really want to start it all just to get built war files.

2017-05-22 09:10:41 GMT <yreg> Loftux, AFAIK you should not use wars built by the SDK

2017-05-22 09:11:08 GMT <yreg> they contain a lot of hacks for RAD, and even if they work, they wouldn't be clean enough for prod

2017-05-22 09:11:43 GMT <fcorti> Loftux, I'm afraid the answer is not positive.

2017-05-22 09:11:44 GMT <Loftux> yreg: Yea, just noticed that it of course have all test resources etc

2017-05-22 09:11:53 GMT <yreg> I would suggest you to add some extra plugin/logic to invoke mmt from maven and build the war by applying amps in the order you which

2017-05-22 09:12:00 GMT <yreg> wish*

2017-05-22 09:12:30 GMT <yreg> (Which was the exact same suggestion made by Ole to me)

2017-05-22 09:12:52 GMT *** angelborroy_ is now known as angelborroy

2017-05-22 09:15:56 GMT <Loftux> SDK2 it is then

2017-05-22 09:23:34 GMT <AFaust> yreg: That reminds me that I still have to port that old SDK plugin patch of mine for ordered MMT invocation to my Acosix Maven project...

2017-05-22 10:01:18 GMT <yreg> Loftux, I assume it would be the same thing with sdk 2.x

2017-05-22 10:03:11 GMT <Loftux> yreg: No it has the "war" modules. We use that for most of our customer deploys, build a complete war that has everything included that should be there, no mmt on the server to apply amps

2017-05-22 10:04:03 GMT <yreg> Loftux, I had the same recommendation from Ole regarding those wars

2017-05-22 10:05:44 GMT <Loftux> yreg: You mean that it includes test resources and such? We use mvn clean install -Denv=production

2017-05-22 10:05:44 GMT <Loftux> and that usually does the trick

2017-05-22 11:37:14 GMT <fwu> hi all!

2017-05-22 11:37:24 GMT <fwu> angelborroy, hello!

2017-05-22 11:37:58 GMT <fwu> what I was trying to ask you the other day was if there is anywhere where I can look the ADF Alfresco screens...

2017-05-22 12:29:30 GMT <angelborroy> fwu https://community.alfresco.com/community/application-development-framework/content?filterID=contentstatus%5Bpublished%5D~category%5Bdocumentation%5D

2017-05-22 12:29:32 GMT <alfbot> Title: Application Development Framework | Alfresco Community (at community.alfresco.com)

2017-05-22 12:54:07 GMT <Loftux> There seem to be a version 1.1.6 of the AOS module available now, but not for _vti_bin.

2017-05-22 12:55:05 GMT <fwu> back

2017-05-22 13:00:13 GMT <Loftux> AOS 1.1.6 was published to artifact server on April 7, would be interesting to know what updates are in there and if it works with 1.1.5 _vti_bin.war https://artifacts.alfresco.com/nexus/#nexus-search;quick~aos

2017-05-22 13:00:14 GMT <alfbot> Title: Nexus Repository Manager (at artifacts.alfresco.com)

2017-05-22 13:00:39 GMT <fwu> ppl, from where can download a ready amp file for the Alfresco javascript console?

2017-05-22 13:01:45 GMT <fcorti> Loftux, let try if I can face this question... if someone is interested, why not. Will tell you later on.

2017-05-22 13:02:12 GMT <Loftux> fcorti: Thanks

2017-05-22 13:06:04 GMT <AFaust> fwu: Maven Central

2017-05-22 13:16:35 GMT <fwu> AFaust, thnak you

2017-05-22 13:20:37 GMT <fwu> AFaust, remember the class question from another day? That I manually add to the alfresco\WEB-INF\classes\ folder?

2017-05-22 13:21:14 GMT <fwu> it is strange because when I added manually just for testing purposes it worked. Now Im saving the class in the same location but with an amp, and Im getting an error...

2017-05-22 13:21:46 GMT <fwu> the error:

2017-05-22 13:21:48 GMT <yreg> fwu that was a dirty hack

2017-05-22 13:21:48 GMT <fwu> ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.alfresco.repo.web.scripts.workflow.WorkflowInstancesGet] for bean with name 'webscript.org.alfresco.repository.workflow.workflow-instances.get' defined in class path resource [alfresco/web-scripts-application-context.xml]: problem with class file or dependent

2017-05-22 13:21:53 GMT <fwu> yreg, yes

2017-05-22 13:21:55 GMT <fwu> thats it

2017-05-22 13:22:30 GMT <AFaust> fwu: When you use an AMP you probably have an issue with *.class files being corrupted by building the AMP.

2017-05-22 13:22:31 GMT <fwu> but why I get an error if placed there in a amp file? It is saved in the right spot...

2017-05-22 13:22:49 GMT <fwu> AFaust, good point

2017-05-22 13:22:51 GMT <AFaust> This is often due to Maven filtering feature when there is no exclusion for the *.class file extension

2017-05-22 13:23:05 GMT <fwu> so I need to place it on the pom?

2017-05-22 13:23:11 GMT <AFaust> This applies to all kinds of binary files

2017-05-22 13:23:40 GMT <AFaust> It depends on how you build the AMP - via assembly or some plugin that uses the maven-resources-plugin behind the covers.

2017-05-22 13:23:53 GMT <AFaust> It is usually safe to add the filtering exclusion to the maven-resources-plugin configuration.

2017-05-22 13:24:14 GMT <AFaust> In my case I use assemblies to generate AMPs and would need to add the filtering exclusion in the assembly descriptor

2017-05-22 13:24:55 GMT <twen> hello

2017-05-22 13:25:11 GMT <AFaust> What yreg said about that being a hack reflects what I have originally stated as well. I would have written my own class and simply replaced the bean class instead of relying on classpath shadowing...

2017-05-22 13:27:07 GMT <fwu> AFaust, I understand what you are saying but I believe I would have some troubles with references, or not?

2017-05-22 13:27:27 GMT <AFaust> Usually not - web scripts are rarely referenced by other beans...

2017-05-22 13:32:52 GMT <fwu> but where in the pom I can add the exclusion.

2017-05-22 13:32:59 GMT <fwu> Is it the maven-war-plugin that I need?

2017-05-22 13:33:25 GMT <AFaust> maven-resources-plugin

2017-05-22 13:33:34 GMT <fwu> ok

2017-05-22 13:33:38 GMT <fwu> let me look at it

2017-05-22 13:33:47 GMT <fwu> thank you AFaust

2017-05-22 13:33:51 GMT <AFaust> That is likely inherited from the parent POM(s) and you may have to copy its definition from there...

2017-05-22 13:34:07 GMT <fwu> ok, I will look at it. nice

2017-05-22 13:50:33 GMT <fwu> AFaust, the exclusion works to exclude the file form the war, but the file will be copied, right?

2017-05-22 14:35:34 GMT <AFaust> fwu: You need to apply this to AMP construction, not WAR construction. So not in the POM that installs the AMPs into the WAR, but the POM that originally creates the AMP(s)

2017-05-22 14:39:27 GMT <fwu> AFaust, I only deal with a pom.xml for each project.

2017-05-22 14:40:31 GMT <fwu> this is for standard alfresco repo project architecture

2017-05-22 14:45:43 GMT <fwu> this pom is building the amp file. so I believe Im looking to the right amp

2017-05-22 14:45:49 GMT <fwu> sorry, right pom

2017-05-22 14:46:25 GMT <fwu> in this pom Im adding a plugin like this:

2017-05-22 14:46:28 GMT <fwu> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.7</version> <dependencies> <dependency> <groupId>org.apache.maven.shared</groupId> <artifactId>maven-filtering</artifactId> <version>1.3</version> </dependency> </dependencies> <configur

2017-05-22 14:47:10 GMT <fwu> <excludes> <exclude>src/main/amp/config/org/alfresco/repo/web/scripts/workflow/WorkflowInstancesGet.class</exclude> </excludes> </configuration>

2017-05-22 14:47:26 GMT <fwu> but it is not working as expected

2017-05-22 15:02:26 GMT <AFaust> fwu: Usually you would want to use maven-resources-plugin nonFilteredFileExtensions to make this more generic - see https://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#nonFilteredFileExtensions

2017-05-22 15:02:27 GMT <alfbot> Title: Apache Maven Resources Plugin – resources:resources (at maven.apache.org)

2017-05-22 15:02:39 GMT <AFaust> I have never used the maven-filtering artifact

2017-05-22 15:03:28 GMT <AFaust> As far as I understand, this is not a real plugin - it is meant to be used as a base for extension to actually write a plugin

2017-05-22 15:43:57 GMT <fwu> AFaust, I tried this with no luck:

2017-05-22 15:43:59 GMT <fwu> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.5</version> <configuration> <encoding>${project.build.sourceEncoding}</encoding> <nonFilteredFileExtensions> <nonFilteredFileExtension>class</nonFilteredFileExtension> </nonFilteredFileExtensions> </configuration> </plugin>

2017-05-22 17:10:27 GMT <fwu> ppl, how can I delete in the database objects that throw this error everywhere in alfresco:

2017-05-22 17:10:32 GMT <fwu> Namespace prefix XXXX is not mapped to a namespace URI

2017-05-22 17:10:40 GMT <fwu> I cant go to the javascript console

2017-05-22 17:10:54 GMT <fwu> i cant use the workflow console

2017-05-22 17:11:00 GMT <fwu> so, I cant delete this

2017-05-22 17:11:12 GMT <fwu> in what tables should I look for?

2017-05-22 17:34:50 GMT <Popochon> "Namespace prefix wf is not mapped to a namespace URI" i have similar problem... with the model of my workflow... its 3 days I can not find a solution...

2017-05-22 18:12:03 GMT *** marsbard_ is now known as marsbard

End of Daily Log

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