Project

General

Profile

how do I custom my server port of API

liu zeyuan
Added over 4 years ago

*--comp-name-1=rest

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

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

rest/port=8086*

I want to run the api on 8086

and it has this exception:

2014-10-20 16:28:34.497 [main] ConfigRepository.setProperties() WARNING: Items list is not set in the configuration file!!

Jid rest;

*java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer

at tigase.http.HttpServer.setProperties(HttpServer.java:86)*

at tigase.http.HttpServer$setProperties.call(Unknown Source)

at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)

at tigase.http.rest.RestMessageReceiver.setProperties(RestMessageReceiver.groovy:191)

at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:550)

at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:182)

at tigase.conf.Configurator.componentAdded(Configurator.java:50)

at tigase.conf.Configurator.componentAdded(Configurator.java:33)

at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:115)

at tigase.server.MessageRouter.addComponent(MessageRouter.java:118)

at tigase.server.MessageRouter.addRouter(MessageRouter.java:155)

at tigase.server.MessageRouter.setProperties(MessageRouter.java:797)

at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:550)

at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:182)

at tigase.conf.Configurator.componentAdded(Configurator.java:50)

at tigase.conf.Configurator.componentAdded(Configurator.java:33)

at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:115)

at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:141)

at tigase.server.MessageRouter.setConfig(MessageRouter.java:696)

at tigase.server.XMPPServer.start(XMPPServer.java:142)

at tigase.server.XMPPServer.main(XMPPServer.java:112)

Loading component: s2s :: componentInfo{Title=Tigase XMPP Server, Version=5.2.2-b3463/285c1771 (2014-09-22/16:41:17), Class=tigase.cluster.S2SConnectionClustered}

Loading plugin: session-close=4 ... , version: 5.2.2-b3463/285c1771 (2014-09-22/16:41:17)

Loading plugin: session-open=4 ... , version: 5.2.2-b3463/285c1771 (2014-09-22/16:41:17)

Loading plugin: default-handler=4 ... , version: 5.2.2-b3463/285c1771 (2014-09-22/16:41:17)

Loading plugin: jabber:iq:register=8 ... , version: 5.2.2-b3463/285c1771 (2014-09-22/16:41:17)

Loading plugin: jabber:iq:auth=8 ... , version: 5.2.2-b3463/285c1771 (2014-09-22/16:41:17)

Loading plugin: urn:ietf:params:xml:ns:xmpp-sasl=8 ... , version: 5.2.2-b3463/285c1771 (2014-09-22/16:41:17)

Loading plugin: urn:ietf:params:xml:ns:xmpp-bind=8 ... , version: 5.2.2-b3463/285c1771 (2014-09-22/16:41:17)

Loading plugin: urn:ietf:params:xml:ns:xmpp-session=8 ... , version: 5.2.2-b3463/285c1771 (2014-09-22/16:41:17)

Loading plugin: jabber:iq:roster=16 ... , version: 5.2.2-b3463/285c1771 (2014-09-22/16:41:17)

Loading plugin: jabber:iq:privacy=8 ... , version: 5.2.2-b3463/285c1771 (2014-09-22/16:41:17)

Loading plugin: jabber:iq:version=8 ... , version: 5.2.2-b3463/285c1771 (2014-09-22/16:41:17)

Loading plugin: http://jabber.org/protocol/stats=8 ... , version: 5.2.2-b3463/285c1771 (2014-09-22/16:41:17)


Replies (2)

Added by Wojciech Kapcia TigaseTeam over 4 years ago

liu zeyuan wrote:

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

rest/port=8086*

All configuration properties in Tigase need to be declared with a type (as above with @use-local-server@), hence the port configuration should look like:

rest/port[I]=8086

Added by liu zeyuan over 4 years ago

thanks it works

    (1-2/2)