You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Natale Vinto <eb...@gmail.com> on 2009/10/27 16:29:16 UTC
Working with PostgreSQL in sling
Hi all,
I've taken latest sling trunk from SVN and built it. I would use a
PostgreSQL db instead of default Derby, so I've changed the repository.xml
that I' ve found in
sling-builder/bundles/jcr/jackrabbit-server/src/main/resources/repository.xml
in this way
http://pastebin.ca/1645228
But i don't see any tables in the db, even if sling starts fine. Also
espblog example seems to write elsewhere because post are saved, maybe with
a derby configuration that I can't find because I 've changed jackrabbit
repository.xml to work on postgresql.
Another question : can I use more jackrabbit repository in sling?
Best Regards
--
Natale Vinto
http://www.gotext.org
http://bluesman.gotext.org
Re: Working with PostgreSQL in sling
Posted by Eric Norman <er...@gmail.com>.
You can specify where the sling files go by specifying a value for the
sling.home init-param in the WEB-INF/web.xml file.
If a sling.home is not specified there is a defaut. This is how the default
behavior is described in the web.xml comment:
If the sling.home parameter is not set a default value is
set as ${user.dir}/sling/${context.path} where ${user.dir}
is the current working directory and ${context.path} is the
servlet context path with slashes replaced by underscores and
the root context represented as just a single underscore.
Example: For Sling deployed in the root context, the default
sling.home would be sling/_. For Sling deployed in the context
/sling/i1, the default sling.home would be sling/_sling_i1.
On Thu, Oct 29, 2009 at 8:10 AM, Vidar Ramdal <vi...@idium.no> wrote:
> On Thu, Oct 29, 2009 at 3:37 PM, Natale Vinto <eb...@gmail.com> wrote:
> > 2009/10/27 Vidar Ramdal <vi...@idium.no>
> >
> >> On Tue, Oct 27, 2009 at 4:29 PM, Natale Vinto <eb...@gmail.com>
> wrote:
> >> > I've taken latest sling trunk from SVN and built it. I would use a
> >> > PostgreSQL db instead of default Derby, so I've changed the
> >> repository.xml
> >> > that I' ve found in
> >> >
> >>
> sling-builder/bundles/jcr/jackrabbit-server/src/main/resources/repository.xml
> >> > in this way
> >> > http://pastebin.ca/1645228
> >> > But i don't see any tables in the db, even if sling starts fine. Also
> >> > espblog example seems to write elsewhere because post are saved, maybe
> >> with
> >> > a derby configuration that I can't find because I 've changed
> jackrabbit
> >> > repository.xml to work on postgresql.
> >>
> >> Hi Natale,
> >>
> >> Look under your launchpad/webapp/target/sling/jackrabbit folder. There
> >> should be a repository.xml there, which is the one being used when you
> >> run the launchpad webapp.
> >>
> >> Hi Vidar,
> > I can't find that folder. In target dir I have only this:
> >
> > classes
> > dependency-maven-plugin-markers
> > launchpad-bundles
> > maven-archiver
> > maven-shared-archive-resources
> > org.apache.sling.launchpad.webapp-6-SNAPSHOT
> > org.apache.sling.launchpad.webapp-6-SNAPSHOT-sources.jar
> > org.apache.sling.launchpad.webapp-6-SNAPSHOT.war
> > .plxarc
> > test-classes
> > war
> >
> > repository.xml that I found in sling-builder project are theese:
> >
> > bluesman@ray:~/Documenti/sling_workspace/sling-builder$ find . -name
> > repository.xml
> >
> ./sling/_org.apache.sling.launchpad.testing-6-SNAPSHOT/jackrabbit/repository.xml
> > ./bundles/jcr/jackrabbit-server/target/classes/repository.xml
> > ./bundles/jcr/jackrabbit-server/src/main/resources/repository.xml
> >
> > that are the same of the last one (the one I've modified to work with
> > postgresql). Then I've seen that in the webapp deployed in Tomcat there
> is
> > that repository.xml in
> >
> >
> apache-tomcat-6.0.20/webapps/ROOT/WEB-INF/resources/bundles/15/org.apache.sling.jcr.jackrabbit.server-2.0.5-SNAPSHOT.jar
> >
> > So I wonder where sling write data and where espblog sample write posts!
>
> Hmm, I don't run Sling on Tomcat, so I'm not sure where the
> repository.xml is created in that case.
> When I run through maven/jetty, the sling folder (including
> sling/jackrabbit et al) is created under the current working
> directory.
> I would think there should be a 'sling' folder under your tomcat root
> directory (apache-tomcat-6.0.20/sling), but I don't have Tomcat
> installed to try it myself.
>
> Anyone running Sling on Tomcat who can look this up?
>
> --
> Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
> Sommerrogata 13-15, N-0255 Oslo, Norway
> + 47 22 00 84 00 / +47 21 531941, ext 2070
>
Re: Working with PostgreSQL in sling
Posted by Vidar Ramdal <vi...@idium.no>.
On Thu, Oct 29, 2009 at 3:37 PM, Natale Vinto <eb...@gmail.com> wrote:
> 2009/10/27 Vidar Ramdal <vi...@idium.no>
>
>> On Tue, Oct 27, 2009 at 4:29 PM, Natale Vinto <eb...@gmail.com> wrote:
>> > I've taken latest sling trunk from SVN and built it. I would use a
>> > PostgreSQL db instead of default Derby, so I've changed the
>> repository.xml
>> > that I' ve found in
>> >
>> sling-builder/bundles/jcr/jackrabbit-server/src/main/resources/repository.xml
>> > in this way
>> > http://pastebin.ca/1645228
>> > But i don't see any tables in the db, even if sling starts fine. Also
>> > espblog example seems to write elsewhere because post are saved, maybe
>> with
>> > a derby configuration that I can't find because I 've changed jackrabbit
>> > repository.xml to work on postgresql.
>>
>> Hi Natale,
>>
>> Look under your launchpad/webapp/target/sling/jackrabbit folder. There
>> should be a repository.xml there, which is the one being used when you
>> run the launchpad webapp.
>>
>> Hi Vidar,
> I can't find that folder. In target dir I have only this:
>
> classes
> dependency-maven-plugin-markers
> launchpad-bundles
> maven-archiver
> maven-shared-archive-resources
> org.apache.sling.launchpad.webapp-6-SNAPSHOT
> org.apache.sling.launchpad.webapp-6-SNAPSHOT-sources.jar
> org.apache.sling.launchpad.webapp-6-SNAPSHOT.war
> .plxarc
> test-classes
> war
>
> repository.xml that I found in sling-builder project are theese:
>
> bluesman@ray:~/Documenti/sling_workspace/sling-builder$ find . -name
> repository.xml
> ./sling/_org.apache.sling.launchpad.testing-6-SNAPSHOT/jackrabbit/repository.xml
> ./bundles/jcr/jackrabbit-server/target/classes/repository.xml
> ./bundles/jcr/jackrabbit-server/src/main/resources/repository.xml
>
> that are the same of the last one (the one I've modified to work with
> postgresql). Then I've seen that in the webapp deployed in Tomcat there is
> that repository.xml in
>
> apache-tomcat-6.0.20/webapps/ROOT/WEB-INF/resources/bundles/15/org.apache.sling.jcr.jackrabbit.server-2.0.5-SNAPSHOT.jar
>
> So I wonder where sling write data and where espblog sample write posts!
Hmm, I don't run Sling on Tomcat, so I'm not sure where the
repository.xml is created in that case.
When I run through maven/jetty, the sling folder (including
sling/jackrabbit et al) is created under the current working
directory.
I would think there should be a 'sling' folder under your tomcat root
directory (apache-tomcat-6.0.20/sling), but I don't have Tomcat
installed to try it myself.
Anyone running Sling on Tomcat who can look this up?
--
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Sommerrogata 13-15, N-0255 Oslo, Norway
+ 47 22 00 84 00 / +47 21 531941, ext 2070
Re: Working with PostgreSQL in sling
Posted by Natale Vinto <eb...@gmail.com>.
2009/10/27 Vidar Ramdal <vi...@idium.no>
> On Tue, Oct 27, 2009 at 4:29 PM, Natale Vinto <eb...@gmail.com> wrote:
> > I've taken latest sling trunk from SVN and built it. I would use a
> > PostgreSQL db instead of default Derby, so I've changed the
> repository.xml
> > that I' ve found in
> >
> sling-builder/bundles/jcr/jackrabbit-server/src/main/resources/repository.xml
> > in this way
> > http://pastebin.ca/1645228
> > But i don't see any tables in the db, even if sling starts fine. Also
> > espblog example seems to write elsewhere because post are saved, maybe
> with
> > a derby configuration that I can't find because I 've changed jackrabbit
> > repository.xml to work on postgresql.
>
> Hi Natale,
>
> Look under your launchpad/webapp/target/sling/jackrabbit folder. There
> should be a repository.xml there, which is the one being used when you
> run the launchpad webapp.
>
> Hi Vidar,
I can't find that folder. In target dir I have only this:
classes
dependency-maven-plugin-markers
launchpad-bundles
maven-archiver
maven-shared-archive-resources
org.apache.sling.launchpad.webapp-6-SNAPSHOT
org.apache.sling.launchpad.webapp-6-SNAPSHOT-sources.jar
org.apache.sling.launchpad.webapp-6-SNAPSHOT.war
.plxarc
test-classes
war
repository.xml that I found in sling-builder project are theese:
bluesman@ray:~/Documenti/sling_workspace/sling-builder$ find . -name
repository.xml
./sling/_org.apache.sling.launchpad.testing-6-SNAPSHOT/jackrabbit/repository.xml
./bundles/jcr/jackrabbit-server/target/classes/repository.xml
./bundles/jcr/jackrabbit-server/src/main/resources/repository.xml
that are the same of the last one (the one I've modified to work with
postgresql). Then I've seen that in the webapp deployed in Tomcat there is
that repository.xml in
apache-tomcat-6.0.20/webapps/ROOT/WEB-INF/resources/bundles/15/org.apache.sling.jcr.jackrabbit.server-2.0.5-SNAPSHOT.jar
So I wonder where sling write data and where espblog sample write posts!
Best Regards
> > Another question : can I use more jackrabbit repository in sling?
>
> Not that I'm aware of - maybe someone else can answer this?
>
> --
> Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
> Sommerrogata 13-15, N-0255 Oslo, Norway
> + 47 22 00 84 00 / +47 21 531941, ext 2070
>
--
Natale Vinto
http://www.gotext.org
http://bluesman.gotext.org
Re: Working with PostgreSQL in sling
Posted by Vidar Ramdal <vi...@idium.no>.
On Tue, Oct 27, 2009 at 4:29 PM, Natale Vinto <eb...@gmail.com> wrote:
> I've taken latest sling trunk from SVN and built it. I would use a
> PostgreSQL db instead of default Derby, so I've changed the repository.xml
> that I' ve found in
> sling-builder/bundles/jcr/jackrabbit-server/src/main/resources/repository.xml
> in this way
> http://pastebin.ca/1645228
> But i don't see any tables in the db, even if sling starts fine. Also
> espblog example seems to write elsewhere because post are saved, maybe with
> a derby configuration that I can't find because I 've changed jackrabbit
> repository.xml to work on postgresql.
Hi Natale,
Look under your launchpad/webapp/target/sling/jackrabbit folder. There
should be a repository.xml there, which is the one being used when you
run the launchpad webapp.
> Another question : can I use more jackrabbit repository in sling?
Not that I'm aware of - maybe someone else can answer this?
--
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Sommerrogata 13-15, N-0255 Oslo, Norway
+ 47 22 00 84 00 / +47 21 531941, ext 2070