11-28-2005 08:49 PM
06-20-2006 07:53 PM
Russ,
I have it working now in Tomcat after following your updated WIKI pages. I'd forgotten the rmiregistry.
Thanks.
no problem
last night I checked out HEAD and ran in to this TypeMismatch stuff. I'll take a look at that.
Also it looks like there is someone having trouble getting the server running under Jboss. When I worked with Jboss a while back I noticed that they run RMI/IIOP or RMI/JNP. Users should be using JNP. RMI/IIOP requires a rmic with special options and in some cases modifications to the code. Its not something I have put much thought into supporting. I did discuss it briefly with the Jackrabbit author as there is some benifits concerning COM/.Net itegration. I can't get too excited about it at the moment.
once iECM web services are published its going to be difficult to really justify the use of RMI.
07-06-2006 05:27 AM
07-06-2006 10:51 AM
Hi Russ,
I tried JCR-RMI but I made a sample that does not work as I expected.
I tried to enumerate all nodes and properties using JCR-RMI but I have the following exception that is thrown. It is not always thrown at the same node or property. It seems to appear randomly.
"
net.sf.acegisecurity.AuthenticationCredentialsNotFoundException: A valid SecureContext was not provided in the RequestContext
at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:477)
at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:355)
at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:40)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy22.getCurrentUserName(Unknown Source)
at org.alfresco.jcr.util.JCRProxyFactory$SessionContextInvocationHandler.invoke(JCRProxyFactory.java:116)
at $Proxy69.getName(Unknown Source)
at org.apache.jackrabbit.rmi.server.ServerItem.getName(ServerItem.java:69)
at sun.reflect.GeneratedMethodAccessor159.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
at org.apache.jackrabbit.rmi.server.ServerProperty_Stub.getName(Unknown Source)
at org.apache.jackrabbit.rmi.client.ClientItem.getName(ClientItem.java:85)
at net.entropysoft.jcrrmi.DisplayRepository.displayProperties(DisplayRepository.java:38)
at net.entropysoft.jcrrmi.DisplayRepository.traverse(DisplayRepository.java:61)
at net.entropysoft.jcrrmi.DisplayRepository.traverse(DisplayRepository.java:64)
at net.entropysoft.jcrrmi.DisplayRepository.traverse(DisplayRepository.java:64)
at net.entropysoft.jcrrmi.DisplayRepository.main(DisplayRepository.java:94)
"
I created an issue about this problem : http://www.alfresco.org/jira/browse/AR-706
Thanks
09-15-2006 07:44 PM
09-16-2006 01:34 PM
So whats the latest info about this JCR-RMI bit?
I'm looking into this kind of access as well but found out that none of the JSR170 classes are Serializable and neither are the Alfresco 1.3 classes that implement them.
Is there an updated zip for this RMI project? And/or instructions on setting it up?
I heard someone mention a wiki page?
Would be cool if so.
03-21-2007 06:17 PM
03-21-2007 09:09 PM
Does anyone know if this issue has been corrected in Alfresco 2.0?
http://issues.alfresco.com/browse/AR-706
Until such time as this issue is corrected, JCR-RMI shouldn't be used with Alfresco.
Is the JNDI option mentioned in http://issues.alfresco.com/browse/AR-1131 any more stable? If not, is there any way to effectively use the JSR 170 api with alfresco remotely?
03-21-2007 11:11 PM
Does anyone know if this issue has been corrected in Alfresco 2.0?
http://issues.alfresco.com/browse/AR-706
Until such time as this issue is corrected, JCR-RMI shouldn't be used with Alfresco.
Is the JNDI option mentioned in http://issues.alfresco.com/browse/AR-1131 any more stable? If not, is there any way to effectively use the JSR 170 api with alfresco remotely?
It's an interesting problem – annoying but interesting. It's not somethign I ran into when I was playing with JCR-RMI but I wasnt doing much to stress the system and therfor maybe RMI was using the same server thread over and over – donno. To be honest the whole Thread Local solution really needs to be thought out before its picked – seeems over used in by the java community to me. It has huge downsides.
This JCR implementation seems to prefer the OSIV (open session in view) model which I think is rather limiting. You have to work in the same thread that opened the session and you cannot open more than one sesion per thread.
I think there a number of solutions we could look at. One goal that I think we aught to strive for is to keep from having to compile our own version of the jackrabbit JCR RMI. There is benifit in the fact that we don't have to compile, manage that distro – it has to work against the unit tests, benchmark harness but it really should remain packaged by the apache folks if possible. I don't recall seeing any way (via some factory mechanism) that would allow us to register our own server implementation which could manage the thread issue on our side from the RMI perspective. My interest is peaked, I am going to go dig this up when I get a chance.
Long term it might be helpful to create a mechanism to allow us to inject our own implementation and donate it back to apache. In the short term it may be quicker / easier to consider other solutions:
One might be to create a session pool that sits above the Alfresco JCR interface and below the RMI interface The worker threads in the pool would own the real JCR thread and the the secure context, tx managment etc while the JCR-RMI component would simply hook up to a proxy. I can think of a number of drawbacks to that approach – complexity is one of them.
Anyway I agree – the issue renders JCR-RMI a invalid option until it is solved. Not only are you likely to get errors when you are seved by a server thread that does not have the appropriate thread locals but you are also in danger of being served a "dirty" thread which is a security concern since that means you have access to someone elses content/profile etc.
03-23-2007 06:19 PM
03-24-2007 05:07 PM
Thanks for the response! That is an interesting suggestion for making JCR-RMI + Alfresco usable. I'm not necessarily dedicated to using JCR-RMI, all I am looking for is a remote way to access Alfresco's JCR interface. Is JCR-RMI the only available solution?
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.