Hi, My question is a very basic one. I've written a small testservlet to access environment variables. This works quite happily in Websphere 4.0 when I add an Environment Entry when assembling the application. The problem is that I don't know how to simulate this in WTE running in VAJ 4.0? I've seen various posts that talk about a properties file called ivj.servlet.properties in the c:\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment folder. I've tried this but haven't managed to get it working. What format should the data in this file take? An extract of the Jave code I'm using is as follows:-
When the servlet runs in WTE I get the following message in the console:- Exception : javax.naming.CommunicationException [Root exception is org.omg.CORBA.COMM_FAILURE: minor code: 3 completed: No] This is happening when trying to perform the 'new javax.naming.InitialContext();' Thanks in advance for any help you might be able to offer. Can you please reply in plain english rather than tech jargon as my Java/VAJ knowledge is limited at the moment. Andee [ January 23, 2002: Message edited by: Andee Weir ] [ January 23, 2002: Message edited by: Andee Weir ]
Hi Andee, I don't know if the following information will be of use to you. In section 220.127.116.11 of the InfoCenter docs v4("Troubleshooting guide for the J2EE application client")it gives an explanation and possible cause for the error. It's more specific to running the launchClient tool though. I also received the error message before when I was obtaining an InitialContext - executing a java class with a main method. The reason was because I was doing this on another computer. When I did the same thing, on the computer where WebSphere was installed, there was no problems. Vinnie.
Not sure if this helps a bit it almost looks like you are trying to do a JNDI lookup. Have you looked at the options on WTE for persistent name server and DataSource Configuration ? Just a thought but i might be way offbase.
posted 18 years ago
Thanks for the replies guys. As well as posting here I also emailed some other contacts who suggested that VAJ 4.0 runs Websphere 3.5.3 (certainly true!) which does not support the use of java:comp context yet - presumably Websphere 4.0 does, which is why works there. So going back to my original problem - I don't want to hardcode some values in code as those values may change for each use of that class between different applications. I need a way to tell an Application (by Application I mean a WAR/EAR) what it's specific values to use are. I've seen a number of posts around the place talking about Property Files but has anyone got a small example servlet they could share with me which can be run in VAJ WTE 3.5.3? Thanks in advance, Andee.