Rest interface not working (Failed to initialize Atmosphere Framework)


Since an upgrade from 1.6.0 to 1.7.1 i can’t get the rest interface to work.
The only error i can find in the log is:

22:20:25.010 [ERROR] [sphere.cpr.AtmosphereFramework:906  ] - Failed to initialize Atmosphere Framework
java.lang.TypeNotPresentException: Type javax.xml.bind.JAXBContext not present
        at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType( ~[na:na]
        at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature( ~[na:na]
        at sun.reflect.generics.tree.ClassTypeSignature.accept( ~[na:na]
        at sun.reflect.generics.visitor.Reifier.reifyTypeArguments( ~[na:na]
        at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature( ~[na:na]
        at sun.reflect.generics.tree.ClassTypeSignature.accept( ~[na:na]
        at sun.reflect.generics.repository.ClassRepository.computeSuperInterfaces( ~[na:na]
...[[[ cut some lines here ]]] ....
        at [org.eclipse.equinox.ds_1.4.1.v20120926-201320.jar:na]
        at [org.eclipse.equinox.util_1.0.400.v20120917-192807.jar:na]
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBContext
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal( ~[org.eclipse.osgi_3.8.2.v20130124-134944.jar:na]
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass( ~[org.eclipse.osgi_3.8.2.v20130124-134944.jar:na]
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass( ~[org.eclipse.osgi_3.8.2.v20130124-134944.jar:na]
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass( ~[org.eclipse.osgi_3.8.2.v20130124-134944.jar:na]
        at java.lang.ClassLoader.loadClass( ~[na:na]
        at java.lang.Class.forName0(Native Method) ~[na:na]
        at java.lang.Class.forName( ~[na:na]
        at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType( ~[na:na]
        ... 66 common frames omitted

Running Debian

java -version
java version “1.9.0-ea”
Java™ SE Runtime Environment (build 1.9.0-ea-b78)
Java HotSpot™ 64-Bit Server VM (build 1.9.0-ea-b78, mixed mode)

I encounter the same issues. As a result the IOS app cannot connect anymore (error 404)

My result is the android app cannot connect.
Dit you upgrade to 1.7.1 as well?

I have the same issue after upgrading to 1.7.1 and using java version “1.9.0-ea” (im running on Odroid XU3 with ubuntu)

Hi Jabberwocked,

I resolved the problem.
First i went back to openhab 1.6.0 and still had the same problem.

Now i switched back to java-8-oracle by using the command update-alternatives and selected the older java as default: ( i still had the older java installed )

update-alternatives --config java

  • 2 /usr/lib/jvm/java-8-oracle/jre/bin/java 5 manual mode
    3 /usr/lib/jvm/java-9-oracle/bin/java 7 manual mode

This solved the problem in both 1.6.0 and 1.7.1

1 Like

Thank you, this solved my problem :slight_smile:

This is my java version
java version “1.8.0”
Java™ SE Runtime Environment (build 1.8.0-b132)
Java HotSpot™ Client VM (build 25.0-b70, mixed mode)

I do have the problem (on 1.7.1).
I’ll install java 1.7 to test

Just want to thanks. This is also the same issue when you have this Error with homematic

[WARN ] [.b.h.i.c.HomematicCommunicator:266 ] - Can’t find DatapointConfig[address=LEQ07xxxx,channel=1,parameter=LEVEL], value is not published to Homematic server!

Just check your java -version. AND DONT use 1.9

damn it…that did take time to solve.