• Post Reply Bookmark Topic Watch Topic
  • New Topic

Prob. in instantiating WLInitialContextFactory

 
ajay gaur
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to All!
I have been deployed a stateless session bean successfully in weblogic5.1. Accessing it through java client its giving error at run time.
caught an exception
javax.naming.NoInitialContextException: Cannot instantiate class:
weblogic.jndi.WlInitialContextFactory
From this its seems that its getting error at runtime even compiling it successfully. Instead of that i set classpath of d:\weblogic\classes dir. where this class file resides, even though it is set also in JAVA_CLASSPATH & WL_CLASSPATH env. variables. After that its giving errror :
Exception in thread "main" java.lang.ClassFormatErrors: TemperatureClient
(Illegal constant pool type)
from this it seems that the Initial Context Factory class file is corrupted some how in weblogic.
Please tell me how i can get out of this problem.
Any reply will be a great help!
Thanks in advance.
Ajay
 
sandy gupta
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well Ajay,
What u can do is get a new implementation of the WLINITIALCONTEXT class i.e. by getting a new Weblogic.jar as the Initial COntext factory of u'rs seems to be corrupted. And if you can do that, that might solve your problem. Or else just get a neew class file for the Weblogic Initial Context Factory and then put it in the class path and then includethe initial context factory path in the Weblogic path
Thanks
Sahil
 
ajay gaur
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I forgot to tell i am using evaluation version of weblogic5.1. I have reinstalled the weblogic again, but facing the same prob.
Tell me what could be the reason.
Thanks for the reply.
Ajay
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ajay gaur,
You may not get appropriate reply to your query over here. We have a forum devoted to WebLogic in our Products section. Try to post your queries in the correct forums for a proper reply.
Thanks.
 
Vivek Viswanathan
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
All that you to do to run u'r client program is include the file
weblogicaux.jar
in u'r classpath ...it should then run ...provided taht you have the necessary remote , and home interface in u'r classpath too
vivek
 
ajay gaur
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Ya weblogicaux.jar is included in the WL_CLASSPATH. & there no point for the remote or home files as i said it is prob. in getting the initial context now. & i think WLInitialContextFactory class is not in weblogicaux.jar file.
Ajay
 
Ganch Meky
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
print the exception stack trace and see. you might not be initializing the environment variables correct before invoking the InitialContext constructor ( the InitialcontextFactory, ProviderURL, Username and Password to connect to the Naming server.)
 
Anjana Rao
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ajay,
all that you have to do is set your classpath to weblogic\classes\..and then execute your code..it will get executed.
cheers,
anjana
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!