K
karen
I am using CustomSQLDBReceiver with chainsaw. When chainsaw is
launched,
I am getting a null pointer exception. Any thoughts on what the issue
might be?
I have included my configuration file below.
The execution of the job threw an exception
java.lang.NullPointerException
at org.apache.log4j.CategoryKey.<init>(CategoryKey.java:30)
at org.apache.log4j.Hierarchy.getLogger(Hierarchy.java:483)
at org.apache.log4j.Hierarchy.getLogger(Hierarchy.java:465)
at org.apache.log4j.LogManager.getLogger(LogManager.java:256)
at org.apache.log4j.Logger.getLogger(Logger.java:64)
at
org.apache.log4j.db.CustomSQLDBReceiver$CustomReceiverJob.execute(CustomSQLDBReceiver.java:326)
at
org.apache.log4j.scheduler.Scheduler.executeInABox(Scheduler.java:195)
at org.apache.log4j.scheduler.Scheduler.run(Scheduler.java:173)
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration >
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<plugin name="MyCustomDBReceiver"
class="org.apache.log4j.db.CustomSQLDBReceiver">
<connectionSource
class="org.apache.log4j.db.DriverManagerConnectionSource">
<param name="driverClass"
value="oracle.jdbc.driver.OracleDriver"/>
<param name="password" value="pass"/>
<param name="user" value="user"/>
<param name="url"
value="jdbcracle:thinserver:1521:servicename"/>
</connectionSource>
<param name="IDField" value="log_id"/>
<param name="refreshMillis" value="3000"/>
<param name="sql" value="SELECT line as LINE, application as
APPLICATION, log_level as "LEVEL", message as MESSAGE,
hostname
as HOSTNAME, src_file as "FILE", stack as THREAD, log_time as
TIMESTAMP, '' AS NDC, '' AS MDC, '' AS CLASS, '' AS METHOD,
CONCAT('{{USERID,'||USER_ID||',log4jid,'||log_id||'}}','') AS
PROPERTIES,
'' AS EXCEPTION, '' AS LOGGER from bu_log"/>
</plugin>
<root>
<level value="debug"/>
</root>
</log4j:configuration>
launched,
I am getting a null pointer exception. Any thoughts on what the issue
might be?
I have included my configuration file below.
The execution of the job threw an exception
java.lang.NullPointerException
at org.apache.log4j.CategoryKey.<init>(CategoryKey.java:30)
at org.apache.log4j.Hierarchy.getLogger(Hierarchy.java:483)
at org.apache.log4j.Hierarchy.getLogger(Hierarchy.java:465)
at org.apache.log4j.LogManager.getLogger(LogManager.java:256)
at org.apache.log4j.Logger.getLogger(Logger.java:64)
at
org.apache.log4j.db.CustomSQLDBReceiver$CustomReceiverJob.execute(CustomSQLDBReceiver.java:326)
at
org.apache.log4j.scheduler.Scheduler.executeInABox(Scheduler.java:195)
at org.apache.log4j.scheduler.Scheduler.run(Scheduler.java:173)
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration >
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<plugin name="MyCustomDBReceiver"
class="org.apache.log4j.db.CustomSQLDBReceiver">
<connectionSource
class="org.apache.log4j.db.DriverManagerConnectionSource">
<param name="driverClass"
value="oracle.jdbc.driver.OracleDriver"/>
<param name="password" value="pass"/>
<param name="user" value="user"/>
<param name="url"
value="jdbcracle:thinserver:1521:servicename"/>
</connectionSource>
<param name="IDField" value="log_id"/>
<param name="refreshMillis" value="3000"/>
<param name="sql" value="SELECT line as LINE, application as
APPLICATION, log_level as "LEVEL", message as MESSAGE,
hostname
as HOSTNAME, src_file as "FILE", stack as THREAD, log_time as
TIMESTAMP, '' AS NDC, '' AS MDC, '' AS CLASS, '' AS METHOD,
CONCAT('{{USERID,'||USER_ID||',log4jid,'||log_id||'}}','') AS
PROPERTIES,
'' AS EXCEPTION, '' AS LOGGER from bu_log"/>
</plugin>
<root>
<level value="debug"/>
</root>
</log4j:configuration>