Project

General

Profile

Tigase HTTP

Serhii Administrator
Added over 4 years ago

Hi everyone.

I have problems with setting up http. Help please.

In my logs I have:

MessageRouterConfig.hasClassForServerComponent() WARNING: Can't load component rest: tigase.http.rest.RestMessageReceiver

That portion of the configuration(init.properties) file relating to http:

--comp-name-3=rest

--comp-class-3=tigase.http.rest.RestMessageReceiver

--http/server-class=tigase.http.jetty.JettyStanadloneHttpServer

--http/port=8080

--rest/use-local-server=true

.jar-files I put in this dir /Tigase-5.2.0-b89/src/groovy/tigase/rest

.groovy-files I put in this dir /Tigase-5.2.0-b89/scripts/rest/groovy_scripts

Tell me what I did wrong?


Replies (10)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 4 years ago

Are you trying to setup Tigase HTTP REST API? How did you install Tigase? I suggest you install the Tigase XMPP Server form the installation package which has all the components and libraries included which are necessary for the full functionality.

Added by Serhii Administrator over 4 years ago

Yes, I want to install Tigase HTTP REST API. Downloaded and compiled. Next, make the required settings using https://projects.tigase.org/projects/tigase-http-api/wiki/Configuration

https://projects.tigase.org/projects/tigase-http-api/wiki/Configuration/annotate/4.

Added by Serhii Administrator over 4 years ago

I resolved this issue with the installation HTTP REST API. But now in the logs such errors

2014-07-16 11:48:59.391 [main] ThreadExceptionHandler.uncaughtException() SEVERE: Uncaught thread: "main" exception

java.lang.NoSuchMethodError: tigase.osgi.ModulesManagerImpl.forName(Ljava/lang/String;)Ljava/lang/Class;

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

I suppose you have compiled Tigase HTTP API from master branch of our repository but this version is prepared only to work with 5.3.0-SNAPSHOT version of Tigase HTTP API and that's why Java reports missing method.

As I remember compiled version Tigase HTTP API 1.0.0 was released as part of Tigase XMPP Server 5.2.0 dist-max package, so you may try to use it, or jump to place in repository of Tigase HTTP API tagged as tigase-http-api-1.0.0 which contains sources which should be used for Tigase XMPP Server 5.2.0 if I'm correct.

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 4 years ago

Another reason can be compilation using different version of JDK. I found that there are problems like this, sometimes, when part of the code is compiled with JDK7 and other part with JDK8.

Added by Serhii Administrator over 4 years ago

Thanks for your help.

This problem is resolved. But the problem with all the proper setting, not yet. And now in its tigase-сonsole.log I see the following.

CONFIG: Added default config parameter: (--comp-name-3=rest)

CONFIG: Added default config parameter: (--comp-class-3=tigase.http.rest.RestMessageReceiver)

ConfigRepository.setProperties() WARNING: Items list is not set in the configuration file!!

HttpServer.setProperties() WARNING: no HttpRegistrator instance where useLocal = true

HTTP API has connected,but It's needed to be configured сorrectly. Help me with this.

This is part of my init.propirities.log

--comp-name-3=rest

--comp-class-3=tigase.http.rest.RestMessageReceiver

--rest/use-local-server[B]=true.

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

This part of your config file should look like this:

--comp-name-3=rest
--comp-class-3=tigase.http.rest.RestMessageReceiver
rest/use-local-server[B]=true

Which version of Tigase HTTP API are you using?

Added by Serhii Administrator over 4 years ago

Configuration for version 1.0.0

Added by raj vasani almost 4 years ago

@Serhii Administrator are you resolved your issue ??

If yes then can share settings that you are applied with your server for enable HTTP API.

I am getting :

2015-04-09 12:29:46.686 [main] MessageRouterConfig.hasClassForServerComponent() WARNING: Can't load component rest: tigase.http.rest.RestMessageReceiver

I am trying to build tigase from eclipse.

I configured my build path with :

  • tigase-http-api-jetty-1.1.0-SNAPSHOT.jar

  • tigase-http-api-1.2.0-SNAPSHOT.jar

My init.properties file look like this :

--cluster-mode = true

config-type = --gen-config-def

--debug = server

--user-db = mysql

--admins = admin@192.168.1.23

--user-db-uri = jdbc:mysql://localhost/tigasedb?user=root&password=

--virt-hosts = 192.168.1.23

--comp-name-4=rest

--comp-class-4=tigase.http.rest.RestMessageReceiver

rest/use-local-server[B]=true

--comp-name-3 = message-archive

--comp-class-3 = tigase.archive.MessageArchiveComponent

--comp-class-2 = tigase.socks5.Socks5ProxyComponent

--comp-name-2 = proxy

--comp-class-1 = tigase.muc.MUCComponent

--comp-name-1 = muc

--sm-plugins = +message-archive-xep-0136

--ssl-container-class=tigase.io.SSLContextContainer

--http/server-class=tigase.http.jetty.JettyStandaloneHttpServer

http/port=8080

--context=/rest

--rest-scripts-dir=/scripts/rest/

Tigase Version : 7.1.0

HTTP API Version : 1.1.0+

Added by raj vasani almost 4 years ago

I solved my issue with new class of HTTP API version 1.1.0.

--comp-name-4=http

--comp-class-4=tigase.http.HttpMessageReceiver

In previous versions of HTTP API it is :

--comp-name-4=rest

--comp-class-4=tigase.http.rest.RestMessageReceiver

    (1-10/10)