How to run the 46 line blog tutorial of Apache Sling? - osgi

I'm trying to go through this tutorial of Apache Sling and I'm stuck at the beginning. I can't display the blog form in my browser. Instead, I get the following message:
Resource dumped by HtmlRendererServlet
Resource path: /content/blog/*
Resource metadata: {sling.resolutionPathInfo=.html, sling.resolutionPath=/content/blog/*}
Resource type: sling:syntheticStarResource
Resource super type: -
Resource Value:
I saw on the README that this might be caused by org.apache.sling.samples.path-based.rtp not running. However I made sure the bundle was active in the Felix console. (I tried to install from the OSGi repository tab of the console, then by downloading the jar and dropping it under sling/startup/15 but it didn't change anything)
I'm wondering if there are extra configuration steps I should take?
Please note that I'm new to OSGi and Sling so this is probably a beginner's mistake.
Edit: I noticed in the Felix console in the component tab that org.apache.sling.samples.pathbasedrtp.DefaultResourceTypeProvider had the status "unsatisfied". Could it be related?

There was indeed a problem (visible by clicking the bundle name at /system/console/bundles) that prevented the o.a.s.samples.path-based.rtp bundle from starting with recent versions of Sling.
I have just fixed it ( https://issues.apache.org/jira/browse/SLING-2557 ), please try again!

Related

dotcms osgi plugin from examples web interceptor

I'm evaluating dotcms through the docker demo, version 22.02
I'm trying the plugin samples provided by dotcms, example:
https://github.com/dotCMS/plugin-seeds/tree/master/OSGi/com.dotcms.webinterceptor
I can build the plugin and deploy it through the dotcms UI. But when I try to access the plugin (http://localhost:8080/app/helloworld?action=wrap) I got a 404 error.
I tried to replace /app by /application or remove /app in the url but same result: 404 error.
Where is the problem? The code is an example from dotcms and the demo docker is also provided by dotcms.
I'm evaluating the product and don't want to spend days to test plugin dev capabilities.
Thanks for your help
Regards,
Laurent
The example was expecting a service reference that no longer exists and so never properly inited. I've updated the example and removed the old reference. Please pull it down and try it again.
https://github.com/dotCMS/plugin-seeds/tree/master/OSGi/com.dotcms.webinterceptor

How to deal with `app_engine_apis` warning when updating app.yaml from go114 to go115

I recently updated my app.yaml from
runtime: go114
to
runtime: go115
because I was warned in an email that support for go114 was ending.
The service deployed fine but after it finished, I got the message:
Updating service [default]...â ¼WARNING: There is an indirect dependency on App Engine APIs, but they are not enabled in your app.yaml. You may see runtime errors trying to access these APIs. Set the app_engine_apis property.
So I added:
app_engine_apis: true
And now the service won't deploy and gives this error:
ERROR: (gcloud.app.deploy) An error occurred while parsing file: [<snip>/app.yaml]
Unexpected attribute 'app_engine_apis' for object of type AppInfoExternal.
Looks like a catch 22. How do I deal with this?
Posting this as community wiki as it's based on #Joel's comments.
It looks like this is being triggered, since those APIs aren't enabled yet in go115, you might get a runtime error.
I would say that you should probably reach out to Google Cloud either in their Issue Tracker system or open an Issue in this Github Page so that they can fix this issue, as there doesn't seem to be any workarounds for this one.

Getting started with Open Liberty: 404

I'm trying to follow the guide here - https://openliberty.io/guides/getting-started.html. I'm on the Building and running the application step. I ran "mvn liberty:run" and Open Liberty started without any errors but when I go to http://localhost:9080/system/properties I get the error below.
Error 404:
com.ibm.ws.webcontainer.servlet.exception.NoTargetForURIException: No
target servlet configured for uri: /system/properties
Any suggestions?
At the end of each guide in the "Nice Work! Where to next?" section, each guide has link:
Raise an issue to share feedback
which I would recommend for these kind of questions as you're likely going to get a quicker response if you open an issue directly against the code you're using.

After Successful completion of deployment status in Openshift through Eclipse, 404 error page is shown

After Successful completion of deployment status of my Java EE application (Spring ) in Openshift through Eclipse, 404 error page is shown on launching "http://closerbyapp-closerbyonline.rhcloud.com/closerbyapp" url.
Any help to Sort out this problem is highly appreciated.
Did you actually deploy an application at the closerbyapp context? the root context (/) of your application is working and showing the default index.html page that comes with the java cartridges. You should double-check how/where you put your code, and that you added it to git, and what url it should show up at. Maybe provide some of the code you used or steps that you took to deploy the code so we can help troubleshoot it? Along with any logs for your application that might be helpful.

Exception logged when using custom css in JavaFX in Felix OSGI

I'm getting the exception below logged to stderr when trying to use my own custom css in JavaFX 2.2 (from JDK 7 update 11). It's funny because the css is actually found and used in my application so the only thing wrong is the exception in the logs. I also load up other resources this way (images, fonts etc) and there are no exceptions logged in these cases.
I'm loading the css like this:
val cssResource = getClass.getResource("/com/openaf/browser/gui/resources/openaf.css").toExternalForm
println("CSS Resource: " + cssResource)
println("")
scene.getStylesheets.add(cssResource)
and you can see from the output that it is found (and I'm not sure why in the exception it says **.bss but maybe that's felix doing some internal bundle renaming.
Does anyone know why this exception is being logged and/or how to get rid of it?
CSS Resource: bundle://21.57:1/com/openaf/browser/gui/resources/openaf.css
java.io.IOException: Resource does not exist: bundle://21.57:1/com/openaf/browser/gui/resources/openaf.bss
java.io.IOException: Resource does not exist: bundle://21.57:1/com/openaf/browser/gui/resources/openaf.bss
at org.apache.felix.framework.URLHandlersBundleURLConnection.<init>(URLHandlersBundleURLConnection.java:136)
at org.apache.felix.framework.URLHandlersBundleStreamHandler.openConnection(URLHandlersBundleStreamHandler.java:64)
at java.net.URL.openConnection(URL.java:971)
at java.net.URL.openStream(URL.java:1037)
at com.sun.javafx.css.Stylesheet.loadBinary(Stylesheet.java:201)
at com.sun.javafx.css.StyleManager.loadStylesheetUnPrivileged(StyleManager.java:572)
at com.sun.javafx.css.StyleManager.loadStylesheet(StyleManager.java:411)
at com.sun.javafx.css.StyleManager.updateStylesheets(StyleManager.java:858)
at javafx.stage.Window.impl_visibleChanging(Window.java:818)
at javafx.stage.Stage.impl_visibleChanging(Stage.java:922)
at javafx.stage.Window$10.invalidated(Window.java:689)
at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:127)
at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:161)
at javafx.stage.Window.setShowing(Window.java:782)
at javafx.stage.Window.show(Window.java:797)
at javafx.stage.Stage.show(Stage.java:229)
at com.openaf.browser.gui.BrowserStageManager.createStage(BrowserStageManager.scala:64)
at com.openaf.browser.gui.BrowserStageManager.start(BrowserStageManager.scala:41)
at com.openaf.browser.gui.BrowserBundleActivator$$anonfun$startUp$2.apply$mcV$sp(BrowserBundleActivator.scala:32)
at com.openaf.browser.gui.utils.BrowserUtils$$anon$1.run(BrowserUtils.scala:48)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
Either convert your CSS files to the binary BSS format:
http://docs.oracle.com/javafx/2/deployment/packaging.htm#BABCACBD
or use "-Dbinary.css=false" when you run your application.
Also note that I've recently released an initial version of Drombler FX, a modular RCP for JavaFX based on OSGi and Maven (POM-first):
http://puces-blog.blogspot.ch/2012/12/drombler-fx-building-modular-javafx.html
http://wiki.drombler.org/GettingStarted
By default it uses Apache Felix as well. Maybe you find it useful.

Resources