Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Ejb error

  Asked By: Jaxson    Date: Feb 02    Category: Java    Views: 800
  

I am a newbie on J2EE ..I have coded a sample code in a book ..As mentioned
in the book :)
But I got a strange error ..its strange be cause I cant find anything about it
on google ..By the is google the right choice for this kind of searching ?

I have an session bean .
I have deployed it on Suns app server that come with j2sdkee1.2.1..

My client app is

import java.util.Hashtable;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;

public class SayacSESClient {

/** Creates a new instance of SayacSESClient */
public SayacSESClient() {
}

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
try {
Hashtable env = new Hashtable();
env.put(InitialContext.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.cosnaming.CNCtxFactory");
env.put(InitialContext.PROVIDER_URL,"iiop://10.0.0.210:1050");

Context initial = new InitialContext(env);
Object objref = initial.lookup("MySayacSES");
SayacSESHome home = (SayacSESHome)PortableRemoteObject.narrow(
objref, SayacSESHome.class);
SayacSES degisken = home.create(800);
System.out.println("A: arttir ula , X: cik ula");

int c;
while ((c = System.in.read()) != 'X' ) {
if (c == 'A') {
degisken.artir();
System.out.println("Sayac Dehiskeni Artirildi:" +
degisken.getDeger());

}
}
} catch (Exception ex) {System.out.println("Hata: "+ex);}

}//main

}



it gives error at line

Object objref = initial.lookup("MySayacSES");

saying that
Hata: org.omg.CORBA.MARSHAL: underflow called with grow strategy vmcid: SUN
minor code: 202 completed: No

I have tried by chaingin MySayacSES to test if it can find the EJB ..The error
messages changes that time saying it cant find that object ..So I understand it
can find my EJB ..

But what does that error means ?

any help should be great for me ..

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Geb Chalthoum     Answered On: Feb 02

error in code
change it
Context initial = new InitialContext(env);
to
InitialContext initial = new InitialContext(env);

 
Didn't find what you were looking for? Find more on Ejb error Or get search suggestion and latest updates.




Tagged: