Hi Sujoy - 
I do not have an explanation, but thought I might share my related
experience.
We are building a CMS system on top of Magnolia, and wanted to
experiment with using Sling for rendering content.

To do this, we deployed Magnolia and Sling as separate webapps, both
binding to the same jcr repo, exposed through a global JNDI resource. 

We ran into problems where Magnolia expects certain MetaData nodes, and
actually had some exceptions when discovering nodes whose type was
unexpected, like sling:.... Similarly, sling requires (albeit fewer)
special nodes to help dictate rendering (correct me if I'm wrong on
this...). My impression is that neither Magnolia nor Sling was designed
to share repo with some other JCR app. (I would love to be wrong about
this, but haven't had more time to explore the details of coaxing them
to work together reliably).

In the end, we decided to forgo the integrating, because these issues
became too complicated and fragile. We are using only Magnolia at this
point.

If you find a better way, I would be very interested to hear about it,
since the rendering engine in Sling is much more flexible (at least
compared to Magnolia 3.6.x, 4.0 has improved on this significantly), and
it would be a nice addition to the possibility of working with Magnolia.


Tyson


-----Original Message-----
From: Sujoy Bhattacharjee [mailto:[email protected]] 
Sent: Monday, March 23, 2009 6:54 AM
To: [email protected]
Cc: 'Sujoy Bhattacharjee'
Subject: Integration with Magnolia

Hi,

I have a requirement where I want to access Magnolia repository from
Apache
sling. More preciously I want to deploy my application on apache sling
and
internally would like to refer magnolia repository for content storing. 

What I did so far as given below.

         1.     I downloaded the src from same site, and built the
org.apache.sling.jcr.jackrabbit.client-2.0.2-cubator.jar, and added to
sling\WEB-                      INF\resources\bundles.

       2.       Updated the configuration for this module with the
magnolia
specific JNDI information.

        java.naming.factory.initial.name :
info.magnolia.jndi.InMemoryContextFactory

        java.naming.provider.url.name: http://www.magnolia.info/jcr

        Repository Name: magnoliaAuthor

        3.      Stop the "Sling - Jackrabbit embedded Repository" from
OSGI
console.
 
        4. Start the
"org.apache.sling.jcr.jackrabbit.client-2.0.2-cubator"
from OSGI console

I have able to access the magnolia repository using JNDI from sling. But
in-case of initial content loading "NodeTypeLoader" is not able to
recognize
the nodeTypeManager for the accrued workspace and showing the following
warning in the log.

       "Repository does not implement JackrabbitNodeTypeManager, cannot
import node types"    

Further when I want to access the sling home page
[http://localhost:8080/sling] it's giving the following error message
followed by a blank screen.

        20.03.2009 19:35:56.737 *ERROR* [SCR Component Actor]
org.apache.sling.jcr.contentloader.internal.ContentLoaderService
activate:
Problem while loading initial content and registering mappings for
existing
bundles javax.jcr.nodetype.NoSuchNodeTypeException: sling:Folder: sling:
is
not a registered namespace prefix.: sling: is not a registered namespace
prefix.
            
            at
org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl.getNodeType(Node
Type
ManagerImpl.java:432)
            ... 13 more
 
Please let me know how I could integrate Magnolia Repository with Apace
sling.

Regards,
Sujoy Bhattacharjee





--------------------------------------------------------------------
This email is intended only for the person or entity to which it is addressed 
and may contain information that is privileged, confidential or otherwise 
protected from disclosure. Dissemination, distribution or copying of this email 
or the information herein by anyone other than the intended recipient, or an 
employee or agent responsible for delivering the message to the intended 
recipient, is prohibited.  If you have received this email in error, please 
immediately notify us by calling our Help Desk at (415) 581-5552 or by 
e-mailing us at [email protected].

Reply via email to