cancel
Showing results for 
Search instead for 
Did you mean: 

Issues in creating custom webscripts using Alfresco AIKAU tutorial.

satheeshkumar
Champ in-the-making
Champ in-the-making
Hi Experts,

I followed the below tutorial,
https://github.com/Alfresco/Aikau/blob/master/tutorial/chapters/Tutorial8.md
and when I try to hit the webscript URL, I am getting the below error in the logs and the Page is not rendering the expected results as few standard js files were missing.


ERROR [org.springframework.extensions.surf.DependencyAggregator] [http-apr-8080-exec-17] Could not find compressed file: js/alfresco/services/UploadService.js
ERROR [org.springframework.extensions.surf.DependencyAggregator] [http-apr-8080-exec-1] Could not find compressed file: js/alfresco/services/DialogService.js
ERROR [org.springframework.extensions.surf.DependencyAggregator] [http-apr-8080-exec-1] Could not find compressed file: js/alfresco/lists/views/AlfListView.js
ERROR [org.springframework.extensions.surf.DependencyAggregator] [http-apr-8080-exec-1] Could not find compressed file: js/alfresco/lists/views/layouts/Row.js
ERROR [org.springframework.extensions.surf.DependencyAggregator] [http-apr-8080-exec-1] Could not find compressed file: js/alfresco/lists/views/layouts/Cell.js


I cross checked in the below path of my project,
/opt/alfresco-5.0.c/tomcat/webapps/share/js/alfresco/services
and found that the
UploadService.js and DialogService.js 
files are missing, similar the case for other js files mentioned in the above error logs.
Can someone tell me why these were missing, do I need to add any special dependency in my project's pom.xml to have this in place.
5 REPLIES 5

mitpatoliya
Star Collaborator
Star Collaborator

lei_wang
Champ in-the-making
Champ in-the-making
Those missing js files are in aikau-x.x.x.x.jar file.

Workaround: Add following in the pom.xml
<blockcode>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>aikau</artifactId>
<version>1.0.8.1</version>
</dependency> 
</blockcode>

Hi Lei,

Thanks for your suggestion, but I got some error when add the above mentioned dependency, so I added the below dependancy by referring some of the aikau projects,

<dependency>
<groupId>org.alfresco</groupId>
<artifactId>aikau</artifactId>
<version>1.0.8</version> //Changed from 1.0.8.1 to 1.0.8
</dependency>


I was able to build the project successfully, but still, after applying amps to my application and starting the server, when I search for the file 'UploadService.js', I could still not able to find it.
But my .amp file size has increased from 4MB to 20MB, after adding this dependency.
It looks like even after adding this dependency it is not loading those standard js files, is there something weird happening here?
Can you please help?

aikau-1.0.8.1 works fine in my environment (community 5.0.c). 

You can find UploadService.js and other missing js files in aikau-1.0.8.1.jar -> META-INF -> js -> aikau -> 1.0.8.1
-> alfresco -> services

You cannot find those js files because jar does not have to be extracted into Alfresco. After successfully deployed the share amp, aikau jar could be found in:
alfresco_home/tomcat/webapps/share/WEB-INF/lib/

I've tested Tutorial 1 Step 5 Add File Upload Support, created amp then deployed to alfresco, upload service works as expected.

Thanks for confirming that Lei, I could able to run the webscript successfully now.