rocks.xmpp.core.XmppException: javax.xml.stream.XMLStreamException
Babbler: 0.5.0 JDK: /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk
OUT: <?xml version='1.0' encoding='UTF-8'?><stream:stream xml:lang="en" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams"><?xml version='1.0' encoding='UTF-8'?><stream:stream xml:lang="en" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
IN : <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="chat" id="53f4cb76" xml:lang="en" version="1.0"><stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/></stream:features><?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="chat" id="53f4cb76" xml:lang="en" version="1.0"><stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/></stream:features>
OUT: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">ADEzMjU5ODUwADxWRU5UVVJFPmJvdGVtYW5pYTwvVkVOVFVSRT48VE9LRU4gVFlQRT0iMSI+PFBVQkxJQz48TUVNQkVSLUlEPjEzMjU5ODUwPC9NRU1CRVItSUQ+PE5BTUU+Y3BnYW1pbmc8L05BTUU+PEVYUElSWS1EQVRFPjE0MjcxMjg3ODYzOTk8L0VYUElSWS1EQVRFPjwvUFVCTElDPjxDSVBIRVItVEVYVD5NTllJZXVnYkd1SjdWMXpxOW5NbTgySlRsbWlTc3dKTTRESDJZZmcrL1ZwMmVqUUEwS05PNm1iVUJvK2ZzdTZybWZDYzZCWDdtNyt0b2dFRzRiQUZzUzFRZ0Z3cWQ4bWRZZFN2MFo5Z2RsK2lEdjlNK3ZwNlpkY1ZiMXJVYnQ2Wm8xQWxRblVwTWN5SlBQSURPZWZLWjEvdWo4RHN2RnRaSmpjN3BGSFF4V284SGhVWUkxV2JFbld3UCtkOU9LZytpM0lrTHFoUEJiOGJ0V3MzRUdVT2NIT3VvYVR6VllUaGZZL21Fa1JjZFFjPTwvQ0lQSEVSLVRFWFQ+PC9UT0tFTj4=</auth><auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">ADEzMjU5ODUwADxWRU5UVVJFPmJvdGVtYW5pYTwvVkVOVFVSRT48VE9LRU4gVFlQRT0iMSI+PFBVQkxJQz48TUVNQkVSLUlEPjEzMjU5ODUwPC9NRU1CRVItSUQ+PE5BTUU+Y3BnYW1pbmc8L05BTUU+PEVYUElSWS1EQVRFPjE0MjcxMjg3ODYzOTk8L0VYUElSWS1EQVRFPjwvUFVCTElDPjxDSVBIRVItVEVYVD5NTllJZXVnYkd1SjdWMXpxOW5NbTgySlRsbWlTc3dKTTRESDJZZmcrL1ZwMmVqUUEwS05PNm1iVUJvK2ZzdTZybWZDYzZCWDdtNyt0b2dFRzRiQUZzUzFRZ0Z3cWQ4bWRZZFN2MFo5Z2RsK2lEdjlNK3ZwNlpkY1ZiMXJVYnQ2Wm8xQWxRblVwTWN5SlBQSURPZWZLWjEvdWo4RHN2RnRaSmpjN3BGSFF4V284SGhVWUkxV2JFbld3UCtkOU9LZytpM0lrTHFoUEJiOGJ0V3MzRUdVT2NIT3VvYVR6VllUaGZZL21Fa1JjZFFjPTwvQ0lQSEVSLVRFWFQ+PC9UT0tFTj4=</auth>
IN :
rocks.xmpp.core.XmppException: javax.xml.stream.XMLStreamException: Can not output XML declaration, after other output has already been done. at rocks.xmpp.core.session.XmppSession.throwAsXmppExceptionIfNotNull(XmppSession.java:324) at rocks.xmpp.core.session.XmppSession.loginInternal(XmppSession.java:1101) at rocks.xmpp.core.session.XmppSession.login(XmppSession.java:1052) at rocks.xmpp.core.session.XmppSession.login(XmppSession.java:1020) at rocks.xmpp.core.session.XmppSession.login(XmppSession.java:998) at rocks.xmpp.core.session.XmppSession.login(XmppSession.java:981) at gamesys.qa.coreplatform.Test.test(Test.java:53) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) Caused by: javax.xml.stream.XMLStreamException: Can not output XML declaration, after other output has already been done. at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1473) at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1502) at com.ctc.wstx.sw.BaseStreamWriter.doWriteStartDocument(BaseStreamWriter.java:699) at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:687) at rocks.xmpp.core.session.XmppStreamWriter$3.run(XmppStreamWriter.java:190) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
Exception in thread "XMPP Writer Thread" java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView; at rocks.xmpp.core.subscription.PresenceManager$3.sessionStatusChanged(PresenceManager.java:108) at rocks.xmpp.core.session.XmppSession.notifySessionStatusListeners(XmppSession.java:1488) at rocks.xmpp.core.session.XmppSession.updateStatus(XmppSession.java:1479) at rocks.xmpp.core.session.XmppSession.notifyException(XmppSession.java:1320) at rocks.xmpp.core.session.XmppStreamWriter.notifyException(XmppStreamWriter.java:267) at rocks.xmpp.core.session.XmppStreamWriter.access$200(XmppStreamWriter.java:54) at rocks.xmpp.core.session.XmppStreamWriter$3.run(XmppStreamWriter.java:210) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
Process finished with exit code 255
Comments (8)
-
repo owner -
repo owner Yes, that's the reason. Just found out, that having woodstox in the classpath is troublesome, because it uses this implementation then. http://stackoverflow.com/a/5478101/2907078 I am afraid, such a scenario hasn't been tested and is therefore unsupported currently. Still wondering about the keySet error. Is it gone now, too?
-
repo owner The missing debugger entries were fixed with 955723e138b92fcafe14a237ffe3a421ade38c47
The duplicate debugger outputs (e.g. 2 <auth/>) were fixed with ae7ed09f52e47a3bc2d2c6406d3e14a38554edce
And the actual Woodstox issue ("Can not output XML declaration, after other output has already been done") have been fixed with: 33035bf832455718ab11323d9d7478858fb23f46
With Woodstox 4.4.1 on the classpath it works now.
Do you know what about the java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet() ???
-
repo owner Ok. It's some cross compilation issue (I compiled with Java 8): https://gist.github.com/AlainODea/1375759b8720a3f9f094
If you can use JDK 8, it should work fine. If not, you can compile it yourself with JDK 7 or try version 0.5.1-SNAPSHOT which I uploaded to the downloads section.
-
repo owner - changed status to resolved
-
repo owner - changed version to 0.6.0
-
I found this thread via Google. I also had a java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet(). My stack trace (not the OP's) is shown below. Not to open this issue again, just to note that I also had the mysterious NoSuchMethodError even though I compiled with Java 7 and run using Java 7.
INFO | jvm 1 | 2015/06/16 03:01:11 | Exception in thread "XMPP Reader Thread" java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView; INFO | jvm 1 | 2015/06/16 03:01:11 | at rocks.xmpp.core.subscription.PresenceManager$3.sessionStatusChanged(PresenceManager.java:108) INFO | jvm 1 | 2015/06/16 03:01:11 | at rocks.xmpp.core.session.XmppSession.notifySessionStatusListeners(XmppSession.java:1488) INFO | jvm 1 | 2015/06/16 03:01:11 | at rocks.xmpp.core.session.XmppSession.updateStatus(XmppSession.java:1479) INFO | jvm 1 | 2015/06/16 03:01:11 | at rocks.xmpp.core.session.XmppSession.notifyException(XmppSession.java:1320) INFO | jvm 1 | 2015/06/16 03:01:11 | at rocks.xmpp.core.session.XmppStreamReader$1.run(XmppStreamReader.java:174) INFO | jvm 1 | 2015/06/16 03:01:11 | at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) INFO | jvm 1 | 2015/06/16 03:01:11 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) INFO | jvm 1 | 2015/06/16 03:01:11 | at java.lang.Thread.run(Unknown Source)
-
repo owner - changed status to closed
- Log in to comment
Thanks, I can try to look into it. In your stacktrace there are a few strange issues, that caught my attention:
it tries (internally) to reference $KeySetView which is only available since JDK 1.8. I don't know why it does that (because you use JDK 7). Babbler only invokes ConcurrentHashMap.keySet(). Strange...