You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Gazi Mushfiqur Rahman <ga...@gmail.com> on 2011/02/08 12:40:16 UTC

Re: Locking on nodes are not preserved in following sessions or requests

Hi Stefan,


Thanks a lot for your previous reply. But I still failed to fix the issue.


I am trying to incorporate the 2.2.3 version of Jackrabbit in Sling, since
this is the latest stable version of Jackrabbit. Also it has fixed the
locking issue. I've changed all the POMs in Sling to use the 2.2.3 version
of Jackrabbit. But still the locking was not working. Then I tried to add
some logs in the Jackrabbit for debug purpose and modified the version to
2.2.3-SNAPSHOT. But I didn't find my logs in the Sling log file. Then I
tried to logg those messages in the 'System.out' along with the logging. But
still I am failing to get those logs in the Tomcat's output file
(catalina.out). So, I think my changes are not used by Sling when I am
building Sling.



If I can't push my modifications in the Sling, I think I won't be able to
fix the issue in Sling in any way. So, can you please help me in building
Sling properly?



I followed the following steps for the building:

  1. Modify Some java files in jackrabbit-core (version 2.2.3) for the
logging

  2. Change all the POMs of Jackrabbit 2.2.3 and set their version to
'2.2.3-SNAPSHOT'

  3. Build jackrabbit using the following command:

                mvn clen

                mvn install

  3. Change the all the dependencies of Sling to use 2.2.3-SNAPSHOT version
of Jackrabbit modules

  4. Change the
org.apache.sling.jcr.jackrabbit.server.impl.security.PluggableDefaultAccessManager
and change the signature of 'canRead' method as the modified super class

  5. Build Sling using the following commands:

                mvn clean
                mvn install -Dmaven.test.skip=true


Am I mistaking anything in the build process?  Any help regarding the build
process will be much appreciated.

Thanks & Regards.

On Mon, Jan 31, 2011 at 4:47 AM, James Stansell <js...@gmail.com> wrote:

> Hi,
>
> The jackrabbit core jar version 2.1.1 will be listed in one of the
> pom.xml files, but I am not sure which one. You need to change it to
> the 2.2.2 version. Other jar versions may also need to change, but not
> sure of the details.
>
> Regards,
>
> -james.
>
> On Sunday, January 30, 2011, Gazi Mushfiqur Rahman wrote:
> ...
> > Jackrabbit team already resolved this issue on their latest version, i.e.
> > 2.2.2. So can anyone please update the jackrabbit version for Sling or
> just
> > fix this issue or let me know how to build and integrate jackrabbit-core
> in
> > Sling?
>

Re: Locking on nodes are not preserved in following sessions or requests

Posted by James Stansell <js...@gmail.com>.
On Fri, Feb 11, 2011 at 10:22 AM, Gazi Mushfiqur Rahman <
gazimushfiqurrahman@gmail.com> wrote:

> So now the latest and bug free jackrabbit-core is being used. But now I
> found that a framework error is occurring as below:
>
> 11.02.2011 21:12:50.569 *ERROR* [FelixDispatchQueue]
> org.apache.aries.jmx.core FrameworkEvent ERROR
> (org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.aries.jmx.core [7]: Unable to resolve 7.0: missing requirement
> [7.0] package;
> (&(package=org.apache.aries.util)(version>=0.3.0)(!(version>=1.0.0))))
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.aries.jmx.core [7]: Unable to resolve 7.0: missing requirement
> [7.0] package;
> (&(package=org.apache.aries.util)(version>=0.3.0)(!(version>=1.0.0)))
>

Hi Gazi,

I see that apache aries 0.3 was released earlier this week.  From looking at
the error message I wonder if you have both of these bundles installed?

 * org.apache.aries.util
 * org.apache.aries.jmx.core

HTH,

-james.

Re: Locking on nodes are not preserved in following sessions or requests

Posted by James Stansell <js...@gmail.com>.
On Fri, Feb 11, 2011 at 10:22 AM, Gazi Mushfiqur Rahman <
gazimushfiqurrahman@gmail.com> wrote:

> So now the latest and bug free jackrabbit-core is being used. But now I
> found that a framework error is occurring as below:
>
> 11.02.2011 21:12:50.569 *ERROR* [FelixDispatchQueue]
> org.apache.aries.jmx.core FrameworkEvent ERROR
> (org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.aries.jmx.core [7]: Unable to resolve 7.0: missing requirement
> [7.0] package;
> (&(package=org.apache.aries.util)(version>=0.3.0)(!(version>=1.0.0))))
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.aries.jmx.core [7]: Unable to resolve 7.0: missing requirement
> [7.0] package;
> (&(package=org.apache.aries.util)(version>=0.3.0)(!(version>=1.0.0)))
>

Hi Gazi,

I see that apache aries 0.3 was released earlier this week.  From looking at
the error message I wonder if you have both of these bundles installed?

 * org.apache.aries.util
 * org.apache.aries.jmx.core

HTH,

-james.

Re: Locking on nodes are not preserved in following sessions or requests

Posted by Gazi Mushfiqur Rahman <ga...@gmail.com>.
Hi Felix,

Thanks for fixing the dependency.

But at last I didn't update the Jackrabbit version to 2.2.2, as the updated
'Jackrabbit Core' and 'Sling JCR Server' were creating conflict with some of
the Sling modules and as a result Sling wasn't running properly. We found
the following error message in the homepage of Sling:
'*HTTP Status 503 - AuthenticationSupport service missing. Cannot
authenticate request*.'

In the Sling log file, I was getting the following stack traces:

19.02.2011 22:21:39.873 *ERROR* [FelixDispatchQueue]
org.apache.felix.webconsole.plugins.memoryusage FrameworkEvent ERROR
(org.osgi.framework.ServiceException: Service factory exception:
javax/servlet/ServletRequest) org.osgi.framework.ServiceException: Service
factory exception: javax/servlet/ServletRequest
at
org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:314)
at
org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:221)
at
org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:297)
at org.apache.felix.framework.Felix.getService(Felix.java:3007)
at
org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:329)
at
org.osgi.util.tracker.ServiceTracker.addingService(ServiceTracker.java:442)
at
org.apache.felix.http.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:35)
at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)
at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)
at
org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:184)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:339)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:273)
at
org.apache.felix.http.whiteboard.internal.WhiteboardActivator.addTracker(WhiteboardActivator.java:56)
at
org.apache.felix.http.whiteboard.internal.WhiteboardActivator.doStart(WhiteboardActivator.java:48)
at
org.apache.felix.http.base.internal.AbstractActivator.start(AbstractActivator.java:41)
at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1827)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1744)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1148)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletRequest
at
org.apache.felix.webconsole.plugins.memoryusage.internal.Activator$2.createObject(Activator.java:59)
at
org.apache.felix.webconsole.plugins.memoryusage.internal.Activator$AbstractServiceFactory.getService(Activator.java:120)
at
org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:310)
... 20 more
Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletRequest
not found by org.apache.felix.webconsole.plugins.memoryusage [66]
at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 23 more

And

19.02.2011 22:21:39.880 *INFO* [Repository Pinger]
org.apache.sling.jcr.jackrabbit.server pingAndCheck; loginAdministrative
failed (javax.jcr.LoginException: LoginModule ignored Credentials)
javax.jcr.LoginException: LoginModule ignored Credentials
at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1489)
at
org.apache.sling.jcr.base.AbstractSlingRepository.login(AbstractSlingRepository.java:214)
at
org.apache.sling.jcr.base.AbstractSlingRepository.loginAdministrative(AbstractSlingRepository.java:180)
at
org.apache.sling.jcr.base.AbstractSlingRepository.pingAndCheck(AbstractSlingRepository.java:517)
at
org.apache.sling.jcr.base.AbstractSlingRepository.startRepository(AbstractSlingRepository.java:804)
at
org.apache.sling.jcr.base.AbstractSlingRepository.run(AbstractSlingRepository.java:925)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.security.auth.login.FailedLoginException: LoginModule
ignored Credentials
at
org.apache.jackrabbit.core.security.authentication.LocalAuthContext.login(LocalAuthContext.java:87)
at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1472)
... 6 more

And

19.02.2011 22:21:43.897 *ERROR* [http-8080-exec-1]
org.apache.sling.engine.impl.SlingHttpContext handleSecurity:
AuthenticationSupport service missing. Cannot authenticate request.

So, what I did is I fixed the Jackrabbit Core's (2.1.1 version)
isExpiredmethod of
org.apache.jackrabbit.core.lock.LockInfo class and build Sling with that. It
somewhat fixed the locking issue that I was facing earlier. But I think
still there are a number of issues left there. So, it'll be best if someone
can update the Jacrabbit dependencies to the latest version in Sling.

Thanks & Regards.

On Fri, Feb 18, 2011 at 9:29 PM, Felix Meschberger <fm...@adobe.com>wrote:

> Hi,
>
> Am Freitag, den 11.02.2011, 16:22 +0000 schrieb Gazi Mushfiqur Rahman:
> > So now the latest and bug free jackrabbit-core is being used. But now I
> > found that a framework error is occurring as below:
> >
> >
> >
> > 11.02.2011 21:12:50.569 *ERROR* [FelixDispatchQueue]
> > org.apache.aries.jmx.core FrameworkEvent ERROR
> > (org.osgi.framework.BundleException: Unresolved constraint in bundle
> > org.apache.aries.jmx.core [7]: Unable to resolve 7.0: missing requirement
> > [7.0] package;
> > (&(package=org.apache.aries.util)(version>=0.3.0)(!(version>=1.0.0))))
> > org.osgi.framework.BundleException: Unresolved constraint in bundle
> > org.apache.aries.jmx.core [7]: Unable to resolve 7.0: missing requirement
> > [7.0] package;
> > (&(package=org.apache.aries.util)(version>=0.3.0)(!(version>=1.0.0)))
>
> When I upgraded the dependencies to aries JMX 0.3.0 I failed to
> recognize this requirement (and failed to see this failure in the log
> file ...). In the meantime I fixed this and the util bundle should be
> part of the launchpad builder build.
>
> Regards
> Felix
>
>

Re: Locking on nodes are not preserved in following sessions or requests

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

Am Freitag, den 11.02.2011, 16:22 +0000 schrieb Gazi Mushfiqur Rahman: 
> So now the latest and bug free jackrabbit-core is being used. But now I
> found that a framework error is occurring as below:
> 
> 
> 
> 11.02.2011 21:12:50.569 *ERROR* [FelixDispatchQueue]
> org.apache.aries.jmx.core FrameworkEvent ERROR
> (org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.aries.jmx.core [7]: Unable to resolve 7.0: missing requirement
> [7.0] package;
> (&(package=org.apache.aries.util)(version>=0.3.0)(!(version>=1.0.0))))
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.aries.jmx.core [7]: Unable to resolve 7.0: missing requirement
> [7.0] package;
> (&(package=org.apache.aries.util)(version>=0.3.0)(!(version>=1.0.0)))

When I upgraded the dependencies to aries JMX 0.3.0 I failed to
recognize this requirement (and failed to see this failure in the log
file ...). In the meantime I fixed this and the util bundle should be
part of the launchpad builder build.

Regards
Felix


Re: Locking on nodes are not preserved in following sessions or requests

Posted by Gazi Mushfiqur Rahman <ga...@gmail.com>.
Hi all,



I found the actual problem. The final WAR of sling is built using some
configuration files. In one of those configuration files (list.xml, located
in '\launchpad\builder\src\main\bundles' directory) the sling modules and
their versions are mentioned. In this file the version for
'org.apache.sling.jcr.jacrabbit.server' module was mentioned to an older
version. So though all these time I modified the POM files to set the
current version of the Jackrabbit and Sling modules, still the older
org.apache.sling.jcr.jackrabbit.server was used and as a result the older
Jackrabbit Core was being used.



So now the latest and bug free jackrabbit-core is being used. But now I
found that a framework error is occurring as below:



11.02.2011 21:12:50.569 *ERROR* [FelixDispatchQueue]
org.apache.aries.jmx.core FrameworkEvent ERROR
(org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.aries.jmx.core [7]: Unable to resolve 7.0: missing requirement
[7.0] package;
(&(package=org.apache.aries.util)(version>=0.3.0)(!(version>=1.0.0))))
org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.aries.jmx.core [7]: Unable to resolve 7.0: missing requirement
[7.0] package;
(&(package=org.apache.aries.util)(version>=0.3.0)(!(version>=1.0.0)))

                at
org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)

                at
org.apache.felix.framework.Felix.startBundle(Felix.java:1719)

                at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1148)

                at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)

                at java.lang.Thread.run(Thread.java:619)



I think it's occurring because of some conflict of this updated module with
some older module of Sling that's still in use. Does anybody have any idea
regarding this?

Thanks & Regards.

On Tue, Feb 8, 2011 at 5:40 PM, Gazi Mushfiqur Rahman <
gazimushfiqurrahman@gmail.com> wrote:

> Hi Stefan,
>
>
> Thanks a lot for your previous reply. But I still failed to fix the issue.
>
>
> I am trying to incorporate the 2.2.3 version of Jackrabbit in Sling, since
> this is the latest stable version of Jackrabbit. Also it has fixed the
> locking issue. I've changed all the POMs in Sling to use the 2.2.3 version
> of Jackrabbit. But still the locking was not working. Then I tried to add
> some logs in the Jackrabbit for debug purpose and modified the version to
> 2.2.3-SNAPSHOT. But I didn't find my logs in the Sling log file. Then I
> tried to logg those messages in the 'System.out' along with the logging. But
> still I am failing to get those logs in the Tomcat's output file
> (catalina.out). So, I think my changes are not used by Sling when I am
> building Sling.
>
>
>
> If I can't push my modifications in the Sling, I think I won't be able to
> fix the issue in Sling in any way. So, can you please help me in building
> Sling properly?
>
>
>
> I followed the following steps for the building:
>
>   1. Modify Some java files in jackrabbit-core (version 2.2.3) for the
> logging
>
>   2. Change all the POMs of Jackrabbit 2.2.3 and set their version to
> '2.2.3-SNAPSHOT'
>
>   3. Build jackrabbit using the following command:
>
>                 mvn clen
>
>                 mvn install
>
>   3. Change the all the dependencies of Sling to use 2.2.3-SNAPSHOT
> version of Jackrabbit modules
>
>   4. Change the
> org.apache.sling.jcr.jackrabbit.server.impl.security.PluggableDefaultAccessManager
> and change the signature of 'canRead' method as the modified super class
>
>   5. Build Sling using the following commands:
>
>                 mvn clean
>                 mvn install -Dmaven.test.skip=true
>
>
> Am I mistaking anything in the build process?  Any help regarding the build
> process will be much appreciated.
>
> Thanks & Regards.
>
> On Mon, Jan 31, 2011 at 4:47 AM, James Stansell <js...@gmail.com>wrote:
>
>> Hi,
>>
>> The jackrabbit core jar version 2.1.1 will be listed in one of the
>> pom.xml files, but I am not sure which one. You need to change it to
>> the 2.2.2 version. Other jar versions may also need to change, but not
>> sure of the details.
>>
>> Regards,
>>
>> -james.
>>
>> On Sunday, January 30, 2011, Gazi Mushfiqur Rahman wrote:
>> ...
>> > Jackrabbit team already resolved this issue on their latest version,
>> i.e.
>> > 2.2.2. So can anyone please update the jackrabbit version for Sling or
>> just
>> > fix this issue or let me know how to build and integrate jackrabbit-core
>> in
>> > Sling?
>>
>
>