Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0" name="no.priv.bang.handlereg.web.frontend.HandleregServlet" immediate="true">
<property name="osgi.http.whiteboard.context.select" type="String" value="(osgi.http.whiteboard.context.name=handleregf)"/>
<property name="osgi.http.whiteboard.servlet.name" type="String" value="handlereg"/>
<property name="osgi.http.whiteboard.servlet.pattern" type="String" value="/*"/>
<service>
<provide interface="javax.servlet.Servlet"/>
</service>
<reference name="LogService" interface="org.osgi.service.log.LogService" bind="setLogService"/>
<implementation class="no.priv.bang.handlereg.web.frontend.HandleregServlet"/>
@steinarb
steinarb / karaf_command_history
Created May 11, 2021 14:31
Delete the old ~/.karaf before testing the command history
sb@lorenzo:/tmp/apache-karaf-4.3.2$ cd
sb@lorenzo:~$ mv .karaf/ .karaf_old
sb@lorenzo:~$ cd /tmp/apache-karaf-4.3.2/
sb@lorenzo:/tmp/apache-karaf-4.3.2$ bin/karaf
Exception in thread "JMX Connector Thread [service:jmx:rmi://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root]" java.lang.RuntimeException: Could not start JMX connector server
at org.apache.karaf.management.ConnectorServerFactory.lambda$init$0(ConnectorServerFactory.java:438)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.rmi.NoSuchObjectException: object not exported
at java.rmi/sun.rmi.transport.ObjectTable.getStub(ObjectTable.java:122)
at java.rmi/java.rmi.server.RemoteObject.toStub(RemoteObject.java:107)
@steinarb
steinarb / karaf_command_history
Created May 11, 2021 13:14
Checking the command history on startup in karaf 4.3.2
sb@lorenzo:/tmp/apache-karaf-4.3.2$ bin/karaf
__ __ ____
/ //_/____ __________ _/ __/
/ ,< / __ `/ ___/ __ `/ /_
/ /| |/ /_/ / / / /_/ / __/
/_/ |_|\__,_/_/ \__,_/_/
Apache Karaf (4.3.2)
Hit '<tab>' for a list of available commands
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0" name="no.priv.bang.authservice.db.liquibase.test.TestLiquibaseRunner" immediate="true" activate="activate">
<property name="name" type="String" value="authservicedb"/>
<service>
<provide interface="org.ops4j.pax.jdbc.hook.PreHook"/>
</service>
<reference name="Logservice" interface="org.osgi.service.log.LogService" bind="setLogservice"/>
<implementation class="no.priv.bang.authservice.db.liquibase.test.TestLiquibaseRunner"/>
</scr:component>
./ws03/jersey-demo/src/main/filtered-resources/feature.xml\02:<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="webapi">
./ws03/modelstore/modelstore.backend/src/main/feature/feature.xml\02:<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="authservice.bundle">
./ws03/osgi-service/src/main/filtered-resources/feature.xml\02:<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="handlereg">
./ws03/ukelonn/ukelonn.db.liquibase.test/src/main/feature/feature.xml\02:<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="ukelonn.bundle.test.db">
./ws03/ukelonn/ukelonn.db.liquibase/src/main/feature/feature.xml\02:<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="ukelonn.db.liquibase">
./ws03/ukelonn/ukelonn.db.liquibase.production/src/main/feature/feature.xml\02:<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="ukelonn.bundle.test.db">
./ws03/ukelonn/ukelonn.web.services/src/main/feature/feature.xml\02:<featur
[INFO] -------------< no.priv.bang.authservice:authservice.tests >-------------
[INFO] Building Authentication webapp integration tests 1.13.0-SNAPSHOT [13/14]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ authservice.tests ---
[INFO] Deleting /home/sb/workspaces/ws03/authservice/authservice.tests/target
[INFO] Deleting /home/sb/workspaces/ws03/authservice/authservice.tests (includes = [**/*.log], excludes = [])
[INFO]
[INFO] --- depends-maven-plugin:1.4.0:generate-depends-file (generate-depends-file) @ authservice.tests ---
[INFO] Created: /home/sb/workspaces/ws03/authservice/authservice.tests/target/classes/META-INF/maven/dependencies.properties
@steinarb
steinarb / org.apache.karaf.features.xml
Created April 5, 2021 16:31
File only found in the etc directory of the karaf debian package
<?xml version="1.0" encoding="UTF-8"?>
<featuresProcessing xmlns="http://karaf.apache.org/xmlns/features-processing/v1.0.0">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
@steinarb
steinarb / diff-etc-tarball-vs-deb
Created April 5, 2021 16:27
Diff between the contents of the etc directory of the karaf binary tarball and the etc directory of the karaf debian package
--- /tmp/etc-431-tarball 2021-04-05 18:08:26.364420100 +0200
+++ /tmp/etc-431-deb 2021-04-05 18:08:09.716632123 +0200
@@ -1,11 +1,12 @@
all.policy
config.properties
+config.properties.dpkg-old
custom.properties
distribution.info
equinox-debug.properties
host.key
@steinarb
steinarb / karaf.log
Created April 3, 2021 21:51
Messages in the log when installing karaf 4.3.1 from the debian package
2021-04-03T17:25:30,226 | INFO | Karaf Shutdown Socket Thread | ShutdownSocketThread | 5 - org.ops4j.pax.logging.pax-logging-api - 2.0.8 | Karaf shutdown socket: received shutdown command. Stopping framework...
2021-04-03T17:25:45,773 | INFO | CM Configuration Updater (Update: pid=org.ops4j.pax.logging) | EventAdminConfigurationNotifier | 6 - org.ops4j.pax.logging.pax-logging-log4j2 - 2.0.8 | Sending Event Admin notification (configuration successful) to org&#x2F;ops4j&#x2F;pax&#x2F;logging&#x2F;Configuration
2021-04-03T17:25:46,056 | INFO | features-3-thread-1 | FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.1 | No deployment change.
2021-04-03T17:25:46,059 | INFO | features-3-thread-1 | FeaturesServiceImpl | 18 - org.apache.karaf.features.core - 4.3.1 | Done.
@steinarb
steinarb / karaf.log
Created March 23, 2021 18:46
Attempt at loading karaf 4.2.0 web whiteboard applications in karaf 4.3.0
Mar 23, 2021 7:40:18 PM org.apache.karaf.main.Main launch
INFO: Installing and starting initial bundles
Mar 23, 2021 7:40:18 PM org.apache.karaf.main.Main launch
INFO: All initial bundles installed and set to start
Mar 23, 2021 7:40:18 PM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Trying to lock /home/sb/skrot/apache-karaf-4.3.0/lock
Mar 23, 2021 7:40:18 PM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Lock acquired
Mar 23, 2021 7:40:18 PM org.apache.karaf.main.Main$KarafLockCallback lockAcquired
INFO: Lock acquired. Setting startlevel to 100