diff --git a/smack-core/src/main/java/org/jivesoftware/smack/CoreInitializer.java b/smack-core/src/main/java/org/jivesoftware/smack/CoreInitializer.java
deleted file mode 100644
index 155a4fbaa..000000000
--- a/smack-core/src/main/java/org/jivesoftware/smack/CoreInitializer.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- *
- * Copyright 2018 Paul Schaub.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jivesoftware.smack;
-
-import org.jivesoftware.smack.initializer.UrlInitializer;
-
-public class CoreInitializer extends UrlInitializer {
-
- @Override
- protected String getProvidersUri() {
- return "classpath:org.jivesoftware.smack/core.providers";
- }
-}
diff --git a/smack-core/src/main/java/org/jivesoftware/smack/SmackInitialization.java b/smack-core/src/main/java/org/jivesoftware/smack/SmackInitialization.java
index f70c721e3..b3a11b8a6 100644
--- a/smack-core/src/main/java/org/jivesoftware/smack/SmackInitialization.java
+++ b/smack-core/src/main/java/org/jivesoftware/smack/SmackInitialization.java
@@ -29,7 +29,9 @@ import java.util.logging.Logger;
import org.jivesoftware.smack.compression.Java7ZlibInputOutputStream;
import org.jivesoftware.smack.initializer.SmackInitializer;
import org.jivesoftware.smack.packet.Bind;
+import org.jivesoftware.smack.packet.Message.Body;
import org.jivesoftware.smack.provider.BindIQProvider;
+import org.jivesoftware.smack.provider.BodyElementProvider;
import org.jivesoftware.smack.provider.ProviderManager;
import org.jivesoftware.smack.sasl.core.SASLAnonymous;
import org.jivesoftware.smack.sasl.core.SASLXOauth2Mechanism;
@@ -116,6 +118,7 @@ public final class SmackInitialization {
SASLAuthentication.registerSASLMechanism(new SASLAnonymous());
ProviderManager.addIQProvider(Bind.ELEMENT, Bind.NAMESPACE, new BindIQProvider());
+ ProviderManager.addExtensionProvider(Body.ELEMENT, Body.NAMESPACE, new BodyElementProvider());
SmackConfiguration.smackInitialized = true;
}
diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java b/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java
index f9dcbc360..2d63cdc77 100644
--- a/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java
+++ b/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java
@@ -28,6 +28,7 @@ import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
+import org.jivesoftware.smack.SmackConfiguration;
import org.jivesoftware.smack.compress.packet.Compress;
import org.jivesoftware.smack.packet.EmptyResultIQ;
import org.jivesoftware.smack.packet.ErrorIQ;
@@ -71,6 +72,9 @@ public class PacketParserUtils {
public static final boolean XML_PULL_PARSER_SUPPORTS_ROUNDTRIP;
static {
+ // Ensure that Smack is initialized.
+ SmackConfiguration.getVersion();
+
XmlPullParser xmlPullParser;
boolean roundtrip = false;
try {
diff --git a/smack-core/src/main/resources/org.jivesoftware.smack/core.providers b/smack-core/src/main/resources/org.jivesoftware.smack/core.providers
deleted file mode 100644
index 4e13951f5..000000000
--- a/smack-core/src/main/resources/org.jivesoftware.smack/core.providers
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
- body
- jabber:client
- org.jivesoftware.smack.provider.BodyElementProvider
-
-
diff --git a/smack-core/src/main/resources/org.jivesoftware.smack/smack-config.xml b/smack-core/src/main/resources/org.jivesoftware.smack/smack-config.xml
index 6f68760f1..fd4468b90 100644
--- a/smack-core/src/main/resources/org.jivesoftware.smack/smack-config.xml
+++ b/smack-core/src/main/resources/org.jivesoftware.smack/smack-config.xml
@@ -5,7 +5,6 @@
org.jivesoftware.smack.initializer.VmArgInitializer
org.jivesoftware.smack.ReconnectionManager
- org.jivesoftware.smack.CoreInitializer