When trying to run smack 4.4.4 in an OSGi environment, I receive the following exception:
java.util.ServiceConfigurationError: org.jivesoftware.smack.xml.XmlPullParserFactory: org.jivesoftware.smack.xml.xpp3.Xpp3XmlPullParserFactory not a subtype
at java.util.ServiceLoader.fail(ServiceLoader.java:589) ~[?:?]
at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1237) ~[?:?]
at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1265) ~[?:?]
at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300) ~[?:?]
at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385) ~[?:?]
at org.jivesoftware.smack.xml.SmackXmlParser.getXmlPullParserFactory(SmackXmlParser.java:33) ~[?:?]
at org.jivesoftware.smack.xml.SmackXmlParser.newXmlParser(SmackXmlParser.java:54) ~[?:?]
at org.jivesoftware.smack.util.PacketParserUtils.getParserFor(PacketParserUtils.java:80) ~[?:?]
at org.jivesoftware.smack.SmackInitialization.processConfigFile(SmackInitialization.java:159) ~[?:?]
at org.jivesoftware.smack.SmackInitialization.processConfigFile(SmackInitialization.java:154) ~[?:?]
at org.jivesoftware.smack.SmackInitialization.<clinit>(SmackInitialization.java:103) ~[?:?]
at org.jivesoftware.smack.Smack.getVersion(Smack.java:36) ~[?:?]
at org.jivesoftware.smack.Smack.ensureInitialized(Smack.java:50) ~[?:?]
at org.jivesoftware.smack.ConnectionConfiguration.<clinit>(ConnectionConfiguration.java:115) ~[?:?]
at org.openhab.binding.xmppclient.internal.XMPPClient.connect(XMPPClient.java:73) ~[?:?]
at org.openhab.binding.xmppclient.internal.handler.XMPPClientHandler.doConnect(XMPPClientHandler.java:91) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
I need to add all transitive dependencies manually, so I added the following:
<properties>
<smack.version>4.4.4</smack.version>
<bnd.importpackage>
!android.*,!sun.security.*
</bnd.importpackage>
</properties>
<dependencies>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack-core</artifactId>
<version>${smack.version}</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack-xmlparser</artifactId>
<version>${smack.version}</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack-xmlparser-xpp3</artifactId>
<version>${smack.version}</version>
</dependency>
<dependency>
<groupId>xpp3</groupId>
<artifactId>xpp3_min</artifactId>
<version>1.1.4c</version>
</dependency>
<dependency>
<groupId>org.jxmpp</groupId>
<artifactId>jxmpp-core</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>org.jxmpp</groupId>
<artifactId>jxmpp-util-cache</artifactId>
<version>1.0.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jxmpp</groupId>
<artifactId>jxmpp-jid</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack-extensions</artifactId>
<version>${smack.version}</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack-im</artifactId>
<version>${smack.version}</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack-tcp</artifactId>
<version>${smack.version}</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack-streammanagement</artifactId>
<version>${smack.version}</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack-experimental</artifactId>
<version>${smack.version}</version>
</dependency>
<dependency>
<groupId>org.hsluv</groupId>
<artifactId>hsluv</artifactId>
<version>0.2</version>
</dependency>
<dependency>
<groupId>org.minidns</groupId>
<artifactId>minidns-core</artifactId>
<version>1.0.2</version>
</dependency>
</dependencies>
Has anybody an idea?