A question about class PooledSession
HI: I think it will be more suitable if the class PooledSession can implement Interface JackrabbitSession, and from the mailling list , it's like that has been done , however I haven't find any change from the latest version. Did it really work? 2009-01-04 yanjie
JcrResourceResolverFactoryImpl components is unsatisifed
HI: In order to realize user manager ,I built sling with jackrabbit 1.6 before,however now I know that sling has support for jackrabbit 1.5,and I use the latest sling and jackrabbit 1.6 . Now a find a question that the JcrResourceResolverFactoryImpl component is unsatisifed. Is there any mehod to handle it? 2009-01-05 yan jie
A question about sling launchpad
HI: When I built run the launchapd webapp with mvn jetty:run (the newest sling), after the server started I encounter with a question as follow: (I want to know it's ling's bug or not ,how can I do it?) 2009-01-05 21:48:43.616:/:WARN: ERROR: Error starting slinginstall:org.apache.sling.jcr.ocm-2.0.3-i ncubator-SNAPSHOT.jar (org.osgi.framework.BundleException: Unresolved package in bundle 31: package; (package=org.apache.commons.lang)) org.osgi.framework.BundleException: Unresolved package in bundle 31: package; (package=org.apache.co mmons.lang) at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1728) at org.apache.felix.framework.Felix._startBundle(Felix.java:1591) at org.apache.felix.framework.Felix.startBundle(Felix.java:1544) at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1125) at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:258) at java.lang.Thread.run(Thread.java:595) 2009-01-05 21:48:45.225:/:INFO: sling: Servlet sling initialized 2009-01-05 21:48:46.317::INFO: Started selectchannelconnec...@0.0.0.0: [INFO] Started Jetty Server 2009-01-05 yanshaozhiGmail
How can I use a jar to run sling
HI: As I remembered , in the launchpad app project. I can run a sling demo only with a jar (with java -jar command ), to my surprise the latest versioin can't work well. Now I want to do it too , which jar can I use? Has the architecture been changed in the launchpad? 2009-01-06 yanjie
why sling can't be built
HI: the latest version sling can't be created with maven, why? after I checked out the newest sling code (version is :732296) ,I built it with maven a mistake happened as follow: can anyone help me. Is this a bug or other question ? [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. GroupId: org.apache.sling ArtifactId: org.apache.sling.extensions.threaddump Version: 0.1.0-incubator-SNAPSHOT Reason: Unable to download the artifact from any repository 2009-01-07 yanjie
A mistake happen when I build sling
Hi : Today when I use the newest sling code to build sling. There is a mistake happened as follow. [INFO] -- [ERROR] BUILD ERROR [INFO] -- [INFO] Failed to resolve artifact. GroupId: org.apache.sling ArtifactId: org.apache.sling.extensions.threaddump Version: 0.1.0-incubator-SNAPSHOT Reason: Unable to download the artifact from any repository Try downloading the file manually from the project website. 2009-01-08 yanjie l
Is there any method run a sling application only with a jar file like before version?
HI: In my opinion it's very convenient to run a application only with a jar file, in the old version sling can do this (only with command : java -jar .. and can access http://localhost:8080 with curl ), however , it's seems not avaliable now. Why? Is there any method can do it ? In the current version after I run the sling application (launchpad/app) there would be follow mistake. And the repository can't be accessed by http request. Hope anyone can fix it. 2009-01-08 13:41:32.290::INFO: jetty-6.1.x 2009-01-08 13:41:32.305:/:INFO: org.ops4j.pax.web.service.internal.model.ServletModel-1: Failed to instantiate plugin org.apache.felix.webconsole.internal.misc.ShellServlet. Reason: java.lang.NoClass DefFoundError: org.apache.felix.shell.ShellService 2009-01-08 13:41:32.321:/:INFO: org.ops4j.pax.web.service.internal.model.ServletModel-3: Failed to instantiate plugin org.apache.felix.webconsole.internal.misc.ShellServlet. Reason: java.lang.NoClass DefFoundError: org.apache.felix.shell.ShellService ERROR: Error starting slinginstall:org.apache.sling.jcr.ocm-2.0.3-incubator-SNAPSHOT.jar (org.osgi.f ramework.BundleException: Unresolved package in bundle 12: package; (package=org.apache.commons.lang )) org.osgi.framework.BundleException: Unresolved package in bundle 12: package; (package=org.apache.co mmons.lang) at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1728) at org.apache.felix.framework.Felix._startBundle(Felix.java:1591) at org.apache.felix.framework.Felix.startBundle(Felix.java:1544) at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1125) at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:258) at java.lang.Thread.run(Thread.java:595) 2009-01-08 yanjie
Since sling is support ing for jackrabbit 1.5 why doesn't provide http api for user manager?
HI: As I know , now sling is support for jackrabbit 1.5 , it will more powerfull if sling can provide api for user manager . And is there any way to implement user manage with sling if I implement it myself ? how can I get ""security" workspace? It's seems that there isn't "security" workspace in sling's jackrabbit repository. 2009-01-08 yanjie
Re: Re: Since sling is support ing for jackrabbit 1.5 why doesn't providehttp api for user manager?
HI: thanks very much for telling me so much , I have another question , if I want to user the user manager in sling, Do I have to change the sling code (sling repository: repository.xml replace the SimpleAccessManager to DefultAccessManager and other interface.) 2009-01-08 yanshaozhiGmail 发件人: Rory Douglas 发送时间: 2009-01-08 23:41:11 收件人: sling-dev 抄送: 主题: Re: Since sling is support ing for jackrabbit 1.5 why doesn't providehttp api for user manager? You need to do two things to get access to UserManager/PrincipalManager. First, you should remove the org.apache.sling.jcr.jackrabbit.api bundle. Then download the Jackrabbit 1.5 API bundle & install that instead (it's OSGI-ified). That will export the releveant JSR283 packages. Then you should be able to do the following (in a JSP or anywhere you have a Session): UserManager userManager = null; if(session instanceof PooledJackrabbitSession) { userManager = ((PooledJackrabbitSession)session).getUserManager(); } else { // use reflection since Jackrabbit.core package not exported Method m = session.getClass().getMethod("getUserManager"); userManager = (UserManager)m.invoke(session); } This same pattern works for PrincipalManager which is exposed on the JackrabbitSession. If you want the AccessControlManager (to set ACLs), you'll need to use the reflection approach only for now. You don't need to actually access the "security" workspace in order to create & manager users (although there's no good way to list all users right now, so accessing the workspace probably would give you that ability). I've created a utility class that wraps up all this messy code - I'll open an issue & submit the patch now. Regards, Rory yanshaozhiGmail wrote: > HI: > >As I know , now sling is support for jackrabbit 1.5 , it will > > more powerfull if sling can provide api for user manager . > >And is there any way to implement user manage with sling > > if I implement it myself ? how can I get ""security" workspace? > > It's seems that there isn't "security" workspace in sling's > > jackrabbit repository. > > > 2009-01-08 > > > > yanjie > >
Re: Re: Since sling is support ing for jackrabbit 1.5 why doesn't providehttpapi for user manager?
HI: It will be much easier for users if sling can change the source code . And in my opinion, it's nesessary to change it, since sling support jackrabbit 1.5. 2009-01-09 yanshaozhiGmail 发件人: Felix Meschberger 发送时间: 2009-01-09 00:24:12 收件人: sling-dev 抄送: 主题: Re: Since sling is support ing for jackrabbit 1.5 why doesn't providehttpapi for user manager? Hmm, I wonder, whether we should not change the default configuration of the jackrabbit-server bundle to use the below setup instead of our current Simple non-secured setup. WDYT ? Regards Felix Rory Douglas schrieb: > Yes, I think you'll need (at a minimum) to setup the SecurityManager. > If you setup the DefaultAccessManager, you can use AccessControlManager > to set ACLs on nodes for authorization. I haven't tried mixing these > with an external JAAS LoginModule, but I think it would work. > Otherwise, configure that too. > > > class="org.apache.jackrabbit.core.DefaultSecurityManager" > workspaceName="security"> > > class="org.apache.jackrabbit.core.security.DefaultAccessManager"> > > > class="org.apache.jackrabbit.core.security.authentication.DefaultLoginModule"> > > > > > > > Regards, > Rory > > yanshaozhiGmail wrote: >> HI: >> >>thanks very much for telling me so much , I have another question , >> if I want to user the user manager in sling, Do I have to change the >> sling code (sling repository: repository.xml replace the >> SimpleAccessManager >> to DefultAccessManager and other interface.) >> >> >> 2009-01-08 >> >> >> yanshaozhiGmail >> >> >> 发件人: Rory Douglas 发送时间: 2009-01-08 23:41:11 收件人: >> sling-dev 抄送: 主题: Re: Since sling is support ing for jackrabbit >> 1.5 why doesn't providehttp api for user manager? >> You need to do two things to get access to >> UserManager/PrincipalManager. First, you should remove the >> org.apache.sling.jcr.jackrabbit.api bundle. Then download the >> Jackrabbit 1.5 API bundle & install that instead (it's OSGI-ified). >> That will export the releveant JSR283 packages. >> Then you should be able to do the following (in a JSP or anywhere you >> have a Session): >> UserManager userManager = null; >> if(session instanceof PooledJackrabbitSession) { >> userManager = ((PooledJackrabbitSession)session).getUserManager(); >> } else { >> // use reflection since Jackrabbit.core package not exported >> Method m = session.getClass().getMethod("getUserManager"); >> userManager = (UserManager)m.invoke(session); >> } >> This same pattern works for PrincipalManager which is exposed on the >> JackrabbitSession. If you want the AccessControlManager (to set >> ACLs), you'll need to use the reflection approach only for now. You >> don't need to actually access the "security" workspace in order to >> create & manager users (although there's no good way to list all users >> right now, so accessing the workspace probably would give you that >> ability). >> I've created a utility class that wraps up all this messy code - I'll >> open an issue & submit the patch now. >> Regards, >> Rory >> yanshaozhiGmail wrote: >> >>> HI: >>> >>>As I know , now sling is support for jackrabbit 1.5 , it will >>> more powerfull if sling can provide api for user manager . >>> >>>And is there any way to implement user manage with sling >>> if I implement it myself ? how can I get ""security" workspace? >>> >>> It's seems that there isn't "security" workspace in sling's >>> jackrabbit repository. >>> >>> >>> 2009-01-08 >>> >>> >>> yanjie >>> >
Re: Re: Since sling is support ing for jackrabbit 1.5 why doesn't providehttpapi for user manager?
Hi: I kown this ,I used to realize it with the method , and in order to realize it , I have to create a project only for runing a jackrabbit server with my needed repository.xml, However I want to use sling's jackrabbit server ,and now sling's repository.xml is not support user so well for user manage . As a result , I want to get a way ,use sling's jackrabbit server and can realize user management . 2009-01-09 yanshaozhiGmail 发件人: Rory Douglas 发送时间: 2009-01-09 01:01:51 收件人: sling-dev 抄送: 主题: Re: Since sling is support ing for jackrabbit 1.5 why doesn't providehttpapi for user manager? Actually, if you need to, it's simple to access the "security" workspace (if you have the admin credentials): <% Session jcrSession = currentNode.getSession(); SimpleCredentials creds = new SimpleCredentials("admin","admin".toCharArray()); Session secSession = jcrSession.getRepository().login(creds,"security"); Query secQuery = secSession.getWorkspace().getQueryManager().createQuery("//element(*,rep:User)","xpath"); QueryResult secResult = secQuery.execute(); %> That should list all users configured in the repository (as a result of UserManager.createUser() calls, and the admin/anonymous profiles). yanshaozhiGmail wrote: > HI: > >thanks very much for telling me so much , I have another question , > > if I want to user the user manager in sling, Do I have to change the > > sling code (sling repository: repository.xml replace the SimpleAccessManager > > to DefultAccessManager and other interface.) > > > 2009-01-08 > > > > yanshaozhiGmail > > > > 发件人: Rory Douglas > 发送时间: 2009-01-08 23:41:11 > 收件人: sling-dev > 抄送: > 主题: Re: Since sling is support ing for jackrabbit 1.5 why doesn't providehttp > api for user manager? > > You need to do two things to get access to > UserManager/PrincipalManager. First, you should remove the > org.apache.sling.jcr.jackrabbit.api bundle. Then download the > Jackrabbit 1.5 API bundle & install that instead (it's OSGI-ified). > That will export the releveant JSR283 packages. > Then you should be able to do the following (in a JSP or anywhere you > have a Session): > UserManager userManager = null; > if(session instanceof PooledJackrabbitSession) { > userManager = ((PooledJackrabbitSession)session).getUserManager(); > } else { > // use reflection since Jackrabbit.core package not exported > Method m = session.getClass().getMethod("getUserManager"); > userManager = (UserManager)m.invoke(session); > } > This same pattern works for PrincipalManager which is exposed on the > JackrabbitSession. If you want the AccessControlManager (to set ACLs), > you'll need to use the reflection approach only for now. You don't need > to actually access the "security" workspace in order to create & manager > users (although there's no good way to list all users right now, so > accessing the workspace probably would give you that ability). > I've created a utility class that wraps up all this messy code - I'll > open an issue & submit the patch now. > Regards, > Rory > yanshaozhiGmail wrote: > >> HI: >> >>As I know , now sling is support for jackrabbit 1.5 , it will >> >> more powerfull if sling can provide api for user manager . >> >>And is there any way to implement user manage with sling >> >> if I implement it myself ? how can I get ""security" workspace? >> >> It's seems that there isn't "security" workspace in sling's >> >> jackrabbit repository. >> >> >> 2009-01-08 >> >> >> >> yanjie >> >> >> -- Rory Douglas | Senior Principal Consultant Fax: +1-201-604-6428 | Mobile: +1-917-498-5344 Oracle North America Consulting ORACLE United States | | San Diego, CA "Please consider your environmental responsibility before printing this e-mail"
Move node question
HI: how can I move many node with only one http request? can anyone give an example? 2009-01-13 yanjie
How to use job (timing task) in sling
Hi everyone: I found sling handles jobs base on Quartz however I didn't use it before , as a result it's a little difficult for me to grasp it in short time . And can anyone tell me how to use it even a simple example such as print a "hello" per 5 minutes ? Thanks . 2009-02-04 yanjie
Is there any easy method to backup and restore data in sling
Hi everyone: Is there any smooth way to backup and restore data in sling ? Thanks. 2009-02-04 yanjie
How can I automatic run my project in sling ?
HI everyone: Today , I found sling change too much , and our project can't auto run , can anyone tell me a method to automatic run my project in sling ? thanks! 2009-02-05 yanjie
Re: Re: How can I automatic run my project in sling ?
Hi: I am sorry , I mean I created a project like sling's launch app project before, and dependence some other projects which are created by myself , and It run well , however , today I updated to the latest sling and biult it , then my project can't work well . You can think that I made a copy of launch app project , I think I should change the pom.xml to include other projects , in other projects there are servlet with osgi service , how can I make the services run automatic ? where should I change the pom.xml file? thanks. 2009-02-05 yanjie l 发件人: Bertrand Delacretaz 发送时间: 2009-02-05 17:38:28 收件人: sling-dev 抄送: 主题: Re: How can I automatic run my project in sling ? Hi, On Thu, Feb 5, 2009 at 10:29 AM, yanshaozhiGmail wrote: > ...can anyone tell me a method to automatic run my project in sling ?... Not sure what you mean, we need a more specific description of what you're trying to achive - "run my project" doesn't have a specific meaning in Sling, AFAIK. -Bertrand
Can sling support chinese query ?
HI everyonse: How can I query the nodes with specified chinese words in sling , Is there any mehod ? thanks a lot. 2009-02-06 yanjie
bug in launchpad
HI everyone: I update the sling to the newest version , and the launchpad app application can't run well . the stacktraces are list bellow. Is there some problem? thanks. java -jar org.apache.sling.launchpad.app-4-incubator-SNAPSHOT.jar 08.02.2009 16:32:44.973 *INFO* [main] Setting sling.home=sling (default) 08.02.2009 16:32:44.974 *INFO* [main] Starting Sling in sling 08.02.2009 16:32:44.975 *INFO* [main] Checking launcher JAR in sling 08.02.2009 16:32:45.086 *INFO* [main] Installed or Updated launcher JAR file from jar:file:/opt/sling/launchpad/app/target/org.apache.sling.launchpad.app-4-incubator-SNAPSHOT.jar!/resources/org.apache.sling.launchpad.base.jar 08.02.2009 16:32:45.087 *INFO* [main] Loading launcher class org.apache.sling.launchpad.base.app.MainDelegate 08.02.2009 16:32:45.101 *INFO* [main] Starting launcher ... 2009-02-08 16:32:46.912::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2009-02-08 16:32:46.960::INFO: jetty-6.1.x 2009-02-08 16:32:47.03::INFO: Started socketconnectorwrap...@0.0.0.0:8080 Exception in thread "Thread-4" java.lang.IllegalStateException: The service registration is no longer valid. at org.apache.felix.framework.ServiceRegistrationImpl.getReference(ServiceRegistrationImpl.java:88) at org.apache.felix.framework.ServiceReferenceImpl.hashCode(ServiceReferenceImpl.java:87) at java.util.HashMap.containsKey(HashMap.java:377) at java.util.HashSet.contains(HashSet.java:182) at org.apache.felix.eventadmin.impl.handler.CleanBlackList$1.contains(CleanBlackList.java:53) at java.util.Collections$SynchronizedCollection.contains(Collections.java:1567) at org.apache.felix.eventadmin.impl.handler.CleanBlackList.contains(CleanBlackList.java:81) at org.apache.felix.eventadmin.impl.handler.BlacklistingHandlerTasks.getEventHandler(BlacklistingHandlerTasks.java:190) at org.apache.felix.eventadmin.impl.tasks.HandlerTaskImpl.execute(HandlerTaskImpl.java:67) at org.apache.felix.eventadmin.impl.tasks.DispatchTask.run(DispatchTask.java:159) at org.apache.felix.eventadmin.impl.dispatch.CacheThreadPool$PooledThread.run(CacheThreadPool.java:265) 2009-02-08 16:32:47.314::INFO: jetty-6.1.x 2009-02-08 16:32:47.317::INFO: Started socketconnectorwrap...@0.0.0.0:8080 08.02.2009 16:32:48.369 *INFO* [main] Startup completed Exception in thread "Timer-1" java.lang.IllegalStateException: The service registration is no longer valid. at org.apache.felix.framework.ServiceRegistrationImpl.getReference(ServiceRegistrationImpl.java:88) at org.apache.felix.framework.ServiceReferenceImpl.hashCode(ServiceReferenceImpl.java:87) at java.util.HashMap.put(HashMap.java:418) at java.util.HashSet.add(HashSet.java:194) at java.util.Collections$SynchronizedCollection.add(Collections.java:1581) at org.apache.felix.eventadmin.impl.handler.CleanBlackList.add(CleanBlackList.java:66) at org.apache.felix.eventadmin.impl.handler.BlacklistingHandlerTasks.blackList(BlacklistingHandlerTasks.java:170) at org.apache.felix.eventadmin.impl.tasks.HandlerTaskImpl.blackListHandler(HandlerTaskImpl.java:92) at org.apache.felix.eventadmin.impl.tasks.DispatchTask$BlackListTask.run(DispatchTask.java:308) at org.apache.felix.eventadmin.impl.dispatch.DelayScheduler$1.run(DelayScheduler.java:96) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) 2009-02-08 yanjie
Re: Re: Can sling support chinese query ?
Hi: It's really encode problem . thanks. 2009-02-10 yanjie 发件人: Felix Meschberger 发送时间: 2009-02-10 02:26:47 收件人: sling-dev 抄送: 主题: Re: Can sling support chinese query ? Hi, yanshaozhiGmail schrieb: > HI everyonse: > > How can I query the nodes with specified chinese words in sling , Is there > any mehod ? > thanks a lot. I am not really fluent in chines (actually not at all) but I assume a chinese word is just a string of Unicode characters. You might have to encode these as UTF-8 (this proved to be the best encoding for international pages) for transfer and should then be able to just use them as input into queries. Do you have any concrete problems or use cases ? Are you using the JSON Query Servlet and experiencing encoding issues ? Regards Felix
how can I listen a event all time ?
HI everyone: I used EventAdmin send a event , and I want I am able to listen is all time , however , some time the service who listened the event will jion backlist and never listen the event after. How to handle it? thanks. 2009-02-16 yanjie