cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco SVN and JBoss Portal 2.6.3

renspr
Champ in-the-making
Champ in-the-making
Hi,

I build a JBoss version of alfresco.war from SVN today

ant -f continuous.xml build-jboss

I installed it in  JBoss AS 4.2.2 together with JBoss Portal 2.6.3. JBoss starts  and deploys alfresco.war without problems. I'm able to access http://localhost:8080/alfresco and also http://localhost:8080/portal.

I installed the Alfresco Webclient Portlet into a portal page. This works well too.

I created an instance of the portlet "local.alfresco.AlfrescoMySpaces" and installed this into another portal page. When I try to access this page as a guest I will get the following error:


The Web Script /alfresco/168s/ui/myspaces has responded with a status of 500 - Internal Error.

500 Description:   An error inside the HTTP server which prevented it from fulfilling the request.

Message:   All user details are mandatory!
   
Exception:   java.lang.IllegalArgumentException - All user details are mandatory!
   
   org.alfresco.web.bean.repository.User.(User.java:71)
   org.alfresco.repo.web.scripts.portlet.WebClientPortletAuthenticatorFactory$WebClientPortletAuthenticator.createWebClientUser(WebClientPortletAuthenticatorFactory.java:177)
   org.alfresco.repo.web.scripts.portlet.WebClientPortletAuthenticatorFactory$WebClientPortletAuthenticator.authenticate(WebClientPortletAuthenticatorFactory.java:151)
   org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:222)
   org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:227)
   org.alfresco.web.scripts.portlet.WebScriptPortlet$PortletRuntime.executeScript(WebScriptPortlet.java:315)
   org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:130)
   org.alfresco.web.scripts.portlet.WebScriptPortlet.doView(WebScriptPortlet.java:214)
   org.alfresco.web.scripts.portlet.WebScriptPortlet.render(WebScriptPortlet.java:131)
   org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.invokeRender(PortletContainerImpl.java:483)
   org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:405)
   org.jboss.portal.portlet.container.PortletContainerInvoker$1.invoke(PortletContainerInvoker.java:86)
   org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
[…]

When I try to access this page as an authenticted user (this user exists within Alfresco) I will get the following error:


The Web Script /alfresco/168s/ui/myspaces has responded with a status of 500 - Internal Error.

500 Description:   An error inside the HTTP server which prevented it from fulfilling the request.

Message:   Transaction must be active and synchronization is required
   
Exception:   org.alfresco.error.AlfrescoRuntimeException - Transaction must be active and synchronization is required
   
   org.alfresco.repo.transaction.AlfrescoTransactionSupport.registerSynchronizations(AlfrescoTransactionSupport.java:390)
   org.alfresco.repo.transaction.AlfrescoTransactionSupport.getSynchronization(AlfrescoTransactionSupport.java:375)
   org.alfresco.repo.transaction.AlfrescoTransactionSupport.bindDaoService(AlfrescoTransactionSupport.java:238)
   org.alfresco.repo.transaction.TransactionalDaoInterceptor.invoke(TransactionalDaoInterceptor.java:66)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   $Proxy272.getNode(Unknown Source)
   org.alfresco.repo.node.db.DbNodeServiceImpl.getNodeNotNull(DbNodeServiceImpl.java:135)
   org.alfresco.repo.node.db.DbNodeServiceImpl.hasAspect(DbNodeServiceImpl.java:732)
   sun.reflect.GeneratedMethodAccessor445.invoke(Unknown Source)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:585)
   org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
   org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
   org.alfresco.repo.transaction.TransactionResourceInterceptor.invoke(TransactionResourceInterceptor.java:129)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   $Proxy274.hasAspect(Unknown Source)
   sun.reflect.GeneratedMethodAccessor445.invoke(Unknown Source)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:585)
   org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:221)
   $Proxy275.hasAspect(Unknown Source)
   org.alfresco.repo.node.MLPropertyInterceptor.getPivotNodeRef(MLPropertyInterceptor.java:255)
   org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:163)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:190)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:190)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   $Proxy274.getProperty(Unknown Source)
   org.alfresco.repo.web.scripts.Repository.getUserHome(Repository.java:254)
   org.alfresco.repo.web.scripts.portlet.WebClientPortletAuthenticatorFactory$WebClientPortletAuthenticator.createWebClientUser(WebClientPortletAuthenticatorFactory.java:178)
   org.alfresco.repo.web.scripts.portlet.WebClientPortletAuthenticatorFactory$WebClientPortletAuthenticator.authenticate(WebClientPortletAuthenticatorFactory.java:151)
   org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:222)
[…]

Has anyone an idea what's wrong here? Any hints on how to access the webscript portlets from JBoss Portal? Are there required configuration steps related to authentication inside webscript portlets?

Best regards, René
6 REPLIES 6

mliedtke
Champ in-the-making
Champ in-the-making
Hi,
I'm getting an error really similar to this, but in LifeRay.  I'm using LifeRay 4.4.1 with Alfresco 2.1.1 deployed as a portlet on JBoss 4.2, and when I include any of the WebScrips portlets I get the following error.


org.alfresco.error.AlfrescoRuntimeException - Transaction must be active and synchronization is required
   
   org.alfresco.repo.transaction.AlfrescoTransactionSupport.registerSynchronizations(AlfrescoTransactionSupport.java:389)
   org.alfresco.repo.transaction.AlfrescoTransactionSupport.getSynchronization(AlfrescoTransactionSupport.java:374)
   org.alfresco.repo.transaction.AlfrescoTransactionSupport.bindDaoService(AlfrescoTransactionSupport.java:237)
   org.alfresco.repo.transaction.TransactionalDaoInterceptor.invoke(TransactionalDaoInterceptor.java:66)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   $Proxy306.getNode(Unknown Source)
   org.alfresco.repo.node.db.DbNodeServiceImpl.exists(DbNodeServiceImpl.java:166)
   sun.reflect.GeneratedMethodAccessor312.invoke(Unknown Source)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:597)
   org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
   org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
   org.alfresco.repo.transaction.TransactionResourceInterceptor.invoke(TransactionResourceInterceptor.java:129)
[…]


One curious thing to note though if I access the portlet directly (ie not through the liferay portal container) with the URL "http://server.domain.com:8080/alfresco/168s/ui/myspaces" I can see it properly.  I'm hoping that I just missed something small, but I'm lost

If anyone has any clues on this please help

Thanks,
Mark

mliedtke
Champ in-the-making
Champ in-the-making
It looks like this is a known issue
http://issues.alfresco.com/browse/AWC-1686

More info in this thread…
http://forums.alfresco.com/viewtopic.php?p=37363#37363

ericc
Champ in-the-making
Champ in-the-making
Hello,
I've got the same problem and I would like to fix it. Is there a patch / hack available (waiting for the new version) or not?

Thanks

mliedtke
Champ in-the-making
Champ in-the-making
I got it working…re-wrote the login filter, bit of a hack, but it works…

It looks from the JIRA that the fix has been completed, but not sure when the next release is planned.  You could pull from SVN, but I don't know what files changed.

I'll post my change in a little while, when I have some of that rare free time…

To get started download the Alfresco community sdk, and set up your dev env.

mliedtke
Champ in-the-making
Champ in-the-making
PS…if anyone from the Alfresco deb team is monitoring, can you update with the status of the ticket.
http://issues.alfresco.com/browse/AWC-1686

timing of next release, and what classes/jars changed for this fix.

Thanks,
Mark

ohtg
Champ in-the-making
Champ in-the-making
I checkout the Alfresco HEAD code revision number 929 from our public SVN http://wiki.alfresco.com/wiki/Alfresco_SVN_Development_Environment#Subversion_Repository_Access.

But I can't build with command:
ant build-jboss 
then get the following error:

BUILD FAILED
Target "build-jboss" does not exist in the project "alfresco".

I released
target name="build-jboss"
and
target name="incremental-jboss"
tags in build.xml file then get the following error:

BUILD FAILED
Target "package-webclient-war-jboss" does not exist in the project "alfresco". It is used from target "incremental-jboss".

help me!!!
Best regards