Karaf 4.0.6 - custom branding - karaf

I have a problem with custom branding in Karaf 4.0.6.
I've put branding.properties file into $KARAF_HOME/etc directory but the welcome message and prompt are still default.
Should I set up something more?

Finally I found the solution. In my case I run karaf as server and then connect via ssh. Since karaf 4.0.6 you have to use file branding-ssh.properties for clients.
Here I found the answer

Here a link to the latest docs: http://karaf.apache.org/manual/latest/#_branding
Here a duplication of what the docs say (in case the link goes away):
I created a etc/branding.properties on a fresh installation of Karaf 4.0.6 and my branding changes, when I start it with karaf.bat (on Windows).
When starting with client.bat you need to change etc/branding-ssh.properties.

Related

Wagtail version in admin interface does not update after upgrade

I recently incrementally upgraded my Wagtail installation from 2.15.2 to 2.16.2, but the Wagtail version in the admin interface is still stuck in the old version. What can I do to fix this?
As #LB Ben Jonston suggested, in the end the problem was even though the Docker image was built correctly, the image did not deploy correctly.
Since I'm not very familiar with Azure, I only checked that the pipeline ran correctly, image was built and pushed. But I missed checking that the actual CD task deployed the image successfully, which it didn't.

JAXB ClassNotFoundException com.sun.xml.bind.v2.ContextFactory when hot-deploying camel routes

Yes I know, there are numerous questions and answers since JAXB was removed from JDK 11. But this one is specific.
I've a Wildfly Server (tested with 18.0.1 and 16.0.0) running with the wildfly-camel subsystem 11.0.1 patch applied. The patch installs Camel 2.25.0
Deploying and Hot-Deploying (while the server is up) Camel routes works fine!
Until I deploy Liferay on the same server :-(
Then the Hot-Deploy of a camel route gives me the annoying
[java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory from [Module "org.apache.camel.spring" version 2.25.0...
exeption.
No matter if I run the server on JDK 11 or JDK 8! Liferay 7.3.2 claims to be runnable on both JDK versions so I guess it has something to with the way Liferay was build.
Reading this article
http://www.descher.at/descher-vu/2019/01/java-11-jaxb-and-osgi/
that the JAXB topic is very complex and far from being resolved.
Question:
How can a deployed application destroy otherwise working classpath resolutions?
And more important:
How to fix it?
I tried removing the 2 jars in question jaxb-api.jar and jaxb-impl.jar from Liferay. But that didn't help.
Turns out that the root cause of the error is a missing dependency to com.sun.xml.bind in the org.apache.camel.spring module of the wildfly-camel patch.
I filed the issue in detail.
Looks like Liferay has nothing to do with it. Because in theory jboss-modules should separate the deployments.

install and configure solr in openshift

I am trying to follow this link for setting up solr in Openshift, but I guess the version given in the example is old. the directories given in the documentation are not working properly.
So my question is, How to install Solr in Openshift using tomcat-7 or other Cartridges ?
Without knowing what errors your getting I would recommend taking a look at https://www.openshift.com/blogs/run-your-java-tomcat-application-for-free-on-openshifts-paas to get tomcat up and running. From there to deploy a war file its as simple as:
1) clone your repo
2) remove the pom.xml file from the root directory of your repo
3) add your war to the webapps/ dir of your repo
4) do git add/commit/push
You can use the following QuickStart from LogicalSpark to make things easier to get up and running with Solr in OpenShift:
https://github.com/LogicalSpark/openshift-solr-quickstart

Google App Engine .jsp Problem

I just created a .jsp file in my google app engine project. How to resolve the below error.
Description Resource Path Location Type
Your project must be configured to use a JDK in order to use JSPs
proj1.jsp
/Proj1/war Unknown Google App Engine Problem
Kindly let me know.
it is the error. In order to compile jsp you need a jdk installed in your system. If you are running on a JRE you will get this error. Also make sure that your project has been configured with a jdk in it's path.
For sake of improving answers
stack over flow reference
.jsp file not working for Google App Engine guestbook tutorial
the accepted answer was a year ago
updated answer from reference
In the end I seem to have wasted my bounty as I found the solution (with a little help) myself.
The problem arose because I was unfamiliar with Eclipse. When I found the more verbose error message Your project must be configured to use a JDK in order to use JSPs guestbook.jsp.
It was located in a tab called 'Markers' in pane found at the bottom of the Eclipse window.
It seems that Eclipse wasn't aware that I had installed the JDK.
In Eclipse I went to menu Window->Preferences->Java->Installed JREs . Eclipse had only one entry there named jre6 I clicked the Add... button Chose Standard VM and browsed to the base directory of the jdk (in my case C:\Program Files\Java\jdk1.6.0_20)
I rebuilt my project but the same error was there. I had forgotten to check the box that tells Eclipse to use the jdk instead of the jre.
As soon as I did that Eclipse rebuilt my project and the error was gone.
To solve this problem, first please confirm that JDK is already install on your computer. If it not available, go to Oracle JDK hompage to download and install it.
Then follow some steps to config JDK.
When JDK is configured, return eclipse and build project if you still get current error, I decide you are using JRE instead JDK. Choose Prefrences - Java - Install JRE - Un-check JRE and check JDK
Rebuild project
Hope this help!
Set JDK as your Installed JREs in Eclipse.
In Eclipse Window->Preference->Java->Installed JREs
Click on Add Button | Select VM ->Add JRE
Select Folder of jdk as "JRE Home" Directory.
Click OK.
Build your GAE Project
JFTR:
For those who use Ubuntu and OpenJDK, and may come here looking for help on the same issue: EVEN when it is called Open*JDK* (i.e. java-6-openjdk) actually you may have installed only the JRE part since they are on different packages, so you need to install also the JDK. For version 6 this is done via:
$ sudo apt-get install openjdk-6-jdk
Note that you may have yet an openjdk-6-jre in your system.
If your problem persist, you must sure that in your project use JDK library. Go to your project->click right->Build Path->Configure Build Path->Add library->JRE System Library->Select "Workspace default JRE (jdk1...)"->Finish, and in "Order and Export" UP your JDK Library above JRE Library. When you save your proyect it´s ok.

Apache Camel route as a Windows Service

I have a Apache Camel route that is exported as a runnable jar file from eclipse. I use a simple bat file to run this route...
C:\PROGRA~1\Java\jre6\bin\java -jar C:\dev\_exports\mdt\cpnnectors_v1.jar
How can I run this as a window service instead with the output from the console to a log file?
I think there are some general windows tools you can use to turn Java apps into services. And I vaugely recall something added to the JDK6 or 7 to support that natively. Anyway try to google a bit.
Tanuki has been around for a long time and they offer such a tool
http://wrapper.tanukisoftware.com/doc/english/download.jsp
I know it is a bit of a late answer but I have managed to deploy my Camel Routes to Apache Karaf and Karaf comes with a service wrapper for both for windows and a deamon wrapper for linux. Basically I know have my Camel routes deployed to Karaf and it is running as a service on windows with really minor hassle.
Karaf is easy to install and the help file also show you how to install the wrapper.

Resources