[jboss-user] [Management, JMX/JBoss] - JBoss Logging

div_gcet1 do-not-reply at jboss.com
Wed Jan 21 04:34:01 EST 2009


Hi

   Here i m working on JBoss 4.2.2 and eclipse Gynemade. I m instantiating 
a java file at the time when jboss configure log4j.xml.  I had given its entry
in log4j.xml. Now my problem is that file have to access the database which
are bound to perticuler JNDI names. And JNDI service  starts after the log4j
configure. So a null pointer exception is coming at the time server configure 
log4j, due to that java file. Can Anyone help me here.  I m sending the change in log4j.xml that exception detail


  | <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
  |       <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
  |       <param name="File" value="${jboss.server.log.dir}/server.log"/>
  |       <param name="Append" value="false"/>
  | 
  |       <!-- Rollover at midnight each day -->
  |       <param name="DatePattern" value="'.'yyyy-MM-dd"/>
  | 
  |       <!-- Rollover at the top of each hour
  |       <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
  |       -->
  | 
  |       <layout class="org.apache.log4j.PatternLayout">
  |          <!-- The default pattern: Date Priority [Category] Message\n -->
  |          <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
  | 
  |          <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
  |          <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
  |           -->
  |       </layout>
  |    </appender>
  | <appender name ="FILE1" class="org.apache.log4j.FileAppender">
  |         <param name="File" value="${jboss.server.log.dir}/server1.log" />
  |         <param name="Append" value="false" />
  |         <layout class="org.apache.log4j.PatternLayout">
  |             <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
  |      
  |  </layout>
  |  <filter class="com.propco.tools.mergemanager.profiles.Domfilter"/>
  | 
  | 
  | 
[img]http://img223.imageshack.us/my.php?image=95972212vg1.png[/img]

Please zoom in the image as the image is a little out of focus.
Sorry for the inconvenience.

Thanks
Divya Garg

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203533#4203533

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203533



More information about the jboss-user mailing list