Now I don’t get the Demo App running anymore… No idea what I’m doing wrong…
I reverted back to the main
branch of openhab-distro
(although that apparently didn’t delete any things I had added in the Demo App…?). I then created a new branch, and started the Demo App. That worked. I then altered pom.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.openhab.demo</groupId>
<artifactId>org.openhab.demo.app</artifactId>
<version>4.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>openHAB Demo :: App</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<oh.java.version>21</oh.java.version>
<maven.compiler.release>${oh.java.version}</maven.compiler.release>
<bnd.version>7.1.0</bnd.version>
</properties>
<dependencies>
<dependency>
<groupId>org.openhab.core.bom</groupId>
<artifactId>org.openhab.core.bom.runtime</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.openhab.core.bom</groupId>
<artifactId>org.openhab.core.bom.openhab-core</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.openhab.ui.bom</groupId>
<artifactId>org.openhab.ui.bom.openhab-ui</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>runtime</scope>
</dependency>
<!-- uncomment this and add the name of your binding that you want to work on -->
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.unifiprotect</artifactId>
<version>4.0.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
<!-- -->
<!-- uncomment this if you want to work on the Zigbee binding
<dependency>
<groupId>org.openhab.addons.bom</groupId>
<artifactId>org.openhab.addons.bom.zigbee</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>runtime</scope>
</dependency>
-->
</dependencies>
<build>
<pluginManagement>
<plugins>
<!-- Use the bnd-maven-plugin and assemble the symbolic names -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<version>${bnd.version}</version>
<executions>
<execution>
<goals>
<goal>bnd-process</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Required to make the maven-jar-plugin pick up the bnd generated manifest. Also avoid packaging empty Jars -->
<!-- Moved... -->
<!-- Setup the indexer for running and testing -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-indexer-maven-plugin</artifactId>
<version>${bnd.version}</version>
<configuration>
<localURLs>REQUIRED</localURLs>
<attach>false</attach>
</configuration>
<executions>
<execution>
<id>index</id>
<goals>
<goal>index</goal>
</goals>
<configuration>
<indexName>${project.artifactId}</indexName>
</configuration>
</execution>
<execution>
<id>test-index</id>
<goals>
<goal>index</goal>
</goals>
<configuration>
<indexName>${project.artifactId}</indexName>
<outputFile>${project.build.directory}/test-index.xml</outputFile>
<scopes>
<scope>test</scope>
</scopes>
</configuration>
</execution>
</executions>
</plugin>
<!-- Define the version of the resolver plugin we use -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-resolver-maven-plugin</artifactId>
<version>${bnd.version}</version>
<configuration>
<failOnChanges>false</failOnChanges>
<bndruns>
</bndruns>
</configuration>
<executions>
<execution>
<goals>
<goal>resolve</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Define the version of the export plugin we use -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-export-maven-plugin</artifactId>
<version>${bnd.version}</version>
<configuration>
<resolve>true</resolve>
<failOnChanges>true</failOnChanges>
</configuration>
<executions>
<execution>
<goals>
<goal>export</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Define the version of the testing plugin that we use -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-testing-maven-plugin</artifactId>
<version>${bnd.version}</version>
<executions>
<execution>
<goals>
<goal>testing</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Define the version of the baseline plugin we use and avoid failing when no baseline jar exists. -->
<!-- (for example before the first release) -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-baseline-maven-plugin</artifactId>
<version>${bnd.version}</version>
<configuration>
<failOnMissing>false</failOnMissing>
</configuration>
<executions>
<execution>
<goals>
<goal>baseline</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Allow running openHAB demo app from a Maven/bnd task -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-run-maven-plugin</artifactId>
<version>${bnd.version}</version>
<configuration>
<includeDependencyManagement>true</includeDependencyManagement>
<bndrun>app.bndrun</bndrun>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.11.2</version>
<configuration>
<outputDirectory>${project.build.directory}/site</outputDirectory>
<failOnError>!${quality.skip}</failOnError>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.15.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<preparationGoals>clean install</preparationGoals>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.13.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.21.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
</plugin>
<!-- This plugin's configuration is used to store Eclipse m2e settings only. -->
<!-- It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-indexer-maven-plugin</artifactId>
<versionRange>[3.1.0,)</versionRange>
<goals>
<goal>index</goal>
<goal>local-index</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-run-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-export-maven-plugin</artifactId>
<configuration>
<failOnChanges>false</failOnChanges>
<bndruns>
<bndrun>app.bndrun</bndrun>
</bndruns>
</configuration>
</plugin>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-resolver-maven-plugin</artifactId>
<configuration>
<bndruns>
<bndrun>app.bndrun</bndrun>
</bndruns>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>openhab-artifactory-release</id>
<name>JFrog Artifactory Repository</name>
<url>https://openhab.jfrog.io/openhab/libs-release</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>openhab-artifactory-snapshot</id>
<name>JFrog Artifactory Repository</name>
<url>https://openhab.jfrog.io/openhab/libs-snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
</repositories>
<profiles>
<profile>
<id>with-bnd-resolver-resolve</id>
<activation>
<property>
<name>withResolver</name>
</property>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-resolver-maven-plugin</artifactId>
<version>${bnd.version}</version>
<executions>
<execution>
<goals>
<goal>resolve</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>j21</id>
<properties>
<oh.java.version>21</oh.java.version>
<maven.compiler.release>${oh.java.version}</maven.compiler.release>
</properties>
</profile>
</profiles>
</project>
Then I added the dependency marked Maven Dependencies
, “resolved”, and clicked Debug OSGi
. Then I got this log:
____________________________
Welcome to Apache Felix Gogo
g! apr 12, 2025 1:36:21 P.M. org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
INFO: Adding the extensions from bundle org.apache.cxf.cxf-rt-frontend-jaxrs (50) [org.apache.cxf.jaxrs.JAXRSBindingFactory]
apr 12, 2025 1:36:21 P.M. org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
INFO: Adding the extensions from bundle org.apache.cxf.cxf-rt-rs-sse (52) [org.apache.cxf.transport.sse.SseProvidersExtension]
apr 12, 2025 1:36:21 P.M. org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
INFO: Adding the extensions from bundle org.apache.cxf.cxf-rt-transports-http (54) [org.apache.cxf.transport.http.HTTPTransportFactory, org.apache.cxf.transport.http.HTTPWSDLExtensionLoader, org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder, org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder, org.apache.cxf.transport.http.policy.NoOpPolicyInterceptorProvider]
apr 12, 2025 1:36:21 P.M. org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
INFO: Aries Blueprint packages not available. So namespaces will not be registered
apr 12, 2025 1:36:21 P.M. org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
INFO: Aries Blueprint packages not available. So namespaces will not be registered
apr 12, 2025 1:36:21 P.M. org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
INFO: Aries Blueprint packages not available. So namespaces will not be registered
apr 12, 2025 1:36:21 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider com.ctc.wstx.stax.WstxEventFactory of service javax.xml.stream.XMLEventFactory in bundle com.fasterxml.woodstox.woodstox-core
apr 12, 2025 1:36:21 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider com.ctc.wstx.stax.WstxInputFactory of service javax.xml.stream.XMLInputFactory in bundle com.fasterxml.woodstox.woodstox-core
apr 12, 2025 1:36:21 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider com.ctc.wstx.dtd.DTDSchemaFactory of service org.codehaus.stax2.validation.XMLValidationSchemaFactory in bundle com.fasterxml.woodstox.woodstox-core
apr 12, 2025 1:36:21 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider com.ctc.wstx.msv.RelaxNGSchemaFactory of service org.codehaus.stax2.validation.XMLValidationSchemaFactory in bundle com.fasterxml.woodstox.woodstox-core
apr 12, 2025 1:36:21 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider com.ctc.wstx.msv.W3CSchemaFactory of service org.codehaus.stax2.validation.XMLValidationSchemaFactory in bundle com.fasterxml.woodstox.woodstox-core
apr 12, 2025 1:36:21 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider com.ctc.wstx.stax.WstxOutputFactory of service javax.xml.stream.XMLOutputFactory in bundle com.fasterxml.woodstox.woodstox-core
apr 12, 2025 1:36:21 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider org.apache.aries.jax.rs.whiteboard.internal.client.ClientBuilderImpl of service javax.ws.rs.client.ClientBuilder in bundle org.apache.aries.jax.rs.whiteboard
apr 12, 2025 1:36:21 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl of service javax.ws.rs.ext.RuntimeDelegate in bundle org.apache.aries.jax.rs.whiteboard
apr 12, 2025 1:36:21 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider org.apache.cxf.jaxrs.sse.client.SseEventSourceBuilderImpl of service javax.ws.rs.sse.SseEventSource.Builder in bundle org.apache.aries.jax.rs.whiteboard
apr 12, 2025 1:36:22 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider org.eclipse.jetty.http.Http1FieldPreEncoder of service org.eclipse.jetty.http.HttpFieldPreEncoder in bundle org.eclipse.jetty.http
apr 12, 2025 1:36:22 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider org.eclipse.jetty.http2.hpack.HpackFieldPreEncoder of service org.eclipse.jetty.http.HttpFieldPreEncoder in bundle org.eclipse.jetty.http2.hpack
apr 12, 2025 1:36:22 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider org.eclipse.jetty.websocket.common.extensions.identity.IdentityExtension of service org.eclipse.jetty.websocket.api.extensions.Extension in bundle org.eclipse.jetty.websocket.common
apr 12, 2025 1:36:22 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider org.eclipse.jetty.websocket.common.extensions.fragment.FragmentExtension of service org.eclipse.jetty.websocket.api.extensions.Extension in bundle org.eclipse.jetty.websocket.common
apr 12, 2025 1:36:22 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider org.eclipse.jetty.websocket.common.extensions.compress.PerMessageDeflateExtension of service org.eclipse.jetty.websocket.api.extensions.Extension in bundle org.eclipse.jetty.websocket.common
apr 12, 2025 1:36:22 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider org.eclipse.jetty.websocket.common.extensions.compress.DeflateFrameExtension of service org.eclipse.jetty.websocket.api.extensions.Extension in bundle org.eclipse.jetty.websocket.common
apr 12, 2025 1:36:22 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider org.eclipse.jetty.websocket.common.extensions.compress.XWebkitDeflateFrameExtension of service org.eclipse.jetty.websocket.api.extensions.Extension in bundle org.eclipse.jetty.websocket.common
apr 12, 2025 1:36:22 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider org.eclipse.jetty.websocket.server.NativeWebSocketServletContainerInitializer of service javax.servlet.ServletContainerInitializer in bundle org.eclipse.jetty.websocket.server
org.openhab.core.storage.json [org.openhab.core.storage.json.internal.JsonStorage] ERROR : Couldn't deserialize value 'org.openhab.core.storage.json.internal.StorageEntry@761b9314'. Root cause is: Failed parsing 'Apr 7, 2025, 9:48:46 AM' as Date; at path $.sessions[0].createdTime
13:36:33.923 [WARN ] [ce.jetty.internal.JettyServerWrapper] - Can't create temporary directory for OsgiContextModel{HS,id=OCM-33,name='context:712658526',path='/',bundle=org.apache.felix.webconsole,context=WebContainerContextWrapper{bundle=org.apache.felix.webconsole_4.7.2 [56],contextId='context:712658526',delegate=org.apache.felix.webconsole.internal.servlet.OsgiManagerHttpContext@2a7a4e5e}}: C:\Users\Erik\AppData\Local\Temp\ROOT\context:712658526
13:36:35.140 [INFO ] [otect.internal.model.UniFiProtectNvr] - Initializing the binding, with config: UniFiProtectNvrThingConfig [host=192.168.1.1, username=openhab, password=*************, refresh=60, eventsTimePeriodLength=30, thumbnailWidth=640.0, imageFolder=C:\Users\Erik\AppData\Local\Temp\, g4SnapshotWidth=3840, g4SnapshotHeight=2160, defaultSnapshotWidth=1920, defaultSnapshotHeight=1080, watchDog=true, g4SnapshotWidthAsString=3840, g4SnapshotHeightAsString=2160, defaultSnapshotWidthAsString=1920, defaultSnapshotHeightAsString=1080]
13:36:35.647 [WARN ] [ax.web.service.spi.model.ServerModel] - ServletModel{id=ServletModel-42,name='cxf-servlet',urlPatterns=[/*],contexts=[{WB,OCM-1,default,/}]} can't be registered now in context / under "/*" mapping. Conflict with ServletModel{id=ServletModel-39,name='/',urlPatterns=[/*],contexts=[{WB,OCM-1,default,/}]}.
13:36:35.647 [WARN ] [ax.web.service.spi.model.ServerModel] - Skipped registration of ServletModel{id=ServletModel-42,name='cxf-servlet',urlPatterns=[/*],contexts=[{WB,OCM-1,default,/}]} because of existing mappings. Servlet will be added as "awaiting registration".
13:37:29.137 [WARN ] [.io.rest.auth.internal.TokenResource] - Couldn't find a user with a session matching the provided refresh_token
13:37:29.140 [WARN ] [.io.rest.auth.internal.TokenResource] - Token issuing failed: invalid_grant
13:37:29.609 [ERROR] [re.storage.json.internal.JsonStorage] - Couldn't deserialize value 'org.openhab.core.storage.json.internal.StorageEntry@702075b4'. Root cause is: Failed parsing 'Apr 7, 2025, 9:49:24 AM' as Date; at path $.timestamp
13:38:02.508 [ERROR] [re.storage.json.internal.JsonStorage] - Couldn't deserialize value 'org.openhab.core.storage.json.internal.StorageEntry@761b9314'. Root cause is: Failed parsing 'Apr 7, 2025, 9:48:46 AM' as Date; at path $.sessions[0].createdTime
13:38:02.515 [ERROR] [re.storage.json.internal.JsonStorage] - Couldn't deserialize value 'org.openhab.core.storage.json.internal.StorageEntry@761b9314'. Root cause is: Failed parsing 'Apr 7, 2025, 9:48:46 AM' as Date; at path $.sessions[0].createdTime
13:38:02.517 [INFO ] [p.auth.internal.AuthorizePageServlet] - First user account created: ontwikkelerik
13:38:30.029 [ERROR] [re.storage.json.internal.JsonStorage] - Couldn't deserialize value 'org.openhab.core.storage.json.internal.StorageEntry@702075b4'. Root cause is: Failed parsing 'Apr 7, 2025, 9:49:24 AM' as Date; at path $.timestamp
13:38:30.035 [ERROR] [re.storage.json.internal.JsonStorage] - Couldn't deserialize value 'org.openhab.core.storage.json.internal.StorageEntry@702075b4'. Root cause is: Failed parsing 'Apr 7, 2025, 9:49:24 AM' as Date; at path $.timestamp
I had to make a new user in the GUI, but my previously created things were still there. The NVR claims to be online, but the camera didn’t. Trying to disable and then enable it again failed. Removing it as well:
As you can see, there are no logs of any of this…