cancel
Showing results for 
Search instead for 
Did you mean: 

Seam Client for Alfresco rivet

rivetlogic
Champ on-the-rise
Champ on-the-rise
SCAr

SCAr (Seam Client for Alfresco rivet) is a production-ready demo application for accessing an Alfresco document management repository. SCAr is built with JBoss Richfaces, JBoss Seam and RAAr (http://wiki.rivetlogic.org/display/RAAR/).

A demo site can be accessed at http://scar.rivetlogic.com.

SCAr lives here:
http://wiki.rivetlogic.org/display/SCAR/

Feel free to ask questions about SCAr in this thread.

–Sumer
46 REPLIES 46

jpfi
Champ in-the-making
Champ in-the-making
Hi Sumer,
nice works, well done! I don't find any license declaration…?
best,
Jan

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi Jan,

Thanks for the catching that. I updated the wiki.

It's actually licensed under GNU Affero General Public License.

Cheers.

–Sumer

amitoj
Champ in-the-making
Champ in-the-making
Hi,

I have installed SCAr on serverA, accessed using http://serverA_IP:8080/scar
Whereas, my alfresco is running on serverB, accessed using http://serverB_IP:8080/alfresco

I have installed CMA and SCAr amps onto the alfresco installation.

How do i point SCAr to my alfresco installation?

Also, How do i implement SSO on SCAr?


Reg,

AH.
PageOne Communications

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

There's an xml config file (app-config.xml) that you need to add to your app server's shared classpath. It contains all of SCAr's configuration. I added instructions on how to do that on SCAr's documentation wiki page:

http://wiki.rivetlogic.com/display/SCAr/Documentation

Look for the Configuration section.

The value for <repository-url>http://localhost:8080/alfresco</repository-url> is what you need to change to point SCAr to your Alfresco repository.

Regarding SSO we have not implemented that yet. This is probably a topic for a dedicated thread but one quick and dirty idea would be to write a custom Alfresco authentication component that takes an SSO ticket as its password value that is in turn validated by that component during the execution of an authentication chain (which would be triggered by a call to the RAAr authenticate method). This of course implies that the SSO solution in place allows for that type of validation and considers it kosher.

The more correct approach for supporting SSO would differ depending on whether or not you need to have the ability to login to Alfresco using Alfresco's web-client via the same SSO mechanism.

If there is no such need then it is possible to make SCAr itself support the SSO solution (i.e. have the ability to validate an SSO ticket and extract a username out of it) and use the method mentioned above to log the user into Alfresco without a password. You'd still need to implement some means via which the custom authentication component can trust the RAAr client, which shouldn't be too difficult.

Hope this helps,

–Alaaeldin

amitoj
Champ in-the-making
Champ in-the-making
Thanks for the solution, SCAr can authenticate with Alfresco now.

I can see the client page, but my folders are missing.

I get following big Exception on login though (Sorry for cut and pasting a big chunk of the log file)

11:05:17,677 INFO  [Server] JBoss (MX MicroKernel) [4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200705111440)] Started in 23s:236ms
11:13:10,974 INFO  [Contexts] starting up: org.jboss.seam.security.identity
11:13:10,983 INFO  [Contexts] starting up: org.jboss.seam.web.session
11:13:11,461 ERROR [STDERR] 23-Dec-2008 11:13:11 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/C:/Java-Servers/jboss-4.2.0.GA/server/default/tmp/deploy/tmp5099scar-exp.war/WEB-INF/lib/jboss-seam-ui-2.0.2.GA.jar!...
11:13:11,485 ERROR [STDERR] 23-Dec-2008 11:13:11 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/C:/Java-Servers/jboss-4.2.0.GA/server/default/tmp/deploy/tmp5099scar-exp.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!/ME...
11:13:11,496 ERROR [STDERR] 23-Dec-2008 11:13:11 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/C:/Java-Servers/jboss-4.2.0.GA/server/default/tmp/deploy/tmp5099scar-exp.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!/ME...
11:13:11,513 ERROR [STDERR] 23-Dec-2008 11:13:11 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/C:/Java-Servers/jboss-4.2.0.GA/server/default/tmp/deploy/tmp5099scar-exp.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!/ME...
11:13:11,542 ERROR [STDERR] 23-Dec-2008 11:13:11 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/C:/Java-Servers/jboss-4.2.0.GA/server/default/tmp/deploy/tmp5099scar-exp.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!/ME...
11:13:11,550 ERROR [STDERR] 23-Dec-2008 11:13:11 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/C:/Java-Servers/jboss-4.2.0.GA/server/default/tmp/deploy/tmp5099scar-exp.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!/ME...
11:13:11,586 ERROR [STDERR] 23-Dec-2008 11:13:11 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/C:/Java-Servers/jboss-4.2.0.GA/server/default/tmp/deploy/tmp5099scar-exp.war/WEB-INF/lib/richfaces-ui-3.2.2.GA.jar!/...
11:13:11,597 ERROR [STDERR] 23-Dec-2008 11:13:11 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/C:/Java-Servers/jboss-4.2.0.GA/server/default/tmp/deploy/tmp5099scar-exp.war/WEB-INF/lib/richfaces-ui-3.2.2.GA.jar!/...
11:13:11,605 ERROR [STDERR] 23-Dec-2008 11:13:11 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/C:/Java-Servers/jboss-4.2.0.GA/server/default/tmp/deploy/tmp5099scar-exp.war/WEB-INF/lib/richfaces-ui-3.2.2.GA.jar!/...
11:13:11,648 ERROR [STDERR] 23-Dec-2008 11:13:11 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/C:/Java-Servers/jboss-4.2.0.GA/server/default/tmp/deploy/tmp5099scar-exp.war/WEB-INF/lib/richfaces-ui-3.2.2.GA.jar!/...
11:13:11,661 ERROR [STDERR] 23-Dec-2008 11:13:11 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/C:/Java-Servers/jboss-4.2.0.GA/server/default/tmp/deploy/tmp5099scar-exp.war/WEB-INF/lib/richfaces-ui-3.2.2.GA.jar!/...
11:13:19,455 ERROR [TreeUtil] A CMA runtime exception occurred:com.rivetlogic.core.cma.exception.CmaRuntimeException: java.lang.NoSuchMethodError: org.alfresco.service.cmr.security.AccessPermission.getPosition()I
        at com.rivetlogic.core.cma.impl.SearchServiceImpl.execute(SearchServiceImpl.java:399)
        at com.rivetlogic.core.cma.impl.SearchServiceImpl.query(SearchServiceImpl.java:219)
        at org.rivetlogic.scar.util.RaarUtil.search(RaarUtil.java:166)
        at org.rivetlogic.scar.util.RaarUtil.searchSpacesStore(RaarUtil.java:101)
        at org.rivetlogic.scar.util.TreeUtil.getAllChildFoldersByPath(TreeUtil.java:120)
        at org.rivetlogic.scar.action.SpacesListAction.getFolderData(SpacesListAction.java:105)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

Caused by: java.lang.NoSuchMethodError: org.alfresco.service.cmr.security.AccessPermission.getPosition()I
        at com.rivetlogic.core.cma.repo.AccessPermissionImpl.<init>(AccessPermissionImpl.java:32)
        at com.rivetlogic.core.cma.alfresco.webscripts.bean.SearchServiceWebScript.createNode(SearchServiceWebScript.java:311)
        at com.rivetlogic.core.cma.alfresco.webscripts.bean.SearchServiceWebScript.createNodes(SearchServiceWebScript.java:247)
        at com.rivetlogic.core.cma.alfresco.webscripts.bean.SearchServiceWebScript.query(SearchServiceWebScript.java:167)
        at com.rivetlogic.core.cma.alfresco.webscripts.bean.SearchServiceWebScript.executeInternal(SearchServiceWebScript.java:98)
        at com.rivetlogic.core.cma.alfresco.webscripts.bean.AbstractCmaWebScript.executeInTransaction(AbstractCmaWebScript.java:189)
        at com.rivetlogic.core.cma.alfresco.webscripts.bean.AbstractCmaWebScript.execute(AbstractCmaWebScript.java:140)
        at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:295)
        at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:340)
        at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:228)
        at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:240)
        at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:139)
        at org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:116)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.alfresco.web.app.servlet.MTWebScriptAuthenticationFilter.doFilter(MTWebScriptAuthenticationFilter.java:102)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

It seems that you're not using the correct SCAr/RAAr version combination. Please follow this compatibility matrix:

http://wiki.rivetlogic.com/display/SCAr/SCAr+to+RAAr+Dependencies

The reason is that for every SCAr release we try to use the latest version of RAAr to stay current.

–Alaaeldin

amitoj
Champ in-the-making
Champ in-the-making
Hi,

I was using cma-alfresco-1.9.0.amp but now I have re-installed Alfresco with cma-alfresco-1.8.1.amp 

I get following error messages

13:22:32,536 ERROR [LoginAction] Authentication failed for user: admin
13:22:32,611 ERROR [LoginAction] Authentication failed for user: admin

This is without the DEBUG log.


reg,

Amitoj.

rivetlogic
Champ on-the-rise
Champ on-the-rise
The error suggests that RAAr is unable to authenticate the admin user. I'm assuming you're using the right password so maybe it has to do with the way Alfresco's authentication is configured.

Are you authenticating against the Alfresco database or are you using a different type of auth?

–Alaaeldin

amitoj
Champ in-the-making
Champ in-the-making
I am authenticating against Alfresco database and I can access Alfresco using the Alfresco default login page.

Also, the version of Alfresco I am using is
Alfresco started (Labs): Current version 3.0.0 (c 1342) schema 1000 - Installed version 3.0.0 (c 1342) schema 1000



Everything is same except the version of CMA amp, which is now 1.8.1 instead of 1.9.0

I have just re-run the jboss using DEBUG log and the output is huge. Is there a way I can email you the log file?