You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Kenneth Yue <Ke...@Sun.COM> on 2008/11/20 19:07:20 UTC
[Fwd: Which RepositoryFactory for WebDAV?]
Sorry if you receive this email twice, but I didn't get a response. I
also send it to dev@jackrabbit.apache.org as well just in case nobody in
users@jackrabbit.apache.org knows the answer. Thanks.
Ken
-------- Original Message --------
Subject: Which RepositoryFactory for WebDAV?
Date: Wed, 19 Nov 2008 13:08:51 -0800
From: Kenneth Yue <ke...@sun.com>
To: users@jackrabbit.apache.org
All,
In the document
http://jackrabbit.apache.org/repository-server-howto.html, it says:
This how-to contains instructions for accessing a JCR-RMI server in
Tomcat versions 4.x and 5.x. It should be easy to modify the
instructions for other container environments and communication protocols.
Here org.apache.jackrabbit.rmi.client.ClientRepositoryFactory is used,
but the communication protocol I want to use is WebDAV, not RMI. Which
RepositoryFactory do I use for WebDAV? Thanks in advance.
Ken
RE: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Julio Castillo <jc...@edgenuity.com>.
Angela,
I was following this thread and would think it would be very helpful if you
can put a RepositoryFactory in the spi2dav sandbox.
Thanks
** julio
-----Original Message-----
From: Angela Schreiber [mailto:anchela@day.com]
Sent: Friday, November 21, 2008 1:32 AM
To: users@jackrabbit.apache.org
Subject: Re: [Fwd: Which RepositoryFactory for WebDAV?]
> That's what I'm trying to avoid. Are they at least available on a
> Maven repo somewhere?
hopefully not. sandbox projects are not released and i would be surprised if
someone you put a snapshot to to a public available maven repo.
if, however, you think the spi2dav sandbox project should be put into a
common release cycle, feel free to open an jira issue for that.
> I saw that too, but I don't want "to test the WebDAV remoting" as
> mentioned in the README; I want to use it.
fair enough. but currently it is in the sandbox, there is not automated
testing installed and i can't promise you that everything works smoothly.
if you can live with that, feel free to use it.
bug reports and requests for improvement are welcome.
> [...] The ideal solution would
> be like org.apache.jackrabbit.rmi.client.ClientRepositoryFactory where
> I just configure it in my context.xml with the URL it needs and my
> code to lookup up the Repository object from JNDI doesn't need to
> change. Does such RepositoryFactory exist?
at Day we are having a RepositoryFactory to obtain a jcr2spi Repository
based on an extended version of the webdav remoting.
i can put a similar factory for spi2dav to the sandbox, if you want me to.
up to now this simply didn't have too much priority.
hope that helps
angela
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Alexander Klimetschek <ak...@day.com>.
On Tue, Dec 2, 2008 at 12:36 AM, Kenneth Yue <Ke...@sun.com> wrote:
> It certainly wasn't my intention to treat Angela as my subordinate. If my
> request came across as a demand, I apologize.
Often it is all about the way you ask for something, and I personally
found your wording inpolite. My response was also based on your
previous mail where you wondered why you have to build the spi2dav
project manually from svn - so I felt you had not much feeling for an
OS project.
> P.S. ASAP is not a "defined response time." :-)
But it's an inpolite term in the context of an OSS mailing list, at least to me.
Regards,
Alex
--
Alexander Klimetschek
alexander.klimetschek@day.com
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Kenneth Yue <Ke...@Sun.COM>.
Alexander Klimetschek wrote:
> Hi Ken!
>
> On Mon, Dec 1, 2008 at 5:40 AM, Kenneth Yue <Ke...@sun.com> wrote:
>> I would really appreciate if you could do that ASAP.
>
> Just a short reminder: This is an open-source project which means: a)
> people spend their limited time on it for the great idea of
> open-source software, b) it is *not* a paid support contract with a
> defined response-time and finally c) using open-source libraries means
> to get involved in the project, at least by building it yourself and
> patching it to your needs, which might come in handy for the project
> itself.
>
> Therefore I'd recommend not to ask people for deliveries as if you
> were their manager.
It certainly wasn't my intention to treat Angela as my subordinate. If
my request came across as a demand, I apologize.
Look, I'm working on another FOSS project too. I'm familiar with the
work I'm doing. However, I have not been involved in the development of
Jackrabbit, so it will be awfully inefficient for me to go in and spend
countless hours of time trying to figure out how the current Jackrabbit
code works, how it's organized, what its architecture is, etc. in order
to come up with a RepositoryFactory for spi2dav.
I was really surprised to find out that the server side of JCR remoting
over WebDAV is released but there is no client code for it (which makes
JCR remoting over WebDAV pretty much useless).
If I were to work on this today, this is the approach I'll make. Please
let me know if this makes sense (all of these are just guessworks so I
could be completely off-base):
1. Try to understand what the SPI architecture is. I suppose it's an
implementation of JCR using SPI (what does this interface look like?)
and then there are multiple implementations of SPI. One of that will be
using WebDAV as the remote protocol to communicate with the JCR WebDAV
Servlet. Another will be using RMI (which I'm not interested in using).
2. Try to understand what a RepositoryFactory is. There are a couple of
examples. One is the BindableRepositoryFactory and another is
ClientRepositoryFactory. There are probably more. I have to study
these as examples to create my own.
3. There are at least two approaches for creating the RepositoryFactory
for SPI. The first one is to have just one that takes a parameter for
what type of SPI implementation to use (WebDAV or RMI). The other
approach is to have different classes that return different
RepositoryImpls that use different SPI implementations. Oh wait, if
there is really just one JCR2SPI implementation, then the second
approach doesn't make sense.
All of these are not rocket science. Giving enough time, maybe a few
weeks/months (which I don't really have right now), anyone can do it.
As you can imagine, trying to read and understand all those classes, how
they interact, takes a long time.
On the other hand, Angela has been working on this project for a long
time (I suppose) and definitely is familiar with the Jackrabbit code.
With the other RepositoryFactory examples that she has, she could
probably create one for SPI2WebDAV in a few hours. :-) Again, this
RepositoryFactory she checks into sandbox doesn't have to be
stable/tested, just something I can start using for the most basic
scenario to continue my development I'll be very happy. I can help
debugging and fixing things as I get more familiar with the code, but as
of now I'm not even sure how to start or if my "approach" above makes
any sense.
Thanks for the good work so far. I really appreciate it.
Ken
P.S. ASAP is not a "defined response time." :-)
> Thanks,
> Alex
>
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Alexander Klimetschek <ak...@day.com>.
Hi Ken!
On Mon, Dec 1, 2008 at 5:40 AM, Kenneth Yue <Ke...@sun.com> wrote:
> I would really appreciate if you could do that ASAP.
Just a short reminder: This is an open-source project which means: a)
people spend their limited time on it for the great idea of
open-source software, b) it is *not* a paid support contract with a
defined response-time and finally c) using open-source libraries means
to get involved in the project, at least by building it yourself and
patching it to your needs, which might come in handy for the project
itself.
Therefore I'd recommend not to ask people for deliveries as if you
were their manager.
Thanks,
Alex
--
Alexander Klimetschek
alexander.klimetschek@day.com
Re: 1.5 upgrade problem
Posted by Thomas Müller <th...@day.com>.
Hi,
> There's no "schema" parameter
> for the DbDataStore, and never has been. You're probably looking for
> the "databaseType" parameter (I know, we're not very consistent...).
That's true... But we are getting there: The property databaseType
will be supported in persistence managers and cluster journal in
Jackrabbit 1.6 and later, see
https://issues.apache.org/jira/browse/JCR-1836
By the way, you usually don't have to specify the database type in the
DbDataStore, because it is detected automatically from the database
URL. However this auto-detection doesn't work (yet) if you use JNDI or
some JDBC wrapper.
Regards,
Thomas
Re: 1.5 upgrade problem
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
On Wed, Dec 10, 2008 at 9:31 PM, Jim Jones <jo...@trivantisdev.com> wrote:
> I'm trying to upgrade to 1.5 and am getting the following exception when I
> try to startup the repository. I removed the <!DOCTYPE> setting per the
> release notes. Is this related to JCR-1462?
Yes, Jackrabbit 1.5 is being more careful about incorrect
configuration files. Jackrabbit 1.4 would just ignore all options it
didn't recognize, but 1.5 will fail with an error so that you don't
accidentally leave typos or other mistakes in your configurations.
> 301266 [main] ERROR org.apache.jackrabbit.core.RepositoryImpl - failed to
> start Repository: org.apache.jackrabbit.core.data.db.DbDataStore does not
> support 'schema
Check your <DataStore> configuration. It looks like you have a <param
name="schema" value="..."/> entry there. There's no "schema" parameter
for the DbDataStore, and never has been. You're probably looking for
the "databaseType" parameter (I know, we're not very consistent...).
BR,
Jukka Zitting
1.5 upgrade problem
Posted by Jim Jones <jo...@trivantisdev.com>.
I'm trying to upgrade to 1.5 and am getting the following exception when
I try to startup the repository. I removed the <!DOCTYPE> setting per
the release notes. Is this related to JCR-1462?
422 [main] WARN
org.apache.jackrabbit.core.config.ConfigurationErrorHandler - Warning
parsing the configuration at line 19 using system id null:
org.xml.sax.SAXParseException: Document root element "Repository", must
match DOCTYPE root "null".
422 [main] WARN
org.apache.jackrabbit.core.config.ConfigurationErrorHandler - Warning
parsing the configuration at line 19 using system id null:
org.xml.sax.SAXParseException: Document is invalid: no grammar found.
1281 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - Starting
repository...
1453 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
LocalFileSystem initialized at path C:\webtora\repository
2562 [main] INFO org.apache.jackrabbit.core.nodetype.NodeTypeRegistry -
no custom node type definitions found
*301266 [main] ERROR org.apache.jackrabbit.core.config.BeanConfig -
org.apache.jackrabbit.core.data.db.DbDataStore does not support 'schema*
301266 [main] ERROR org.apache.jackrabbit.core.RepositoryImpl - failed
to start Repository: org.apache.jackrabbit.core.data.db.DbDataStore does
not support 'schema
org.apache.jackrabbit.core.config.ConfigurationException:
org.apache.jackrabbit.core.data.db.DbDataStore does not support 'schema
at
org.apache.jackrabbit.core.config.BeanConfig.newInstance(BeanConfig.java:122)
at
org.apache.jackrabbit.core.config.RepositoryConfigurationParser$1.getDataStore(RepositoryConfigurationParser.java:708)
at
org.apache.jackrabbit.core.config.RepositoryConfig.getDataStore(RepositoryConfig.java:794)
at
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:284)
at
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:618)
at
com.trivantis.webtora.repository.JCRUtil.getRepository(JCRUtil.java:128)
at com.trivantis.webtora.repository.JCRUtil.login(JCRUtil.java:138)
at
com.trivantis.webtora.repository.RepMgrServlet.init(RepMgrServlet.java:130)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4042)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4348)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:516)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Kenneth Yue <Ke...@Sun.COM>.
Marcel Reutegger wrote:
> Kenneth Yue wrote:
>> Is a javax.naming.spi.ObjectFactory implementation similar to
>> org.apache.jackrabbit.rmi.client.ClientRepositoryFactory planned? Please
>> consider doing it. That would make my life (and my users' lives) much
>> easier. :-)
>
> JSR 283 does not mandate that javax.jcr.RepositoryFactory extends from
> javax.naming.spi.ObjectFactory. The EG decided that there should be a factory
> that is independent of JNDI.
Agreed.
> It would certainly make sense to have RepositoryFactory implementations also
> implement ObjectFactory. Feel free to create a JIRA issue. It should be too
> complicated to implement. patches welcome ;)
I've updated the description of
https://issues.apache.org/jira/browse/JCR-1877 for this. Thanks.
Ken
>> I can't believe I'm the only one asking for it!
>
> well, the class was just added a couple of days ago. I guess you're the first
> one using it...
>
> regards
> marcel
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Marcel Reutegger <ma...@gmx.net>.
Kenneth Yue wrote:
> Is a javax.naming.spi.ObjectFactory implementation similar to
> org.apache.jackrabbit.rmi.client.ClientRepositoryFactory planned? Please
> consider doing it. That would make my life (and my users' lives) much
> easier. :-)
JSR 283 does not mandate that javax.jcr.RepositoryFactory extends from
javax.naming.spi.ObjectFactory. The EG decided that there should be a factory
that is independent of JNDI.
It would certainly make sense to have RepositoryFactory implementations also
implement ObjectFactory. Feel free to create a JIRA issue. It should be too
complicated to implement. patches welcome ;)
> I can't believe I'm the only one asking for it!
well, the class was just added a couple of days ago. I guess you're the first
one using it...
regards
marcel
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Kenneth Yue <Ke...@Sun.COM>.
Angela Schreiber wrote:
> hi kenneth
>
>> So how do I use this?
>
> see
> http://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/client/JCR2SPIRepositoryStub.java
>
> for an example. that used to work for me.
> if that doesn't it is simply broken.
Hmm, Jackrabbit specific coding, which is what I've been trying to
avoid. I have nothing against Jackrabbit (or else I wouldn't be using
it :-), but having Jackrabbit code (i.e import org.apache.jackrabbit.*)
in my code makes the users of my software hard, if not impossible, to
switch to another JSR170 implementation at deploy/run-time. For
example, if my users want to use Day's CRX (pay Day money) instead of
Jackrabbit, they can't because I'm using
org.apache.jackrabbit.client.JCR2SPIRepositoryStub in my code. This
completely defeats the purpose of having a JSR in the first place, IMHO.
Is a javax.naming.spi.ObjectFactory implementation similar to
org.apache.jackrabbit.rmi.client.ClientRepositoryFactory planned?
Please consider doing it. That would make my life (and my users' lives)
much easier. :-) I can't believe I'm the only one asking for it!
>> FYI, for a workaround, I've been using RMI and this works great:
>
> glad to hear. i didn't try that one ;)
Maybe you should, then you'll know what I meant above. :-)
Thanks.
Ken
> regards
> angela
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Angela Schreiber <an...@day.com>.
hi kenneth
> So how do I use this?
see
http://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/client/JCR2SPIRepositoryStub.java
for an example. that used to work for me.
if that doesn't it is simply broken.
> FYI, for a workaround, I've been using RMI and this works great:
glad to hear. i didn't try that one ;)
regards
angela
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Kenneth Yue <Ke...@Sun.COM>.
Angela Schreiber wrote:
> hi kenneth
>
>> I would really appreciate if you could do that ASAP. How much effort
>> does that require? Thanks.
>
> i added an initial draft to the client module with
> rev. 722416
>
> see
> https://issues.apache.org/jira/browse/JCR-1890
> for a very rough summary.
>
> note: you have to update the jackrabbit trunk as well.
> the factory interface i used has just been added by
> marcel on friday (Revision: 721387, Issue JCR-1834).
Thank you very much for checking this in. I tried it with
<Resource name="jcr/repository"
auth="Container"
type="javax.jcr.Repository"
factory="org.apache.jackrabbit.client.RepositoryFactoryImpl"
org.apache.jackrabbit.repository.spi2dav.url="http://localhost:8080/jackrabbit/server/"/>
and got
Message: Could not create resource factory instance
Cause: javax.naming.NamingException: Could not create resource factory
instance [Root exception is java.lang.ClassCastException:
org.apache.jackrabbit.client.RepositoryFactoryImpl cannot be cast to
javax.naming.spi.ObjectFactory]
So how do I use this?
FYI, for a workaround, I've been using RMI and this works great:
<Resource name="jcr/repository"
auth="Container"
type="javax.jcr.Repository"
factory="org.apache.jackrabbit.rmi.client.ClientRepositoryFactory"
url="rmi://localhost:1099/jackrabbit.repository"/>
Thanks again.
Ken
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Angela Schreiber <an...@day.com>.
hi kenneth
> I would really appreciate if you could do that ASAP. How much effort
> does that require? Thanks.
i added an initial draft to the client module with
rev. 722416
see
https://issues.apache.org/jira/browse/JCR-1890
for a very rough summary.
note: you have to update the jackrabbit trunk as well.
the factory interface i used has just been added by
marcel on friday (Revision: 721387, Issue JCR-1834).
regards
angela
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Kenneth Yue <Ke...@Sun.COM>.
Angela Schreiber wrote:
>
>> You mentioned in a previous email that you already have a
>> RepositoryFactory for spi2dav locally. Can you commit it to the
>> sandbox? Thanks.
>
> i don't have a RepositoryFactory for the spi2dav sandbox
> but for a Day internal project. i have to create a similar
> one for spi2dav first.
I would really appreciate if you could do that ASAP. How much effort
does that require? Thanks.
Ken
> angela
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Angela Schreiber <an...@day.com>.
> You mentioned in a previous email that you already have a
> RepositoryFactory for spi2dav locally. Can you commit it to the
> sandbox? Thanks.
i don't have a RepositoryFactory for the spi2dav sandbox
but for a Day internal project. i have to create a similar
one for spi2dav first.
angela
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Kenneth Yue <Ke...@Sun.COM>.
Angela Schreiber wrote:
> hi kenneth
>
> please disregard my previous response.
> actually the pom.xml contained outdated
> dependencies.
>
> that should be fixed at revision 720447.
I checked out revision 721047 and the build failed with a lot of errors,
but the jars are created regardless.
You mentioned in a previous email that you already have a
RepositoryFactory for spi2dav locally. Can you commit it to the
sandbox? Thanks.
Ken
> regards
> angela
>
>
>> [INFO] Error building POM (may not be this project's POM).
>>
>>
>> Project ID: org.apache.jackrabbit:jackrabbit-test-client
>> POM Location: /home/yue/jackrabbit/sandbox/spi/client/pom.xml
>> Validation Messages:
>>
>> [0] 'dependencies.dependency.version' is missing for
>> org.apache.jackrabbit:jackrabbit-spi2jcr
>>
>>
>> Reason: Failed to validate POM for project
>> org.apache.jackrabbit:jackrabbit-test-client at
>> /home/yue/jackrabbit/sandbox/spi/client/pom.xml
>>
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Trace
>> org.apache.maven.reactor.MavenExecutionException: Failed to validate
>> POM for project org.apache.jackrabbit:jackrabbit-test-client at
>> /home/yue/jackrabbit/sandbox/spi/client/pom.xml
>> at
>> org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
>> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:292)
>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> at
>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>> at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>> Caused by: org.apache.maven.project.InvalidProjectModelException:
>> Failed to validate POM for project
>> org.apache.jackrabbit:jackrabbit-test-client at
>> /home/yue/jackrabbit/sandbox/spi/client/pom.xml
>> at
>> org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:1108)
>>
>> at
>> org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:878)
>>
>> at
>> org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:506)
>>
>> at
>> org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:198)
>>
>> at
>> org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:583)
>> at
>> org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:461)
>> at
>> org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:534)
>> at
>> org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
>> ... 11 more
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 3 seconds
>> [INFO] Finished at: Fri Nov 21 15:39:40 PST 2008
>> [INFO] Final Memory: 3M/249M
>> [INFO]
>> ------------------------------------------------------------------------
>>
>> Angela, I'll really appreciate if you have the working bits and just
>> kindly send them my way (email, put them on a FTP server, or whatever)
>> if you don't feel they're stable enough to commit. I urgently need
>> them to continue my development. Oh, by the way, throw in the
>> RepositoryFactory while you're at it so I don't have to read the test
>> code to figure out how to use those classes. Thanks.
>>
>> Ken
>>
>>>> if, however, you think the spi2dav sandbox project
>>>> should be put into a common release cycle, feel free to
>>>> open an jira issue for that.
>>>
>>> Will do.
>>>
>>>>> I saw that too, but I don't want "to test the WebDAV remoting" as
>>>>> mentioned in the README; I want to use it.
>>>>
>>>> fair enough. but currently it is in the sandbox, there
>>>> is not automated testing installed and i can't promise
>>>> you that everything works smoothly.
>>>
>>> That's fine. I'm not doing anything fancy, just simply reading and
>>> writing attributes and node data (no versioning, no locking). As
>>> long as the basic functionality works, I don't mind the code having
>>> some bugs here and there.
>>>
>>>> if you can live with that, feel free to use it.
>>>> bug reports and requests for improvement are welcome.
>>>>
>>>>> [...] The ideal solution would be like
>>>>> org.apache.jackrabbit.rmi.client.ClientRepositoryFactory where I
>>>>> just configure it in my context.xml with the URL it needs and my
>>>>> code to lookup up the Repository object from JNDI doesn't need to
>>>>> change. Does such RepositoryFactory exist?
>>>>
>>>> at Day we are having a RepositoryFactory to obtain a jcr2spi
>>>> Repository based on an extended version of the webdav
>>>> remoting.
>>>>
>>>> i can put a similar factory for spi2dav to the sandbox,
>>>> if you want me to. up to now this simply didn't have too
>>>> much priority.
>>>
>>> YES, PLEASE, ASAP! As I said above, it doesn't have to be perfectly
>>> stable/robust, as long as the basic best-case scenario works.
>>>
>>>> hope that helps
>>>
>>> Definitely. Thanks again for your time.
>>>
>>> Ken
>>
>>
>
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Angela Schreiber <an...@day.com>.
hi kenneth
please disregard my previous response.
actually the pom.xml contained outdated
dependencies.
that should be fixed at revision 720447.
regards
angela
> [INFO] Error building POM (may not be this project's POM).
>
>
> Project ID: org.apache.jackrabbit:jackrabbit-test-client
> POM Location: /home/yue/jackrabbit/sandbox/spi/client/pom.xml
> Validation Messages:
>
> [0] 'dependencies.dependency.version' is missing for
> org.apache.jackrabbit:jackrabbit-spi2jcr
>
>
> Reason: Failed to validate POM for project
> org.apache.jackrabbit:jackrabbit-test-client at
> /home/yue/jackrabbit/sandbox/spi/client/pom.xml
>
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.reactor.MavenExecutionException: Failed to validate POM
> for project org.apache.jackrabbit:jackrabbit-test-client at
> /home/yue/jackrabbit/sandbox/spi/client/pom.xml
> at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:292)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.project.InvalidProjectModelException: Failed
> to validate POM for project org.apache.jackrabbit:jackrabbit-test-client
> at /home/yue/jackrabbit/sandbox/spi/client/pom.xml
> at
> org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:1108)
>
> at
> org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:878)
>
> at
> org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:506)
>
> at
> org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:198)
>
> at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:583)
> at
> org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:461)
> at
> org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:534)
> at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
> ... 11 more
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 3 seconds
> [INFO] Finished at: Fri Nov 21 15:39:40 PST 2008
> [INFO] Final Memory: 3M/249M
> [INFO]
> ------------------------------------------------------------------------
>
> Angela, I'll really appreciate if you have the working bits and just
> kindly send them my way (email, put them on a FTP server, or whatever)
> if you don't feel they're stable enough to commit. I urgently need them
> to continue my development. Oh, by the way, throw in the
> RepositoryFactory while you're at it so I don't have to read the test
> code to figure out how to use those classes. Thanks.
>
> Ken
>
>>> if, however, you think the spi2dav sandbox project
>>> should be put into a common release cycle, feel free to
>>> open an jira issue for that.
>>
>> Will do.
>>
>>>> I saw that too, but I don't want "to test the WebDAV remoting" as
>>>> mentioned in the README; I want to use it.
>>>
>>> fair enough. but currently it is in the sandbox, there
>>> is not automated testing installed and i can't promise
>>> you that everything works smoothly.
>>
>> That's fine. I'm not doing anything fancy, just simply reading and
>> writing attributes and node data (no versioning, no locking). As long
>> as the basic functionality works, I don't mind the code having some
>> bugs here and there.
>>
>>> if you can live with that, feel free to use it.
>>> bug reports and requests for improvement are welcome.
>>>
>>>> [...] The ideal solution would be like
>>>> org.apache.jackrabbit.rmi.client.ClientRepositoryFactory where I
>>>> just configure it in my context.xml with the URL it needs and my
>>>> code to lookup up the Repository object from JNDI doesn't need to
>>>> change. Does such RepositoryFactory exist?
>>>
>>> at Day we are having a RepositoryFactory to obtain a jcr2spi
>>> Repository based on an extended version of the webdav
>>> remoting.
>>>
>>> i can put a similar factory for spi2dav to the sandbox,
>>> if you want me to. up to now this simply didn't have too
>>> much priority.
>>
>> YES, PLEASE, ASAP! As I said above, it doesn't have to be perfectly
>> stable/robust, as long as the basic best-case scenario works.
>>
>>> hope that helps
>>
>> Definitely. Thanks again for your time.
>>
>> Ken
>
>
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Angela Schreiber <an...@day.com>.
hi kenneth
> [0] 'dependencies.dependency.version' is missing for
> org.apache.jackrabbit:jackrabbit-spi2jcr
did you build the complete jackrabbit/trunk before?
that should from my point of view solve the problem.
angela
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Kenneth Yue <Ke...@Sun.COM>.
Kenneth Yue wrote:
> Angela Schreiber wrote:
>>
>>> That's what I'm trying to avoid. Are they at least available on a
>>> Maven repo somewhere?
>>
>> hopefully not. sandbox projects are not released and i
>> would be surprised if someone you put a snapshot to
>> to a public available maven repo.
>
> OK, then, I'll just build them myself.
Too bad, I couldn't build them. Here's what I got:
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.apache.jackrabbit:jackrabbit-test-client
POM Location: /home/yue/jackrabbit/sandbox/spi/client/pom.xml
Validation Messages:
[0] 'dependencies.dependency.version' is missing for
org.apache.jackrabbit:jackrabbit-spi2jcr
Reason: Failed to validate POM for project
org.apache.jackrabbit:jackrabbit-test-client at
/home/yue/jackrabbit/sandbox/spi/client/pom.xml
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Failed to validate POM
for project org.apache.jackrabbit:jackrabbit-test-client at
/home/yue/jackrabbit/sandbox/spi/client/pom.xml
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:292)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.InvalidProjectModelException: Failed
to validate POM for project org.apache.jackrabbit:jackrabbit-test-client
at /home/yue/jackrabbit/sandbox/spi/client/pom.xml
at
org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:1108)
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:878)
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:506)
at
org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:198)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:583)
at
org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:461)
at
org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:534)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
... 11 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Fri Nov 21 15:39:40 PST 2008
[INFO] Final Memory: 3M/249M
[INFO]
------------------------------------------------------------------------
Angela, I'll really appreciate if you have the working bits and just
kindly send them my way (email, put them on a FTP server, or whatever)
if you don't feel they're stable enough to commit. I urgently need them
to continue my development. Oh, by the way, throw in the
RepositoryFactory while you're at it so I don't have to read the test
code to figure out how to use those classes. Thanks.
Ken
>> if, however, you think the spi2dav sandbox project
>> should be put into a common release cycle, feel free to
>> open an jira issue for that.
>
> Will do.
>
>>> I saw that too, but I don't want "to test the WebDAV remoting" as
>>> mentioned in the README; I want to use it.
>>
>> fair enough. but currently it is in the sandbox, there
>> is not automated testing installed and i can't promise
>> you that everything works smoothly.
>
> That's fine. I'm not doing anything fancy, just simply reading and
> writing attributes and node data (no versioning, no locking). As long
> as the basic functionality works, I don't mind the code having some bugs
> here and there.
>
>> if you can live with that, feel free to use it.
>> bug reports and requests for improvement are welcome.
>>
>>> [...] The ideal solution would be like
>>> org.apache.jackrabbit.rmi.client.ClientRepositoryFactory where I just
>>> configure it in my context.xml with the URL it needs and my code to
>>> lookup up the Repository object from JNDI doesn't need to change.
>>> Does such RepositoryFactory exist?
>>
>> at Day we are having a RepositoryFactory to obtain a jcr2spi
>> Repository based on an extended version of the webdav
>> remoting.
>>
>> i can put a similar factory for spi2dav to the sandbox,
>> if you want me to. up to now this simply didn't have too
>> much priority.
>
> YES, PLEASE, ASAP! As I said above, it doesn't have to be perfectly
> stable/robust, as long as the basic best-case scenario works.
>
>> hope that helps
>
> Definitely. Thanks again for your time.
>
> Ken
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Kenneth Yue <Ke...@Sun.COM>.
Angela Schreiber wrote:
>
>> That's what I'm trying to avoid. Are they at least available on a
>> Maven repo somewhere?
>
> hopefully not. sandbox projects are not released and i
> would be surprised if someone you put a snapshot to
> to a public available maven repo.
OK, then, I'll just build them myself.
> if, however, you think the spi2dav sandbox project
> should be put into a common release cycle, feel free to
> open an jira issue for that.
Will do.
>> I saw that too, but I don't want "to test the WebDAV remoting" as
>> mentioned in the README; I want to use it.
>
> fair enough. but currently it is in the sandbox, there
> is not automated testing installed and i can't promise
> you that everything works smoothly.
That's fine. I'm not doing anything fancy, just simply reading and
writing attributes and node data (no versioning, no locking). As long
as the basic functionality works, I don't mind the code having some bugs
here and there.
> if you can live with that, feel free to use it.
> bug reports and requests for improvement are welcome.
>
>> [...] The ideal solution would be like
>> org.apache.jackrabbit.rmi.client.ClientRepositoryFactory where I just
>> configure it in my context.xml with the URL it needs and my code to
>> lookup up the Repository object from JNDI doesn't need to change.
>> Does such RepositoryFactory exist?
>
> at Day we are having a RepositoryFactory to obtain a jcr2spi
> Repository based on an extended version of the webdav
> remoting.
>
> i can put a similar factory for spi2dav to the sandbox,
> if you want me to. up to now this simply didn't have too
> much priority.
YES, PLEASE, ASAP! As I said above, it doesn't have to be perfectly
stable/robust, as long as the basic best-case scenario works.
> hope that helps
Definitely. Thanks again for your time.
Ken
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Angela Schreiber <an...@day.com>.
> That's what I'm trying to avoid. Are they at least available on a Maven
> repo somewhere?
hopefully not. sandbox projects are not released and i
would be surprised if someone you put a snapshot to
to a public available maven repo.
if, however, you think the spi2dav sandbox project
should be put into a common release cycle, feel free to
open an jira issue for that.
> I saw that too, but I don't want "to test the WebDAV remoting" as
> mentioned in the README; I want to use it.
fair enough. but currently it is in the sandbox, there
is not automated testing installed and i can't promise
you that everything works smoothly.
if you can live with that, feel free to use it.
bug reports and requests for improvement are welcome.
> [...] The ideal solution would
> be like org.apache.jackrabbit.rmi.client.ClientRepositoryFactory where I
> just configure it in my context.xml with the URL it needs and my code to
> lookup up the Repository object from JNDI doesn't need to change. Does
> such RepositoryFactory exist?
at Day we are having a RepositoryFactory to obtain a jcr2spi
Repository based on an extended version of the webdav
remoting.
i can put a similar factory for spi2dav to the sandbox,
if you want me to. up to now this simply didn't have too
much priority.
hope that helps
angela
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Kenneth Yue <Ke...@Sun.COM>.
Alexander Klimetschek wrote:
> Hi,
>
> the (simple) WebDAV server part of Jackrabbit is already very useful
> on its own for mounting a repository as a filesystem and
> reading/writing files into it.
Agreed, but that isn't what I'm looking for.
> Regarding the SPI: For the SPI -> WebDAV you have to manually build
> the project for yourself from the sandbox (which is plain SVN:
> https://svn.apache.org/repos/asf/jackrabbit/sandbox/); the spi2dav
> project is at https://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/spi2dav/
That's what I'm trying to avoid. Are they at least available on a Maven
repo somewhere?
> Note that I haven't used it myself and it might not be very stable
> (Angela?). There is a readme with some tips:
> https://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/README.txt
I saw that too, but I don't want "to test the WebDAV remoting" as
mentioned in the README; I want to use it. That inevitably requires me
to copy the test code and write my own client. The ideal solution would
be like org.apache.jackrabbit.rmi.client.ClientRepositoryFactory where I
just configure it in my context.xml with the URL it needs and my code to
lookup up the Repository object from JNDI doesn't need to change. Does
such RepositoryFactory exist? Am I just dreaming? :-)
> Hope that helps,
Hmm, to be honest with you, not much. :-)
Thanks again for taking the time to answer my questions.
Ken
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Alexander Klimetschek <ak...@day.com>.
Hi,
the (simple) WebDAV server part of Jackrabbit is already very useful
on its own for mounting a repository as a filesystem and
reading/writing files into it.
Regarding the SPI: For the SPI -> WebDAV you have to manually build
the project for yourself from the sandbox (which is plain SVN:
https://svn.apache.org/repos/asf/jackrabbit/sandbox/); the spi2dav
project is at https://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/spi2dav/
Note that I haven't used it myself and it might not be very stable
(Angela?). There is a readme with some tips:
https://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/README.txt
Hope that helps,
Alex
--
Alexander Klimetschek
alexander.klimetschek@day.com
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Kenneth Yue <Ke...@Sun.COM>.
Thanks for your reply, but you misunderstood me. :-)
I want to use JNDI to obtain a Repository object (no dependency on a
particular JSR170 implementation) in my webapp and just configure the
web container to register the Repository object to JNDI using some kind
of object factory. The page
http://jackrabbit.apache.org/repository-server-howto.html is almost
perfect for me except that it's using RMI as an example but I want to
talk to a remote JCR via WebDAV. In other words, JCR -> SPI -> WebDAV
-> JCR.
Shouldn't the URL be http://server:8080/jackrabbit-server/server?
I know there are some code examples under sandbox/spi (mostly test code)
that do what I want, but I'm trying to avoid doing any Jackrabbit
specific coding and just keep my code pure JSR170. I'm surprised that
Jackrabbit provides a JCR WebDAV Server to allow remoting JSR170 calls
via WebDAV, but yet there is no client available. In both
http://jackrabbit.apache.org/jackrabbit-jcr-server.html and
http://jackrabbit.apache.org/jackrabbit-web-application.html, a client
is mentioned, like
The client counterpart of this server is represented by the JCR to SPI
project in combination with the SPI to WebDAV SPI implementation that
can be found in the Jackrabbit sandbox.
and
For the corresponding JCR client see JCR to SPI and the SPI to WebDAV
contribution inside the Jackrabbit sandbox.
yet there is no such client to be downloaded in
http://jackrabbit.apache.org/downloads.html
It would be nice if a RepositoryFactory similar to
org.apache.jackrabbit.rmi.client.ClientRepositoryFactory for the RMI
case is provided so that using JCR->SPI->WebDAV->JCR is simply a matter
of configuration and not copying code. Thanks again.
Ken
Alexander Klimetschek wrote:
> You don't need a special RepositoryFactory. The WebDAV is provided by
> a servlet that creates jcr session on its own, ie. logging in to the
> repository on the server-side by using the credentials from the WebDAV
> requests.
>
> See http://jackrabbit.apache.org/jackrabbit-web-application.html
>
> If you use the standard jackrabbit webap running on port 8080, this
> would be the webdav URL:
>
> http://server:8080/<war resource>/repository/<workspace>
>
> so typically:
>
> http://server:8080/jackrabbit-server/repository/default
>
> Regards,
> Alex
>
> On Thu, Nov 20, 2008 at 7:07 PM, Kenneth Yue <Ke...@sun.com> wrote:
>> Sorry if you receive this email twice, but I didn't get a response. I also
>> send it to dev@jackrabbit.apache.org as well just in case nobody in
>> users@jackrabbit.apache.org knows the answer. Thanks.
>>
>> Ken
>>
>> -------- Original Message --------
>> Subject: Which RepositoryFactory for WebDAV?
>> Date: Wed, 19 Nov 2008 13:08:51 -0800
>> From: Kenneth Yue <ke...@sun.com>
>> To: users@jackrabbit.apache.org
>>
>> All,
>>
>> In the document
>> http://jackrabbit.apache.org/repository-server-howto.html, it says:
>>
>> This how-to contains instructions for accessing a JCR-RMI server in
>> Tomcat versions 4.x and 5.x. It should be easy to modify the
>> instructions for other container environments and communication protocols.
>>
>> Here org.apache.jackrabbit.rmi.client.ClientRepositoryFactory is used,
>> but the communication protocol I want to use is WebDAV, not RMI. Which
>> RepositoryFactory do I use for WebDAV? Thanks in advance.
>>
>> Ken
>>
>>
>
>
>
Re: [Fwd: Which RepositoryFactory for WebDAV?]
Posted by Alexander Klimetschek <ak...@day.com>.
You don't need a special RepositoryFactory. The WebDAV is provided by
a servlet that creates jcr session on its own, ie. logging in to the
repository on the server-side by using the credentials from the WebDAV
requests.
See http://jackrabbit.apache.org/jackrabbit-web-application.html
If you use the standard jackrabbit webap running on port 8080, this
would be the webdav URL:
http://server:8080/<war resource>/repository/<workspace>
so typically:
http://server:8080/jackrabbit-server/repository/default
Regards,
Alex
On Thu, Nov 20, 2008 at 7:07 PM, Kenneth Yue <Ke...@sun.com> wrote:
> Sorry if you receive this email twice, but I didn't get a response. I also
> send it to dev@jackrabbit.apache.org as well just in case nobody in
> users@jackrabbit.apache.org knows the answer. Thanks.
>
> Ken
>
> -------- Original Message --------
> Subject: Which RepositoryFactory for WebDAV?
> Date: Wed, 19 Nov 2008 13:08:51 -0800
> From: Kenneth Yue <ke...@sun.com>
> To: users@jackrabbit.apache.org
>
> All,
>
> In the document
> http://jackrabbit.apache.org/repository-server-howto.html, it says:
>
> This how-to contains instructions for accessing a JCR-RMI server in
> Tomcat versions 4.x and 5.x. It should be easy to modify the
> instructions for other container environments and communication protocols.
>
> Here org.apache.jackrabbit.rmi.client.ClientRepositoryFactory is used,
> but the communication protocol I want to use is WebDAV, not RMI. Which
> RepositoryFactory do I use for WebDAV? Thanks in advance.
>
> Ken
>
>
--
Alexander Klimetschek
alexander.klimetschek@day.com