[erlang-questions] probelm between java and erlang nodes

Pablo Álvarez Yáñez <>
Fri Oct 27 13:15:22 CEST 2006


Hello,
I need to call java functions from an erlang program. I have seen the
examples into the IC lib directory (lib/ic-4.2.11), but if I execute
an erlang node calling the java node (or vice versa) I get the
following error:

----> In the java server:

Initialization exception :
java.io.IOException: expected 2 bytes, got EOF after 0 bytes
        at com.ericsson.otp.erlang.AbstractConnection.readSock(AbstractConnection.java
:861)
        at com.ericsson.otp.erlang.AbstractConnection.read2BytePackage(AbstractConnection.java:1037)
        at com.ericsson.otp.erlang.AbstractConnection.recvChallengeReply(AbstractConnection.java:1186)
        at  com.ericsson.otp.erlang.AbstractConnection.doAccept(AbstractConnection.java:875)
        at com.ericsson.otp.erlang.AbstractConnection.<init>(AbstractConnection.java:153)
        at com.ericsson.otp.erlang.OtpConnection .<init>(OtpConnection.java:63)
        at com.ericsson.otp.erlang.OtpSelf.accept(OtpSelf.java:177)
        at server.main(server.java:39)

-----> In the erlang client

()1> client:call().
Init...ok
** exited: {{},
            {gen_server,call,
                        [{},
                         rmod_random_produce,
                         infinity]}} **

=ERROR REPORT==== 26-Oct-2006::20:02:42 ===
Error in process <0.41.0> on node '' with exit value:
{badarg,[{erlang,list_to_existing_atom,[""]},{dist_util,recv_challenge,1},{dist_util,handshake_we_started,1}]}

********************************

However, I can get communication between the java client and server
(and it is supposed that they act as erlang nodes). I think it is some
problem with the type conversion. I am using the Erlang last release
(R11B-1).
Does anybody know something about it, or how to solve the problem?

Thanks

-- 
Pablo Álvarez Yáñez
http://azulneon.blogsome.com




More information about the erlang-questions mailing list