Project

General

Profile

ClassNotFoundException when trying to use tigase.http.jetty.JettyStanadloneHttpServer

Igor Khomenko
Added almost 4 years ago

I have Tigase 7.0.1 running with http component enabled

Here is the init.properties part:

--comp-name-3=http
--comp-class-3=tigase.http.HttpMessageReceiver
http/http/port[I]=8080
http/http/server-class=tigase.http.jetty.JettyStanadloneHttpServer
http/rest/api-keys[s]=open_access

I also have tigase-http-api-jetty.jar inside jars folder

But when I run Tigase then got next exception:

2015-03-31 19:01:41.178 [main]             HttpServer.setProperties()         SEVERE:   Cannot instantiate HTTP server implementation class: tigase.http.jetty.JettyStanadloneHttpServer
java.lang.ClassNotFoundException: tigase.http.jetty.JettyStanadloneHttpServer
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at tigase.osgi.ModulesManagerImpl.forName(ModulesManagerImpl.java:187)
    at tigase.http.HttpServer.setProperties(HttpServer.java:68)
    at tigase.http.HttpMessageReceiver.setProperties(HttpMessageReceiver.java:192)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
    at tigase.server.MessageRouter.addComponent(MessageRouter.java:108)
    at tigase.server.MessageRouter.addRouter(MessageRouter.java:145)
    at tigase.server.MessageRouter.setProperties(MessageRouter.java:704)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
    at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)
    at tigase.server.MessageRouter.setConfig(MessageRouter.java:603)
    at tigase.server.XMPPServer.start(XMPPServer.java:141)
    at tigase.server.XMPPServer.main(XMPPServer.java:111)
2015-03-31 19:01:41.179 [main]             MessageRouter.setProperties()      WARNING:  configuration of component http failed - disabling component, error: Can not instantiate HTTP server implementation class: tigase.http.jetty.JettyStanadloneHttpServer

Should we add anything else?


Replies (2)

Added by Igor Khomenko almost 4 years ago

Ok guys,

I found why I get this

It's a typo in your documentation, please update

Here https://projects.tigase.org/projects/tigase-http-api/wiki/Configuration I can find

tigase.http.jetty.Jetty*Stanadlone*HttpServer -> tigase.http.jetty.Jetty*Standalone*HttpServer

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam almost 4 years ago

Thank you for reporting this issue in documentation. I corrected name of class for usage of Jetty as implementation of HTTP server on wiki page

    (1-2/2)