Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

Hostname escaping characters. Bug in ExternalComponent connection?

$
0
0

Hi all

 

I am trying to develop a simple external component but I got stuck with what I suppose is a connection problem. I have a code looking like this:

 

publicclass Main {    publicstaticvoid main(String[] args)    {        ExternalComponentManager mgr = new ExternalComponentManager("myHost-ubuntu", 5276);        mgr.setSecretKey("mysub", "123456");          try        {            mgr.addComponent("simpleservice", new ServiceComponent());        }        catch (ComponentException e)        {            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, "main", e);            System.exit(-1);        }          while (true) {            try{                Thread.sleep(10000);            }catch (Exception e) {                Logger.getLogger(Main.class.getName()).log(Level.SEVERE, "main", e);            }        }    }}

 

And I receive an error:

SEVERE: main

org.xmpp.component.ComponentException: org.xmlpull.v1.XmlPullParserException: expected start tag name and not / (position: START_DOCUMENT seen </... @1:2)

          at org.jivesoftware.whack.ExternalComponent.connect(ExternalComponent.java:248)

          at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentM anager.java:211)

          at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentM anager.java:191)

          at external.component.Main.main(Main.java:21)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:43)

          at java.lang.reflect.Method.invoke(Method.java:606)

          at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

Caused by: org.xmlpull.v1.XmlPullParserException: expected start tag name and not / (position: START_DOCUMENT seen </... @1:2)

          at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1475)

          at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)

          at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)

          at org.jivesoftware.whack.ExternalComponent.connect(ExternalComponent.java:186)

          ... 8 more

 

I suppose that the problem is with my host name as connection might not escape the '-' in my hostname. How can I change a hostname? Or maybe the problem is somewhere else? I tried to manually change my computer hostname by running in terminal "hosname newHostname" command and then restart setup for openfire server but that would not do the trick.

 

I don't care if I could loose any data right now as I have nothing relevant connected to the server.


Viewing all articles
Browse latest Browse all 10742

Trending Articles