Re: [RT] Generic "scriptable" launcher
On Thu, May 14, 2009 at 8:47 AM, Carsten Ziegeler wrote: > ...While I see the value of a launcher - I don't think that this is the > concern of Sling - we are the framework which should run in every OSGi > installation; so let's focus on the framework and leverage other efforts > like pax+runner, Karaf etc. instead of doing this stuff ourselves Agree, I was actually thinking of creating the launcher as an independent tool outside of Sling, maybe at Apache Commons. Just wanted to see how much people like it here, as that could be useful for our launchpad configurations. -Bertrand
Re: [RT] Generic "scriptable" launcher
On Wed, May 13, 2009 at 9:04 PM, Felix Meschberger wrote: > Hi, > > Bertrand Delacretaz schrieb: >> I'm thinking of creating a generic launcher, using a text file >> definition to load and start jars, allowing a Sling launcher to take >> over and load and start bundles once a main class is started. > > This sounds a lot like Tanuki Java Service Wrapper ... Ok, I'll have a look. > ...At first I thought: What may this be used for. Maybe just because I > failed to understand the problem for which you present a solution. > > Is this about creating "custom Sling configurations" ?... It is about empowering users to create their own assemblies of jars and bundles, and share those assemblies in a simple and foolproof way. > Now, this is certainly a valid request, to which we currently have two > answers: > > * The launchpad/bundles project defines a package of bundles to > be included in the app or webapp binary > > * A patch to extend the BootstrapInstaller to read more bundles > for installation from the filesystem... Ok, but sharing the resulting assembly is not convenient, especially if your configuration involves omitting (removing) some launchpad bundles. > ...Maybe we need an additional mechanism for setting up an initial set of > bundles. Now, there's pax runner [1] which sports so called profiles, > which may be exactly what you are envisioning ?... I'll have a closer look at that. -Bertrand > [1] http://paxrunner.ops4j.org/space/Pax+Runner
Re: [RT] Generic "scriptable" launcher
Bertrand Delacretaz wrote: > On Thu, May 14, 2009 at 8:47 AM, Carsten Ziegeler > wrote: >> ...While I see the value of a launcher - I don't think that this is the >> concern of Sling - we are the framework which should run in every OSGi >> installation; so let's focus on the framework and leverage other efforts >> like pax+runner, Karaf etc. instead of doing this stuff ourselves > > Agree, I was actually thinking of creating the launcher as an > independent tool outside of Sling, maybe at Apache Commons. > > Just wanted to see how much people like it here, as that could be > useful for our launchpad configurations. > I personally would first evaluate if the existing solutions are sufficient or could be easily enhanced instead of creating another project. Carsten -- Carsten Ziegeler cziege...@apache.org
Creating a user mailing list? (was: [DISCUSS] Graduation)
On Wed, May 13, 2009 at 8:31 PM, Felix Meschberger wrote: > Dominik Süß schrieb: >> ...BTW. at this point a users-mailinglist would really make sense since this >> mailinglist might be really confusing for a sling-rookie;) Is this >> user-mailinglist part of the graduationprocess? > > There is no hard relation-ship for having a users list and the graduation. > > A user list is more of a decission to split traffic. For now, I am not > sure, whether we really need it. But if "the community" deems it useful > to have two list, I am certainly open to also run a users list. Maybe to > be set up during the graduation process I don't think need a user mailing list right now, IMHO our community is too small to warrant separate lists. This list currently has 130 subscribers according to http://people.apache.org/~coar/mlists.html. The problem with separate user and dev lists is that it tends to create an "us and them" feeling which I don't like, unless traffic is really to high for a single list. We can always create a user list later, nothing says this has to happen at graduation time. -Bertrand
[ANN] New Release of Apache Sling 5
Bringing Back the Fun - Reloaded Apache Sling brings back the fun to Java developers and makes the life of a web developer much easier. It combines current state of the art technologies and methods like OSGi, REST, scripting, and JCR. The main focus of Sling deals with the important task of bringing your content into the web and providing a plattform to manage/update the content in a REST style. Sling is built into OSGi bundles and therefore benefits from all advantages of OSGi. On the development side a scripting layer (using Apache BSF) allows to use any scripting language with Sling (of course you can use plain old Java, too). And on top of this, Sling helps in developing an application in a RESTful way. As the first web framework dedicated to JSR-170 Java Content Repositories, Sling makes it very simple to implement simple applications, while providing an enterprise-level framework for more complex applications. Underneath the covers Apache Jackrabbit is used for the repository implementation. Download the new release, Apache Sling 5, today and give it a try! Apache Sling currently comes in four flavors: - A standalone application (a jar containing everything to get started with Sling) - A web application (just drop this into your favorite web container) - The full source package (interested in reading the source?) - Maven Artifacts (available through the Apache Incubator Repository) For more information, please visit the Apache Sling web site at http://incubator.apache.org/sling. or go directly to the download site at http://incubator.apache.org/sling/site/downloads.cgi The Apache Sling Community -- Carsten Ziegeler cziege...@apache.org
Re: Creating a user mailing list? (was: [DISCUSS] Graduation)
+1, IMVHO splitting dev and users too early will isolate developers from the users needs, and users from the realities of developers. BTW, "to early" has yet to be defined. Ian On 14 May 2009, at 09:28, Bertrand Delacretaz wrote: On Wed, May 13, 2009 at 8:31 PM, Felix Meschberger wrote: Dominik Süß schrieb: ...BTW. at this point a users-mailinglist would really make sense since this mailinglist might be really confusing for a sling-rookie;) Is this user-mailinglist part of the graduationprocess? There is no hard relation-ship for having a users list and the graduation. A user list is more of a decission to split traffic. For now, I am not sure, whether we really need it. But if "the community" deems it useful to have two list, I am certainly open to also run a users list. Maybe to be set up during the graduation process I don't think need a user mailing list right now, IMHO our community is too small to warrant separate lists. This list currently has 130 subscribers according to http://people.apache.org/~coar/mlists.html. The problem with separate user and dev lists is that it tends to create an "us and them" feeling which I don't like, unless traffic is really to high for a single list. We can always create a user list later, nothing says this has to happen at graduation time. -Bertrand
Re: Releases in the future
On Tue, May 12, 2009 at 10:34 PM, Roy T. Fielding wrote: > On May 12, 2009, at 12:40 AM, Bertrand Delacretaz wrote: > >> On Mon, May 11, 2009 at 10:29 PM, Roy T. Fielding >> wrote: >>> >>> On May 11, 2009, at 12:03 PM, Felix Meschberger wrote: >>> Carsten and I have been reasoning about the releases in the future, mainly the ones for end-users who just want to grab a binary and fire it off >> >>> Apache only releases source code packages. Those other things you build >>> are not releases -- they are binaries that individuals build and upload. >> >> How about naming those things "binary packages" instead of "releases"? > > A rose is still a rose ... > >> We can still use the same process for releasing them, and include a >> disclaimer that they're not official releases and provided without >> warranty etc.. > > I don't see how we can "use the same process for releasing them" when > part of that process requires comparison of the source code with what > is in subversion. An ASF release is a group decision based on peer > review, and I don't think anyone giving +1s on the binaries are > actually doing JVM decompiles and source-level comparisons to verify > the contents don't include some extra trojan horse. Running the tests > is not sufficient. > > That's why the ASF does not vote on binaries. I'd rather not make it > look like we are. Ok, I see your point. I suggest that we clarify how we do that next time we have a concrete case. -Bertrand
Re: Creating a user mailing list? (was: [DISCUSS] Graduation)
2009/5/14 Bertrand Delacretaz : > I don't think need a user mailing list right now, IMHO our community > is too small to warrant separate lists. I agree. In other projects, that have two mailing lists, it's sometimes hard to decide which one to write to. Also, the 'user' list sometimes seem less of a priority to the developers, so that questions asked there are often left unanswered for some time. Until the volume of traffic to sling-dev becomes unmanageable, I see no great need to have a separate user list. -- Vidar S. Ramdal - http://www.idium.no Akersgata 16, N-0158 Oslo, Norway +47 21 531941, ext 2070
[jira] Closed: (SLING-946) jcrinstall integration tests fail on our Hudson build server
[ https://issues.apache.org/jira/browse/SLING-946?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bertrand Delacretaz closed SLING-946. - Resolution: Fixed Using the latest bnd (revision 774406) fixed the problem. > jcrinstall integration tests fail on our Hudson build server > > > Key: SLING-946 > URL: https://issues.apache.org/jira/browse/SLING-946 > Project: Sling > Issue Type: Bug > Components: JCR Install >Reporter: Bertrand Delacretaz >Priority: Minor > > The jcrinstall integration tests in the > http://hudson.zones.apache.org/hudson/view/Sling/job/sling-contrib-1.5 build > fail with errors like > java.io.FileNotFoundException: > /home/hudson/hudson-slave/workspace/sling-contrib-1.5/contrib-1.5/launchpad/testing/target/launchpad-bundles/resources/bundles/15/cloned-bundles/observer_clone_1240993668015.jar > For some reason, the tests cannot find the cloned bundles. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
FYI, added some Pax Exam-based tests
Hi, See contrib/extensions/jcrinstall/it - I used Juanjo's whiteboard example (whiteboard/jvazquez/testing) as a base, thanks! Tests obviously run slower than pure JUnit tests, but not too slow, and it's fairly easy to assemble some bundles to test services. I have configured debugging so that -Dpax.exam.debug.port=1234 on the mvn command line activates remote debugging of the tests, which run in a separate VM. For my jcrinstall tests it would be nice to be able to grab bundles from the Maven repository using Pax Exam's mavenBundle() and friends, but I havent figured that out yet. -Bertrand
Re: FYI, added some Pax Exam-based tests
> See contrib/extensions/jcrinstall/it - I used Juanjo's whiteboard > example (whiteboard/jvazquez/testing) as a base, thanks! You´re welcome. I hope to continue this stuff soon. > Tests obviously run slower than pure JUnit tests, but not too slow, > and it's fairly easy to assemble some bundles to test services. > > I have configured debugging so that -Dpax.exam.debug.port=1234 on the > mvn command line activates remote debugging of the tests, which run in > a separate VM. > > For my jcrinstall tests it would be nice to be able to grab bundles > from the Maven repository using Pax Exam's mavenBundle() and friends, > but I havent figured that out yet. Good news. I´ll take a look at your stuff. Thanks!. Juanjo.
[jira] Resolved: (SLING-251) Add mapping for user homes
[ https://issues.apache.org/jira/browse/SLING-251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Felix Meschberger resolved SLING-251. - Resolution: Won't Fix I think we can write off this issue because we can probably not encode the actual location of the user home inside the ResourceResolver. We can still reopen, if we find a solution or may assign it to some other component. > Add mapping for user homes > -- > > Key: SLING-251 > URL: https://issues.apache.org/jira/browse/SLING-251 > Project: Sling > Issue Type: Improvement > Components: JCR Resource >Reporter: Tobias Bocanegra > > it would be very practical to have a mapping to 'user homes'. i.e. like the > unix tilde expansion: > http://host/~/test > would resolve to a resource: /home/tripod/test (if the request is > authenticated as 'tripod'). > i don't think that the reverse mapping is needed. > the user home root resource (i.e. "/home") needs to be configurable. > possible default values for the user root are: > /home > /users > /people > but i prefer "/home" -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (SLING-968) Fix support for exact virtual URL mappings
Fix support for exact virtual URL mappings -- Key: SLING-968 URL: https://issues.apache.org/jira/browse/SLING-968 Project: Sling Issue Type: Improvement Components: JCR Resource Affects Versions: JCR Resource 2.0.4 Reporter: Felix Meschberger Assignee: Felix Meschberger Fix For: JCR Resource 2.0.6 The mapping specification below /etc/map allows for matching an exact URL by using a sling:match property terminated with a $, as in: /etc/map/http/some.host.80/path +--- sling:match = "path$" +--- sling:internalRedirect = "/some/path.html" This setup would match requests to http://some.host/path exactly and works well. The reverse mapping, though, is setup as: /some/path.html --> http://some.host/path$ which results in a StringOutOfBoundsException when trying to map the resource path /some/path.html back to an URL. The loader for /etc/map mappings should recognize such match patterns with trailing $ and act as follows: * Child nodes are not considered (since nothing will match after the $ sign any way) * For the revers mapping, the trailing $ sign is moved to the left hand side as in : /some/path.html$ --> http://some.host/path -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-968) Fix support for exact virtual URL mappings
[ https://issues.apache.org/jira/browse/SLING-968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709545#action_12709545 ] Felix Meschberger commented on SLING-968: - Implemented this change in Rev. 774890 as requested. > Fix support for exact virtual URL mappings > -- > > Key: SLING-968 > URL: https://issues.apache.org/jira/browse/SLING-968 > Project: Sling > Issue Type: Improvement > Components: JCR Resource >Affects Versions: JCR Resource 2.0.4 >Reporter: Felix Meschberger >Assignee: Felix Meschberger > Fix For: JCR Resource 2.0.6 > > > The mapping specification below /etc/map allows for matching an exact URL by > using a sling:match property terminated with a $, as in: >/etc/map/http/some.host.80/path > +--- sling:match = "path$" > +--- sling:internalRedirect = "/some/path.html" > This setup would match requests to http://some.host/path exactly and works > well. The reverse mapping, though, is setup as: > /some/path.html --> http://some.host/path$ > which results in a StringOutOfBoundsException when trying to map the resource > path /some/path.html back to an URL. > The loader for /etc/map mappings should recognize such match patterns with > trailing $ and act as follows: > * Child nodes are not considered (since nothing will match after the $ > sign any way) > * For the revers mapping, the trailing $ sign is moved to the left hand > side as in : /some/path.html$ --> http://some.host/path -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (SLING-968) Fix support for exact virtual URL mappings
[ https://issues.apache.org/jira/browse/SLING-968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Felix Meschberger closed SLING-968. --- Resolution: Fixed Closing with committed unit test in Rev. 774897 > Fix support for exact virtual URL mappings > -- > > Key: SLING-968 > URL: https://issues.apache.org/jira/browse/SLING-968 > Project: Sling > Issue Type: Improvement > Components: JCR Resource >Affects Versions: JCR Resource 2.0.4 >Reporter: Felix Meschberger >Assignee: Felix Meschberger > Fix For: JCR Resource 2.0.6 > > > The mapping specification below /etc/map allows for matching an exact URL by > using a sling:match property terminated with a $, as in: >/etc/map/http/some.host.80/path > +--- sling:match = "path$" > +--- sling:internalRedirect = "/some/path.html" > This setup would match requests to http://some.host/path exactly and works > well. The reverse mapping, though, is setup as: > /some/path.html --> http://some.host/path$ > which results in a StringOutOfBoundsException when trying to map the resource > path /some/path.html back to an URL. > The loader for /etc/map mappings should recognize such match patterns with > trailing $ and act as follows: > * Child nodes are not considered (since nothing will match after the $ > sign any way) > * For the revers mapping, the trailing $ sign is moved to the left hand > side as in : /some/path.html$ --> http://some.host/path -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Problems with script execution
Hi all I've tried to trigger a script, both groovy and esp. I am recieving the exception pasted below. Can anybody make any sense out of it? Cheers Christian (500) The requested URL /controlmanagement/rulebook.html resulted in an error in /apps/test/html.esp. Exception: java.io.UnsupportedEncodingException: at sun.nio.cs.StreamDecoder.forInputStreamReader(Unknown Source) at java.io.InputStreamReader.(Unknown Source) at org.apache.sling.scripting.core.impl.DefaultSlingScript.getScriptReader(DefaultSlingScript.java:301) at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:129) at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:106) at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:225) at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:520) at org.apache.sling.engine.impl.SlingMainServlet.processRequest(SlingMainServlet.java:409) at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:48) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:59) at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:59) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:57) at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:296) at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:183) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389) at org.ops4j.pax.web.service.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:64) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.ops4j.pax.web.service.internal.HttpServiceContext.handle(HttpServiceContext.java:111) at org.ops4j.pax.web.service.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:64) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) Request Progress: 0 (2009-05-14 21:38:17) Starting Request Processing 1 (2009-05-14 21:38:17) Starting ResourceResolution 7 (2009-05-14 21:38:17) URI=/controlmanagement/rulebook.html resolves to Resource=JcrNodeResource, type=test, path=/controlmanagement/rulebook, elapsed = 6ms 8 (2009-05-14 21:38:17) Resource Path Info: SlingRequestPathInfo: path='/controlmanagement/rulebook', selectorString='null', extension='html', suffix='null' 8 (2009-05-14 21:38:17) Starting ServletResolution 8 (2009-05-14 21:38:17) Starting resolverServlet(JcrNodeResource, type=test, path=/controlmanagement/rulebook) 530 (2009-05-14 21:38:17) Using Servlet /apps/test/html.esp, elapsed = 522ms 530 (2009-05-14 21:38:17) URI=/controlmanagement/rulebook.html handled by Servlet=/apps/test/html.esp, elapsed = 522ms 531 (2009-05-14 21:38:17) Applying request filters 531 (2009-05-14 21:38:17) Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter 531 (2009-05-14 21:38:17) Starting /apps/test/html.esp#0 551 (2009-05-14 21:38:17) SCRIPT ERROR: 551 (2009-05-14 21:38:17) /apps/test/html.esp#0, elapsed = 20ms 552 (2009-05-14 21:38:17) Starting handleError:throwable=java.io.UnsupportedEncodingException 561 (2009-05-14 21:38:17) Using handler Sling Default Error Handler Servlet, elapsed = 9ms 584 (2009-05-14 21:38:17) Dumping SlingRequestProgressTracker Entries, elapsed = 584ms ApacheSling/2.0 (Java HotSpot(TM) Client VM 1.6.0_13; Windows Vista 6.0 x86)
Re: Problems with script execution
Hi Christian, This is kind of unexpected. But lets recap. The DefaultSlingScript.getScriptReader method uses the ResourceMetadata.getCharacterEncoding() to find the encoding of the script file. Now if this is based on a JCR nt:file node, this would be the jcr:mimeType property. To what value is this property set ? Could it be, that this property has a non-empty value, which is not a valid character encoding ? I think, we should catch this exception and create some better logging and probably try some other encoding - maybe UTF-8 or the platform default. WDYT ? Regards Felix Christian Sprecher schrieb: > Hi all > > I've tried to trigger a script, both groovy and esp. I am recieving the > exception pasted below. Can anybody make any sense out of it? > > Cheers > > Christian > > > (500) > > The requested URL /controlmanagement/rulebook.html resulted in an error > in /apps/test/html.esp. > > > Exception: > > java.io.UnsupportedEncodingException: at > sun.nio.cs.StreamDecoder.forInputStreamReader(Unknown Source) > at java.io.InputStreamReader.(Unknown Source) > at > org.apache.sling.scripting.core.impl.DefaultSlingScript.getScriptReader(DefaultSlingScript.java:301) > > at > org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:129) > > at > org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:106) > > at > org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:225) > > at > org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:520) > > at > org.apache.sling.engine.impl.SlingMainServlet.processRequest(SlingMainServlet.java:409) > > at > org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:48) > > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:59) > > at > org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:59) > > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:57) > > at > org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:296) > > at > org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:183) > > at > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) > at > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389) > at > org.ops4j.pax.web.service.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:64) > > at > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) > at > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) > at > org.ops4j.pax.web.service.internal.HttpServiceContext.handle(HttpServiceContext.java:111) > > at > org.ops4j.pax.web.service.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:64) > > at > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) > at org.mortbay.jetty.Server.handle(Server.java:324) > at > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535) > at > org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865) > > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539) > at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) > at > org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) > > at > org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) > > > > Request Progress: > > 0 (2009-05-14 21:38:17) Starting Request Processing > 1 (2009-05-14 21:38:17) Starting ResourceResolution > 7 (2009-05-14 21:38:17) URI=/controlmanagement/rulebook.html > resolves to Resource=JcrNodeResource, type=test, > path=/controlmanagement/rulebook, elapsed = 6ms > 8 (2009-05-14 21:38:17) Resource Path Info: SlingRequestPathInfo: > path='/controlmanagement/rulebook', selectorString='null', > extension='html', suffix='null' > 8 (2009-05-14 21:38:17) Starting ServletResolution > 8 (2009-05-14 21:38:17) Starting resolverServlet(JcrNodeResource, > type=test, path=/controlmanagement/rulebook) >530 (2009-05-14 21:38:17) Using Servlet /apps/test/html.esp, elapsed > = 522ms >530 (2009-05-14 21:38:17) URI=/controlmanagement/rulebook.html > handled by Servlet=/apps/test/html.esp, elapsed = 522ms >531 (2009-05-14 21:38:17) Applying request filters >531 (2009-05-14 21:38:17) Calling filter: > org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter >531 (2009-05-14 21:38:17) Starting /apps/test/html.esp#0 >551 (2009-05-14 21:38:17) SCRIPT ERROR:551 (2009-05-14 21:38:17) > /apps/test/
[jira] Created: (SLING-969) /etc/map entries must be applied depth first
/etc/map entries must be applied depth first Key: SLING-969 URL: https://issues.apache.org/jira/browse/SLING-969 Project: Sling Issue Type: Bug Components: JCR Affects Versions: JCR Resource 2.0.4 Reporter: Felix Meschberger Assignee: Felix Meschberger Fix For: JCR Resource 2.0.6 In a mapping of the form: /etc/map/http +--- host.80 +--- sling:internalRedirect = "/content" +--- virtual +--- sling:internalRedirect = "/content" The child node (virtual) must be compared to the URL before the parent node (host.80). Otherwise the child node would never get a chance to map since an URL mapping the child node always also maps the parent node. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (SLING-969) /etc/map entries must be applied depth first
[ https://issues.apache.org/jira/browse/SLING-969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Felix Meschberger closed SLING-969. --- Resolution: Fixed Fixed and added testcase in Rev. 774920. > /etc/map entries must be applied depth first > > > Key: SLING-969 > URL: https://issues.apache.org/jira/browse/SLING-969 > Project: Sling > Issue Type: Bug > Components: JCR >Affects Versions: JCR Resource 2.0.4 >Reporter: Felix Meschberger >Assignee: Felix Meschberger > Fix For: JCR Resource 2.0.6 > > > In a mapping of the form: > /etc/map/http > +--- host.80 > +--- sling:internalRedirect = "/content" > +--- virtual > +--- sling:internalRedirect = "/content" > The child node (virtual) must be compared to the URL before the parent node > (host.80). Otherwise the child node would never get a chance to map since an > URL mapping the child node always also maps the parent node. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (SLING-969) /etc/map entries must be applied depth first
[ https://issues.apache.org/jira/browse/SLING-969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Felix Meschberger updated SLING-969: Component/s: (was: JCR) JCR Resource > /etc/map entries must be applied depth first > > > Key: SLING-969 > URL: https://issues.apache.org/jira/browse/SLING-969 > Project: Sling > Issue Type: Bug > Components: JCR Resource >Affects Versions: JCR Resource 2.0.4 >Reporter: Felix Meschberger >Assignee: Felix Meschberger > Fix For: JCR Resource 2.0.6 > > > In a mapping of the form: > /etc/map/http > +--- host.80 > +--- sling:internalRedirect = "/content" > +--- virtual > +--- sling:internalRedirect = "/content" > The child node (virtual) must be compared to the URL before the parent node > (host.80). Otherwise the child node would never get a chance to map since an > URL mapping the child node always also maps the parent node. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: Problems with script execution
Hi Felix I think you mean the *jcr:enconding* property of the respective jcr:content child node. And this had been set to an empty value. Changing this to UTF-8 does work. Now, the file hasn't been created via Sling/http but rather via JCR API, and there I do set jcr:encoding explicitely to "" (empty string, doh!). How do you do this in Sling? Do you simply set the encoding to UTF-8, or do you retrieve this value from somewhere? Thx & Cheers Christian Felix Meschberger schrieb: Hi Christian, This is kind of unexpected. But lets recap. The DefaultSlingScript.getScriptReader method uses the ResourceMetadata.getCharacterEncoding() to find the encoding of the script file. Now if this is based on a JCR nt:file node, this would be the jcr:mimeType property. To what value is this property set ? Could it be, that this property has a non-empty value, which is not a valid character encoding ? I think, we should catch this exception and create some better logging and probably try some other encoding - maybe UTF-8 or the platform default. WDYT ? Regards Felix Christian Sprecher schrieb: Hi all I've tried to trigger a script, both groovy and esp. I am recieving the exception pasted below. Can anybody make any sense out of it? Cheers Christian (500) The requested URL /controlmanagement/rulebook.html resulted in an error in /apps/test/html.esp. Exception: java.io.UnsupportedEncodingException: at sun.nio.cs.StreamDecoder.forInputStreamReader(Unknown Source) at java.io.InputStreamReader.(Unknown Source) at org.apache.sling.scripting.core.impl.DefaultSlingScript.getScriptReader(DefaultSlingScript.java:301) at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:129) at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:106) at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:225) at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:520) at org.apache.sling.engine.impl.SlingMainServlet.processRequest(SlingMainServlet.java:409) at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:48) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:59) at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:59) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:57) at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:296) at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:183) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389) at org.ops4j.pax.web.service.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:64) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.ops4j.pax.web.service.internal.HttpServiceContext.handle(HttpServiceContext.java:111) at org.ops4j.pax.web.service.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:64) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) Request Progress: 0 (2009-05-14 21:38:17) Starting Request Processing 1 (2009-05-14 21:38:17) Starting ResourceResolution 7 (2009-05-14 21:38:17) URI=/controlmanagement/rulebook.html resolves to Resource=JcrNodeResource, type=test, path=/controlmanagement/rulebook, elapsed = 6ms 8 (2009-05-14 21:38:17) Resource Path Info: SlingRequestPathInfo: path='/controlmanagement/rulebook', selectorString='null', extension='html', suffix='null' 8 (2009-05-14 21:38:17) Starting ServletResolution 8 (2009-05-14 21:38:17) Starting resolverServlet(JcrNodeResource, type=test, path=/controlmanagement/rulebook) 530 (2009-05-14 21:38:17) Using Servlet /apps/test/html.esp, elapsed = 522ms 530 (2009-05-14 21:38:17) URI=/controlmanagement/rulebook.html handled by Servlet=/apps/test/html.esp, elapsed = 522ms 531 (2009-05-14 21:38:17) Applying requ
Re: Problems with script execution
Hi Christian, Christian Sprecher schrieb: > Hi Felix > > I think you mean the *jcr:enconding* property of the respective Ehrm, yes of course. My bad. > jcr:content child node. And this had been set to an empty value. > Changing this to UTF-8 does work. > Now, the file hasn't been created via Sling/http but rather via JCR API, > and there I do set jcr:encoding explicitely to "" (empty string, doh!). Ah, that explains it. > How do you do this in Sling? Do you simply set the encoding to UTF-8, or > do you retrieve this value from somewhere? Usually I upload scripts using WebDAV and this stores the file data as UTF-8 and sets the encoding accordingly IIRC. Regards Felix > > Thx & Cheers > > Christian > > Felix Meschberger schrieb: >> Hi Christian, >> >> This is kind of unexpected. But lets recap. The >> DefaultSlingScript.getScriptReader method uses the >> ResourceMetadata.getCharacterEncoding() to find the encoding of the >> script file. Now if this is based on a JCR nt:file node, this would be >> the jcr:mimeType property. >> >> To what value is this property set ? Could it be, that this property has >> a non-empty value, which is not a valid character encoding ? >> >> I think, we should catch this exception and create some better logging >> and probably try some other encoding - maybe UTF-8 or the platform >> default. >> >> WDYT ? >> >> Regards >> Felix >> >> Christian Sprecher schrieb: >> >>> Hi all >>> >>> I've tried to trigger a script, both groovy and esp. I am recieving the >>> exception pasted below. Can anybody make any sense out of it? >>> >>> Cheers >>> >>> Christian >>> >>> >>> (500) >>> >>> The requested URL /controlmanagement/rulebook.html resulted in an error >>> in /apps/test/html.esp. >>> >>> >>> Exception: >>> >>> java.io.UnsupportedEncodingException: at >>> sun.nio.cs.StreamDecoder.forInputStreamReader(Unknown Source) >>> at java.io.InputStreamReader.(Unknown Source) >>> at >>> org.apache.sling.scripting.core.impl.DefaultSlingScript.getScriptReader(DefaultSlingScript.java:301) >>> >>> >>> at >>> org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:129) >>> >>> >>> at >>> org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:106) >>> >>> >>> at >>> org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:225) >>> >>> >>> at >>> org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:520) >>> >>> >>> at >>> org.apache.sling.engine.impl.SlingMainServlet.processRequest(SlingMainServlet.java:409) >>> >>> >>> at >>> org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:48) >>> >>> >>> at >>> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:59) >>> >>> >>> at >>> org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:59) >>> >>> >>> at >>> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:57) >>> >>> >>> at >>> org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:296) >>> >>> >>> at >>> org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:183) >>> >>> >>> at >>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) >>> at >>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389) >>> at >>> org.ops4j.pax.web.service.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:64) >>> >>> >>> at >>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) >>> at >>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) >>> at >>> org.ops4j.pax.web.service.internal.HttpServiceContext.handle(HttpServiceContext.java:111) >>> >>> >>> at >>> org.ops4j.pax.web.service.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:64) >>> >>> >>> at >>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) >>> at org.mortbay.jetty.Server.handle(Server.java:324) >>> at >>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535) >>> at >>> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865) >>> >>> >>> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539) >>> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) >>> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) >>> at >>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) >>> >>> >>> at >>> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) >>> >>> >>> >>> >>> Request Progress: >>> >>> 0 (2009-05-14 21:38:17) Starting Request Processing >>> 1 (2009-05-14 21:38:17) Starting ResourceResolutio