Hi Folks,

I'm currently writing some JUnit tests for an application that normally runs
under Tomcat 4.1.18. To this end I need to spoof the Context that the tomcat
container uses.

I am using the javaURLContextFactory type when creating an InitialContext
and am getting the following message after performing a lookup:

javax.naming.NameNotFoundException: Name java:comp is not bound in this
Context
        at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
        at javax.naming.InitialContext.lookup(InitialContext.java:347)
        at uk.co.goodtech.cms.unittest.CMSTest.<init>(CMSTest.java:79)

I believe that this error is down to the Context.URL_PKG_PREFIXES not being
set correctly, but I am unable to locate much information about how to do
this (STFW, RTFM + source) and was wondering if anyone had any ideas?

Cheers (and apologies if this is OT)

James

James Lewis
Java Developer
www.goodtechnology.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to