FATAL EXCEPTION: Socket-Worker-Thread (#14)
Unknown opened 4 years ago
2020-12-02 20:26:51.289 4243-4378/com.xxxx.xxxx I/AccountCreator: Event: class tigase.jaxmpp.core.client.Connector$StateChangedHandler$StateChangedEvent
2020-12-02 20:26:51.289 4243-4378/com.xxxx.xxxx D/se.eventbus.ThreadSafeEventBus: Calling handler class class tigase.jaxmpp.core.client.JaxmppCore$5 with event class tigase.jaxmpp.core.client.Connector$StreamTerminatedHandler$StreamTerminatedEvent
2020-12-02 20:26:51.290 4243-4378/com.xxxx.xxxx D/se.eventbus.ThreadSafeEventBus: Calling handler class class tigase.jaxmpp.core.client.xmpp.modules.StreamFeaturesModule$3 with event class tigase.jaxmpp.core.client.Connector$StreamTerminatedHandler$StreamTerminatedEvent
    
    --------- beginning of crash
2020-12-02 20:26:51.291 4243-4424/com.xxxx.xxxx E/AndroidRuntime: FATAL EXCEPTION: Socket-Worker-Thread
    Process: com.xxxx.xxxx, PID: 4243
    java.lang.NoSuchMethodError: No virtual method position(I)Ljava/nio/ByteBuffer; in class Ljava/nio/ByteBuffer; or its super classes (declaration of 'java.nio.ByteBuffer' appears in /system/framework/core-oj.jar)
        at tigase.jaxmpp.j2se.connectors.socket.TextStreamReader.read(TextStreamReader.java:56)
        at tigase.jaxmpp.j2se.connectors.socket.Worker.run(Worker.java:113)
Unknown commented 4 years ago

Method position(I)Ljava/nio/ByteBuffer; in class Ljava/nio/ByteBuffer; comes from java.nio.Buffer and it is there (in the Java VM (JDK,JRE) for a very long time.

Most likely the issue is caused by Java 9 (or newer) used for building your application for Android (import restrictions created by Java modules) or by Android not providing method which should be there (as it is in the JVM).

What is the target version of your project? Java 9 or newer? Do you use Java modules? (or Java modules enabled project) Which version of Android SDK are you targeting?

Unknown commented 4 years ago

@hantu85 thank you for your reply. We are using java 1.8.0_242 (built in with android studio) as a targetCompatibility and sourceCompatibility in android gradle. As well as java enabled modules are there using same 1.8 java version. targetSdkVersion 29 for android.

Unknown commented 4 years ago

I recompiled everything with Java8 (1.8.0_265) and I added cast to Buffer in problematic place. I also reproduced your error during compilation: when I compiled code using Java 11 and then I switched sdk to 1.8.0 and tried compiling again without cleaning the project.

wojciech.kapcia@tigase.net added "Related" #9 5 months ago
issue 1 of 1
Issue Votes (0)
Watchers (2)
Reference
tigase/_libraries/jaxmpp#14
Please wait...
Page is in error, reload to recover