1 Reply Latest reply on Sep 15, 2008 11:12 AM by Peter Johnson

    application works with jboss 4.2 and doesn't work with 4.3

    H. Hecate Newbie

      My application have worked correctly with JBoss 4.2. Once I tried to run my application with JBoss 4.3, I got a lot of exceptions:

      java -cp $CLASSPATH:$HOME/log4j-1.2.13.jar com.telcordia.xsm.jmslistener.ServerApp


      here are the exceptions:

      Creating conenction to JMS ...
      log4j:ERROR Error while activating options for appender named [DefaultAppender].
      java.lang.NullPointerException
       at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1392)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:596)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
       at javax.naming.InitialContext.lookup(InitialContext.java:351)
       at org.apache.log4j.net.JMSAppender.lookup(Unknown Source)
       at org.apache.log4j.net.JMSAppender.activateOptions(Unknown Source)
       at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
       at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132)
       at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
       at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)
       at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
       at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
       at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
       at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441)
       at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:468)
       at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
       at org.jboss.logging.Log4jLoggerPlugin.init(Log4jLoggerPlugin.java:63)
       at org.jboss.logging.Logger.getDelegatePlugin(Logger.java:338)
       at org.jboss.logging.Logger.<init>(Logger.java:96)
       at org.jboss.logging.Logger.getLogger(Logger.java:309)
       at org.jnp.interfaces.NamingContext.<clinit>(NamingContext.java:158)
       at org.jnp.interfaces.NamingContextFactory.getInitialContext(NamingContextFactory.java:56)
       at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
       at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
       at javax.naming.InitialContext.init(InitialContext.java:223)
       at javax.naming.InitialContext.<init>(InitialContext.java:175)
       at com.telcordia.xsm.jmslistener.SynchronousServer.createTopicSubscriber(SynchronousServer.java:70)
       at com.telcordia.xsm.jmslistener.SynchronousServer.receiveMessages(SynchronousServer.java:45)
       at com.telcordia.xsm.jmslistener.SynchronousServer.run(SynchronousServer.java:40)
       at java.lang.Thread.run(Thread.java:595)
      


      Here are *.properties files from the client side:
      log4j.properties:
      log4j.rootLogger=INFO, DefaultAppender
      log4j.appender.DefaultAppender=org.apache.log4j.net.JMSAppender
      
      log4j.appender.DefaultAppender.TopicConnectionFactoryBindingName=systempilot/jms/topic/connection-factory
      log4j.appender.DefaultAppender.TopicBindingName=systempilot/jms/topic/log4jtopic
      
      log4j.appender.DefaultAppender.layout=org.apache.log4j.PatternLayout
      log4j.appender.DefaultAppender.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
      


      jndi.properties:
      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.provider.url=jnp://<my ip address>:1099
      


      jmslistener.properties:
      connectionfactory.jndi.name=ConnectionFactory
      topic.log4jtopic=topic/systemPilotTopic
      
      reinit.timeout=30000
      jms.receive.timeout=1000
      


      So, the *.properties files are the same as in previous release. On a server side in JBoss 4.2 I had the following my own tag:
      D:\jboss-4.2.2\server\default\deploy\jms\jbossmq-destinations-service.xml
       <mbean code="org.jboss.mq.server.jmx.Topic" name="jboss.mq.destination:service=Topic,name=systemPilotTopic">
       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
       </mbean>
      


      But in JBoss 4.3 the tag was changed and file name and path to xml file was changed too:
      D:\jboss-eap-4.3\jboss-as\server\production\deploy\jboss-messaging.sar\destinations-service.xml

      <mbean code="org.jboss.jms.server.destination.TopicService"
       name="jboss.messaging.destination:service=Topic,name=systemPilotTopic"
       xmbean-dd="xmdesc/Topic-xmbean.xml">
       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
       <depends>jboss.messaging:service=PostOffice</depends>
       </mbean>


      As I suspect, I modified destinations-service.xml file in 4.3 incorrectly or didn't update something "DefaultAppender"-related on a client side (may be, syntax for .properties files was changed in 4.3?)

      Please, advice, how to investigate this issue. Are there any documents described difference between JBoss-es 4.3 and 4.2?

      Do you need more info?

      thanks