On Wednesday, January 21, 2015 03:43:50 PM Lior Vernia wrote:

> Hello,

>

> Building from master (i.e. towards 3.6), trying to use REST produces

> some exceptions - anyone has any clue as to why? Attaching the response

> (stack trace); this is to a GET operation on /api.

>

> Yours, Lior.

>

>

 

The problem is the following according to the stack trace:

 

java.lang.NoClassDefFoundError:

org/codehaus/jackson/xc/JaxbAnnotationIntrospector

 

If you are running the stock JBOSS from Fedora 20 I believe it contains the wrong jackson library. Download jboss-7.1.1.Final from the website and use that one. That should make the issue go away.

 

>

> <html><head><title>JBoss Web/7.0.0.SNAPSHOT - Error

> report</title><style><!--H1

> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;fo

> nt-size:22px;} H2

> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;fo

> nt-size:16px;} H3

> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;fo

> nt-size:14px;} BODY

> {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B

> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}

> P

> {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:

> 12px;}A {color : black;}A.name {color : black;}HR {color :

> #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1"

> noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b>

> <u></u></p><p><b>description</b> <u>The server encountered an internal

> error () that prevented it from fulfilling this

> request.</u></p><p><b>exception</b> <pre>javax.servlet.ServletException:

> Servlet.init() for servlet

> org.ovirt.engine.api.restapi.BackendApplication threw exception

> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBas

> e.java:489)

> org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityCo

> ntextAssociationValve.java:153)

> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10

> 2) org.jboss.web.rewrite.RewriteValve.invoke(RewriteValve.java:466)

> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Htt

> p11Protocol.java:671)

> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

> java.lang.Thread.run(Thread.java:724)

> </pre></p><p><b>root cause</b> <pre>java.lang.RuntimeException:

> java.lang.RuntimeException: Unable to instantiate MessageBodyReader

> org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuilt

> in.java:35)

> org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:211

> )

> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(S

> ervletContainerDispatcher.java:67)

> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpSe

> rvletDispatcher.java:36)

> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBas

> e.java:489)

> org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityCo

> ntextAssociationValve.java:153)

> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10

> 2) org.jboss.web.rewrite.RewriteValve.invoke(RewriteValve.java:466)

> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Htt

> p11Protocol.java:671)

> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

> java.lang.Thread.run(Thread.java:724)

> </pre></p><p><b>root cause</b> <pre>java.lang.RuntimeException: Unable

> to instantiate MessageBodyReader

> org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyPro

> viderFactory.java:761)

> org.jboss.resteasy.plugins.providers.RegisterBuiltin.registerProviders(Regi

> sterBuiltin.java:70)

> org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuilt

> in.java:31)

> org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:211

> )

> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(S

> ervletContainerDispatcher.java:67)

> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpSe

> rvletDispatcher.java:36)

> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBas

> e.java:489)

> org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityCo

> ntextAssociationValve.java:153)

> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10

> 2) org.jboss.web.rewrite.RewriteValve.invoke(RewriteValve.java:466)

> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Htt

> p11Protocol.java:671)

> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

> java.lang.Thread.run(Thread.java:724)

> </pre></p><p><b>root cause</b> <pre>java.lang.RuntimeException: Failed

> to construct public org.ovirt.engine.api.json.JSONProvider()

> org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInject

> orImpl.java:144)

> org.jboss.resteasy.spi.ResteasyProviderFactory.getProviderInstance(Resteasy

> ProviderFactory.java:1039)

> org.jboss.resteasy.spi.ResteasyProviderFactory.addMessageBodyReader(Resteas

> yProviderFactory.java:478)

> org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyPro

> viderFactory.java:757)

> org.jboss.resteasy.plugins.providers.RegisterBuiltin.registerProviders(Regi

> sterBuiltin.java:70)

> org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuilt

> in.java:31)

> org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:211

> )

> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(S

> ervletContainerDispatcher.java:67)

> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpSe

> rvletDispatcher.java:36)

> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBas

> e.java:489)

> org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityCo

> ntextAssociationValve.java:153)

> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10

> 2) org.jboss.web.rewrite.RewriteValve.invoke(RewriteValve.java:466)

> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Htt

> p11Protocol.java:671)

> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

> java.lang.Thread.run(Thread.java:724)

> </pre></p><p><b>root cause</b> <pre>java.lang.NoClassDefFoundError:

> org/codehaus/jackson/xc/JaxbAnnotationIntrospector

> org.ovirt.engine.api.json.JSONProvider.&lt;init&gt;(JSONProvider.java:32)

> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce

> ssorImpl.java:57)

> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru

> ctorAccessorImpl.java:45)

> java.lang.reflect.Constructor.newInstance(Constructor.java:526)

> org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInject

> orImpl.java:132)

> org.jboss.resteasy.spi.ResteasyProviderFactory.getProviderInstance(Resteasy

> ProviderFactory.java:1039)

> org.jboss.resteasy.spi.ResteasyProviderFactory.addMessageBodyReader(Resteas

> yProviderFactory.java:478)

> org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyPro

> viderFactory.java:757)

> org.jboss.resteasy.plugins.providers.RegisterBuiltin.registerProviders(Regi

> sterBuiltin.java:70)

> org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuilt

> in.java:31)

> org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:211

> )

> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(S

> ervletContainerDispatcher.java:67)

> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpSe

> rvletDispatcher.java:36)

> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBas

> e.java:489)

> org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityCo

> ntextAssociationValve.java:153)

> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10

> 2) org.jboss.web.rewrite.RewriteValve.invoke(RewriteValve.java:466)

> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Htt

> p11Protocol.java:671)

> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

> java.lang.Thread.run(Thread.java:724)

> </pre></p><p><b>root cause</b> <pre>java.lang.ClassNotFoundException:

> org.codehaus.jackson.xc.JaxbAnnotationIntrospector from [Module

> &quot;org.ovirt.engine.api.restapi-definition:main&quot; from local

> module loader @131b4c5d (roots:

> /home/lvernia/target/ovirt-engine/var/lib/ovirt-engine/jboss_runtime/modules

> /00-modules-common,/home/lvernia/target/ovirt-engine/var/lib/ovirt-engine/jb

> oss_runtime/modules/01-jboss-as-modules)]

> org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

> org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(Concurren

> tClassLoader.java:468)

> org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentC

> lassLoader.java:456)

> org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoa

> der.java:398)

> org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.jav

> a:120)

> org.ovirt.engine.api.json.JSONProvider.&lt;init&gt;(JSONProvider.java:32)

> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce

> ssorImpl.java:57)

> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru

> ctorAccessorImpl.java:45)

> java.lang.reflect.Constructor.newInstance(Constructor.java:526)

> org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInject

> orImpl.java:132)

> org.jboss.resteasy.spi.ResteasyProviderFactory.getProviderInstance(Resteasy

> ProviderFactory.java:1039)

> org.jboss.resteasy.spi.ResteasyProviderFactory.addMessageBodyReader(Resteas

> yProviderFactory.java:478)

> org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyPro

> viderFactory.java:757)

> org.jboss.resteasy.plugins.providers.RegisterBuiltin.registerProviders(Regi

> sterBuiltin.java:70)

> org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuilt

> in.java:31)

> org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:211

> )

> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(S

> ervletContainerDispatcher.java:67)

> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpSe

> rvletDispatcher.java:36)

> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBas

> e.java:489)

> org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityCo

> ntextAssociationValve.java:153)

> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10

> 2) org.jboss.web.rewrite.RewriteValve.invoke(RewriteValve.java:466)

> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Htt

> p11Protocol.java:671)

> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

> java.lang.Thread.run(Thread.java:724)

> </pre></p><p><b>note</b> <u>The full stack trace of the root cause is

> available in the JBoss Web/7.0.0.SNAPSHOT logs.</u></p><HR size="1"

> noshade="noshade"><h3>JBoss Web/7.0.0.SNAPSHOT</h3></body></html>

>

> _______________________________________________

> Users mailing list

> Users@ovirt.org

> http://lists.ovirt.org/mailman/listinfo/users