Hi Oliver,

looks OK now.

Do you have any idea why I would be getting HTTP 404 in Chrome and working
site in Firefox?

Kind Regards,
Miroslav


V V pet., 4. okt. 2019 ob 22:26 je oseba Oliver Lietz <[email protected]>
napisala:

> On Thursday, October 3, 2019 10:20:21 PM CEST Miroslav Beranič wrote:
> > Hi all,
>
> Hi Miroslav,
>
> > it seems I've mixed by branches and I was few days/weeks behind current
> > development.
> >
> > scripting_sightly was already renamed to scripting_htl with "SLING-8685
> > Rename feature sling-scripting-sightly to sling-scripting-htl".
>
> I did some updates today and spotted the missing commit in the
> distribution
> module. Can you please try again and let me know if you see a different
> behavior with Sling on Karaf than with Sling Starter?
>
> @Robert: Did you look into Sling with Oak RDB DocumentStore? AFAIR there
> was a
> similar request some time ago.
>
> Thanks,
> O.
>
>
> > Getting used to repo tool ...
> >
> >
> > Kind Regards,
> > Miroslav
> >
> >
> >
> > V V čet., 3. okt. 2019 ob 21:31 je oseba Miroslav Beranič <
> >
> > [email protected]> napisala:
> > > Hi all,
> > >
> > > I am trying to bootstrap Karaf with Sling. I fail to do so, for quite
> > > some time now.
> > >
> > > I've started with the "org-apache-sling-app-cms", that works, but this
> is
> > > ( as far as I can tell ) on Felix ( "only" ). Later I've moved to
> > > "org-apache-sling-karaf-distribution". I failed to do it with HTTP 404.
> > >
> > > It compiles. It starts up. But there is a HTTP 404, when I visit
> website.
> > > I follow this manual:
> > >
> > > https://sling.apache.org/documentation/karaf.html
> > >
> > > ( I've compiled & installed all the features described )
> > >
> > > Project "org-apache-sling-karaf-distribution" has a config dependency
> on a
> > > project "org-apache-sling-karaf-configs", config file was renamed
> > > from
> > >
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-sc
> > > ripting_sightly to
> > > file
> > >
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-sc
> > > ripting_htl.config. As far as I know ( from Jira ) sightly was renamed
> to
> > > htl ( I think I saw one Jira issue about it ).
> > >
> > > this is in file "org-apache-sling-karaf-distribution/pom.xml:377". I
> > > renamed the config file and recompiled.
> > >
> > > Is there any guide or working example how to get Sling working on
> Karaf (
> > > with RDB DocumentStore )? Please do not tell me it is a one-line-change
> > > ...
> > >
> > > :D
> > >
> > > System console is loading on URL:
> > > http://localhost:8181/system/console/bundles
> > >
> > > but this is more-or-less I have to say about it.
> > >
> > >
> > >
> > > Output at the Karaf Shell is ( if it is of any use ):
> > >
> > > karaf@root()> feature:repo-add
> > >
> mvn:org.apache.sling/org.apache.sling.karaf-features/0.1.1-SNAPSHOT/xml/fe
> > > atures
> > >
> > >
> > > Adding feature url
> > >
> mvn:org.apache.sling/org.apache.sling.karaf-features/0.1.1-SNAPSHOT/xml/fe
> > > atures karaf@root()> feature:install sling-quickstart-oak-tar
> > >
> > >
> > >
> > > karaf@root()> System property [org.owasp.esapi.opsteam] is not set
> > >
> > >
> > >
> > > System property [org.owasp.esapi.devteam] is not set
> > > Attempting to load ESAPI.properties via file I/O.
> > > Attempting to load ESAPI.properties as resource file via file I/O.
> > > Not found in 'org.owasp.esapi.resources' directory or file not
> readable:
> > >
> /path/to/sling/org-apache-sling-karaf-distribution/target/assembly/ESAPI.p
> > > roperties Not found in SystemResource Directory/resourceDirectory:
> > > .esapi/ESAPI.properties
> > > Not found in 'user.home' (/home/user) directory:
> > > /home/user/esapi/ESAPI.properties
> > > Loading ESAPI.properties via file I/O failed. Exception was:
> > > java.io.FileNotFoundException
> > > Attempting to load ESAPI.properties via the classpath.
> > > SUCCESSFULLY LOADED ESAPI.properties via the CLASSPATH from '/ (root)'
> > > using class loader for DefaultSecurityConfiguration class!
> > > SecurityConfiguration for Validator.ConfigurationFile.MultiValued not
> > > found in ESAPI.properties. Using default: false
> > > Attempting to load validation.properties via file I/O.
> > > Attempting to load validation.properties as resource file via file I/O.
> > > Not found in 'org.owasp.esapi.resources' directory or file not
> readable:
> > >
> /path/to/sling/org-apache-sling-karaf-distribution/target/assembly/validat
> > > ion.properties Not found in SystemResource Directory/resourceDirectory:
> > > .esapi/validation.properties
> > > Not found in 'user.home' (/home/user) directory:
> > > /home/user/esapi/validation.properties
> > > Loading validation.properties via file I/O failed.
> > > Attempting to load validation.properties via the classpath.
> > > SUCCESSFULLY LOADED validation.properties via the CLASSPATH from '/
> > > (root)' using class loader for DefaultSecurityConfiguration class!
> > >
> > > karaf@root()> feature:install sling-starter-content
> > >
> > >
> > >
> > > karaf@root()> System property [org.owasp.esapi.opsteam] is not set
> > >
> > >
> > >
> > > System property [org.owasp.esapi.devteam] is not set
> > > Attempting to load ESAPI.properties via file I/O.
> > > Attempting to load ESAPI.properties as resource file via file I/O.
> > > Not found in 'org.owasp.esapi.resources' directory or file not
> readable:
> > >
> /path/to/sling/org-apache-sling-karaf-distribution/target/assembly/ESAPI.p
> > > roperties Not found in SystemResource Directory/resourceDirectory:
> > > .esapi/ESAPI.properties
> > > Not found in 'user.home' (/home/user) directory:
> > > /home/user/esapi/ESAPI.properties
> > > Loading ESAPI.properties via file I/O failed. Exception was:
> > > java.io.FileNotFoundException
> > > Attempting to load ESAPI.properties via the classpath.
> > > SUCCESSFULLY LOADED ESAPI.properties via the CLASSPATH from '/ (root)'
> > > using class loader for DefaultSecurityConfiguration class!
> > > SecurityConfiguration for Validator.ConfigurationFile.MultiValued not
> > > found in ESAPI.properties. Using default: false
> > > Attempting to load validation.properties via file I/O.
> > > Attempting to load validation.properties as resource file via file I/O.
> > > Not found in 'org.owasp.esapi.resources' directory or file not
> readable:
> > >
> /path/to/sling/org-apache-sling-karaf-distribution/target/assembly/validat
> > > ion.properties Not found in SystemResource Directory/resourceDirectory:
> > > .esapi/validation.properties
> > > Not found in 'user.home' (/home/user) directory:
> > > /home/user/esapi/validation.properties
> > > Loading validation.properties via file I/O failed.
> > > Attempting to load validation.properties via the classpath.
> > > SUCCESSFULLY LOADED validation.properties via the CLASSPATH from '/
> > > (root)' using class loader for DefaultSecurityConfiguration class!
> > >
> > > >> opened Chrome at http://localhost:8181/
> > >
> > > And now I am blown. Just for fun, I said: Ok, do not advertise Chrome,
> > > write browser -- just for fun, try URL with Firefox. And I did. And it
> > > worked. I am able to login, edit content using built-in editor. OK. I
> am
> > > not really sure what is going on now. Why is it working with Firefox
> but
> > > fails on Chrome with HTTP 404?
> > >
> > > Chrome says this ( requested URL /%E2%81%A0 looks funny --- why is this
> > > like this ? ) :
> > >
> > > Resource at '/⁠' not found: No resource found (404)
> > > The requested URL /%E2%81%A0 resulted in an error in
> > >
> org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerSe
> > > rvlet.>
> > > Request Progress:
> > >       0 TIMER_START{Request Processing}
> > >
> > >      13 COMMENT timer_end format is {<elapsed microseconds>,<timer
> name>}
> > >
> > > <optional message>
> > >
> > >      32 LOG Method=GET, PathInfo=null
> > >      42 TIMER_START{handleSecurity}
> > >
> > >    6921 TIMER_END{6872,handleSecurity} authenticator
> > >
> > > org.apache.sling.auth.core.impl.SlingAuthenticator@9cc7f101 returns
> true
> > >
> > >   11358 TIMER_START{ResourceResolution}
> > >   12240 TIMER_END{878,ResourceResolution} URI=/%E2%81%A0 resolves to
> > >
> > > Resource=NonExistingResource, path=/⁠
> > >
> > >   12255 LOG Resource Path Info: SlingRequestPathInfo: path='/⁠',
> > >
> > > selectorString='null', extension='null', suffix='null'
> > >
> > >   12257 TIMER_START{ServletResolution}
> > >   12263 TIMER_START{resolveServlet(/⁠)}
> > >   12300 TIMER_END{34,resolveServlet(/⁠)} Using servlet
> > >
> > > org.apache.sling.servlets.get.DefaultGetServlet
> > >
> > >   12307 TIMER_END{49,ServletResolution} URI=/%E2%81%A0 handled by
> > >
> > > Servlet=org.apache.sling.servlets.get.DefaultGetServlet
> > >
> > >   12318 LOG Applying Requestfilters
> > >   12336 LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter
> > >
> > >   12355 LOG Calling filter:
> > > org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
> > >
> > >   12364 LOG Applying Componentfilters
> > >   12388 TIMER_START{org.apache.sling.servlets.get.DefaultGetServlet#0}
> > >   12428 TIMER_END{38,org.apache.sling.servlets.get.DefaultGetServlet#0}
> > >
> > >   12570 LOG Filter timing:
> > >
> filter=org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter,
> > > inner=0, total=0, outer=0
> > >
> > >   13885 LOG Applying Error filters
> > >   13914 LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter
> > >   13930 TIMER_START{handleError:status=404}
> > >   14611 TIMER_END{678,handleError:status=404} Using handler
> > >
> > >
> org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerSe
> > > rvlet>
> > >   15261 TIMER_END{15258,Request Processing} Dumping
> > >
> > > SlingRequestProgressTracker Entries
> > >
> > > I am blown away right now.
> > >
> > > If anyone reads this far ... so it seems
> > > "org-apache-sling-karaf-distribution" works as advertised. If this was
> so
> > > easy, next issue, how do I swap TAR/MongoDB NodeStore/BlobStore with
> RDB
> > > DocumentStore ( PostgreSQL ).
> > >
> > > Journey continues ...
> > >
> > >
> > > Kind Regards,
> > > Miroslav
> > >
> > >
> > > --
> > > Miroslav Beranič
> > > MIBESIS
> > > [email protected]
> > > https://www.mibesis.si
>
>
>
>
>

-- 
Miroslav Beranič
MIBESIS
[email protected]
https://www.mibesis.si

Reply via email to