Re: Vanilla Sling and caconfig

2023-02-23 Thread Ben Fortuna
Thanks Stefan, works perfectly.

For benefit of others, I added this to my config node under /conf:

"security:acl": [
  { "principal": "everyone", "granted": ["jcr:read"] }
]

Docs suggest I should use "allow" rather than "granted", but that
didn't work for me.

regards,

ben


On Thu, 23 Feb 2023 at 18:44, Stefan Seifert
 wrote:

> hello ben.
>
> yes, you would need to prepare your own ACL setup. e.g. grant jcr:read for
> everyone on /conf, or selected subpaths/globbings which you know are
> relevant. the caconfig resolver always uses the access rights of the
> resource resolver the current user (or anonymous) is using.
>
> stefan
>
> > -Original Message-
> > From: Ben Fortuna 
> > Sent: Thursday, February 23, 2023 2:05 AM
> > To: users@sling.apache.org
> > Subject: Vanilla Sling and caconfig
> >
> > Hi all,
> >
> > Apologies for the novice question, just trying to understand how to use
> > caconfig with a vanilla Sling install.
> >
> > It seems that to resolve a config lookup (via sling:configRef ->
> > /conf/example) I need to be logged in as Sling admin for it to resolve
> > correctly. If I am not logged in, the config lookup (via Sling models
> > @ContextAwareConfiguration) will fail (return empty values).
> >
> > I can't see anywhere in the docs referring to ACLs for the /conf
> > hierarchy, just wondering if I need to configure something to allow
> config
> > resolution without being logged in.
> >
> > Many thanks
> > Ben
>


Vanilla Sling and caconfig

2023-02-22 Thread Ben Fortuna
Hi all,

Apologies for the novice question, just trying to understand how to use
caconfig with a vanilla Sling install.

It seems that to resolve a config lookup (via sling:configRef ->
/conf/example) I need to be logged in as Sling admin for it to resolve
correctly. If I am not logged in, the config lookup (via Sling models
@ContextAwareConfiguration) will fail (return empty values).

I can't see anywhere in the docs referring to ACLs for the /conf hierarchy,
just wondering if I need to configure something to allow config resolution
without being logged in.

Many thanks
Ben


Re: [question] 2 sling instances behind one apache server sharing 1 session

2018-12-09 Thread Ben Fortuna
Hi Ruben,

If you are logged in to your sling CMS is it to author content? If so, how
do you maintain consistency when load balancing across two nodes?

If you are not authoring, is the session to authenticate custom CMS
extensions to sing? In such scenario general advice seems to be
externalising session completely as a separate session not integrated with
the sling session.

Regards,
Ben


On Mon., 10 Dec. 2018, 1:41 am Ruben Reusser  Jason,
>
> sorry, I should have been clear about what I am looking for
>
> 1 apache server, 1 domain name (say cms.example.org)
> 2 sling instances (either on 2 servers or 2 different ports)
>
> from a user point of view I'd like to log in to cms.example.org and be
> fully logged in to both sling instances (eg same full sling user on both
> systems)
>
> one way of course would be to use an sso solution
> another one would be that the authentication session in sling can be
> shared between multiple instances
>
> what I am trying to get to is the following:
>
> - my cms uses one instance for the admin shell
> - we use client side rendering for the admin shell
> - content is stored in another instance
>
> This approach should allow me to upgrade my admin shell (the whole admin
> UI) without having to upgrade the instance containing the customer
> content. It also would isolate each customer (or tenant) onto their own
> (smaller) sling instance with their own JVM and hence allow for better
> vertical or horizontal scaling
>
> Ruben
>
>
> Hi Ruben,
>
> Can you clarify some, when you say two tenants, is this two separate
> domains ? And when you talk about being logged in, are yu controlling
> access or just validating that someone is logged in or not, i.e. being able
> to access information based on a user id.
>
> - Jason
> [show/hide original text]
> On Sun, Dec 2, 2018, at 10:04 AM, Ruben Reusser wrote: > hi there, > > I
> have been trying to do the following: 1 apache http server, 2 sling >
> instances. /tenant1 goes to sling instance number 1, tenant 2 goes to >
> sling instance number 2. If I log in I'd love to be logged in to all >
> sling instances, preferably not with a cookie for each tenant. Would >
> love to hear suggestions in what direction I should concentrate my >
> effort to achieve my goal here! > > thank you > > Ruben >
>
>


Re: [slingstart-maven-plugin] configuring logs

2018-09-05 Thread Ben Fortuna
You could create a bundle that includes the following config (remove the
third line to output to default log file, or remove filename to output to
stdout):

"org.apache.sling.commons.log.LogManager": {

"jcr:primaryType":"sling:OsgiConfig",
"org.apache.sling.commons.log.file": "debug.log",
"org.apache.sling.commons.log.level": "debug"
}

On Wed., 5 Sep. 2018, 11:57 pm Nicolas Peltier, 
wrote:

> Hi,
>
> Is there a way to easily set logger on a sling instance launched with
> slingstart-maven-plugin ?
> Trying to set debug log in
> https://github.com/apache/sling-org-apache-sling-servlets-annotations-it/blob/master/pom.xml#L76
>
> Nicolas
>
>


Re: Groovy script support in Sling 10

2018-03-19 Thread Ben Fortuna
Hi Bertrand,

I've raised an issue in SLING Jira with more details:

https://issues.apache.org/jira/browse/SLING-7545

I can see there were some changes in sling-scripting-core (e.g.
https://issues.apache.org/jira/browse/SLING-7311) which may be the cause,
but I can't confirm it as yet.

regards,
ben


On 19 March 2018 at 20:21, Bertrand Delacretaz <bdelacre...@apache.org>
wrote:

> Hi,
>
> On Fri, Mar 16, 2018 at 2:12 PM, Ben Fortuna <benfort...@gmail.com> wrote:
> > ...As of Sling 10 my Groovy scripts have stopped working. Anyone else
> have
> > this issue, or have an explanation of why this might be?...
>
> Unless someone can provide such hints that fix your issue, you'll need
> to provide more details so that we can investigate.
>
> -Bertrand
>


Groovy script support in Sling 10

2018-03-16 Thread Ben Fortuna
Hi,

As of Sling 10 my Groovy scripts have stopped working. Anyone else have
this issue, or have an explanation of why this might be?

Many thanks.

regards,
ben


Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-29 Thread Ben Fortuna
Hi Jason,

Possibly I approached it from the wrong angle in my assessment, happy to
hear it's been working for you and others. I may try again for APIs in
future.

That aside, after using sling for serving web content I can't recommend it
enough. For me it certainly puts the fun back in web development.

Regards,
Ben

On 30 Jan 2017 6:32 AM, "Jason E Bailey" <jason.bai...@24601.org> wrote:

> I'm not sure how to correctly convey my confusion over your statement :)
> There may be some bias here, since I've been doing this for a while, but
> this is an incredibly easy platform for REST and I haven't ran across
> another that gives me the same flexibility.
>
> --
> Jason
>
> On Sat, Jan 28, 2017, at 05:27 PM, Ben Fortuna wrote:
> > Hi Henry,
> >
> > I agree with what you say about keeping it simple and using a servlet.
> > However there are many frameworks and platforms today geared towards
> > making
> > it easier to implement REST APIs, and I think non-trivial APIs would
> > probably benefit from using one.
> >
> > As such, to me an API should live outside the Sling process and use sling
> > as a data/content source.
> >
> > Regards,
> > Ben
> >
>
>


Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-29 Thread Ben Fortuna
Hi Roy,

Yes my reference to data/content was based on the OP stating he'll be
storing data in JCR, so effectively yes he probably could just use a JCR
repo backend.

I'm not totally discounting Sling as an API platform, just that it probably
won't integrate easily with other API frameworks (e.g. JAX-RS, Spring,
etc.). Also if the API is serving more than JCR "resources" (i.e. some form
of data processing) then it will probably need to use servlets. A lot of
maybes I guess. ;-)

regards,
ben


On 29 January 2017 at 09:32, Roy Teeuwen <r...@teeuwen.be> wrote:

> Hey Ben,
>
> I have to argue you on that one though. The short definition of Apache
> Sling from the main site, definitely look at point 1:
>
> Apache Sling in five bullets points
>
> • REST based web framework
> • Content-driven, using a JCR content repository
> • Powered by OSGi
> • Scripting inside, multiple languages (JSP, server-side
> javascript, Scala, etc.)
> • Apache Open Source project
>
> Talking about sling as only data/content is just addressing the JCR /
> Apache OAK part of Sling, then you can just as well say, drop sling and
> just use oak to store the data/content
>
> Greets
> Roy
>
> > On 28 Jan 2017, at 23:27, Ben Fortuna <benfort...@gmail.com> wrote:
> >
> > Hi Henry,
> >
> > I agree with what you say about keeping it simple and using a servlet.
> > However there are many frameworks and platforms today geared towards
> making
> > it easier to implement REST APIs, and I think non-trivial APIs would
> > probably benefit from using one.
> >
> > As such, to me an API should live outside the Sling process and use sling
> > as a data/content source.
> >
> > Regards,
> > Ben
> >
> > On 29 Jan 2017 6:09 AM, "Henry Saginor" <hsaginor.apa...@gmail.com>
> wrote:
> >
> >> In my opinion Sling is first and foremost a REST framework specifically
> >> designed for this kind of thing. It’s not only to serve JCR content.
> >> The paradigm Steven described earlier in this thread is EXACTLY the way
> to
> >> implement it. In the Sling world the resource IS the RESTful object
> >> addressable via a URI. The only thing I can add, as I wrote before, is
> that
> >> it’s not necessary to implement a custom resource provider.
> >> You can simply create JCR nodes/resources to map to your resource type
> via
> >> sling:resourceType. And what your servlet returns is up to you and your
> >> requirements. That works in most cases.
> >> You can easily integrate your servlet with existing OSGi service via
> >> declarative services and use any framework/library you need internally
> >> (provided you can make it available in OSGi container) to integrate with
> >> your data where it adds value.
> >> But in my opinion it does not make sense integrating Sling with other
> >> framework, such as Spring, which follow different paradigms to do the
> same
> >> things as Sling + Declarative Services. It increases complexity and does
> >> not add value.
> >>
> >> My advice is don’t shoot yourself in the foot and keep things as simple
> as
> >> possible. Just implement a servlet, integrate with existing service via
> DS
> >> if needed, and format and return the response based on your
> requirements.
> >> Then create a resource (JCR or custom ResourceProvider), map it to your
> >> servlet via sling:resourceType. This is how I have always implemented
> >> RESTful services in Sling without many limitations. The framework is
> >> specifically designed for this.
> >>
> >> Henry
> >>
> >>> On Jan 28, 2017, at 7:57 AM, Jason E Bailey <jason.bai...@24601.org>
> >> wrote:
> >>>
> >>>
> >>> Its my understanding that the question on ACL's depends on where it is
> >>> inheriting the ACL from. Taking your code as literal, you've declared
> >>> that you own everything under /things and it would inherit the ACL of
> /.
> >>> So if you put your ROOT as /content/remote/things You could set JCR
> ACLs
> >>> on /content/remote.
> >>>
> >>> Theoretically I assume that your resource could provide an ACL as the
> >>> ACL is just a resource in the tree.
> >> I am not sure if you can do this since ACLs are at JCR level and are
> >> checked via JCR.
> >>>
> >>> As others suggested using a resource provider in this way may not be
> the
> >>> best solution. A

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-28 Thread Ben Fortuna
Hi Henry,

I agree with what you say about keeping it simple and using a servlet.
However there are many frameworks and platforms today geared towards making
it easier to implement REST APIs, and I think non-trivial APIs would
probably benefit from using one.

As such, to me an API should live outside the Sling process and use sling
as a data/content source.

Regards,
Ben

On 29 Jan 2017 6:09 AM, "Henry Saginor"  wrote:

> In my opinion Sling is first and foremost a REST framework specifically
> designed for this kind of thing. It’s not only to serve JCR content.
> The paradigm Steven described earlier in this thread is EXACTLY the way to
> implement it. In the Sling world the resource IS the RESTful object
> addressable via a URI. The only thing I can add, as I wrote before, is that
> it’s not necessary to implement a custom resource provider.
> You can simply create JCR nodes/resources to map to your resource type via
> sling:resourceType. And what your servlet returns is up to you and your
> requirements. That works in most cases.
> You can easily integrate your servlet with existing OSGi service via
> declarative services and use any framework/library you need internally
> (provided you can make it available in OSGi container) to integrate with
> your data where it adds value.
> But in my opinion it does not make sense integrating Sling with other
> framework, such as Spring, which follow different paradigms to do the same
> things as Sling + Declarative Services. It increases complexity and does
> not add value.
>
> My advice is don’t shoot yourself in the foot and keep things as simple as
> possible. Just implement a servlet, integrate with existing service via DS
> if needed, and format and return the response based on your requirements.
> Then create a resource (JCR or custom ResourceProvider), map it to your
> servlet via sling:resourceType. This is how I have always implemented
> RESTful services in Sling without many limitations. The framework is
> specifically designed for this.
>
> Henry
>
> > On Jan 28, 2017, at 7:57 AM, Jason E Bailey 
> wrote:
> >
> >
> > Its my understanding that the question on ACL's depends on where it is
> > inheriting the ACL from. Taking your code as literal, you've declared
> > that you own everything under /things and it would inherit the ACL of /.
> > So if you put your ROOT as /content/remote/things You could set JCR ACLs
> > on /content/remote.
> >
> > Theoretically I assume that your resource could provide an ACL as the
> > ACL is just a resource in the tree.
> I am not sure if you can do this since ACLs are at JCR level and are
> checked via JCR.
> >
> > As others suggested using a resource provider in this way may not be the
> > best solution. As the whole point of Sling is to manage content and
> > splitting it into different pieces can be awkward.
> >
> > I'm assuming that you don't need to do POST operations, and that using
> > Oak with an S3 file storage configuration is out.
> >
> > If you can tell Sling what's on the remote store, you could just use a
> > reference to the data. In the same way that in AEM, an image component
> > doesn't necessarily have the image, rather it can have a pointer to the
> > image.  So your renderer can just go out and retrieve the image and
> > return it.
> >
> > Or, the Sling Resource Merger
> > https://sling.apache.org/documentation/bundles/resource-merger.html
> >
> > In this case you can merge your resource provider with a JCR Path. So
> > that your resource provider provides the remote content while the
> > associated meta data can be stored in the JCR. Haven't tried this myself
> > though.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > Jason
> >
> > On Fri, Jan 27, 2017, at 04:27 PM, lancedolan wrote:
> >> Hi friends,
> >>
> >> I've tried routing questions through stackoverflow to cut down my mails
> >> to
> >> this list. I'm losing lots of time on this one, though, and am stuck.
> >>
> >> I need to create APIs which don't represent Sling Resources. Example:
> >> /services/images/123123123
> >> that image will exist somewhere else.
> >>
> >> Bertrand suggests creating a ResourceProvider, as in the example here
> >> [1].
> >> However, that uses the spi package which is not in version 2.9.0 of
> >> org.apache.sling.api, and thus, not available to me in Sling 8.
> >>
> >> I did find a ResourceProvider interface to implement though, and created
> >> this code:
> >>
> >> /**
> >> * Created by lancedolan on 1/27/17.
> >> */
> >> @Component
> >> @Service(value=ResourceProvider.class)
> >> @Properties({
> >>@Property(name = ResourceProvider.ROOTS, value = "things"),
> >>@Property(name = ResourceProvider.OWNS_ROOTS, value = "true")
> >> })
> >> public class ImageResourceProvider implements ResourceProvider {
> >>
> >>/** If this provider required a context this would be more elaborate,
> >> *  but for this simple example we don't need one.
> >> */
> 

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-27 Thread Ben Fortuna
Hi Lance,

I would personally recommend that you find a different solution for serving
REST APIs. I also thought it might be good to service an API from Sling, as
it does make JSON a "first class citizen", but then I realised that Sling
is geared towards serving resources from JCR and ultimately you'll be
fighting with the platform to serve an API without all the JCR metadata.

At very least you could try to run Jersey using plain Servlets, but I think
Sling should be left to do what it is meant for.

Other solutions such as Spring Boot or Ratpack are specifically designed
for serving REST APIs, and with Docker it is trivial to support both a
Sling platform for web content and an API back-end on the same server.

One thing about REST APIs I do think Sling is good for is stubbing. You can
easily create example API responses to test your web UI without needing to
run with a back-end (good for UI testing).

regards,
ben


On 28 January 2017 at 08:27, lancedolan  wrote:

> Hi friends,
>
> I've tried routing questions through stackoverflow to cut down my mails to
> this list. I'm losing lots of time on this one, though, and am stuck.
>
> I need to create APIs which don't represent Sling Resources. Example:
> /services/images/123123123
> that image will exist somewhere else.
>
> Bertrand suggests creating a ResourceProvider, as in the example here [1].
> However, that uses the spi package which is not in version 2.9.0 of
> org.apache.sling.api, and thus, not available to me in Sling 8.
>
> I did find a ResourceProvider interface to implement though, and created
> this code:
>
> /**
>  * Created by lancedolan on 1/27/17.
>  */
> @Component
> @Service(value=ResourceProvider.class)
> @Properties({
> @Property(name = ResourceProvider.ROOTS, value = "things"),
> @Property(name = ResourceProvider.OWNS_ROOTS, value = "true")
> })
> public class ImageResourceProvider implements ResourceProvider {
>
> /** If this provider required a context this would be more elaborate,
>  *  but for this simple example we don't need one.
>  */
> public static class DoesNotNeedAContext {
> };
>
> @Override
> public Resource getResource(ResourceResolver resourceResolver, String
> path) {
> Resource returnResource = new SyntheticResource(resourceResolver,
> path, "edlio/microservice/image");
> returnResource.getValueMap().put("myProp" , "myValue");
> return returnResource;
> }
>
> @Override
> public Resource getResource(ResourceResolver resourceResolver,
> HttpServletRequest httpServletRequest, String path) {
> return getResource(resourceResolver , path);
> }
>
> @Override
> public Iterator listChildren(Resource resource) {
> return null;
> }
> }
>
>
> The result is that I get a 403 response. How do I control the
> authentication
> for resources that don't actually exist? The fact that I'm not getting 404
> means that my ResourceProvider is at least registering successfully.
>
> Finally, I'd much prefer to use Jersey if possible... Anybody have success
> getting Jersey to work in Sling 8? I dumped a bunch of time into it and
> gave
> up after class not found errors for classes that should be found [2].
>
> The ultimate goal is just to provide a restful API in Sling 8 and the
> static-path-declaration of SlingSafeMethodsServlet just doesn't cut it.
>
> Thanks a million guys...
>
>
>
> [1]
> https://github.com/apache/sling/blob/trunk/launchpad/
> test-services/src/main/java/org/apache/sling/launchpad/
> testservices/resourceprovider/PlanetsResourceProvider.java
>
> [2] http://stackoverflow.com/questions/41901337/how-to-use-jersey-in-sling
>
>
>
>
>
> --
> View this message in context: http://apache-sling.73963.n3.
> nabble.com/How-to-create-Rest-APIs-for-non-JCR-data-in-
> Sling-8-tp4069947.html
> Sent from the Sling - Users mailing list archive at Nabble.com.
>


Re: HTMLSerializer and unicode characters

2016-08-18 Thread Ben Fortuna
Hi Stefan,

Thanks for the quick reply. I've created a JIRA issue here:

https://issues.apache.org/jira/browse/SLING-5973

regards,
ben


On 17 August 2016 at 02:18, Stefan Seifert <sseif...@pro-vision.de> wrote:

> hello ben.
>
> difficult to say without further context, unlikely that we have such a
> major problem in the codebase which is used for a long time. in general
> sling should support unicode character everywhere without problems.
>
> can you create a trivial sample project that reproduces the problem e.g.
> in sling Launchpad, and create a sling JIRA ticket with the steps to
> reproduce the problem?
>
> stefan
>
>
> >-Original Message-
> >From: Ben Fortuna [mailto:benfort...@gmail.com]
> >Sent: Tuesday, August 16, 2016 9:18 AM
> >To: users@sling.apache.org
> >Subject: HTMLSerializer and unicode characters
> >
> >Hi everyone,
> >
> >I've noticed that when I have unicode special characters (e.g. emoji) in
> my
> >sling content and the sling rewriter is enabled the characters are not
> >output correctly to the browser. For example:
> >
> > becomes 
> >
> >If I disable the rewriter pipeline the output is as expected.
> >
> >I've looked in the code and I suspect the issue is in the HTMLSerializer
> >from the Cocoon library, however I'm not sure why as it should be using
> the
> >default encoding for output (which is UTF-8). My rewriter pipeline is
> using
> >the default html-generator and html-serializer provided by sling.
> >
> >Is anyone familiar with using unicode characters in sling, and is there
> any
> >special configuration required? Many thanks.
> >
> >regards,
> >ben
>


HTMLSerializer and unicode characters

2016-08-16 Thread Ben Fortuna
Hi everyone,

I've noticed that when I have unicode special characters (e.g. emoji) in my
sling content and the sling rewriter is enabled the characters are not
output correctly to the browser. For example:

 becomes 

If I disable the rewriter pipeline the output is as expected.

I've looked in the code and I suspect the issue is in the HTMLSerializer
from the Cocoon library, however I'm not sure why as it should be using the
default encoding for output (which is UTF-8). My rewriter pipeline is using
the default html-generator and html-serializer provided by sling.

Is anyone familiar with using unicode characters in sling, and is there any
special configuration required? Many thanks.

regards,
ben


Response content type when url has no extension

2016-06-21 Thread Ben Fortuna
Hi,

Just wondering what is the standard practice for managing sling requests
with no extension. My use case is that my index node is called 'index' so
when I get a request for just the domain name root (ie.
http://www.example.com/) it will redirect to my index but without an
extension (ie. /content/blah/index). The content type for this request is
text/plain, so the browser doesn't render the page.

Should this be handled in sling or is it common practice to use another
mechanism to redirect / to /index.html?

Many thanks.

Regards,
Ben


Re: Sling and link rewriter

2016-06-17 Thread Ben Fortuna
Hi Oliver,

Actually I just got it working now. I had some configuration issues to work
through, but ended up with the following additional bundles to install:

* cocoon-serializers-charsets-1.0.0.jar (NOTE: version 1.0.2 didn't work)
* org.apache.sling.commons.html-1.0.0.jar
* org.apache.sling.rewriter-1.1.2.jar

Hopefully the OBR will be updated eventually to reflect these required
dependencies (not sure of the process for updating OBR?)

regards,
ben


On Tue, Jun 14, 2016 at 7:24 PM, Oliver Lietz <apa...@oliverlietz.de> wrote:

> On Saturday 11 June 2016 18:39:08 Ben Fortuna wrote:
> > Just to follow up on this, I discovered the OBR version of sling rewriter
> > is old (1.0.4) so when I installed from maven central (1.1.2) I am not
> > seeing the same errors. Here is the link if anyone is interested:
> >
> >
> http://search.maven.org/#artifactdetails%7Corg.apache.sling%7Corg.apache.sli
> > ng.rewriter%7C1.1.2%7Cbundle
> >
> > I also installed Cocoon serializers using this JAR:
> >
> >
> http://search.maven.org/#artifactdetails%7Corg.apache.cocoon%7Ccocoon-serial
> > izers-charsets%7C1.0.2%7Cbundle
>
> Does it work now?
>
> O.
>
> > On Sat, Jun 11, 2016 at 12:29 PM, Ben Fortuna <benfort...@gmail.com>
> wrote:
> > > Hi Oliver,
> > >
> > > Yes I did refresh after installing, however I couldn't find a standard
> > > OSGi bundle for cocoon, so I just embedded the cocoon-serializers JAR
> to
> > > my
> > > own bundle. So it's possible I am not exporting all of the required
> > > packages.
> > >
> > > Are there standard cocoon bundles I should use for the rewriter
> support? I
> > > will look around a bit more to see if I can find some better bundle to
> > > use.
> > > Many thanks.
> > >
> > > Regards,
> > > Ben
> > > On 11 Jun 2016 6:12 am, "Oliver Lietz" <apa...@oliverlietz.de> wrote:
> > >
> > > On Thursday 09 June 2016 18:20:31 Ben Fortuna wrote:
> > > > Hi,
> > >
> > > Hi Ben,
> > >
> > > > I am seeing a curious error when I try to inject a link transformer
> in
> > >
> > > the
> > >
> > > > rewriter pipeline of Sling 8 (running in docker). It tells me that
> the
> > > > HtmlSerializerFactory can't find the HtmlSerializer class, even
> though
> > > > it
> > > > is an inner class of the factory.
> > > >
> > > > I suspect the problem is that the required Cocoon libraries are not
> > > > installed, but even then the rewriter bundle does not explicitly
> import
> > >
> > > the
> > >
> > > > cocoon packages.
> > >
> > > the Cocoon import is optional. Did you refresh package imports after
> > > installing Cocoon?
> > >
> > > Regards,
> > > O.
> > >
> > > > Has anyone used the default Sling rewriter pipeline serializer, or do
> > >
> > > most
> > >
> > > > use the implementation that comes with AEM (which is apparently
> > >
> > > different)?
> > >
> > > > Many thanks.
> > > >
> > > > Regards,
> > > > Ben
>
>


Re: Sling and link rewriter

2016-06-11 Thread Ben Fortuna
Just to follow up on this, I discovered the OBR version of sling rewriter
is old (1.0.4) so when I installed from maven central (1.1.2) I am not
seeing the same errors. Here is the link if anyone is interested:

http://search.maven.org/#artifactdetails%7Corg.apache.sling%7Corg.apache.sling.rewriter%7C1.1.2%7Cbundle

I also installed Cocoon serializers using this JAR:

http://search.maven.org/#artifactdetails%7Corg.apache.cocoon%7Ccocoon-serializers-charsets%7C1.0.2%7Cbundle


On Sat, Jun 11, 2016 at 12:29 PM, Ben Fortuna <benfort...@gmail.com> wrote:

> Hi Oliver,
>
> Yes I did refresh after installing, however I couldn't find a standard
> OSGi bundle for cocoon, so I just embedded the cocoon-serializers JAR to my
> own bundle. So it's possible I am not exporting all of the required
> packages.
>
> Are there standard cocoon bundles I should use for the rewriter support? I
> will look around a bit more to see if I can find some better bundle to use.
> Many thanks.
>
> Regards,
> Ben
> On 11 Jun 2016 6:12 am, "Oliver Lietz" <apa...@oliverlietz.de> wrote:
>
> On Thursday 09 June 2016 18:20:31 Ben Fortuna wrote:
> > Hi,
>
> Hi Ben,
>
> > I am seeing a curious error when I try to inject a link transformer in
> the
> > rewriter pipeline of Sling 8 (running in docker). It tells me that the
> > HtmlSerializerFactory can't find the HtmlSerializer class, even though it
> > is an inner class of the factory.
> >
> > I suspect the problem is that the required Cocoon libraries are not
> > installed, but even then the rewriter bundle does not explicitly import
> the
> > cocoon packages.
>
> the Cocoon import is optional. Did you refresh package imports after
> installing Cocoon?
>
> Regards,
> O.
>
> > Has anyone used the default Sling rewriter pipeline serializer, or do
> most
> > use the implementation that comes with AEM (which is apparently
> different)?
> > Many thanks.
> >
> > Regards,
> > Ben
>
>


Re: Sling and link rewriter

2016-06-10 Thread Ben Fortuna
Hi Oliver,

Yes I did refresh after installing, however I couldn't find a standard OSGi
bundle for cocoon, so I just embedded the cocoon-serializers JAR to my own
bundle. So it's possible I am not exporting all of the required packages.

Are there standard cocoon bundles I should use for the rewriter support? I
will look around a bit more to see if I can find some better bundle to use.
Many thanks.

Regards,
Ben
On 11 Jun 2016 6:12 am, "Oliver Lietz" <apa...@oliverlietz.de> wrote:

On Thursday 09 June 2016 18:20:31 Ben Fortuna wrote:
> Hi,

Hi Ben,

> I am seeing a curious error when I try to inject a link transformer in the
> rewriter pipeline of Sling 8 (running in docker). It tells me that the
> HtmlSerializerFactory can't find the HtmlSerializer class, even though it
> is an inner class of the factory.
>
> I suspect the problem is that the required Cocoon libraries are not
> installed, but even then the rewriter bundle does not explicitly import
the
> cocoon packages.

the Cocoon import is optional. Did you refresh package imports after
installing Cocoon?

Regards,
O.

> Has anyone used the default Sling rewriter pipeline serializer, or do most
> use the implementation that comes with AEM (which is apparently
different)?
> Many thanks.
>
> Regards,
> Ben


Sling and link rewriter

2016-06-09 Thread Ben Fortuna
Hi,

I am seeing a curious error when I try to inject a link transformer in the
rewriter pipeline of Sling 8 (running in docker). It tells me that the
HtmlSerializerFactory can't find the HtmlSerializer class, even though it
is an inner class of the factory.

I suspect the problem is that the required Cocoon libraries are not
installed, but even then the rewriter bundle does not explicitly import the
cocoon packages.

Has anyone used the default Sling rewriter pipeline serializer, or do most
use the implementation that comes with AEM (which is apparently different)?
Many thanks.

Regards,
Ben


Re: Decoupling Sling from Launchpad

2014-08-11 Thread Ben Fortuna
Hi Dragos,

I haven't really looked at Karaf in much detail, it's almost a bit
overwhelming the size of that project. But I will have a look to see if
they have documented something similar to what I am trying.

regards,
ben



On Mon, Aug 11, 2014 at 3:32 PM, Dragos Dascalita Haut ddrag...@gmail.com
wrote:

 Did you check Apache Karaf integration ?

 Dragos

 Sent from my iPhone

  On Aug 10, 2014, at 10:31 PM, Carsten Ziegeler cziege...@apache.org
 wrote:
 
  Hi,
 
  I'm not sure if we have any examples or documentation, but nothing in
 Sling
  should rely on the launchpad stuff, therefore Sling should run ootb in
  other runtimes by just deploying all relevant bundles into that runtime.
 
  Carsten
 
 
  2014-08-11 3:01 GMT+02:00 Ben Fortuna fort...@users.sourceforge.net:
 
  Hi all,
 
  Just wondering if it is possible to decouple Sling from the Launchpad
 Base
  bundle. I am trying to embed the Sling bundles in a  customised OSGi
  environment, however it appears (from documentation) that I should be
 using
  the Launchpad Base to launch my environment.
 
  From what I can tell the Sling Launchpad bundle embeds Felix, and as
 such
  excludes other OSGi runtimes. I was hoping to be able to support
 different
  OSGi runtimes in my environment.
 
  Are there any examples of Sling running on a different OSGi runtime (not
  Felix)? Many thanks for your time.
 
  regards,
  ben
 
 
 
  --
  Carsten Ziegeler
  Adobe Research Switzerland
  cziege...@apache.org