Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with client

 
sreedhar kumar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I deployed Sessionbean on Weblogic successfully...

i have written a small client program for that, whenever i run that one i am getting the fallowing exception...


Client:
--------
import javax.naming.*;
import javax.naming.InitialContext;
import java.util.*;
import javax.rmi.PortableRemoteObject;

public class MyClient
{

public static void main(String[] args) throws Exception
{

try
{


Hashtable h = new Hashtable();
h.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
h.put(Context.PROVIDER_URL,"t3://localhost:7001");
Context ctx = new InitialContext(h);
Object objref = ctx.lookup("myjndi");
MyHome home = (MyHome)PortableRemoteObject.narrow(objref,MyHome.class);
MyRemote rm = home.create();
rm.getName();


}catch(Exception e)
{
System.out.println(e);
}



}
}


Exception:::
------------

C:\nagraj\ejb\sessionBean>java MyClient

Exception in thread "main" java.lang.NoClassDefFoundError: java/lang/AssertionError
at weblogic.security.subject.DelegatingSubjectStack.<clinit>(DelegatingSubjectStack.java:18)
at weblogic.security.service.SubjectManagerImpl.<init>(SubjectManagerImpl.java:40)
at weblogic.security.service.SubjectManagerImpl.ensureInitialized(SubjectManagerImpl.java:277)
at weblogic.jndi.WLInitialContextFactoryDelegate.<clinit>(WLInitialContextFactoryDelegate.java:137)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:131)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at MyClient.main(MyClient.java:26)


I greatly appreciate if I could get help ASAP.
 
Arun
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using jdk 1.4? AssertionError was introduced in 1.4, so if u r trying to run your program with an earlier version of jdk you might get this error.
 
Surya Baabu
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Looks like you are using an earlier version of JDK. From the command window check which version of the JDK is in the the path first and if it is not the latest jdk then either set the path or run the program using the full directory path of jdk for example f:\jdk1.4\bin\MyClient

Surya Baabu
 
Surasak Leenapongpanit
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check your Weblogic version, is it recommended JDK1.4?
 
sreedhar kumar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for response...


i am using j2sdk1.4.0_02...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic