You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Rakesh Midha <mi...@gmail.com> on 2006/08/31 17:11:01 UTC

Re: JCR Integration

Hello

I followed the steps given by Andreas in his mail.

Even now my lenya is pointing to content directory of my publication in pubs
folder. I thought after doing all this it should point to jcr-repository.
(means if i create new html page it should go in jcr-repository)

As I understand the problem is in step 3 which says
3) Set the JCRNodeFactory as default node factory in
java/org/apache/lenya/lenya.roles
  <role name="org.apache.lenya.cms.repository.NodeFactory"
        shorthand="node-factory"
        default-class="org.apache.lenya.cms.jcr.JCRNodeFactory"/>

NodeFactory role is removed from Lenya.roles by Andreas in revision 416134
with comment Removed NodeFactory role from lenya.roles (now provided by
sourcerepository module in cocoon.xconf)

Can someone please tell me what changes are required to make my lenya point
to JCR rather that pub directory in filesystem.

Thanks
Rakesh

 *Re: JCR integration * by Torsten
Schlabach<http://www.nabble.com/forum/Search.jtp?user=3292> 2005-07-28
17:09 | Reply <http://www.nabble.com/forum/Reply.jtp?post=502801> | Show
Only this Message <http://www.nabble.com/Re%3A-JCR-integration-p502801.html> |
Rate this Message: [image: Click to rate as Poor
Post]<http://www.nabble.com/forum/ViewPost.jtp?post=502801&framed=y#>[image:
Click to rate as Below Average
Post]<http://www.nabble.com/forum/ViewPost.jtp?post=502801&framed=y#>[image:
Click to rate as Average
Post]<http://www.nabble.com/forum/ViewPost.jtp?post=502801&framed=y#>[image:
Click to rate as Above Average
Post]<http://www.nabble.com/forum/ViewPost.jtp?post=502801&framed=y#>[image:
Click to rate as Excellent
Post]<http://www.nabble.com/forum/ViewPost.jtp?post=502801&framed=y#>
[image:
Click to clear rating]<http://www.nabble.com/forum/ViewPost.jtp?post=502801&framed=y#>
(use
ratings to moderate[? <http://www.nabble.com/help/Answer.jtp?id=16>])
> That's strange, actually the sitetree file should be there ...
>
> I have no idea what goes wrong, maybe we have to wait for other
> experiences.

I am currently trying to understand a bit what's going on.
Where should the JCR repository be created?

Regards,
Torsten

> Torsten Schlabach wrote:
>> Josias,
>>
>>> Did the problem occur when you started the import-usecase?
>>
>> Yes!
>
> That's strange, actually the sitetree file should be there ...
>
> I have no idea what goes wrong, maybe we have to wait for other
> experiences.
>
> -- Andreas
>
>>> Which version of cocoon are you using?
>>> I think you need a recent svn version of 2.1.x
>>
>>
>> I do. I use a SVN checkout of 2.1.x as of today.
>>
>> Regards,
>> Torsten
>>
>> Josias Thoeny schrieb:
>>
>>> On Wed, 2005-07-27 at 11:10 +0200, Torsten Schlabach wrote:
>>>
>>>> Andreas,
>>>>
>>>> just tried this exactly as described in your email. I did not yet dig
>>>> too
>>>> deep into all the details of it, but if I do exactly what you wrote,
>>>> I get
>>>> an error:
>>>>
>>>> The source [lenya://lenya/pubs/default/content/authoring/sitetree.xml]
>>>> does not exist!
>>>
>>>
>>>
>>> Did the problem occur when you started the import-usecase?
>>> Which version of cocoon are you using?
>>> I think you need a recent svn version of 2.1.x
>>>
>>> Josias
>>>
>>>
>>>
>>>> org.apache.avalon.framework.CascadingRuntimeException:
>>>> "file:/usr/local/src/lenya-1.4.x/build/lenya/webapp/lenya/usecases/usecases.js",

>>>>
>>>> line 168: uncaught JavaScript exception: at executeUsecase
>>>> (file:/usr/local/src/lenya-1.4.x/build/lenya/webapp/lenya/usecases/usecases.js,

>>>>
>>>> Line 168): org.apache.lenya.cms.usecase.UsecaseException:
>>>> org.apache.excalibur.source.SourceNotFoundException: The source
>>>> [lenya://lenya/pubs/default/content/authoring/sitetree.xml] does not
>>>> exist!
>>>>
>>>> cause: org.apache.excalibur.source.SourceNotFoundException: The source
>>>> [lenya://lenya/pubs/default/content/authoring/sitetree.xml] does not
>>>> exist!
>>>>
>>>> Regards,
>>>> Torsten
>>>>
>>>>
>>>>
>>>>> Hi Lenya devs,
>>>>>
>>>>> Lenya now supports JCR :)
>>>>>
>>>>> Just kidding, it's not fully integrated, but the content can be
>>>>> stored in JCR. To migrate your publication to JCR, follow these
>>>>> steps:
>>>>>
>>>>>
>>>>> 1) Call the "Import into JCR" usecase to migrate the content:
>>>>>
>>>>>    http://localhost:8888/index.html?lenya.usecase=jcr.import
>>>>>
>>>>>    (select your publication and click OK)
>>>>>
>>>>>
>>>>> 2) Correct the node type configuration in cocoon.xconf:
>>>>>
>>>>>     <component-instance
>>>>> class="org.apache.cocoon.jcr.source.JCRSourceFactory"
>>>>> name="jcr">
>>>>>       <folder-node new-file="nt:file" new-folder="nt:folder"
>>>>> type="rep:root"/>
>>>>>       <folder-node new-file="nt:file" new-folder="nt:unstructured"
>>>>> type="nt:unstructured"/>
>>>>>       <folder-node type="nt:folder" new-file="nt:file"/>
>>>>>       <file-node content-path="jcr:content"
>>>>> content-type="nt:resource"
>>>>> type="nt:file"/>
>>>>>       <file-node content-ref="jcr:content" type="nt:linkedFile"/>
>>>>>               <content-node type="nt:resource"
>>>>>                             content-prop="jcr:data"
>>>>>                             mimetype-prop="jcr:mimeType"
>>>>>                             lastmodified-prop="jcr:lastModified"
>>>>>                             validity-prop="jcr:lastModified"/>
>>>>>     </component-instance>
>>>>>
>>>>>     I guess this configuration has to be reviewed.
>>>>>     I just copied it from the JCRSourceFactory javadocs.
>>>>>
>>>>>
>>>>> 3) Set the JCRNodeFactory as default node factory in
>>>>>    java/org/apache/lenya/lenya.roles
>>>>>
>>>>>   <role name="org.apache.lenya.cms.repository.NodeFactory"
>>>>>         shorthand="node-factory"
>>>>>         default-class="org.apache.lenya.cms.jcr.JCRNodeFactory"/>
>>>>>
>>>>>
>>>>> 5) Delete the content directory of your publication.
>>>>>
>>>>> 4) Restart Jetty.
>>>>>
>>>>>
>>>>> Now your content is stored in the JCR repository.
>>>>>
>>>>> Of course this is in alpha state, feel free to give it a try and
>>>>> report
>>>>> problems in Bugzilla.
>>>>>
>>>>> -- Andreas
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail:
dev-unsubscribe@...<http://www.nabble.com/user/SendEmail.jtp?type=post&post=502801&i=0>
>>>>> For additional commands, e-mail:
dev-help@...<http://www.nabble.com/user/SendEmail.jtp?type=post&post=502801&i=1>
>>>>>
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail:
dev-unsubscribe@...<http://www.nabble.com/user/SendEmail.jtp?type=post&post=502801&i=2>
>>>> For additional commands, e-mail:
dev-help@...<http://www.nabble.com/user/SendEmail.jtp?type=post&post=502801&i=3>
>>>>
>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
dev-unsubscribe@...<http://www.nabble.com/user/SendEmail.jtp?type=post&post=502801&i=4>
>>> For additional commands, e-mail:
dev-help@...<http://www.nabble.com/user/SendEmail.jtp?type=post&post=502801&i=5>
>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...<http://www.nabble.com/user/SendEmail.jtp?type=post&post=502801&i=6>
> For additional commands, e-mail: dev-help@...<http://www.nabble.com/user/SendEmail.jtp?type=post&post=502801&i=7>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail:
dev-unsubscribe@...<http://www.nabble.com/user/SendEmail.jtp?type=post&post=502801&i=8>
For additional commands, e-mail:
dev-help@...<http://www.nabble.com/user/SendEmail.jtp?type=post&post=502801&i=9>

« Return to forum <http://www.nabble.com/Lenya---Users-f146i35.html>
  (c) 2005 Nabble, Inc.  Help <http://www.nabble.com/help/Index.jtp> - Powered
by <http://www.nabble.com/more/PoweredBy.jtp> - Terms of
Use<http://www.nabble.com/user/Terms.jtp>- Nabble
Support <http://www.nabble.com/Nabble-Support-f1.html>

Re: JCR Integration

Posted by Rakesh Midha <mi...@gmail.com>.
Sorry I meant sourceRepository when i said "i think import usecase will
require repository to exist.".....

do you think import usecase will not require sourcerepository, my
understanding is the import usecase uses sourcerepository to getdata and put
it into jcrrepository

Am I wrong somewhere?

On 9/1/06, Andreas Hartmann <an...@apache.org> wrote:
>
> Rakesh Midha wrote:
> > Hello Andreas
> >
> > thanks for the help.
> >
> > I don't think we can exclude the sourcerepository module, because
> > repository module depends on sourcerepository, doesn't sound right but
> > it is true. Look at module.xml in repository
> >   <id>org.apache.lenya.modules.repository</id>
> >   <depends module="org.apache.lenya.modules.sourcerepository"/>
> >
> > Anyways even if this dependency is there, i think import usecase will
> > require repository to exist.
>
> I don't think so, the repository module isn't used anywhere.
>
> -- Andreas
>
> >
> > Is there any other way for redirection from sourcerepository to
> > jcrrepository.?
> >
> > Yes, I liked your idea of "we should rather use a list of single modules
> > for declaration", i think we should do this....currently only directory
> > level exclude is allowed indirectly using modules.root.dirs.
> >
> >
> > thanks
> > Rakesh
> >
> >
> >
> > On 8/31/06, *Andreas Hartmann* <andreas@apache.org
> > <ma...@apache.org>> wrote:
> >
> >     Rakesh Midha wrote:
> >      > Hello
> >      >
> >      > I followed the steps given by Andreas in his mail.
> >      >
> >      > Even now my lenya is pointing to content directory of my
> >     publication in
> >      > pubs folder. I thought after doing all this it should point to
> >      > jcr-repository. (means if i create new html page it should go in
> >      > jcr-repository)
> >      >
> >      > As I understand the problem is in step 3 which says
> >      > 3) Set the JCRNodeFactory as default node factory in
> >      > java/org/apache/lenya/lenya.roles
> >      >   <role name=" org.apache.lenya.cms.repository.NodeFactory"
> >      >         shorthand="node-factory"
> >      >         default-class="org.apache.lenya.cms.jcr.JCRNodeFactory"/>
> >      >
> >      > NodeFactory role is removed from Lenya.roles by Andreas in
> revision
> >      > 416134 with comment Removed NodeFactory role from lenya.roles(now
> >      > provided by sourcerepository module in cocoon.xconf)
> >      >
> >      > Can someone please tell me what changes are required to make my
> >     lenya
> >      > point to JCR rather that pub directory in filesystem.
> >
> >     Basically you have to exclude the sourcerepository module and
> include
> >     the modules-optional/jcrsource module. That's not easy with the
> >     current module declaration syntax (maybe we should rather use a list
> >     of single modules for declaration). You could disable the patch in
> >     the sourcerepository module (e.g. use a different extension).
> >
> >     -- Andreas
> >
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> >     <ma...@lenya.apache.org>
> >     For additional commands, e-mail: dev-help@lenya.apache.org
> >     <ma...@lenya.apache.org>
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
>
>

Re: JCR Integration

Posted by Andreas Hartmann <an...@apache.org>.
Rakesh Midha wrote:
> Hello Andreas
> 
> thanks for the help.
> 
> I don't think we can exclude the sourcerepository module, because  
> repository module depends on sourcerepository, doesn't sound right but 
> it is true. Look at module.xml in repository
>   <id>org.apache.lenya.modules.repository</id>
>   <depends module="org.apache.lenya.modules.sourcerepository"/>
> 
> Anyways even if this dependency is there, i think import usecase will 
> require repository to exist.

I don't think so, the repository module isn't used anywhere.

-- Andreas

> 
> Is there any other way for redirection from sourcerepository to 
> jcrrepository.?
> 
> Yes, I liked your idea of "we should rather use a list of single modules 
> for declaration", i think we should do this....currently only directory 
> level exclude is allowed indirectly using modules.root.dirs.
> 
> 
> thanks
> Rakesh
> 
> 
> 
> On 8/31/06, *Andreas Hartmann* <andreas@apache.org 
> <ma...@apache.org>> wrote:
> 
>     Rakesh Midha wrote:
>      > Hello
>      >
>      > I followed the steps given by Andreas in his mail.
>      >
>      > Even now my lenya is pointing to content directory of my
>     publication in
>      > pubs folder. I thought after doing all this it should point to
>      > jcr-repository. (means if i create new html page it should go in
>      > jcr-repository)
>      >
>      > As I understand the problem is in step 3 which says
>      > 3) Set the JCRNodeFactory as default node factory in
>      > java/org/apache/lenya/lenya.roles
>      >   <role name=" org.apache.lenya.cms.repository.NodeFactory"
>      >         shorthand="node-factory"
>      >         default-class="org.apache.lenya.cms.jcr.JCRNodeFactory"/>
>      >
>      > NodeFactory role is removed from Lenya.roles by Andreas in revision
>      > 416134 with comment Removed NodeFactory role from lenya.roles (now
>      > provided by sourcerepository module in cocoon.xconf)
>      >
>      > Can someone please tell me what changes are required to make my
>     lenya
>      > point to JCR rather that pub directory in filesystem.
> 
>     Basically you have to exclude the sourcerepository module and include
>     the modules-optional/jcrsource module. That's not easy with the
>     current module declaration syntax (maybe we should rather use a list
>     of single modules for declaration). You could disable the patch in
>     the sourcerepository module (e.g. use a different extension).
> 
>     -- Andreas
> 
> 
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
>     <ma...@lenya.apache.org>
>     For additional commands, e-mail: dev-help@lenya.apache.org
>     <ma...@lenya.apache.org>
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: JCR Integration

Posted by Rakesh Midha <mi...@gmail.com>.
Hello Andreas

thanks for the help.

I don't think we can exclude the sourcerepository module, because
repository module depends on sourcerepository, doesn't sound right but it is
true. Look at module.xml in repository
  <id>org.apache.lenya.modules.repository</id>
  <depends module="org.apache.lenya.modules.sourcerepository"/>

Anyways even if this dependency is there, i think import usecase will
require repository to exist.

Is there any other way for redirection from sourcerepository to
jcrrepository.?

Yes, I liked your idea of "we should rather use a list of single modules for
declaration", i think we should do this....currently only directory level
exclude is allowed indirectly using modules.root.dirs.


thanks
Rakesh



On 8/31/06, Andreas Hartmann <an...@apache.org> wrote:
>
> Rakesh Midha wrote:
> > Hello
> >
> > I followed the steps given by Andreas in his mail.
> >
> > Even now my lenya is pointing to content directory of my publication in
> > pubs folder. I thought after doing all this it should point to
> > jcr-repository. (means if i create new html page it should go in
> > jcr-repository)
> >
> > As I understand the problem is in step 3 which says
> > 3) Set the JCRNodeFactory as default node factory in
> > java/org/apache/lenya/lenya.roles
> >   <role name="org.apache.lenya.cms.repository.NodeFactory"
> >         shorthand="node-factory"
> >         default-class="org.apache.lenya.cms.jcr.JCRNodeFactory"/>
> >
> > NodeFactory role is removed from Lenya.roles by Andreas in revision
> > 416134 with comment Removed NodeFactory role from lenya.roles (now
> > provided by sourcerepository module in cocoon.xconf)
> >
> > Can someone please tell me what changes are required to make my lenya
> > point to JCR rather that pub directory in filesystem.
>
> Basically you have to exclude the sourcerepository module and include
> the modules-optional/jcrsource module. That's not easy with the
> current module declaration syntax (maybe we should rather use a list
> of single modules for declaration). You could disable the patch in
> the sourcerepository module (e.g. use a different extension).
>
> -- Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
>
>

Re: JCR Integration

Posted by Andreas Hartmann <an...@apache.org>.
Rakesh Midha wrote:
> Hello
> 
> I followed the steps given by Andreas in his mail.
> 
> Even now my lenya is pointing to content directory of my publication in 
> pubs folder. I thought after doing all this it should point to 
> jcr-repository. (means if i create new html page it should go in 
> jcr-repository)
> 
> As I understand the problem is in step 3 which says
> 3) Set the JCRNodeFactory as default node factory in 
> java/org/apache/lenya/lenya.roles
>   <role name="org.apache.lenya.cms.repository.NodeFactory"
>         shorthand="node-factory"
>         default-class="org.apache.lenya.cms.jcr.JCRNodeFactory"/>
> 
> NodeFactory role is removed from Lenya.roles by Andreas in revision 
> 416134 with comment Removed NodeFactory role from lenya.roles (now 
> provided by sourcerepository module in cocoon.xconf)
> 
> Can someone please tell me what changes are required to make my lenya 
> point to JCR rather that pub directory in filesystem.

Basically you have to exclude the sourcerepository module and include
the modules-optional/jcrsource module. That's not easy with the
current module declaration syntax (maybe we should rather use a list
of single modules for declaration). You could disable the patch in
the sourcerepository module (e.g. use a different extension).

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org