• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help to fix bug in Weblogic8.1 Server

 
Jothish Justin
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please Help to fix the bug in the weblogic 8.1 server

Server : Weblogic 8.1
JDK version :1.4.1

While I create a new domain and try to bind simple object in the JNDI tree I get the following run time error.

Javax.naming.CommunicationException [ Root exception is java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.io.StreamCorruptedException ]

Source code of programs:

jnditest.java

package com.examples;

import javax.naming.*;
import java.util.*;
import java.io.*;
import weblogic.common.*;
import weblogic.jndi.*;

public class jnditest{

public static void main(String arg[]){
Context ctx=null;
Hashtable ht=new Hashtable();
try{
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,weblogic.jndi.WLInitialContextFactory.class.getName());
ctx = new InitialContext(env);
personone myperson=new personone();
ctx.bind("Person one object",myperson);
}catch(NamingException e){
System.out.println(e);
}
finally{
try{
ctx.close();
}
catch(Exception e){
}
}
}
}

personone.java

package com.examples;

import java.io.*;

public class personone implements Serializable{

String name;
int age;
public personone(){
}
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic