log: WARN ItemStateMap overwriting map entry

2010-02-24 Thread Marc Speck
Hi,

I've just updated Sling, started, stopped and started again Sling standalone
and see several 100 lines of

24.02.2010 16:11:48.732 *WARN* [SCR Component Actor]
org.apache.jackrabbit.core.state.ItemStateMap overwriting map entry
b43a5b0e-27e7-ecd6-88fa-5a6d238bf879
24.02.2010 16:11:48.732 *WARN* [SCR Component Actor]
org.apache.jackrabbit.core.state.ItemStateMap overwriting map entry
436d46a1-654d-e70e-c322-16a108f3893d
24.02.2010 16:11:48.733 *WARN* [SCR Component Actor]
org.apache.jackrabbit.core.state.ItemStateMap overwriting map entry
57b3843e-71c9-27d2-50a8-96232516bfc7

in the log. Is the the update to JR2 still in progress and should I just way
a few days?

Marc


Re: NoClassDefFoundError in start-up log

2010-01-26 Thread Marc Speck
Hi Felix,


> Have you tried setting the "Maximum Idle Sessions" (pool.maxIdle)
> property of the repository configuration to 0 (zero) to disable session
> pooling ?
>
> oh my, I set maxIdle=0 but nothing changed. After poking around for half an
hour I remembered that the console is full of traps... I changed the setting
in the first Repository entry but I should have changed the running
instance...

All fine now, thanks for the hint,
Marc





> Regards
> Felix
>
>
> >
> > Cheers,
> > Marc
> >
> >
> >
> > 1. https://issues.apache.org/jira/browse/SLING-1272
> > 2. https://issues.apache.org/jira/browse/SLING-1283
> >
> >
> >
> > javax.jcr.RepositoryException: this session has been closed
> > at
> > org.apache.jackrabbit.core.SessionImpl.sanityCheck(SessionImpl.java:375)
> > at
> >
> org.apache.jackrabbit.core.SessionImpl.hasPendingChanges(SessionImpl.java:869)
> > at
> >
> org.apache.sling.jcr.base.internal.PooledSession.hasPendingChanges(PooledSession.java:213)
> >
> > javax.jcr.RepositoryException: this session has been closed
> > at
> > org.apache.jackrabbit.core.SessionImpl.sanityCheck(SessionImpl.java:375)
> > at
> > org.apache.jackrabbit.core.ItemImpl.sanityCheck(ItemImpl.java:137)
> > at
> org.apache.jackrabbit.core.NodeImpl.addMixin(NodeImpl.java:997)
> > at
> org.apache.jackrabbit.core.NodeImpl.addMixin(NodeImpl.java:2779)
> >
> > javax.jcr.RepositoryException: this session has been closed
> > at
> > org.apache.jackrabbit.core.SessionImpl.sanityCheck(SessionImpl.java:375)
> > at
> > org.apache.jackrabbit.core.ItemImpl.sanityCheck(ItemImpl.java:137)
> > at
> org.apache.jackrabbit.core.ItemImpl.getPath(ItemImpl.java:1272)
> >
> > On Tue, Jan 26, 2010 at 10:20 AM, Felix Meschberger  >wrote:
> >
> >> Hi,
> >>
> >> On 26.01.2010 09:56, Marc Speck wrote:
> >>> https://issues.apache.org/jira/browse/SLING-1327
> >>
> >> Thanks.
> >>
> >> Regards
> >> Felix
> >>
> >>>
> >>>
> >>> On Tue, Jan 26, 2010 at 9:14 AM, Felix Meschberger  >>> wrote:
> >>>
> >>>> Hi Marc,
> >>>>
> >>>> This looks like the RMI registry support cannot be started in the new
> >>>> Jackrabbit 1.6 binding. Unless you need the RMI binding, this has no
> >>>> influence on the functionality.
> >>>>
> >>>> Yep, I found it when I wanted to debug something in the repository
> with
> >> the
> >>> Eclipse plugin...
> >>>
> >>> Cheers,
> >>> Marc
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> Would you mind reporting an issue ? Thanks alot.
> >>>>
> >>>> Regards
> >>>> Felix
> >>>>
> >>>> On 25.01.2010 20:53, Marc Speck wrote:
> >>>>> I've just checked-out and compiled Sling from the repository and got
> >> the
> >>>>> error log below. Is this a known bug or is anything wrong on my side?
> >>>>> Marc
> >>>>>
> >>>>>
> >>>>>
> >>>>> 25.01.2010 20:43:23.727 *ERROR* [SCR Component Actor]
> >>>> org.apache.felix.scr
> >>>>> Unexpected problem executing task Enable Component:
> >>>>> org.apache.sling.jcr.jackrabbit.server.RmiRegistrationSupport (5)
> >>>>> (java.lang.NoClassDefFoundError:
> >>>>> org/apache/jackrabbit/rmi/server/RemoteAdapterFactory)
> >>>>> java.lang.NoClassDefFoundError:
> >>>>> org/apache/jackrabbit/rmi/server/RemoteAdapterFactory
> >>>>> at java.lang.Class.getDeclaredConstructors0(Native Method)
> >>>>> at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
> >>>>> at java.lang.Class.getConstructor0(Unknown Source)
> >>>>> at java.lang.Class.newInstance0(Unknown Source)
> >>>>> at java.lang.Class.newInstance(Unknown Source)
> >>>>> at
> >>>>>
> >>>>
> >>
> org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:183)
> >>>>> at
> >>>&g

Re: NoClassDefFoundError in start-up log

2010-01-26 Thread Marc Speck
Hi Felix,

I've updated to 903202 and NoClassDefFoundError is gone, thanks a lot for
fixing so quickly!

Now I run into an other issue with closed sessions which sounds like [1]
[2]. It happens randomly when our integration tests run but seldom in the
same classes. Maybe the traces below help resolving the Jira issues.

Cheers,
Marc



1. https://issues.apache.org/jira/browse/SLING-1272
2. https://issues.apache.org/jira/browse/SLING-1283



javax.jcr.RepositoryException: this session has been closed
at
org.apache.jackrabbit.core.SessionImpl.sanityCheck(SessionImpl.java:375)
at
org.apache.jackrabbit.core.SessionImpl.hasPendingChanges(SessionImpl.java:869)
at
org.apache.sling.jcr.base.internal.PooledSession.hasPendingChanges(PooledSession.java:213)

javax.jcr.RepositoryException: this session has been closed
at
org.apache.jackrabbit.core.SessionImpl.sanityCheck(SessionImpl.java:375)
at
org.apache.jackrabbit.core.ItemImpl.sanityCheck(ItemImpl.java:137)
at org.apache.jackrabbit.core.NodeImpl.addMixin(NodeImpl.java:997)
at org.apache.jackrabbit.core.NodeImpl.addMixin(NodeImpl.java:2779)

javax.jcr.RepositoryException: this session has been closed
at
org.apache.jackrabbit.core.SessionImpl.sanityCheck(SessionImpl.java:375)
at
org.apache.jackrabbit.core.ItemImpl.sanityCheck(ItemImpl.java:137)
at org.apache.jackrabbit.core.ItemImpl.getPath(ItemImpl.java:1272)

On Tue, Jan 26, 2010 at 10:20 AM, Felix Meschberger wrote:

> Hi,
>
> On 26.01.2010 09:56, Marc Speck wrote:
> > https://issues.apache.org/jira/browse/SLING-1327
>
> Thanks.
>
> Regards
> Felix
>
> >
> >
> > On Tue, Jan 26, 2010 at 9:14 AM, Felix Meschberger  >wrote:
> >
> >> Hi Marc,
> >>
> >> This looks like the RMI registry support cannot be started in the new
> >> Jackrabbit 1.6 binding. Unless you need the RMI binding, this has no
> >> influence on the functionality.
> >>
> >> Yep, I found it when I wanted to debug something in the repository with
> the
> > Eclipse plugin...
> >
> > Cheers,
> > Marc
> >
> >
> >
> >
> >
> >
> >
> >> Would you mind reporting an issue ? Thanks alot.
> >>
> >> Regards
> >> Felix
> >>
> >> On 25.01.2010 20:53, Marc Speck wrote:
> >>> I've just checked-out and compiled Sling from the repository and got
> the
> >>> error log below. Is this a known bug or is anything wrong on my side?
> >>> Marc
> >>>
> >>>
> >>>
> >>> 25.01.2010 20:43:23.727 *ERROR* [SCR Component Actor]
> >> org.apache.felix.scr
> >>> Unexpected problem executing task Enable Component:
> >>> org.apache.sling.jcr.jackrabbit.server.RmiRegistrationSupport (5)
> >>> (java.lang.NoClassDefFoundError:
> >>> org/apache/jackrabbit/rmi/server/RemoteAdapterFactory)
> >>> java.lang.NoClassDefFoundError:
> >>> org/apache/jackrabbit/rmi/server/RemoteAdapterFactory
> >>> at java.lang.Class.getDeclaredConstructors0(Native Method)
> >>> at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
> >>> at java.lang.Class.getConstructor0(Unknown Source)
> >>> at java.lang.Class.newInstance0(Unknown Source)
> >>> at java.lang.Class.newInstance(Unknown Source)
> >>> at
> >>>
> >>
> org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:183)
> >>> at
> >>>
> >>
> org.apache.felix.scr.impl.manager.ImmediateComponentManager.createComponent(ImmediateComponentManager.java:118)
> >>> at
> >>>
> >>
> org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:991)
> >>> at
> >>>
> >>
> org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:298)
> >>> at
> >>>
> >>
> org.apache.felix.scr.impl.manager.AbstractComponentManager$1.doRun(AbstractComponentManager.java:138)
> >>> at
> >>>
> >>
> org.apache.felix.scr.impl.ComponentActivatorTask.run(ComponentActivatorTask.java:67)
> >>> at
> >>>
> >>
> org.apache.felix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:96)
> >>> at java.lang.Thread.run(Unknown Source)
> >>> Caused by: java.lang.ClassNotFoundException:
> >>> org.apache.jackrabbit.rmi.server.RemoteAdapterFactory
> >>> at
> >>>
> >>
> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:744)
> >>> at
> >> org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
> >>> at
> >>>
> >>
> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)
> >>> at java.lang.ClassLoader.loadClass(Unknown Source)
> >>> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> >>> ... 13 mor
> >>>
> >>
> >
>


Re: NoClassDefFoundError in start-up log

2010-01-26 Thread Marc Speck
https://issues.apache.org/jira/browse/SLING-1327


On Tue, Jan 26, 2010 at 9:14 AM, Felix Meschberger wrote:

> Hi Marc,
>
> This looks like the RMI registry support cannot be started in the new
> Jackrabbit 1.6 binding. Unless you need the RMI binding, this has no
> influence on the functionality.
>
> Yep, I found it when I wanted to debug something in the repository with the
Eclipse plugin...

Cheers,
Marc







> Would you mind reporting an issue ? Thanks alot.
>
> Regards
> Felix
>
> On 25.01.2010 20:53, Marc Speck wrote:
> > I've just checked-out and compiled Sling from the repository and got the
> > error log below. Is this a known bug or is anything wrong on my side?
> > Marc
> >
> >
> >
> > 25.01.2010 20:43:23.727 *ERROR* [SCR Component Actor]
> org.apache.felix.scr
> > Unexpected problem executing task Enable Component:
> > org.apache.sling.jcr.jackrabbit.server.RmiRegistrationSupport (5)
> > (java.lang.NoClassDefFoundError:
> > org/apache/jackrabbit/rmi/server/RemoteAdapterFactory)
> > java.lang.NoClassDefFoundError:
> > org/apache/jackrabbit/rmi/server/RemoteAdapterFactory
> > at java.lang.Class.getDeclaredConstructors0(Native Method)
> > at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
> > at java.lang.Class.getConstructor0(Unknown Source)
> > at java.lang.Class.newInstance0(Unknown Source)
> > at java.lang.Class.newInstance(Unknown Source)
> > at
> >
> org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:183)
> > at
> >
> org.apache.felix.scr.impl.manager.ImmediateComponentManager.createComponent(ImmediateComponentManager.java:118)
> > at
> >
> org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:991)
> > at
> >
> org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:298)
> > at
> >
> org.apache.felix.scr.impl.manager.AbstractComponentManager$1.doRun(AbstractComponentManager.java:138)
> > at
> >
> org.apache.felix.scr.impl.ComponentActivatorTask.run(ComponentActivatorTask.java:67)
> > at
> >
> org.apache.felix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:96)
> > at java.lang.Thread.run(Unknown Source)
> > Caused by: java.lang.ClassNotFoundException:
> > org.apache.jackrabbit.rmi.server.RemoteAdapterFactory
> > at
> >
> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:744)
> > at
> org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
> > at
> >
> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)
> > at java.lang.ClassLoader.loadClass(Unknown Source)
> > at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> > ... 13 mor
> >
>


NoClassDefFoundError in start-up log

2010-01-25 Thread Marc Speck
I've just checked-out and compiled Sling from the repository and got the
error log below. Is this a known bug or is anything wrong on my side?
Marc



25.01.2010 20:43:23.727 *ERROR* [SCR Component Actor] org.apache.felix.scr
Unexpected problem executing task Enable Component:
org.apache.sling.jcr.jackrabbit.server.RmiRegistrationSupport (5)
(java.lang.NoClassDefFoundError:
org/apache/jackrabbit/rmi/server/RemoteAdapterFactory)
java.lang.NoClassDefFoundError:
org/apache/jackrabbit/rmi/server/RemoteAdapterFactory
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:183)
at
org.apache.felix.scr.impl.manager.ImmediateComponentManager.createComponent(ImmediateComponentManager.java:118)
at
org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:991)
at
org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:298)
at
org.apache.felix.scr.impl.manager.AbstractComponentManager$1.doRun(AbstractComponentManager.java:138)
at
org.apache.felix.scr.impl.ComponentActivatorTask.run(ComponentActivatorTask.java:67)
at
org.apache.felix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:96)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException:
org.apache.jackrabbit.rmi.server.RemoteAdapterFactory
at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:744)
at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 13 mor


Minor config issues

2009-11-16 Thread Marc Speck
1) The pre-built manifest file in org.apache.sling.jcr.jackrabbit.server is
not in sync anymore. I miserably failed at updating to a higher Jackrabbit
version, but could somebody of wisdom ;) at least update the version of the
bundle? The Felix Console says 2.0.3.incubator-SNAPSHOT instead of
2.0.5-SNAPSHOT

2) Is there a reason that org.apache.sling.jcr.jackrabbit.usermanager and
accessmanaager declare a dependency on jackrabbit-api twice?

Cheers,
Marc


Re: ServletResolver

2009-09-14 Thread Marc Speck
On Mon, Sep 14, 2009 at 1:59 PM, Vidar Ramdal  wrote:

> On Mon, Sep 14, 2009 at 1:41 PM, Bertrand Delacretaz
>  wrote:
> > Hi,
> >
> > On Mon, Sep 14, 2009 at 12:22 PM, Marc Speck 
> wrote:
> >> On Mon, Sep 14, 2009 at 11:43 AM, Bertrand Delacretaz
> >>  wrote:
> >>> ...using version.12 instead of version=12 should help here, 12
> >>> then becomes just another selector.
> >>
> >> Excellent idea, parsing getSelectorString() should give the number. I
> have
> >> also /foo/bar.version.12 for folders but it's fine to look into the
> >> extension for the number.
> >
> > You don't even need to parse if you use
> > SlingHttpServletRequest.getRequestPathInfo().getSelectors().
>

Right, but if the order should ever get mixed up in the future, the
algorithm is more likely to fail then parsing "version.123.".


> >
> >> ...The OptingServlet sounds interesting. It means that I can register
> several
> >> servlets for the same resourceType and implement accept() accordingly?..
> >
> > Yes, that's the idea, for those (hopefully rare) cases where the other
> > mechanisms aren't sufficient.
>
> Yeah, do what Bertrand says - I didn't think about the OptingServlet
> when replying to your questions. Seems it can do pretty much what you
> want.
>

I'd need it for the main resourceType that handles 70% of traffic. It seems
that SlingServletResolver does not cache OptingServlets which makes sense.
However, I will have to investigate how much performance I loose with giving
up servlet caching. A custom ResourceCollector.hashCode could probably solve
the problem but this goes too far for me.

I'm rather considering creating 3 subResourceTypes just for servlet
resolving. As JCR queries are inheritance-sensitive to type constraints, I
think it's the solution with the least side effects.

Thanks for your suggestions,
Marc


Re: ServletResolver

2009-09-14 Thread Marc Speck
On Mon, Sep 14, 2009 at 11:43 AM, Bertrand Delacretaz  wrote:

> On Mon, Sep 14, 2009 at 10:46 AM, Marc Speck  wrote:
> > ...3. A RegExp for selectors or extensions. For example, I currently have
> the
> > version in the path like /foo/bar.version=12.xml, so @scr.property
> > name="sling.servlet.selectors" value="version=.+"...
>
> Note that using version.12 instead of version=12 should help here, 12
> then becomes just another selector.
>

Excellent idea, parsing getSelectorString() should give the number. I have
also /foo/bar.version.12 for folders but it's fine to look into the
extension for the number.

The OptingServlet sounds interesting. It means that I can register several
servlets for the same resourceType and implement accept() accordingly?

Marc


Re: ServletResolver

2009-09-14 Thread Marc Speck
Thanks for the quick confirmation,
Marc



On Mon, Sep 14, 2009 at 10:51 AM, Vidar Ramdal  wrote:

> On Mon, Sep 14, 2009 at 10:46 AM, Marc Speck  wrote:
> > I'm trying to find all options for directing requests to different
> servlets.
> > I was glad if somebody could confirm that the following use cases are not
> > covered:
> >
> > 1. A wildcard for the name of the first node in the path, e.g.
> @scr.property
> > name="sling.servlet.paths" value="\/.*?\/a\/b"
>
> Not supported.
>
> > 2. jcr:mixinTypes are ignored for servlet resolving.
>
> True.
>
> > 3. A RegExp for selectors or extensions. For example, I currently have
> the
> > version in the path like /foo/bar.version=12.xml, so @scr.property
> > name="sling.servlet.selectors" value="version=.+"
>
> Not supported.
>
> As a general rule for servlet registration, each servlet is registered
> to one or more paths in the virtual resource tree.
> The path must be an actual resolvable path, i.e. it cannot consist of
> regex'es (as this could possibly yield an unlimited number of paths).
>
> However, you might be able to write your own ResourceProvider to
> handle those cases.
>
> --
> Vidar S. Ramdal  - http://www.idium.no
> Sommerrogata 13-15, N-0255 Oslo, Norway
> + 47 22 00 84 00 / +47 21 531941, ext 2070
>


ServletResolver

2009-09-14 Thread Marc Speck
I'm trying to find all options for directing requests to different servlets.
I was glad if somebody could confirm that the following use cases are not
covered:

1. A wildcard for the name of the first node in the path, e.g. @scr.property
name="sling.servlet.paths" value="\/.*?\/a\/b"

2. jcr:mixinTypes are ignored for servlet resolving.

3. A RegExp for selectors or extensions. For example, I currently have the
version in the path like /foo/bar.version=12.xml, so @scr.property
name="sling.servlet.selectors" value="version=.+"

Thanks for any hints,
Marc