• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMS InitialContext Error

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hie Experts,

I get the error:

log4j:ERROR Error while activating options for appender named [JMS1].
java.lang.NullPointerException
at javax.naming.InitialContext.getURLScheme(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.apache.log4j.net.JMSAppender.lookup(Unknown Source)

The steps that I took are:

1. I configured and installed OpenJMS on the server. Server running.
2. Next in my log4.properties file - I have:

log4j.rootLogger=INFO, JMS1
log4j.appender.JMS1=org.apache.log4j.net.JMSAppender
log4j.appender.JMS1.InitialContextFactoryName=org.exolab.jms.jndi.InitialContextFactory
log4j.appender.JMS1.ProviderURL=rmi://localhost:1099
#log4j.appender.JMS1.TopicBindingName=testtopic
#log4j.appender.JMS1.TopicConnectionFactoryBindingName=JmsTopicConnectionFactory

I do not know if I do need the TopicBindingName and TopicConnectionFactoryBindingName?

Could this be the reason that I am getting the error?

Thanks,

Vishal Chitkara
 
Vishal Kumar
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Further to my post above -

1. I am not setting up a TopicBindingName and TopicConnectionFactoryBindingName. Do I need to ?

2. I think that the OpenJMS server needs to be up at all times ?

3. Since I am calling logger like :
static Logger logger = Logger.getLogger(RulesFiredLogger.class);
---
logger.info("send this to JMS Queue");

How will it know what queue to send to?

Thanks Folks !!
 
Legend has it that if you rub the right tiny ad, a genie comes out.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic