Howdy,
And the class with the initial context factory implementation
(com.ibm...) is in your WEB-INF/lib?  Along with log4j?

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Sabitha [mailto:[EMAIL PROTECTED]
>Sent: Thursday, December 18, 2003 9:50 AM
>To: Log4J Users List
>Subject: RE: JMSQueueAppender and Tomcat 4.1
>
>Thank you for the response.
>I am constructing the initial context factory as you suggest - using
the
>hastable. Both this and the provider URL are specified in the log4j
file
>for the JMSQueueAppender.
>
>     ht.put(Context.INITIAL_CONTEXT_FACTORY, initialContextFactory);
>     ht.put(Context.PROVIDER_URL, providerUrl);
>
>     return (new InitialContext(ht));
>
>Here is my log4j config:
>
> <appender name="JMSPTOP" class="appenders.JMSQueueAppender">
>  <param name="InitialContextFactory"
>value="com.ibm.websphere.naming.WsnInitialContextFactory" />
>  <param name="ProviderUrl" value="iiop://linudia3:2011" />
>  <param name="QueueConnectionFactoryBindingName" value="QCF_YBR"/>
>        <param name="QueueBindingName" value="YBR_Activity_Q5"/>
>  <layout class="org.apache.log4j.PatternLayout">
>            <param name="ConversionPattern" value="%m"/>
>        </layout>
> </appender>
>
>I have included the IBM jars in my Web-inf/lib directory.
>
>Sabitha
>
>"Shapira, Yoav" <[EMAIL PROTECTED]> wrote:
>
>Howdy,
>Make sure your initial context factory implementation is in
WEB-INF/lib,
>and that you construct an initial context with the environment
parameter
>(hashtable), not just new InitialContext(). In that environment,
>specify the factory class name and server JNDI URL. When you don't,
>you're using tomcat's default JNDI initial context factory
>implementation which can't talk to your IBM server. If you do the
>above, you'll be able to run with the Sun JDK (or any other). I suggest
>you read the JNDI documentation.
>
>Yoav Shapira
>Millennium ChemInformatics
>
>
>>-----Original Message-----
>>From: Sabitha [mailto:[EMAIL PROTECTED]
>>Sent: Wednesday, December 17, 2003 6:58 PM
>>To: [EMAIL PROTECTED]
>>Subject: JMSQueueAppender and Tomcat 4.1
>>
>>I am using the JMSQueueAppender (from the contributions) in a webapp
>that
>>is deployed on Tomcat 4.1 using Sun's jdk 1.4. When I try to write to
>this
>>appender, I get the following exception:
>>
>>log4j:ERROR Could not get initial context with
>>[com.ibm.websphere.naming.WsnInitialContextFactory] and
>>[iiop://linudia3:2011].
>>
>>log4j:ERROR Error while activating options for appender named
>[JMSPTOP].
>>
>>javax.naming.ServiceUnavailableException: NULL returned when resolving
>>initial reference=NameService
>>
>>From researching on the web, I found out that I may have to use IBM's
>JDK
>>to get this to work. And sure enough when I change Tomcat settings to
>use
>>the IBM JDK , it works. Does anyone know if there is a workaround for
>this
>>because the we need to use the Sun jdk?
>>
>>Thanks..Sabitha
>>
>>
>>
>>
>>
>>---------------------------------
>>Do you Yahoo!?
>>New Yahoo! Photos - easier uploading and sharing
>
>
>
>This e-mail, including any attachments, is a confidential business
>communication, and may contain information that is confidential,
>proprietary and/or privileged. This e-mail is intended only for the
>individual(s) to whom it is addressed, and may not be saved, copied,
>printed, disclosed or used by anyone else. If you are not the(an)
intended
>recipient, please immediately delete this e-mail from your computer
system
>and notify the sender. Thank you.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>---------------------------------
>Do you Yahoo!?
>New Yahoo! Photos - easier uploading and sharing



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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

Reply via email to