initializing the log4j system properly

69 views
Skip to first unread message

alison

unread,
Dec 14, 2015, 4:24:59 PM12/14/15
to kamanja
Hi,

When I run the following command:

$ kamanja upload compile config

Using default configuration /usr/local/Cellar/kamanja/1.2/config/MetadataAPIConfig.properties

 WARN [main] - DATABASE_SCHEMA remains unset

 WARN [main] - DATABASE_LOCATION remains unset

 WARN [main] - DATABASE_HOST remains unset

 WARN [main] - ADAPTER_SPECIFIC_CONFIG remains unset

 WARN [main] - SSL_PASSWD remains unset

 WARN [main] - AUDIT_PARMS remains unset

 WARN [main] - DATABASE remains unset

log4j:WARN No appenders could be found for logger (org.apache.curator.framework.imps.CuratorFrameworkImpl).

log4j:WARN Please initialize the log4j system properly.

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.


Pick a Config Definition file(s) from below choices


[1]/usr/local/Cellar/kamanja/1.2/config/ClusterConfig.json

[2]/usr/local/Cellar/kamanja/1.2/config/COPDRiskAssessmentCompileCfg.json

[3]/usr/local/Cellar/kamanja/1.2/config/LBCompileCfg_Finance.json

[4]/usr/local/Cellar/kamanja/1.2/config/Model_Config_HelloWorld.json

[5]/usr/local/Cellar/kamanja/1.2/config/SubscriberUsageAlertCompileCfg_Telecom.json


Enter your choice(If more than 1 choice, please use commas to seperate them): 


What do I do about:


log4j:WARN No appenders could be found for logger (org.apache.curator.framework.imps.CuratorFrameworkImpl).

log4j:WARN Please initialize the log4j system properly.

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.


?


How do I initialize the log4j system properly?

I wasn't getting this warning when I used Kamanja v1.1.

thanks,

alison

William Tarver

unread,
Dec 14, 2015, 4:30:33 PM12/14/15
to Alison Apel, kamanja
Hey Alison,

That message is a result of our change from log4j to log4j2. That error is actually coming from external components that we rely on. I believe something is happening with the CuratorFramework’s logging. Since we aren’t providing a configuration file it seems it is failing to initialize its logger. it doesn’t really hurt anything but I’ll take a look to see if there’s a change that can be made to quell that message.

-William
--
You received this message because you are subscribed to the Google Groups "kamanja" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kamanja+u...@ligadata.com.
To post to this group, send email to kam...@ligadata.com.
Visit this group at https://groups.google.com/a/ligadata.com/group/kamanja/.

Alison Apel

unread,
Dec 14, 2015, 4:32:24 PM12/14/15
to kamanja
Then when I run:

$ bash PushSampleDataToKafka_HelloWorld.sh 

ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.

log4j:WARN No appenders could be found for logger (kafka.utils.VerifiableProperties).

log4j:WARN Please initialize the log4j system properly.

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

SLF4J: Defaulting to no-operation (NOP) logger implementation

SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Tid: 0, Time:  12971154ms, Lines:      51, Read:           2755, Sent:           2755, Last, file:/usr/local/Cellar/kamanja/1.2/input/SampleApplications/data/Input_Data_HelloWorld.csv.gz

00. File:/usr/local/Cellar/kamanja/1.2/input/SampleApplications/data/Input_Data_HelloWorld.csv.gz ElapsedTime:50.00ms

Done. ElapsedTime:308.83ms



So, I'm definitely missing some steps regarding log4j. Can someone help?
thanks,
alison

--

William Tarver

unread,
Dec 14, 2015, 4:39:41 PM12/14/15
to Alison Apel, kamanja
In the case of the script, and SimpleKafkaProducer, there is neither a log4j2 file being included in the fat jar (there isn’t one in source for this project) nor is the script indicating a log4j2 file to use. We can simply update the script and add a basic log4j2 file in source.

Sreenivasulu Pokuri

unread,
Dec 14, 2015, 4:48:01 PM12/14/15
to William Tarver, Alison Apel, kamanja

I always prefer to use external file instead of putting any log4j properties/xml file in project resources

Krishna Uppala

unread,
Dec 14, 2015, 4:54:18 PM12/14/15
to Sreenivasulu Pokuri, William Tarver, kamanja, Alison Apel

Let's stick with one policy across all components - external files should be preferred as they can be changed dynamically.

Alison Apel

unread,
Dec 14, 2015, 5:46:24 PM12/14/15
to Krishna Uppala, Sreenivasulu Pokuri, William Tarver, kamanja
Please let me know the steps to set up an external file.

Alison Apel

unread,
Dec 14, 2015, 6:11:56 PM12/14/15
to Krishna Uppala, Sreenivasulu Pokuri, William Tarver, kamanja
That is, which directory do I change to? What do I type on the command-line?
Reply all
Reply to author
Forward
0 new messages