• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

exception while trying to get the context...

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I tried to run the following code from the command line using "java" on the same machine on which the weblogic is running. But, I got the following Exception.

Does anyone have a solution for this??
CODE :
import java.util.*;
import javax.naming.*;
import javax.naming.directory.*;
import javax.sql.*;
import java.sql.*;
public class WlcTest
{
public static void main(String[] args)
{
try {

Hashtable properties = new Hashtable();
properties.put(Context.INITIAL_CONTEXT_FACTORY,
weblogic.jndi.WLInitialContextFactory.class.getName());

properties.put(Context.PROVIDER_URL, "t3://servername:7001");
Context context = new InitialContext(properties);
}catch(Exception e) {
}
}
}
Exception :
java.io.StreamCorruptedException: Type code out of range, is 0
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Exception.java:42)
at java.io.IOException.<init>(IOException.java:47)
at java.io.ObjectStreamException.<init>(ObjectStreamException.java:29)
at java.io.StreamCorruptedException.<init>(StreamCorruptedException.java
:30)
at java.io.ObjectInputStream.peekCode(Compiled Code)
at java.io.ObjectInputStream.SkipToEndOfBlockData(Compiled Code)
at java.io.ObjectInputStream.inputClassDescriptor(Compiled Code)
at java.io.ObjectInputStream.readObject(Compiled Code)
at java.io.ObjectInputStream.readObject(Compiled Code)
at java.io.ObjectInputStream.inputObject(Compiled Code)
at java.io.ObjectInputStream.readObject(Compiled Code)
at java.io.ObjectInputStream.readObject(Compiled Code)
at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedO
bjectInputStream.java:110)
at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedO
bjectInputStream.java:123)
at weblogic.rjvm.ConnectionManager.readPeerInfo(ConnectionManager.java:6
83)
at weblogic.rjvm.ConnectionManagerClient.handleIdentifyResponse(Connecti
onManagerClient.java:140)
at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:624)
at weblogic.rjvm.t3.T3JVMConnection.dispatch(Compiled Code)
at weblogic.socket.JavaSocketMuxer.processSockets2(Compiled Code)
at weblogic.socket.JavaSocketMuxer.processSockets(Compiled Code)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(Compiled Code)
--------------- nested within: ------------------
weblogic.utils.AssertionError: ***** ASSERTION FAILED ***** - with nested except
ion:
[java.io.StreamCorruptedException: Type code out of range, is 0]
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Error.<init>(Error.java:50)
at weblogic.utils.NestedError.<init>(NestedError.java:24)
at weblogic.utils.AssertionError.<init>(AssertionError.java:56)
at weblogic.rjvm.ConnectionManager.readPeerInfo(ConnectionManager.java:6
85)
at weblogic.rjvm.ConnectionManagerClient.handleIdentifyResponse(Connecti
onManagerClient.java:140)
at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:624)
at weblogic.rjvm.t3.T3JVMConnection.dispatch(Compiled Code)
at weblogic.socket.JavaSocketMuxer.processSockets2(Compiled Code)
at weblogic.socket.JavaSocketMuxer.processSockets(Compiled Code)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(Compiled Code)
CODECODE
 
mainasiris
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the client JVM version was different from the server's. It works fine now.
 
My honeysuckle is blooming this year! Now to fertilize this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic