cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Via RMI

rdanner
Champ in-the-making
Champ in-the-making
For those interested:

I have put alfresco behind the JCR-RMI library from jackrabbit.
All i had to do was make a simple bean to register the repository and then leverage their client on the remote end.


I have a build for just the RMI-JCR and the additional alfresco config and classes.

I had done a significant portion of an RMI wrapper before I ran in to jackrabbit (I should be looking a little harder before i leap).

Works like a charm.  Their library does not use remote activation which I would like to include for robustness sake.
62 REPLIES 62

s0110655
Champ in-the-making
Champ in-the-making
Hi Russ,

I've put the -server option in the VM arguments when I run my application.  First I got an error that the jvm.dll was not in the C:\Program Files\Java\jre1.5.0_06\bin\server folder. I checked that folder and there was no server folder in there. Although there was a server folder in the C:\Program Files\Java\jdk1.5.0_06\bin\ folder so I copied that one and placed it in the jre directory. Then it started my application as usual.

The strange CGLIB error however is still not gone. Did I do something wrong that eclipse still uses the classic JVM? What do you think?

Thanks for the help!
Steven

rdanner
Champ in-the-making
Champ in-the-making
Hi Russ,

I've put the -server option in the VM arguments when I run my application.  First I got an error that the jvm.dll was not in the C:\Program Files\Java\jre1.5.0_06\bin\server folder. I checked that folder and there was no server folder in there. Although there was a server folder in the C:\Program Files\Java\jdk1.5.0_06\bin\ folder so I copied that one and placed it in the jre directory. Then it started my application as usual.

The strange CGLIB error however is still not gone. Did I do something wrong that eclipse still uses the classic JVM? What do you think?

Thanks for the help!
Steven

I wish this form would stop blowing out…. Its about 6billion characters wide on my screen  :shock:

Um… I defer to the alfresco gang here man.  This thing is working well for me and I am just not sure what you have going on.  There has to be something configuration-wise.

s0110655
Champ in-the-making
Champ in-the-making
Okay, no problem. Thanks for your patience and help. I'll try to get the best out of it and hopefully I get things working properly.

Steven

steve
Champ in-the-making
Champ in-the-making
Hello,

You could try setting your JAVA_HOME to the JDK directory: C:\Program Files\Java\jdk1.5.0_06

This is what is usually needed to run the server JVM.

Steve

rdanner
Champ in-the-making
Champ in-the-making
Hi Russ,

I'm sorry for the newbie questions, but I want to make sure that I don't do anything wrong now. You said:

1. You still need to copy the jcr config in the web-client.
==> Does this mean I have to copy the jcr-context.xml file in the folder web-client?
2. Build and deploy the webclient jar
==> Is it ok if I run ant on the top folder (root/common) so it rebuilds everything or do I just have to run ant in the root\projects\web-client folder?
==> How do I deploy webclient.jar? Do I have to put it in the tomcat/webapps folder next to alfresco-jct-tck.war or should I just place it in the Tomcat 5.5\webapps\alfresco-jcr-tck\WEB-INF\lib folder?
3. Drop your database tables
==> How do I do that in mySQL?
4. Kill your file system store (alf_data) its probably in the bin of tomcat
==> Is it ok if I just delete the alf_data folder?

Thanks for your patience with me!
Steven


Steve have we lost you? What is your status?

davidc
Star Contributor
Star Contributor
Hi Russ,

I'm testing your JCR-RMI implementation with v1.3 of Alfresco.  There are a couple of adjustments required due to the collapsing of the JCR implementation into repository.jar and jcr-context.xml dependency changes.

However, I've hit a snag with Tomcat.  Basically, in JcrRmiBindingUtil.java - bindRemoteRepository(), I receive a "Connection refused" exception at the point of Naming.bind.  I guess it's down to security policy configuration in Tomcat, but I thought I check with you first, before spending anymore time investigating.

Thanks.

rdanner
Champ in-the-making
Champ in-the-making
Hi Russ,

I'm testing your JCR-RMI implementation with v1.3 of Alfresco.  There are a couple of adjustments required due to the collapsing of the JCR implementation into repository.jar and jcr-context.xml dependency changes.

However, I've hit a snag with Tomcat.  Basically, in JcrRmiBindingUtil.java - bindRemoteRepository(), I receive a "Connection refused" exception at the point of Naming.bind.  I guess it's down to security policy configuration in Tomcat, but I thought I check with you first, before spending anymore time investigating.

Thanks.

I'll take a look, when I put the thing together I used Tomcat 5.x and Jboss 4.0.3SP1.  I'll try to get back to you tonight.  I never made any security policy alterations on the JVM which means they were probably wide open (default).

rdanner
Champ in-the-making
Champ in-the-making
Hi Russ,

I'm testing your JCR-RMI implementation with v1.3 of Alfresco.  There are a couple of adjustments required due to the collapsing of the JCR implementation into repository.jar and jcr-context.xml dependency changes.

However, I've hit a snag with Tomcat.  Basically, in JcrRmiBindingUtil.java - bindRemoteRepository(), I receive a "Connection refused" exception at the point of Naming.bind.  I guess it's down to security policy configuration in Tomcat, but I thought I check with you first, before spending anymore time investigating.

Thanks.

I'll take a look, when I put the thing together I used Tomcat 5.x and Jboss 4.0.3SP1.  I'll try to get back to you tonight.  I never made any security policy alterations on the JVM which means they were probably wide open (default).

Sorry David I did not get to look in to the issue.  I ran into a curious error with spring,

org.springframework.beans.factory.BeanCreationExcepti gueon: Error creating bean with name 'javaContentRepositoryRmiBinding' defined in file [C:\servers\tomcat\common\classes\alfresco\extension\jcr-rmi-context.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptionsException: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.alfresco.jcr.repository.RepositoryImpl] to required type [javax.jcr.Repository] for property 'jcrRepository']

Which is absurd… my guess is that the error message is a red herring. I'll have to pull down the source for spring tomorrow and check it out. I suspect the actual issue will be a null or something. The RepositoryImpl obviously still implements Repository.

davidc
Star Contributor
Star Contributor
Russ,

I have it working now in Tomcat after following your updated WIKI pages.  I'd forgotten the rmiregistry.

Thanks.

rdanner
Champ in-the-making
Champ in-the-making
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.