Re: Components each process twice

2017-02-02 Thread lancedolan
This response is good enough for me. The fact that the community hasn't largely said "yea we see it all the time and it's normal" tells me I'm probably causing this myself somewhere, and I'll have to look into it. I just didn't want to lose a day figuring out the root cause if this was known

Re: import and export JCR data

2017-02-07 Thread lancedolan
Hi All, Does anybody have some terminal commands or procedure they follow for exporting data without composum? I've downloaded this "jackrabbit-filevault" project, and I've tried some different terminal commands after reading the documentation. Not sure what I'm doing. * For those

How to export Sling data?

2017-02-07 Thread lancedolan
Hi All, Does anybody have some terminal commands or procedure they follow for exporting data without composum? I've downloaded this "jackrabbit-filevault" project, and I've tried some different terminal commands after reading the documentation. Not sure what I'm doing. Does anybody here

Re: import and export JCR data

2017-02-07 Thread lancedolan
If it's not composum, then it's file-vault or JCR related, which is even more concerning. I'm pretty confident this isn't user error. I've given consulting demonstrations, teaching others the ins and outs of file-vault XML-to-node translation, the various complex rules one can combine, and also

Re: How to export Sling data?

2017-02-07 Thread lancedolan
Sorry, double post. See http://apache-sling.73963.n3.nabble.com/import-and-export-JCR-data-td4069390.html -- View this message in context: http://apache-sling.73963.n3.nabble.com/How-to-export-Sling-data-tp4070157p4070158.html Sent from the Sling - Users mailing list archive at Nabble.com.

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-31 Thread lancedolan
Henry Saginor-2 wrote > Hi Lance, > > I think a better practice is to register your servlet with a resource type > instead of path. This requires creating a node per resource. Please see my prior post where I disqualify all solutions that involve creating nodes. My entire requirement is that I'm

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-31 Thread lancedolan
is pretty elementary, but for posterity looking to get this ResourceProvider working in Sling 8, here's how I did it. I expect there are better ways, but this is demonstrative: /** * Created by lancedolan on 1/27/17. */ @Component @Service(value=ResourceProvider.class) @Properties({ @Pro

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-30 Thread lancedolan
I'm surprised at all the tech opinions this raised :) First, there's a couple popular suggestions happening which aren't going in the right direction, so I'll get that out of the way quick: 1) Any solution that involves me creating a JCR node and binding by resource type is infeasible. I'm not

"java.lang.VerifyError"

2017-01-30 Thread lancedolan
Has anybody run into this before? I'm tempted to thing it's a defect in Sling 8. I write a @Service for OSGI, and it has a @Reference to another service, such as a ResourceResolverFactory, and deploy it to Sling the same way I have for several years, and it fails to get the Reference, with the

Re: "java.lang.VerifyError"

2017-01-30 Thread lancedolan
Sort of solved: adding -noverify to the JVM arguments stops this error from occurring. However, I don't fully understand the cause and I'm also nervous about forward compatibility... I wonder how this could prevent us from moving to future Java versions. It just seems like a bad smell that

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-30 Thread lancedolan
I guess, even if we use SlingSafeMethodsServlet and request parameter, I still have this problem of securing the servlet... I've put a servlet at paths = "/myservice/image" , and created a node at /myservice with an ACL that denies jcr: all to everyone and anonymous, and yet anonymous can still

Re: "java.lang.VerifyError"

2017-01-30 Thread lancedolan
That's the solution, thank you! My maven-scr-plugin version had fallen badly out of date by re-building from an archetype... bumped to latest version and I no longer need the -noverify argument. Thanks again :D -- View this message in context:

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-27 Thread lancedolan
These APIs I'm looking to build are likely to use other OSGI services I've written, and perhaps even write to the JCR for other reasons. Imagine doing a GET /api/images/my-new-image.jpg and the image lives in Amazon S3, but you want to write some audit data into the JCR. I'm still thinking

RE: Not-sticky sessions with Sling?

2017-01-18 Thread lancedolan
Jason Bailey wrote > Couldn't this be simplified to simply stating that the sticky session > cookie only lasts for x amount of seconds? WHOAAA!! Bertrand, probably hold the phone on everything else I suggested in my last post - this solution is insanely simple, embarrassingly obvious in

Re: Not-sticky sessions with Sling?

2017-01-18 Thread lancedolan
Chetan is making things crystal clear for us. Our next steps are: 1) Learn what the MAXIMUM "inconsistency window" could be. Is it possible to delay past 5 seconds? 10 Seconds? 60? What determines this? Only server load? I'll ask on the JCR forum and also experiment. 2) Design and test a

Re: Not-sticky sessions with Sling?

2017-01-17 Thread lancedolan
Ok First of all - I GENUINELY appreciate the heck out of your time, and patience!! ... and THIS is really interesting: If THIS is true: chetan mehrotra wrote > If you are running a cluster with Sling on Oak/Mongo then sticky > sessions would be required due to eventual consistent nature of

Re: Not-sticky sessions with Sling?

2017-01-17 Thread lancedolan
Bertrand Delacretaz wrote > That would be a pity, as I suppose you're starting to like Sling now ;-) Ma you have no idea haha! I've got almost every dev in the office all excited about this now haha. However, it seems our hands are tied. I wrote local consistency test scripts which POST and

RE: Not-sticky sessions with Sling?

2017-01-17 Thread lancedolan
Thi is tempting, but I know in my dev-instinct that we won't have the time to solve all the unsolved in that effort. Thank you for suggesting though :) -- View this message in context: http://apache-sling.73963.n3.nabble.com/Not-sticky-sessions-with-Sling-tp4069530p4069712.html Sent from

Re: Not-sticky sessions with Sling?

2017-01-17 Thread lancedolan
lancedolan wrote > I must know what determines the duration of this revision catch-up time > ... While I don't know where to look in src code to answer this, I did run a very revealing experiment. It pretty much always takes 1 second exactly for a Sling instance to get the latest re

Re: Not-sticky sessions with Sling?

2017-01-16 Thread lancedolan
This is really disappointing for us. Through this revisioning, Oak has turned a datastore that is consistent by default into a datastore that is not :p It's ironic that the cluster which involves multiple datastores (tar), and thus should have a harder time being consistent, is the one that can

Re: How to change run mode in Sling8

2017-01-11 Thread lancedolan
Ok that makes sense. It sounds like developing a new codebase *based on* the launchpad might be my next step. I guess the launchpad is really an example, and not intended to be deployed to production as provided from the war download link here: https://sling.apache.org/downloads.cgi. I guess

Re: Not-sticky sessions with Sling?

2017-01-13 Thread lancedolan
Alright, this is a deal breaker for our business (if sling absolutely requires sticky sessions). I hope you're not offended that I'm not 100% convinced yet. I understand you do development on the sling project and are well qualified on the topic. To be honest, however, I don't understand fully

RE: Sling 8 Resource Versioning? Jira access?

2017-01-10 Thread lancedolan
Ahh, yes you're right. I was getting a 403 apparently because of an old bad Chrome Plugin that was injecting Basic Auth headers into my request... my fault. -- View this message in context: http://apache-sling.73963.n3.nabble.com/Sling-8-Resource-Versioning-Jira-access-tp4069484p4069486.html

JS Use API usability or limitations

2017-01-10 Thread lancedolan
I've got years of experience writing backing beans for Sling (aem) components, but can't seem to get a simple JS backing working using the new Javascript Use API. All I want to do is print out a resource's children resources. My JS backing bean: use([], function () { var returnObj = {

Join new member to Sling Oak cluster?

2017-01-09 Thread lancedolan
Hey guys, sorry for multiple recent question. I'm biting down hard on Sling right now and hitting tons of learning curve and growing pains. My problem: If I create a fresh instance of MongoDB, and connect multiple fresh instances of Sling to it (each running in a separate tomcat instance), they

Re: Multiple Version of Commons Lang in OSGI...

2017-01-09 Thread lancedolan
Gah - solved myself almost immediately after posting. For posterity: version 3.5 of commons lang has a different Bundle-SymbolicName ( org.apache.commons.lang3) in the OSGI metadata of MINFEST.MF. Simply by bumping to lang 3.5 you'll solve this. -- View this message in context:

Multiple Version of Commons Lang in OSGI...

2017-01-09 Thread lancedolan
I have packages (such as composum tools) that depend on apache commons lang 3. I have other packages (such as most of the sling itself) that depend on commons lang version 2. There are no Java Package namespacing collisions between these packages - they can both exist in the same JVM safely.

Re: Join new member to Sling Oak cluster?

2017-01-10 Thread lancedolan
- What kind of discovery mechanism do you use? I don't know - whichever is the default discovery mechanism when running org.apache.sling.launchpad-8-webapp.war on Tomcat 8 and I've modified the content of the war file so that it will start with run modes oak|oak_mongo, so that by default it's

How to change run mode in Sling8

2017-01-10 Thread lancedolan
I cannot change run mode using the process I have in the past, with Sling8. The only thing that has worked for me was to crack open the org.apache.sling.launchpad-8-webapp.war file, crack open the oak jar file within it, edit sling_install.properties

RE: How to change run mode in Sling8

2017-01-12 Thread lancedolan
Update: Ok, I get it now. Thank you - this is really slick. For posterity: The "source code" for the "Sling Source Release" artifact at [1] is really not the project source code. It's just some text files that neatly describe which OSGI bundles and configurations (including run modes) you'd

Re: Join new member to Sling Oak cluster?

2017-01-12 Thread lancedolan
Robert Munteanu-2 wrote > - Are the Sling/Oak instances and MongoDB clocks in sync? I've just realized the significance of this question. Our Sling and Mongo instances will be in different data centers entirely, Mongo provided as a service and Sling in our own AWS instances somewhere... I

Re: Join new member to Sling Oak cluster?

2017-01-10 Thread lancedolan
Not sure if I've experienced an intermittent but severe defect, or if I did something wrong when attempting this yesterday. I followed the exact same steps today, and the new instance *did* successfully join. Either I'm wrong, and I actually did something differently yesterday, or this is an

Sling 8 Resource Versioning? Jira access?

2017-01-10 Thread lancedolan
The announcement for sling 8 announces a feature we're excited to use: Versioning through the Resource API: https://sling.apache.org/news/sling-launchpad-8-released.html#versioning-support-in-the-resource-api However, the only info it provides is a JIRA link I can't access:

RE: JS Use API usability or limitations

2017-01-12 Thread lancedolan
Aha. Thanks, I was sure it was sure weird Rhino thing. It's hard to call it valid JavaScript either, though, as it's invalid in every single popular browser. That mozilla doc says "Non-standard. The Iterator function is a SpiderMonkey-specific feature, and will be removed at some point. " As a

RE: JS Use API usability or limitations

2017-01-11 Thread lancedolan
Thank you for your time everybody! For posterity: First to clarify, my very specific question is how to iterate an iterable in the model-building logic (what us old timers might call a "backing bean"). I do already know that I can use HTL to iterate the children, and I do recognize that in this

RE: JS Use API usability or limitations

2017-01-11 Thread lancedolan
No architectural reason - purely speed of development reasons. Our team has switched from Java to Node.js on our other projects and are seeing real gains in dev time. We believe we could see the same faster development with lightweight JS files as opposed to traditional type-safe Java. I think

Re: Not-sticky sessions with Sling?

2017-01-12 Thread lancedolan
Chetan, I'd like to confirm to what degree that is true for our proposed architecture. It seems that only the OSGI configurations and bundles would be "eventually consistent." It seems the only "state" that is stored in Sling instances are OSGI configurations and OSGI bundles. Everything else is

RE: How to change run mode in Sling8

2017-01-12 Thread lancedolan
This is fantastic information! I'd love a nice clear how-to documentation for getting this done, but hey it's open source stuff, hah. I'll go fumble through the slingstart-maven-plugin and probably have a question or two along the way. Thanks guys. -- View this message in context:

Re: How to change run mode in Sling8

2017-01-11 Thread lancedolan
Hmm, my genuine apologies, I'm not sure what custom application bits are. If you're saying that I can deploy code that I write to Sling, that's absolutely true, but my understanding is that I need to change the runmode BEFORE the Sling instance starts up for the very first time, and I can only

Re: How to change run mode in Sling8

2017-01-11 Thread lancedolan
I can look into overriding init params through some servlet container features. Is that the way that Sling devs expect me to turn on Mongo functionality? -- View this message in context: http://apache-sling.73963.n3.nabble.com/How-to-change-run-mode-in-Sling8-tp4069494p4069529.html Sent from

Not-sticky sessions with Sling?

2017-01-11 Thread lancedolan
The only example code I can find to authenticate to Sling will use the JEE servlet container's "j_security_check" which then stores the authenticated session in App Server memory. A load-balancer without sticky-sessions enabled will cause an unstable experience for users, in which they are