Bug 35481 - NullPointerException for logger in JDBCStore rev. 1.24
Summary: NullPointerException for logger in JDBCStore rev. 1.24
Status: NEW
Alias: None
Product: Slide
Classification: Unclassified
Component: Stores (show other bugs)
Version: Nightly
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Slide Developer List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-23 14:55 UTC by Tomasz Majchrzak
Modified: 2005-06-23 06:55 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Majchrzak 2005-06-23 14:55:17 UTC
For JDBCStore rev. 1.23 it is working fine. 
I found that Log4jLogger class doesn't set 
level for newly created logger. 
I'm working with PostgreSQL. I'm using log4j
for logging purposes:

log4j.rootLogger=INFO,A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender

My Domain.xml contains:

<slide logger="log4j.Log4jLogger" logger-level="6">

If I set it simply to <slide>, it works fine. 
For J2EEStore it is ok in both cases.

My stack trace:

23 Jun 2005 14:17:45 - org.apache.slide.common.Domain - INFO - Auto-Initializing
Domain
23 Jun 2005 14:17:45 - org.apache.slide.common.Domain - INFO - Configuration
found in classpath
23 Jun 2005 14:17:45 - org.apache.slide.common.Domain - INFO - Domain
configuration : {org.apache.slide.lock=true,
org.apache.slide.versioncontrol=true, org.apache.slide.debug=true,
org.apache.slide.search=true, org.apache.slide.security=true,
org.apache.slide.urlEncoding=UTF-8,
org.apache.slide.domain=/home/tomek/workspace/SlideTestClient/Domain.xml}
2005-06-23 14:17:46,687 INFO  org.apache.slide.common.Domain  Initializing Domain
2005-06-23 14:17:47,314 INFO  org.apache.slide.common.Domain  Domain
configuration : {org.apache.slide.lock=true,
org.apache.slide.versioncontrol=true, org.apache.slide.debug=true,
org.apache.slide.search=true, org.apache.slide.security=true,
org.apache.slide.urlEncoding=UTF-8,
org.apache.slide.domain=/home/tomek/workspace/SlideTestClient/Domain.xml}
2005-06-23 14:17:47,317 INFO  org.apache.slide.common.Domain  Domain parameters:
{logger-level=6, versioncontrol-exclude=, auto-version=checkout-checkin,
historypath=/history, checkin-fork=forbidden,
workingresourcepath=/workingresource, workspacepath=/workspace, default=slide,
auto-version-control=true, logger=log4j.Log4jLogger, checkout-fork=forbidden}
2005-06-23 14:17:47,318 INFO  org.apache.slide.common.Domain  Initializing
namespace : slide
2005-06-23 14:17:47,357 WARN  org.apache.slide.common.Domain  Loading of
create_store_listener class failed: org.apache.slide.webdav.util.UriHandler
2005-06-23 14:17:47,364 INFO  org.apache.slide.common.Namespace  Loading
namespace slide parameters
2005-06-23 14:17:47,456 INFO  org.apache.slide.common.Namespace  Loading
namespace definition
2005-06-23 14:17:47,539 INFO  org.apache.slide.common.Namespace  nodestore:
org.apache.slide.store.impl.rdbms.JDBCStore
2005-06-23 14:17:47,603 WARN 
org.apache.slide.store.impl.rdbms.AbstractRDBMSStore  The maxPooledConnections
configuration attribute is deprecated, please use dbcp.maxActive instead.
2005-06-23 14:17:47,647 INFO 
org.apache.slide.store.impl.rdbms.AbstractRDBMSStore  Loading and registering
driver 'org.postgresql.Driver'
2005-06-23 14:17:47,660 INFO 
org.apache.slide.store.impl.rdbms.AbstractRDBMSStore  Using DBCP pooling
2005-06-23 14:17:47,661 INFO  org.apache.slide.common.Namespace  securitystore
references nodestore
2005-06-23 14:17:47,661 INFO  org.apache.slide.common.Namespace  lockstore
references nodestore
2005-06-23 14:17:47,662 INFO  org.apache.slide.common.Namespace 
revisiondescriptorsstore references nodestore
2005-06-23 14:17:47,662 INFO  org.apache.slide.common.Namespace 
revisiondescriptorstore references nodestore
2005-06-23 14:17:47,663 INFO  org.apache.slide.common.Namespace  contentstore:
org.apache.slide.store.txfile.TxFileContentStore
2005-06-23 14:17:47,795 INFO  file-content-store  File Store configured to
/home/tomek/slide/data/store/content, working directory
/home/tomek/slide/data/work/content
2005-06-23 14:17:47,796 INFO  file-content-store  Set timeout to 120
2005-06-23 14:17:47,824 INFO  org.apache.slide.common.Namespace 
propertiesindexer: org.apache.slide.index.lucene.LucenePropertiesIndexer
2005-06-23 14:17:47,863 INFO  org.apache.slide.common.Namespace  contentindexer:
org.apache.slide.index.lucene.LuceneContentIndexer
2005-06-23 14:17:47,869 INFO  org.apache.slide.common.Namespace  sequencestore
references nodestore
2005-06-23 14:17:47,873 INFO  org.apache.slide.util.logger  Disabling cache
timeout for store DgaArchive
2005-06-23 14:17:47,874 INFO  org.apache.slide.util.logger  Setting object cache
size for store DgaArchive to 10000
2005-06-23 14:17:47,895 INFO  org.apache.slide.store.ExtendedStore  Setting
permission cache size for store DgaArchive to 10000
2005-06-23 14:17:47,898 INFO  org.apache.slide.store.ExtendedStore  Setting lock
cache size for store DgaArchive to 10000
2005-06-23 14:17:47,899 INFO  org.apache.slide.store.ExtendedStore  Setting
descriptors cache size for store DgaArchive to 10000
2005-06-23 14:17:47,899 INFO  org.apache.slide.store.ExtendedStore  Setting
descriptor cache size for store DgaArchive to 10000
2005-06-23 14:17:47,900 INFO  org.apache.slide.store.ExtendedStore  Setting
content caching for store DgaArchive to false
2005-06-23 14:17:47,901 INFO  org.apache.slide.store.ExtendedStore  Setting
content cache size for store DgaArchive to 10000
2005-06-23 14:17:47,902 INFO  org.apache.slide.store.ExtendedStore  Setting
content cache byte size for store DgaArchive to 10000000
2005-06-23 14:17:47,903 INFO  org.apache.slide.store.ExtendedStore  Setting
transaction content cache size for store DgaArchive to 1000
2005-06-23 14:17:47,903 INFO  org.apache.slide.store.ExtendedStore  Setting
transaction content cache byte size for store DgaArchive to 1000000
2005-06-23 14:17:47,904 INFO  org.apache.slide.store.ExtendedStore  Setting
maximum byte size for content cache entry for store DgaArchive to 50000
2005-06-23 14:17:47,905 INFO  org.apache.slide.store.ExtendedStore  Enabling
full caching causing low isolation
2005-06-23 14:17:47,933 INFO  org.apache.slide.common.Namespace  Registering
Store DgaArchive (class org.apache.slide.store.ExtendedStore) with parameters {}
on scope /
2005-06-23 14:17:47,960 INFO  org.apache.slide.common.Namespace  Initializing
Store DgaArchive(org.apache.slide.store.ExtendedStore)
2005-06-23 14:17:48,099 WARN  org.apache.slide.common.Domain  Loading of
redirector class failed: org.apache.slide.webdav.util.DeltavUriRedirector
2005-06-23 14:17:48,474 INFO  org.apache.slide.index.lucene.LuceneContentIndexer
 using analyzer: org.apache.lucene.analysis.SimpleAnalyzer
2005-06-23 14:17:48,493 INFO  org.apache.slide.common.Namespace  Loading
namespace slide base data
2005-06-23 14:17:49,554 ERROR org.apache.slide.common.Namespace  Unable to read
Namespace base configuration file : 
2005-06-23 14:17:49,559 ERROR org.apache.slide.common.Namespace 
java.lang.NullPointerExceptionjava.lang.NullPointerException
	at log4j.Log4jLogger.fromLevel(Log4jLogger.java:230)
	at log4j.Log4jLogger.getLoggerLevel(Log4jLogger.java:81)
	at
org.apache.slide.store.impl.rdbms.JDBCStore.logConnectionPoolStatistics(JDBCStore.java:464)
	at org.apache.slide.store.impl.rdbms.JDBCStore.connect(JDBCStore.java:333)
	at
org.apache.slide.common.AbstractXAServiceBase.connect(AbstractXAServiceBase.java:130)
	at org.apache.slide.store.AbstractStore.connect(AbstractStore.java:222)
	at
org.apache.slide.common.AbstractServiceBase.connectIfNeeded(AbstractServiceBase.java:192)
	at org.apache.slide.common.Namespace.connectService(Namespace.java:576)
	at org.apache.slide.common.Namespace.retrieveStore(Namespace.java:675)
	at org.apache.slide.common.Uri.parseUri(Uri.java:348)
	at org.apache.slide.common.Uri.<init>(Uri.java:67)
	at org.apache.slide.common.Namespace.getUri(Namespace.java:724)
	at org.apache.slide.common.Namespace.getUri(Namespace.java:704)
	at org.apache.slide.common.Namespace.loadBaseData(Namespace.java:835)
	at org.apache.slide.common.Domain.initNamespace(Domain.java:883)
	at org.apache.slide.common.Domain.init(Domain.java:462)
	at org.apache.slide.common.Domain.selfInit(Domain.java:816)
	at org.apache.slide.common.Domain.getDefaultNamespace(Domain.java:222)
	at my.app.SlideVersionsTest.<init>(SlideVersionsTest.java:56)
	at my.app.SlideVersionsTest.main(SlideVersionsTest.java:482)
2005-06-23 14:17:49,567 INFO  org.apache.slide.common.Namespace  Loading
namespace slide configuration
2005-06-23 14:17:49,601 ERROR org.apache.slide.common.Domain 
java.lang.NullPointerException
java.lang.NullPointerException
	at log4j.Log4jLogger.fromLevel(Log4jLogger.java:230)
	at log4j.Log4jLogger.getLoggerLevel(Log4jLogger.java:81)
	at
org.apache.slide.store.impl.rdbms.JDBCStore.logConnectionPoolStatistics(JDBCStore.java:464)
	at org.apache.slide.store.impl.rdbms.JDBCStore.connect(JDBCStore.java:333)
	at
org.apache.slide.common.AbstractXAServiceBase.connect(AbstractXAServiceBase.java:130)
	at org.apache.slide.store.AbstractStore.connect(AbstractStore.java:222)
	at
org.apache.slide.common.AbstractServiceBase.connectIfNeeded(AbstractServiceBase.java:192)
	at org.apache.slide.common.Namespace.connectService(Namespace.java:576)
	at org.apache.slide.common.Namespace.retrieveStore(Namespace.java:675)
	at org.apache.slide.common.Uri.parseUri(Uri.java:346)
	at org.apache.slide.common.Uri.<init>(Uri.java:67)
	at org.apache.slide.common.Namespace.getUri(Namespace.java:724)
	at org.apache.slide.common.Namespace.getUri(Namespace.java:704)
	at org.apache.slide.common.Namespace.getUri(Namespace.java:692)
	at org.apache.slide.common.NamespaceConfig.getActionNode(NamespaceConfig.java:1052)
	at
org.apache.slide.common.NamespaceConfig.getConfiguredNode(NamespaceConfig.java:801)
	at
org.apache.slide.common.NamespaceConfig.initializeNamespaceConfig(NamespaceConfig.java:671)
	at org.apache.slide.common.Namespace.loadConfiguration(Namespace.java:906)
	at org.apache.slide.common.Domain.initNamespace(Domain.java:888)
	at org.apache.slide.common.Domain.init(Domain.java:462)
	at org.apache.slide.common.Domain.selfInit(Domain.java:816)
	at org.apache.slide.common.Domain.getDefaultNamespace(Domain.java:222)
	at my.app.SlideVersionsTest.<init>(SlideVersionsTest.java:56)
	at my.app.SlideVersionsTest.main(SlideVersionsTest.java:482)
2005-06-23 14:17:49,604 INFO  org.apache.slide.common.Domain  Domain
initialization complete
Exception in thread "main" java.lang.NullPointerException
	at org.apache.slide.common.NamespaceConfig.getParameter(NamespaceConfig.java:568)
	at
org.apache.slide.util.NamespaceConfigUtil.getSecurityImplementation(NamespaceConfigUtil.java:70)
	at
org.apache.slide.common.NamespaceAccessTokenImpl.<init>(NamespaceAccessTokenImpl.java:76)
	at org.apache.slide.common.Domain.accessNamespace(Domain.java:252)
	at my.app.SlideVersionsTest.<init>(SlideVersionsTest.java:56)
	at my.app.SlideVersionsTest.main(SlideVersionsTest.java:482)