JBoss3.0 JNDI lookup gives unexpected block data ??
dsconnelly May 14, 2002 12:10 PMI am very new to JBoss. I have been running Sun's J2EE RI Rlease 1.3.1.
I am running boss-3.0.0RC2 on Red Hat Linux 7.1 (dual processor PII) and Sun's JDK 1.4.0 for Linux.
JBoss comes up whistle-clean using the jboss_init_redhat.sh script (although I do see why RHL requires a special launch).
When I run a simple client, I will get a strange error on my first attempt to access the JNDI ENC.
Note, I do get the InitialContext OK. I set NameService sysprops on the command line.
But when I do the following lookup
Object env = initial.lookup("java:comp/env");
... then I get:
javax.naming.CommunicationException: unexpected block data. Root exception is java.io.StreamCorruptedException: unexpected block data
I found that when I use telnet to look at port 1099, then I was getting disconnected by the Linux host (explicitly). Same behavior on localhost as from a Solaris machine telneting to the JBoss host.
I changed "jboss-service.xml" so that the Naming Service runs on 1098, and changed the sysprop for the client accordingly. Same result on running the client, but the telnet no longer says disconnected by host (explicitly).
This nameService port change is the ONLY change I have made to the default setup.
The telnet does give me some strange output when I connect to 1098. I believe that this normal, based on FAQ examples. Then the telnet does return to my Linux prompt. In other words, it does disconnect, but it no longer says so for the operation on port 1098. This difference is probably not significant.
I am too new to JBoss to know if the telnet behavior is entirely as expected.
When I check the MBean View for
jboss:service=JNDIViewr
then I do see "env" in the "java:comp" namespace of the MEJB bean, but not in "java:" namespace (of what?) nor the Global JNDI namespace.
My current suspicions are focused on JDK 1.4.0 socket management on RHL, but I have no other indications of problems in this area. (I do not want to have to go back to JDK 1.3.1 if I can avoid it.)
Any other ideas???
Dan Connelly
South Burlington, Vermont