Sorry for asking this question, as the similar question was posted before! However, as I searched through all the posts regarding the question, I still CANNOT find the solution.
I followed the steps in Chapter 1 for running the AdviceClient example, in the following environment: 1)J2SDK 1.5 2)J2EE SDK 1.4 and Sun Java Application Server v8 3)XP pro
And I was reported the following error:
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial ...
I had tried several suggestions regarding the same problem posted in the forum, none of which is working for me! 1) Provide the interpreter java with j2ee.jar file and other archive files java -cp c:\AppServer\lib\j2ee.jar;AdviceAppClient.jar;. AdviceClient
BTW, I want to tell other persons who may encountered the same problem. If there are more than one jndi.properties files in your classpath, make sure the appserv-rt.jar is put in the first position. Otherwise, other jndi.properties files which might contain "uncorrect" properties will be retrieved instead of the "correct" one.
Before Ash told me, I imported all the jar files from AppServer\lib, and the result is error!!!
[ February 10, 2005: Message edited by: Songxun Lin ]
SCJP 1.4 SCWCD 1.4
Come have lunch with me Arthur. Adventure will follow. This tiny ad: