[jira] Reopened: (SLING-632) Ruby script engine does not start due to missing dependencies

2008-08-27 Thread Bertrand Delacretaz (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bertrand Delacretaz reopened SLING-632:
---


Not all of them:


javax.swing.*;
org.apache.bsf.*;
sun.misc; resolution:=optional


I'll try as you suggest, with jruby 1.1.1

> Ruby script engine does not start due to missing dependencies
> -
>
> Key: SLING-632
> URL: https://issues.apache.org/jira/browse/SLING-632
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
>
> In revision 689730, the ruby script engine bundle does not start if loaded, 
> due to the following missing dependencies:
> !! com.sun.mirror.apt,version=0.0.0 from -- Cannot be resolved
> !! com.sun.mirror.declaration,version=0.0.0 from -- Cannot be resolved
> !! com.sun.mirror.type,version=0.0.0 from -- Cannot be resolved
> !! com.sun.mirror.util,version=0.0.0 from -- Cannot be resolved
> !! org.apache.bsf,version=0.0.0 from -- Cannot be resolved
> !! org.apache.bsf.util,version=0.0.0 from -- Cannot be resolved
> !! sun.misc,version=0.0.0 from -- Cannot be resolved
> For now, I'll downgrade the jruby dependency to 1.0, as that used to work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Issue Comment Edited: (SLING-632) Ruby script engine does not start due to missing dependencies

2008-08-27 Thread Felix Meschberger (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626452#action_12626452
 ] 

fmeschbe edited comment on SLING-632 at 8/27/08 11:47 PM:
---

Hmm, these look like rather specific dependencies. How about declaring them as 
optional:

   
   com.sun.*;org.apache.bsf.*;sun.*;resolution:=optional,*
   


Wasn't that already in the pom.xml ?

  was (Author: fmeschbe):
Hmm, these look like rather specific dependencies. How about declaring them 
as optional:

   
   com.sun.*;org.apache.bsf.*;sun.*;resolution:=optional,*
   

  
> Ruby script engine does not start due to missing dependencies
> -
>
> Key: SLING-632
> URL: https://issues.apache.org/jira/browse/SLING-632
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
>
> In revision 689730, the ruby script engine bundle does not start if loaded, 
> due to the following missing dependencies:
> !! com.sun.mirror.apt,version=0.0.0 from -- Cannot be resolved
> !! com.sun.mirror.declaration,version=0.0.0 from -- Cannot be resolved
> !! com.sun.mirror.type,version=0.0.0 from -- Cannot be resolved
> !! com.sun.mirror.util,version=0.0.0 from -- Cannot be resolved
> !! org.apache.bsf,version=0.0.0 from -- Cannot be resolved
> !! org.apache.bsf.util,version=0.0.0 from -- Cannot be resolved
> !! sun.misc,version=0.0.0 from -- Cannot be resolved
> For now, I'll downgrade the jruby dependency to 1.0, as that used to work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: How do I create a Ruby template?

2008-08-27 Thread Bertrand Delacretaz
Hi Josh,

On Thu, Aug 28, 2008 at 12:52 AM, Joshua Oransky <[EMAIL PROTECTED]> wrote:
> ...I';ve
> tried restarting CRX, but still .erb files are not interpreted

The scripting/ruby bundle was broken in the current trunk, see SLING-632.

It should work now, but uses jruby 1.0 again, I didn't have time to
look at the additional dependencies required by jruby 1.1.1. We'll
need to have a closer look if someone needs the latest and greatest
jruby.

-Bertrand


[jira] Commented: (SLING-632) Ruby script engine does not start due to missing dependencies

2008-08-27 Thread Felix Meschberger (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626452#action_12626452
 ] 

Felix Meschberger commented on SLING-632:
-

Hmm, these look like rather specific dependencies. How about declaring them as 
optional:

   
   com.sun.*;org.apache.bsf.*;sun.*;resolution:=optional,*
   


> Ruby script engine does not start due to missing dependencies
> -
>
> Key: SLING-632
> URL: https://issues.apache.org/jira/browse/SLING-632
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
>
> In revision 689730, the ruby script engine bundle does not start if loaded, 
> due to the following missing dependencies:
> !! com.sun.mirror.apt,version=0.0.0 from -- Cannot be resolved
> !! com.sun.mirror.declaration,version=0.0.0 from -- Cannot be resolved
> !! com.sun.mirror.type,version=0.0.0 from -- Cannot be resolved
> !! com.sun.mirror.util,version=0.0.0 from -- Cannot be resolved
> !! org.apache.bsf,version=0.0.0 from -- Cannot be resolved
> !! org.apache.bsf.util,version=0.0.0 from -- Cannot be resolved
> !! sun.misc,version=0.0.0 from -- Cannot be resolved
> For now, I'll downgrade the jruby dependency to 1.0, as that used to work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Closed: (SLING-632) Ruby script engine does not start due to missing dependencies

2008-08-27 Thread Bertrand Delacretaz (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bertrand Delacretaz closed SLING-632.
-

Resolution: Fixed

"Fixed" in revision 689731, the scripting.ruby bundle now loads correctly using 
the launchpad/testing module, and the following script at apps/foo/foo.erb 
displays the correct path when requesting 
http://localhost:/content/foo/*.html



currentNode path = <%= currentNode.getPath() %>.



> Ruby script engine does not start due to missing dependencies
> -
>
> Key: SLING-632
> URL: https://issues.apache.org/jira/browse/SLING-632
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
>
> In revision 689730, the ruby script engine bundle does not start if loaded, 
> due to the following missing dependencies:
> !! com.sun.mirror.apt,version=0.0.0 from -- Cannot be resolved
> !! com.sun.mirror.declaration,version=0.0.0 from -- Cannot be resolved
> !! com.sun.mirror.type,version=0.0.0 from -- Cannot be resolved
> !! com.sun.mirror.util,version=0.0.0 from -- Cannot be resolved
> !! org.apache.bsf,version=0.0.0 from -- Cannot be resolved
> !! org.apache.bsf.util,version=0.0.0 from -- Cannot be resolved
> !! sun.misc,version=0.0.0 from -- Cannot be resolved
> For now, I'll downgrade the jruby dependency to 1.0, as that used to work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (SLING-632) Ruby script engine does not start due to missing dependencies

2008-08-27 Thread Bertrand Delacretaz (JIRA)
Ruby script engine does not start due to missing dependencies
-

 Key: SLING-632
 URL: https://issues.apache.org/jira/browse/SLING-632
 Project: Sling
  Issue Type: Bug
  Components: Scripting
Reporter: Bertrand Delacretaz
Assignee: Bertrand Delacretaz
Priority: Minor


In revision 689730, the ruby script engine bundle does not start if loaded, due 
to the following missing dependencies:

!! com.sun.mirror.apt,version=0.0.0 from -- Cannot be resolved
!! com.sun.mirror.declaration,version=0.0.0 from -- Cannot be resolved
!! com.sun.mirror.type,version=0.0.0 from -- Cannot be resolved
!! com.sun.mirror.util,version=0.0.0 from -- Cannot be resolved
!! org.apache.bsf,version=0.0.0 from -- Cannot be resolved
!! org.apache.bsf.util,version=0.0.0 from -- Cannot be resolved
!! sun.misc,version=0.0.0 from -- Cannot be resolved

For now, I'll downgrade the jruby dependency to 1.0, as that used to work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: Accessing Felix services from Jackrabbit classes

2008-08-27 Thread Felix Meschberger

Hi Rory,

Rory Douglas schrieb:

Hi Felix,

Thanks for this advice, I have it working now.  I copied the mechanism
from SlingAuthenticator (for tracking AuthenticationHandler services)
almost verbatim.  The facade checks the path property of each
DelegateAccessManager against the item path, and uses the appropriate
AM(s), or falls back to the default logic if there's no match.


Cool !



The complication was the dependency on org.apache.jackrabbit.core/spi
classes (for AccessManager, HierarchyManager etc).  They aren't exported
anywhere, so I tried embedding them (like the jackrabbit-server
bundle).  This enabled the bundle to load, but caused linkage errors
when Jackrabbit tried to instantiate my AccessManager, since
org.apache.jackrabbit.core.security.AccessManager was being loaded in 2
places.  The quick solution I found was to modify the jackrabbit-server
pom.xml to export o.a.j.core and o.a.j.spi packages, though I'd be
interested in finding out if there's another way.


Unfortunately the "SPI" interfaces of jackrabbit core is not currently 
properly separated from the actual implementations. So simply exporting 
packages from the jackrabbit-core library is a pain and causes all sorts 
of bundle resolution issues. That's why we did not export anything from 
the jackrabbit-core for now.


If the export works for you, that is fine



I also implemented a basic ACL-based AccessManager bundle to test it
out.  Let me know if you think these would be useful as samples.


I think almost everything, that extends and enhances Sling and/or 
Jackrabbit is usefull as a sample in one sense or the other.


I am not sure, whether we can apply your changes to the export list of 
the jackrabbit-server (I would have to inspect first ;-) ) but IMHO a 
sample bundle with instructions on how to get it running would also be 
worth something.


Thanks and Regards
Felix


Re: Accessing Felix services from Jackrabbit classes

2008-08-27 Thread Rory Douglas

Hi Felix,

Thanks for this advice, I have it working now.  I copied the mechanism
from SlingAuthenticator (for tracking AuthenticationHandler services)
almost verbatim.  The facade checks the path property of each
DelegateAccessManager against the item path, and uses the appropriate
AM(s), or falls back to the default logic if there's no match.

The complication was the dependency on org.apache.jackrabbit.core/spi
classes (for AccessManager, HierarchyManager etc).  They aren't exported
anywhere, so I tried embedding them (like the jackrabbit-server
bundle).  This enabled the bundle to load, but caused linkage errors
when Jackrabbit tried to instantiate my AccessManager, since
org.apache.jackrabbit.core.security.AccessManager was being loaded in 2
places.  The quick solution I found was to modify the jackrabbit-server
pom.xml to export o.a.j.core and o.a.j.spi packages, though I'd be
interested in finding out if there's another way.

I also implemented a basic ACL-based AccessManager bundle to test it
out.  Let me know if you think these would be useful as samples.

Regards,
Rory

Felix Meschberger wrote:

Hi Rory,

Rory Douglas schrieb:
I want to write a facade AccessManager implementation that will 
delegate to a bundle-provided service.  The idea would be to register 
one or more bundles providing AccessManager implementations and be 
able to configure the paths and/or nodetypes that they control, 
though initially it will probably just delegate to one service (if 
available), and fallback to SimpleAccessManager logic if no 
AccessManager service is available.


Since the AccessManager implementation is instantiated by Jackrabbit 
directly (has no Bundle- or ComponentContext), how can I get a handle 
to the Felix framework to lookup/listen for services?  Would this 
even be advisable?


Depends on who you ask ;-) I think this is a valuable extension of 
Jackrabbit. Unfortunately, as you correctly note, Jackrabbit is 
currently configured in an non-dependency-injection way.


Of course, I assume you know of the risk of allowing any provider to 
plug in an AccessManager ;-)


As a solution I suggest you do the following:

  * Create a new bundle and export the AccessManagerFacade class
and the extension interface.
  * Configure your AccessManagerFacade into Jackrabbit. The
jackrabbit-server bundle will find the AccessManagerFacade
class with a dynamic import.
  * Create a BundleActivator in your AccessManagerFacade bundle
along these lines (make sure to _not_export this class) :
public class Activator implements BundleActivator {
private static BundleContext context;
public static BundleContext getBundleContext() {
return context;
}
public void start(BundleContext context) {
this.context = context;
}
public void stop(BundleContext context) {
this.context = null;
}
   * To find and use the real access managers the AccessManagerFacade
 would then access the Activator.getBundleContext() method

This works thanks to OSGi's class loader isolation. The drawback is, 
that the repository of course only works correctly if your 
AccessManager bundle is started.


Hope this helps.

Regards
Felix



Regards,
Rory





Re: How do I create a Ruby template?

2008-08-27 Thread Felix Meschberger

Hi Josh,

The Maven output just says, that it has been successfully building the 
bundle and sent it to the Sling system. Actually sending to the Sling 
system is only part of the story.


The other part of the story is, what the Sling system actually does with 
this. This is found in the logs/error.log file in your ${sling.home} 
folder. That would actually be the interesting part here.


Joshua Oransky schrieb:
I attached the logs that happened when I ran your command. I';ve 
tried restarting CRX, but still .erb files are not interpreted. However, 
simply changing the extension to .jst or .esp causes output. Currently, 
there is no code in my file, only text.


Changing the extension to .jst or .esp just causes another ScriptEngine 
to be used, which shows that the basic mechanism actually works. Only 
that the ruby script is not being called.


Regards
Felix



Here's the command line messaging:

Joshua-Oranskys-MacBook-Pro:ruby joshuaoransky$ mvn -P autoInstallBundle 
-Dsling.url=http://localhost:7402/ctx/system/console clean install

[INFO] Scanning for projects...
[INFO] 
 


[INFO] Building Sling - Scripting - Ruby Support
[INFO]task-segment: [clean, install]
[INFO] 
 


[INFO] [clean:clean]
[INFO] Deleting directory 
/Users/joshuaoransky/Downloads/slingsrc/sling/scripting/ruby/target

[INFO] [enforcer:enforce {execution: enforce-java}]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[echo] ** WARNING (SLING-443) 
**

[echo] On most platforms, building Sling currently requires setting
[echo] MAVEN_OPTS="-Xmx256M", see 
https://issues.apache.org/jira/browse/SLING-443
[echo] You might get a "java.lang.OutOfMemoryError: Java heap space" 
if that

[echo] setting is not correct.
[echo] 
* 


[INFO] Executed tasks
[INFO] [compiler:compile]
[INFO] Compiling 2 source files to 
/Users/joshuaoransky/Downloads/slingsrc/sling/scripting/ruby/target/classes

[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [bundle:bundle]
[INFO] Preparing source:jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive 
invocation.

[INFO] [enforcer:enforce {execution: enforce-java}]
[INFO] [source:jar {execution: attach-sources}]
[INFO] Building jar: 
/Users/joshuaoransky/Downloads/slingsrc/sling/scripting/ruby/target/org.apache.sling.scripting.ruby-2.0.0-incubator-SNAPSHOT-sources.jar 


[INFO] [install:install]
[INFO] Installing 
/Users/joshuaoransky/Downloads/slingsrc/sling/scripting/ruby/target/org.apache.sling.scripting.ruby-2.0.0-incubator-SNAPSHOT.jar 
to 
/Users/joshuaoransky/.m2/repository/org/apache/sling/org.apache.sling.scripting.ruby/2.0.0-incubator-SNAPSHOT/org.apache.sling.scripting.ruby-2.0.0-incubator-SNAPSHOT.jar 

[INFO] Installing 
/Users/joshuaoransky/Downloads/slingsrc/sling/scripting/ruby/target/org.apache.sling.scripting.ruby-2.0.0-incubator-SNAPSHOT-sources.jar 
to 
/Users/joshuaoransky/.m2/repository/org/apache/sling/org.apache.sling.scripting.ruby/2.0.0-incubator-SNAPSHOT/org.apache.sling.scripting.ruby-2.0.0-incubator-SNAPSHOT-sources.jar 


[INFO] [bundle:install]
[INFO] Parsing file:/Users/joshuaoransky/.m2/repository/repository.xml
[INFO] Installing 
org/apache/sling/org.apache.sling.scripting.ruby/2.0.0-incubator-SNAPSHOT/org.apache.sling.scripting.ruby-2.0.0-incubator-SNAPSHOT.jar 


[INFO] Writing OBR metadata
[INFO] [sling:install {execution: install-bundle}]
[INFO] Installing Bundle 
org.apache.sling.scripting.ruby(/Users/joshuaoransky/Downloads/slingsrc/sling/scripting/ruby/target/org.apache.sling.scripting.ruby-2.0.0-incubator-SNAPSHOT.jar) 
to http://localhost:7402/ctx/system/console

[INFO] Bundle installed
[INFO] 


[INFO] BUILD SUCCESSFUL
[INFO] 


[INFO] Total time: 17 seconds
[INFO] Finished at: Wed Aug 27 15:33:18 PDT 2008
[INFO] Final Memory: 15M/45M
[INFO] 






On Aug 27, 2008, at 1:27 PM, Felix Meschberger wrote:


Hi Josh,

Joshua Oransky schrieb:

Felix,
  I have a feeling you are correct. I did what you said, and it 
appears to have installed. However, .erb files are still not being 
interpreted. I'm using CRX, not Jackrabbit, and I check 
/system/bundles and it does not show any new bundles, specifically 
Ruby ones, installed.
  I am going to try this method on Jackrabbit, but was curio

Re: How do I create a Ruby template?

2008-08-27 Thread Joshua Oransky

Felix,

	I attached the logs that happened when I ran your command. I';ve  
tried restarting CRX, but still .erb files are not interpreted.  
However, simply changing the extension to .jst or .esp causes output.  
Currently, there is no code in my file, only text.


Here's the command line messaging:

Joshua-Oranskys-MacBook-Pro:ruby joshuaoransky$ mvn -P  
autoInstallBundle -Dsling.url=http://localhost:7402/ctx/system/console  
clean install

[INFO] Scanning for projects...
[INFO]  


[INFO] Building Sling - Scripting - Ruby Support
[INFO]task-segment: [clean, install]
[INFO]  


[INFO] [clean:clean]
[INFO] Deleting directory /Users/joshuaoransky/Downloads/slingsrc/ 
sling/scripting/ruby/target

[INFO] [enforcer:enforce {execution: enforce-java}]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[echo] ** WARNING (SLING-443)  
**

[echo] On most platforms, building Sling currently requires setting
[echo] MAVEN_OPTS="-Xmx256M", see 
https://issues.apache.org/jira/browse/SLING-443
[echo] You might get a "java.lang.OutOfMemoryError: Java heap  
space" if that

[echo] setting is not correct.
[echo]  
*

[INFO] Executed tasks
[INFO] [compiler:compile]
[INFO] Compiling 2 source files to /Users/joshuaoransky/Downloads/ 
slingsrc/sling/scripting/ruby/target/classes

[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [bundle:bundle]
[INFO] Preparing source:jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive  
invocation.

[INFO] [enforcer:enforce {execution: enforce-java}]
[INFO] [source:jar {execution: attach-sources}]
[INFO] Building jar: /Users/joshuaoransky/Downloads/slingsrc/sling/ 
scripting/ruby/target/org.apache.sling.scripting.ruby-2.0.0-incubator- 
SNAPSHOT-sources.jar

[INFO] [install:install]
[INFO] Installing /Users/joshuaoransky/Downloads/slingsrc/sling/ 
scripting/ruby/target/org.apache.sling.scripting.ruby-2.0.0-incubator- 
SNAPSHOT.jar to /Users/joshuaoransky/.m2/repository/org/apache/sling/ 
org.apache.sling.scripting.ruby/2.0.0-incubator-SNAPSHOT/ 
org.apache.sling.scripting.ruby-2.0.0-incubator-SNAPSHOT.jar
[INFO] Installing /Users/joshuaoransky/Downloads/slingsrc/sling/ 
scripting/ruby/target/org.apache.sling.scripting.ruby-2.0.0-incubator- 
SNAPSHOT-sources.jar to /Users/joshuaoransky/.m2/repository/org/apache/ 
sling/org.apache.sling.scripting.ruby/2.0.0-incubator-SNAPSHOT/ 
org.apache.sling.scripting.ruby-2.0.0-incubator-SNAPSHOT-sources.jar

[INFO] [bundle:install]
[INFO] Parsing file:/Users/joshuaoransky/.m2/repository/repository.xml
[INFO] Installing org/apache/sling/org.apache.sling.scripting.ruby/ 
2.0.0-incubator-SNAPSHOT/org.apache.sling.scripting.ruby-2.0.0- 
incubator-SNAPSHOT.jar

[INFO] Writing OBR metadata
[INFO] [sling:install {execution: install-bundle}]
[INFO] Installing Bundle org.apache.sling.scripting.ruby(/Users/ 
joshuaoransky/Downloads/slingsrc/sling/scripting/ruby/target/ 
org.apache.sling.scripting.ruby-2.0.0-incubator-SNAPSHOT.jar) to http://localhost:7402/ctx/system/console

[INFO] Bundle installed
[INFO]  


[INFO] BUILD SUCCESSFUL
[INFO]  


[INFO] Total time: 17 seconds
[INFO] Finished at: Wed Aug 27 15:33:18 PDT 2008
[INFO] Final Memory: 15M/45M
[INFO]  







On Aug 27, 2008, at 1:27 PM, Felix Meschberger wrote:


Hi Josh,

Joshua Oransky schrieb:

Felix,
  I have a feeling you are correct. I did what you said, and it  
appears to have installed. However, .erb files are still not being  
interpreted. I'm using CRX, not Jackrabbit, and I check /system/ 
bundles and it does not show any new bundles, specifically Ruby  
ones, installed.
  I am going to try this method on Jackrabbit, but was curious if  
this should also work on CRX?


It makes no difference. In fact Sling does not care what repository  
implements the JCR interface as long as there is one...


Do you have any log messages in the logs/error.log file regarding  
the installation of the bundle ?


Regards
Felix


  Thanks man...
  -Josh
On Aug 26, 2008, at 12:24 AM, Felix Meschberger wrote:

Hi Josh,

Joshua Oransky schrieb:

Rory,
 I think that's the issue; I don't have the bundle installed.  
There isn't a lot of information on how to get this bundle,  
however. I tried following the directions on http://w

Re: Capturing component output

2008-08-27 Thread Felix Meschberger

Hi Jukka,

I have now fixed the wrong method. Maybe you can test again ? Thanks.

OTOH, thinking again, I don't think, that the wrong response wrapper 
should have any influence here  hmm, strange.


Regards
Felix

Felix Meschberger schrieb:

Hi Jukka,

Jukka Zitting schrieb:

Hi,

I'm trying to use a RequestDispatcher and a
(Sling)HttpServletResponseWrapper in a servlet component to capture
output from another components. My current attempt is:

final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
final ServletOutputStream stream = new ServletOutputStream() {
@Override
public void write(int b) throws IOException {
buffer.write(b);
}
};
final PrintWriter writer = new PrintWriter(stream);

HttpServletResponseWrapper wrapper =
new HttpServletResponseWrapper(response) {
@Override
public ServletOutputStream getOutputStream() {
return stream;
}
@Override
public PrintWriter getWriter() throws IOException {
return writer;
 }
};

RequestDispatcher dispatcher = request.getRequestDispatcher(path);
dispatcher.include(request, wrapper);

I traced the code to figure out that the RequestDispatcher correctly
finds the target resource I've identified, but then in
RequestData.service (called by SlingComponentFilterChain.render) the
call requestData.getContentData().getServlet() gives the original
servlet (where I'm trying to do the capture) instead of the component
associated with the target resource.

What am I doing wrong?


Maybe you should use a SlingHttpServletResponseWrapper instead of a 
HttpServletResponseWrapper ? This should do the trick (for now).


Point is, that your way should also work. But there is a bug in the 
RequestData.toSlingHttpServletResponse method which should create 
SlingHttpServletResponseWrapper around your HttpServletResponseWrapper 
delegating to the SlingHttpServletResponse wrapped by your 
HttpServletResponseWrapper ..  I opened an issue for that problem [1].


Regards
Felix


[1] https://issues.apache.org/jira/browse/SLING-631



Re: Capturing component output

2008-08-27 Thread Felix Meschberger

Hi Jukka,

Jukka Zitting schrieb:

Hi,

I'm trying to use a RequestDispatcher and a
(Sling)HttpServletResponseWrapper in a servlet component to capture
output from another components. My current attempt is:

final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
final ServletOutputStream stream = new ServletOutputStream() {
@Override
public void write(int b) throws IOException {
buffer.write(b);
}
};
final PrintWriter writer = new PrintWriter(stream);

HttpServletResponseWrapper wrapper =
new HttpServletResponseWrapper(response) {
@Override
public ServletOutputStream getOutputStream() {
return stream;
}
@Override
public PrintWriter getWriter() throws IOException {
return writer;
 }
};

RequestDispatcher dispatcher = request.getRequestDispatcher(path);
dispatcher.include(request, wrapper);

I traced the code to figure out that the RequestDispatcher correctly
finds the target resource I've identified, but then in
RequestData.service (called by SlingComponentFilterChain.render) the
call requestData.getContentData().getServlet() gives the original
servlet (where I'm trying to do the capture) instead of the component
associated with the target resource.

What am I doing wrong?


Maybe you should use a SlingHttpServletResponseWrapper instead of a 
HttpServletResponseWrapper ? This should do the trick (for now).


Point is, that your way should also work. But there is a bug in the 
RequestData.toSlingHttpServletResponse method which should create 
SlingHttpServletResponseWrapper around your HttpServletResponseWrapper 
delegating to the SlingHttpServletResponse wrapped by your 
HttpServletResponseWrapper ..  I opened an issue for that problem [1].


Regards
Felix


[1] https://issues.apache.org/jira/browse/SLING-631


[jira] Created: (SLING-631) RequestData.toSlingHttpServletResponse does not wrap HttpServletResponse

2008-08-27 Thread Felix Meschberger (JIRA)
RequestData.toSlingHttpServletResponse does not wrap HttpServletResponse


 Key: SLING-631
 URL: https://issues.apache.org/jira/browse/SLING-631
 Project: Sling
  Issue Type: Bug
Affects Versions: Engine 2.0.2
Reporter: Felix Meschberger
Assignee: Felix Meschberger
 Fix For: Engine 2.0.4


The RequestData.toSlingHttpServletResponse method is intended to create a 
SlingHttpServletResponse wrapper for a non-SlingHttpServletResponse object 
delegating to wrapped SlingHttpServletResponse. In other words, 
RequestData.toSlingHttpServletResponse should do to the response, what the 
RequestData.toSlingHttpServletRequest does to the request. But it doesn't.

This is most probably the cause for the problem reported by Jukka Zitting in 
[1].

[1] http://markmail.org/message/fphyjdeb2oecjqdn

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: sling & FCKeditor

2008-08-27 Thread Felix Meschberger

Hi Juerg,

Juerg Meier schrieb:

Hello Felix,

***
This is my 2nd wiring of this posting, first one has been rejected as it
was qualified as spam, so I intentionally put spaces into URIs and the
word "sl ing". 
***


Well, the exclamation mark in the Slin
g-Bundle-Resources:/libs/fckeditor!/
did it, in fact! I actually thought about this definition rather like a
traditional mount point than a path within the bundle. Great that both
ways are possible.


Good to hear. Thanks for the feedback.



Now, looks like I need another of your very valuable tips with the
taglib bundle... 


As mentioned, the taglib bundle installed fine. In the jsp (where I use
the FCK:edit tag), I declared the recommended taglib directive: 


<%@ taglib uri="http://fckeditor .net/tags-fckeditor" prefix="FCK" %>

At runtime, the jsp reacted with an error 500:

org.apache.jasper.JasperException: This absolute uri
(http://fckeditor .net/tags-fckeditor) cannot be resolved in either
web.xml or the jar files deployed with this application.


If you just embed the tag library (I assume the java-core-2.4.jar ?) in 
your bundle, the JSP compiler should recognize the FCKeditor.tld file in 
the jar's META-INF folder and load that descriptor. As a URL, the one in 
the tld file is assumed (lacking any other means of configuration). This 
your taglib declaration should probably read:


   <%@ taglib uri="http://java.fckeditor.net"; prefix="FCK" %>

Then other thing of defining a bundle resource and using an absolute 
path should not be required.





Well, to make a long story short, I combined then a 


Slin g-Bundle-Resources: /libs/fckeditor-taglib!/

header with the jsp taglib directive  


<[EMAIL PROTECTED] uri="/libs /fckeditor-taglib/META-INF/FCKeditor.tld"
prefix="FCK" %> 


Now, the jsp seems to be a little happier, it just issues the following
error: 


java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagSupport
at java.lang.ClassLoader.defineClass1(Native Method)
...

May be a missing import? 


Yes, I created a simple maven project using the maven-bundle-plugin, 
which creates the following imports:


  javax.portlet   {resolution:=optional}
  javax.servlet
  javax.servlet.http
  javax.servlet.jsp
  javax.servlet.jsp.tagext
  javax.xml.parsers
  javax.xml.transform
  javax.xml.transform.dom
  javax.xml.transform.stream
  org.slf4j
  org.w3c.dom

I have not tested this, though ;-)

Hope this helps.

Regards
Felix



The manifest looks like this now:
Manifest-Version: 1.0Bundle-Version: 1.0.0
Bundle-Name: FCKEditor-taglib
Bundle-SymbolicName: net.proxymit.fck.fcktaglib
Bundle-ManifestVersion: 2
Import-Package: org.slf4j
Export-Package: net.fckeditor, net.fckeditor.handlers,
net.fckeditor.tags, net.fckeditor.tool
Bundle-ClassPath: /fckeditor-java-core-2.4.jar, 
/lib/commons-fileupload-1.2.1.jar, /lib/commons-io-1.3.2.jar
Build-Jdk: 1.5.0_15
Sli ng-Bundle-Resources: /libs/fckeditor-taglib!/

Thanks,
Juerg





On Tue, 2008-08-26 at 08:43 +0200, Felix Meschberger wrote:

Hi Juerg,

Juerg Meier schrieb:

Hi Felix,

Progress! Both bundles are now installed, visible in the console and
started!

Cool !


However, there not yet doing what they supposed to do: for instance, I
cannot retrieve resources from the resource bundle. E.g. the license
file has path /license.txt within the bundle jar. So, in combination
with the 


Sling-Bundle-Resources: /libs/fckeditor

I would have guessed that the URI for it is:

http://localhost:7402/libs/fckeditor/license.txt

But I get a 404 instead. 


Any idea?
Yes, the license file is expected to be at /libs/fckeditor/license.txt 
in the bundle. So the path used to access the resource is looked up as 
is in the bundle providing the resource.


If you want to have the fckeditor in the root of your bundle, you might 
want to use the path mapping feature:



Sling-Bundle-Resources/libs/fckeditor!/

This functionality cause the bundle resource provider top cut off 
everything before the bang ("!") from the requested resource path and 
only using the remaing path to access the bundle.


Regards
Felix


Thanks so much,
Juerg


On Mon, 2008-08-25 at 08:15 +0200, Felix Meschberger wrote:

Hi Juerg,

Juerg Meier schrieb:

Hi Felix,

Well. my first adventure into OSGi was not a very lucky one... I
prepared two bundles, one for the resources, one for the taglib, but
adding them with the mgmt console, they remained invisible. Looks like
their falling in a black hole, because there wasn't an error message
either...

Perhaps the manifests are incomplete? Here the one for the static
resources:

Manifest-Version: 1.0
Bundle-Version: 1.0.0
Bundle-Name: FCKEditorResources
Bundle-ManifestVersion: 2
Sling-Bundle-Resources: /libs/fckeditor 
The problem with this manifest is, that the Bundle-SymbolicName header 
is missing, which is required by OSGi R4. The same problem is with the 
tag lib bundle.


I observed that 
in CRX quickstart there is bundle #33 th

Re: Security?

2008-08-27 Thread Felix Meschberger

Hi Joseph,

Joseph Ottinger schrieb:
Is there a way to manage permissions to, well, things like the admin 
console from the Sling .war without rebundling the thing with security 
in web.xml?


Sling does not use the servlet container security at all. For normal 
access to the system (except the OSGi management console) Sling 
authenticates with the credentials from the request against the repository.


The OSGi management console has its own very simple authentication 
mechanism supporting a single user with HTTP Basic authentication. You 
can configure the user id, password and HTTP Basic authentication realm 
on the Configuration page of the console selecting the "Management 
Console" configuration.


Hope this helps.

Regards
Felix


Re: sling & FCKeditor

2008-08-27 Thread Jukka Zitting
Hi,

On Wed, Aug 27, 2008 at 10:12 PM, Juerg Meier <[EMAIL PROTECTED]> wrote:
> This is my 2nd wiring of this posting, first one has been rejected as it
> was qualified as spam, so I intentionally put spaces into URIs and the
> word "sl ing".

Just wondering whether it's "sling" or "fckeditor" that's triggering
the spam rules.

It would be helpful if you forwarded us (off-list is OK) the full
bounce message that indicates which rules were triggered by your
message. We can ask the Apache infrastructure team to adjust the rules
to avoid similar issues in the future.

BR,

Jukka Zitting


Re: sling & FCKeditor

2008-08-27 Thread Juerg Meier
Hello Felix,

***
This is my 2nd wiring of this posting, first one has been rejected as it
was qualified as spam, so I intentionally put spaces into URIs and the
word "sl ing". 
***

Well, the exclamation mark in the Slin
g-Bundle-Resources:/libs/fckeditor!/
did it, in fact! I actually thought about this definition rather like a
traditional mount point than a path within the bundle. Great that both
ways are possible.

Now, looks like I need another of your very valuable tips with the
taglib bundle... 

As mentioned, the taglib bundle installed fine. In the jsp (where I use
the FCK:edit tag), I declared the recommended taglib directive: 

<%@ taglib uri="http://fckeditor .net/tags-fckeditor" prefix="FCK" %>

At runtime, the jsp reacted with an error 500:

org.apache.jasper.JasperException: This absolute uri
(http://fckeditor .net/tags-fckeditor) cannot be resolved in either
web.xml or the jar files deployed with this application.

Well, to make a long story short, I combined then a 

Slin g-Bundle-Resources: /libs/fckeditor-taglib!/

header with the jsp taglib directive  

<[EMAIL PROTECTED] uri="/libs /fckeditor-taglib/META-INF/FCKeditor.tld"
prefix="FCK" %> 

Now, the jsp seems to be a little happier, it just issues the following
error: 

java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagSupport
at java.lang.ClassLoader.defineClass1(Native Method)
...

May be a missing import? 

The manifest looks like this now:
Manifest-Version: 1.0Bundle-Version: 1.0.0
Bundle-Name: FCKEditor-taglib
Bundle-SymbolicName: net.proxymit.fck.fcktaglib
Bundle-ManifestVersion: 2
Import-Package: org.slf4j
Export-Package: net.fckeditor, net.fckeditor.handlers,
net.fckeditor.tags, net.fckeditor.tool
Bundle-ClassPath: /fckeditor-java-core-2.4.jar, 
/lib/commons-fileupload-1.2.1.jar, /lib/commons-io-1.3.2.jar
Build-Jdk: 1.5.0_15
Sli ng-Bundle-Resources: /libs/fckeditor-taglib!/

Thanks,
Juerg





On Tue, 2008-08-26 at 08:43 +0200, Felix Meschberger wrote:
> Hi Juerg,
> 
> Juerg Meier schrieb:
> > Hi Felix,
> > 
> > Progress! Both bundles are now installed, visible in the console and
> > started!
> 
> Cool !
> 
> > 
> > However, there not yet doing what they supposed to do: for instance, I
> > cannot retrieve resources from the resource bundle. E.g. the license
> > file has path /license.txt within the bundle jar. So, in combination
> > with the 
> > 
> > Sling-Bundle-Resources: /libs/fckeditor
> > 
> > I would have guessed that the URI for it is:
> > 
> > http://localhost:7402/libs/fckeditor/license.txt
> > 
> > But I get a 404 instead. 
> > 
> > Any idea?
> 
> Yes, the license file is expected to be at /libs/fckeditor/license.txt 
> in the bundle. So the path used to access the resource is looked up as 
> is in the bundle providing the resource.
> 
> If you want to have the fckeditor in the root of your bundle, you might 
> want to use the path mapping feature:
> 
> 
>   Sling-Bundle-Resources/libs/fckeditor!/
> 
> This functionality cause the bundle resource provider top cut off 
> everything before the bang ("!") from the requested resource path and 
> only using the remaing path to access the bundle.
> 
> Regards
> Felix
> 
> > 
> > Thanks so much,
> > Juerg
> > 
> > 
> > On Mon, 2008-08-25 at 08:15 +0200, Felix Meschberger wrote:
> >> Hi Juerg,
> >>
> >> Juerg Meier schrieb:
> >>> Hi Felix,
> >>>
> >>> Well. my first adventure into OSGi was not a very lucky one... I
> >>> prepared two bundles, one for the resources, one for the taglib, but
> >>> adding them with the mgmt console, they remained invisible. Looks like
> >>> their falling in a black hole, because there wasn't an error message
> >>> either...
> >>>
> >>> Perhaps the manifests are incomplete? Here the one for the static
> >>> resources:
> >>>
> >>> Manifest-Version: 1.0
> >>> Bundle-Version: 1.0.0
> >>> Bundle-Name: FCKEditorResources
> >>> Bundle-ManifestVersion: 2
> >>> Sling-Bundle-Resources: /libs/fckeditor 
> >> The problem with this manifest is, that the Bundle-SymbolicName header 
> >> is missing, which is required by OSGi R4. The same problem is with the 
> >> tag lib bundle.
> >>
> >>> I observed that 
> >>> in CRX quickstart there is bundle #33 that contains
> >>> resources only. Howewver, its manifest does not contain a
> >>> Sling-Bundle_Resources header, but something called
> >>> Sling-Initial-Content.
> >> These have different use cases: Sling-Bundle-Resources provides the 
> >> files (and folders) in the Sling Resource tree directly without any 
> >> traces in the repository. The main advantage of this is, that simply 
> >> updating the bundle also updates the files and folders in the reource tree.
> >>
> >> The Sling-Initial-Content header causes the addressed content to be 
> >> copied to the repository. The main advantage of this is, that you can 
> >> then directly manipulate these files in the repository without having to 
> >> redeploy a bundle -- but of course you loose the code management 

Re: How do I create a Ruby template?

2008-08-27 Thread Joshua Oransky

Felix,

	I have a feeling you are correct. I did what you said, and it appears  
to have installed. However, .erb files are still not being  
interpreted. I'm using CRX, not Jackrabbit, and I check /system/ 
bundles and it does not show any new bundles, specifically Ruby ones,  
installed.


	I am going to try this method on Jackrabbit, but was curious if this  
should also work on CRX?


Thanks man...

-Josh


On Aug 26, 2008, at 12:24 AM, Felix Meschberger wrote:


Hi Josh,

Joshua Oransky schrieb:

Rory,
   I think that's the issue; I don't have the bundle installed.  
There isn't a lot of information on how to get this bundle,  
however. I tried following the directions on http://wiki.apache.org/jackrabbit/ApacheSling/SlingGuideInstall 
 but they


The Sling docs in the Jackrabbit wiki are outdated and invalid.  
Please refer to the Sling site at http://incubator.apache.org/sling  
for more up to date information.


don't match up with what I'm seeing. I downloaded and tried to  
upload the pom.xml file since it contains SVN URLs thinking that  
CRX would just download the files, to no avail. That guide makes it  
seem like the bundle repository is something like apt-get or fink,  
but I can't figure out how to get it to connect to the repository.


We are considering building a repository similar to the apt-get  
stuff for Sling. In the realm of OSGi this is called the OSGi Bundle  
Repository or OBR for short. Currently we don't have it yet.


It is not decided yet, what will go into such a repository (except  
for the released bundles, of course).


Regards
Felix


   I appreciate any help!
   -Josh
Have you installed the ruby scripting bundle - I don't think it's  
installed by default in the launchpad app?

Joshua Oransky wrote:
I tried that one. I get this:
Node dumped by HtmlRendererServlet
Node path: /content/maniatv/gameology
Resource metadata: {sling.resolutionPath=/content/maniatv/gameology}
Node properties
jcr:primaryType: nt:unstructured
I've looked all over for the answer. This doesn't seem to be a  
topic explored very much.

-Josh
On Aug 20, 2008, at 12:02 PM, Rory Douglas wrote:
I think the extension you need is .erb (see  
org 
.apache 
.sling.scripting.ruby.ErbScriptEngineFactory#ERB_SCRIPT_EXTENSION)  
Joshua Oransky wrote:
I'm just getting started with Sling. I've played around with the  
examples and feel pretty comfortable with the layout.
However, I need to use Ruby as my scripting language. What  
extension do I use for a template that uses Ruby code? I tried  
various extensions, but nothing works.

Thanks in advance - Josh




[jira] Updated: (SLING-339) Implement job acknowledge

2008-08-27 Thread Carsten Ziegeler (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler updated SLING-339:
---

 Priority: Blocker  (was: Major)
Affects Version/s: Extensions Event 2.0.2
Fix Version/s: Extensions Event 2.0.4
 Assignee: Carsten Ziegeler

Especially, if jobs can't be run in parallel, the first job without a processor 
stops further processing of these jobs as the finishedJob() method is never 
called.
This can especially happen on startup, when the event listeners haven't been 
registered yet.

> Implement job acknowledge
> -
>
> Key: SLING-339
> URL: https://issues.apache.org/jira/browse/SLING-339
> Project: Sling
>  Issue Type: Improvement
>  Components: Event
>Affects Versions: Extensions Event 2.0.2
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Blocker
> Fix For: Extensions Event 2.0.4
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Currently there is no acknowledge that someone is interested in processing a 
> job. This results in the problem
> that jobs might end up locked in the repository for ever if there is noone 
> interested in processing this kind of
> job.
> This couldbe solved by requiring that a job processor acknowledges the 
> receival of a job and thereby indicates that it will process this job. This 
> could also be used to deny other processors for this job.
> If a job is not acknowledged during a specified timeout, the job will be 
> removed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SLING-301) Dojo Classes for accessing the repository via the µjax protocol

2008-08-27 Thread Vidar S. Ramdal (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626108#action_12626108
 ] 

Vidar S. Ramdal commented on SLING-301:
---

Lars Trieloff - 13/Mar/08: "Also: write support added."

Where exactly is the write support added? I find no traces of write support in 
SlingNodeStore.js. E.g, SlingNodeStore.js#500:
 
 setValues: function(item, attribute, values) { console.log("setValues");
throw new Error('Unimplemented API: dojo.data.api.Write.setValues');
 ...

> Dojo Classes for accessing the repository via the µjax protocol
> ---
>
> Key: SLING-301
> URL: https://issues.apache.org/jira/browse/SLING-301
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets Post
>Reporter: Lars Trieloff
>Assignee: Felix Meschberger
>Priority: Minor
> Attachments: demo.html, demo2.html, demo4.html, dojo-ujax.tar.gz, 
> SlingNodeStore.js, SlingPropertyStore.js
>
>
> I've created two Dojo Store implementations that use the µjax protocol to 
> communicate with the repository. The UJaxNodeStore implements a read-only 
> hierarchical store (I am planning to add write support later on) that can be 
> used to read properties and children of a node. The UJaxPropertyStore 
> implements a read-write flat store for accessing the properties of a node. 
> The Store showcases a high-level integration with a full-fledged AJAX toolkit 
> that allows easy integration with an existing widget system.
> Using these store classes, it was easy to create an example repository 
> browser that uses a tree control and a grid control to browse the resource 
> tree and allows to create new and change existing properties.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Capturing component output

2008-08-27 Thread Jukka Zitting
Hi,

I'm trying to use a RequestDispatcher and a
(Sling)HttpServletResponseWrapper in a servlet component to capture
output from another components. My current attempt is:

final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
final ServletOutputStream stream = new ServletOutputStream() {
@Override
public void write(int b) throws IOException {
buffer.write(b);
}
};
final PrintWriter writer = new PrintWriter(stream);

HttpServletResponseWrapper wrapper =
new HttpServletResponseWrapper(response) {
@Override
public ServletOutputStream getOutputStream() {
return stream;
}
@Override
public PrintWriter getWriter() throws IOException {
return writer;
 }
};

RequestDispatcher dispatcher = request.getRequestDispatcher(path);
dispatcher.include(request, wrapper);

I traced the code to figure out that the RequestDispatcher correctly
finds the target resource I've identified, but then in
RequestData.service (called by SlingComponentFilterChain.render) the
call requestData.getContentData().getServlet() gives the original
servlet (where I'm trying to do the capture) instead of the component
associated with the target resource.

What am I doing wrong?

BR,

Jukka Zitting


[jira] Updated: (SLING-630) StarResource does not set correct ResourceMetadata

2008-08-27 Thread Bertrand Delacretaz (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bertrand Delacretaz updated SLING-630:
--

Summary: StarResource does not set correct ResourceMetadata  (was: 
StarResource does not adapt to a Map or String)

> StarResource does not set correct ResourceMetadata
> --
>
> Key: SLING-630
> URL: https://issues.apache.org/jira/browse/SLING-630
> Project: Sling
>  Issue Type: Bug
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
> Fix For: JCR Resource 2.0.4
>
>
> In revision 689422, requesting http://localhost:/*.txt causes the 
> Exception shown below.
> As a result, the  
> org.apache.sling.launchpad.webapp.integrationtest.GetStarTest fails.
> javax.servlet.ServletException: Resource StarResource, 
> type=sling:syntheticStarResource, path=/* does not adapt to a map or string.
>   at 
> org.apache.sling.servlets.get.helpers.PlainTextRendererServlet.renderResource(PlainTextRendererServlet.java:71)
>   at 
> org.apache.sling.servlets.get.helpers.PlainTextRendererServlet.doGet(PlainTextRendererServlet.java:58)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Closed: (SLING-630) StarResource does not adapt to a Map or String

2008-08-27 Thread Bertrand Delacretaz (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bertrand Delacretaz closed SLING-630.
-

   Resolution: Fixed
Fix Version/s: JCR Resource 2.0.4

Fixed in revision 689439, the problem was that StarResource did not initialize 
the ResourceMetadata correctly after SLING-627 changes.

> StarResource does not adapt to a Map or String
> --
>
> Key: SLING-630
> URL: https://issues.apache.org/jira/browse/SLING-630
> Project: Sling
>  Issue Type: Bug
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
> Fix For: JCR Resource 2.0.4
>
>
> In revision 689422, requesting http://localhost:/*.txt causes the 
> Exception shown below.
> As a result, the  
> org.apache.sling.launchpad.webapp.integrationtest.GetStarTest fails.
> javax.servlet.ServletException: Resource StarResource, 
> type=sling:syntheticStarResource, path=/* does not adapt to a map or string.
>   at 
> org.apache.sling.servlets.get.helpers.PlainTextRendererServlet.renderResource(PlainTextRendererServlet.java:71)
>   at 
> org.apache.sling.servlets.get.helpers.PlainTextRendererServlet.doGet(PlainTextRendererServlet.java:58)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Security?

2008-08-27 Thread Joseph Ottinger
Is there a way to manage permissions to, well, things like the admin 
console from the Sling .war without rebundling the thing with security 
in web.xml?


[jira] Assigned: (SLING-630) StarResource does not adapt to a Map or String

2008-08-27 Thread Bertrand Delacretaz (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bertrand Delacretaz reassigned SLING-630:
-

Assignee: Bertrand Delacretaz

> StarResource does not adapt to a Map or String
> --
>
> Key: SLING-630
> URL: https://issues.apache.org/jira/browse/SLING-630
> Project: Sling
>  Issue Type: Bug
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
>
> In revision 689422, requesting http://localhost:/*.txt causes the 
> Exception shown below.
> As a result, the  
> org.apache.sling.launchpad.webapp.integrationtest.GetStarTest fails.
> javax.servlet.ServletException: Resource StarResource, 
> type=sling:syntheticStarResource, path=/* does not adapt to a map or string.
>   at 
> org.apache.sling.servlets.get.helpers.PlainTextRendererServlet.renderResource(PlainTextRendererServlet.java:71)
>   at 
> org.apache.sling.servlets.get.helpers.PlainTextRendererServlet.doGet(PlainTextRendererServlet.java:58)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (SLING-630) StarResource does not adapt to a Map or String

2008-08-27 Thread Bertrand Delacretaz (JIRA)
StarResource does not adapt to a Map or String
--

 Key: SLING-630
 URL: https://issues.apache.org/jira/browse/SLING-630
 Project: Sling
  Issue Type: Bug
Reporter: Bertrand Delacretaz
Priority: Minor


In revision 689422, requesting http://localhost:/*.txt causes the Exception 
shown below.

As a result, the  org.apache.sling.launchpad.webapp.integrationtest.GetStarTest 
fails.

javax.servlet.ServletException: Resource StarResource, 
type=sling:syntheticStarResource, path=/* does not adapt to a map or string.
at 
org.apache.sling.servlets.get.helpers.PlainTextRendererServlet.renderResource(PlainTextRendererServlet.java:71)
at 
org.apache.sling.servlets.get.helpers.PlainTextRendererServlet.doGet(PlainTextRendererServlet.java:58)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: http://wiki.apache.org/jackrabbit/ApacheSling

2008-08-27 Thread Bertrand Delacretaz
Hi,

On Wed, Aug 27, 2008 at 9:56 AM,  <[EMAIL PROTECTED]> wrote:
> ...I just got the following response from my latest
> posting:
>
>> undeliverable to s l i n [EMAIL PROTECTED]
>
>> Body of message generated response:
>> 552 spam score (7.9) exceeded threshold...

Can you give me more details about that message? If you could send me
(off-list) the complete raw response message that you got, I can check
with our infra people if they can find out why it was rejected.

-Bertrand


Re: http://wiki.apache.org/jackrabbit/ApacheSling

2008-08-27 Thread jcr

Hi Bertrand,

That's certainly a good idea.

And somehting more: I just got the following response from my latest posting:


undeliverable to s l i n [EMAIL PROTECTED]



Body of message generated response:
552 spam score (7.9) exceeded threshold


Perhaps, ASF should remove the term "s l i n g" from its spam assassin  
black list dictionary???


Regards,
Juerg


Quoting Bertrand Delacretaz <[EMAIL PROTECTED]>:


Hi,

It looks like the pages found under
http://wiki.apache.org/jackrabbit/ApacheSling contain old info about
Sling - would it be better to delete them to avoid confusion?

-Bertrand