You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by javed khan <ja...@gmail.com> on 2018/05/29 19:29:34 UTC

log4j error

Hello

I have installed and importe Jena 2.10. When I run my program, it gives me
the error:
WARN No appenders could be found for logger
(com.hp.hpl.jena.sparql.mgt.ARQMgt).
log4j:WARN Please initialize the log4j system properly.

I have included the "properties" file with the following code, but still it
gives me the error.

log4j.rootLogger=INFO, stdout

# Direct log messages to stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p
%c{1}:%L - %m%n

Re: log4j error

Posted by Andy Seaborne <an...@apache.org>.
Use -Dlog4j.configuration

On 29/05/18 22:26, javed khan wrote:
> By import I mean include the file.
> 
> I have included the file with the following code:
> 
> log4j.rootLogger=INFO, stdlog
> ## log4j.rootLogger=INFO, FusekiFileLog
> 
> log4j.appender.stdlog=org.apache.log4j.ConsoleAppender
> ## log4j.appender.stdlog.target=System.err
> log4j.appender.stdlog.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdlog.layout.ConversionPattern=%d{HH:mm:ss} %-5p %-20c{1}
> :: %m%n
> 
> ## # Example for file logging.
> ## log4j.appender.FusekiFileLog=org.apache.log4j.DailyRollingFileAppender
> ## log4j.appender.FusekiFileLog.DatePattern='.'yyyy-MM-dd
> ## log4j.appender.FusekiFileLog.File=fuseki-log
> ## log4j.appender.FusekiFileLog.layout=org.apache.log4j.PatternLayout
> ## log4j.appender.FusekiFileLog.layout.ConversionPattern=%d{HH:mm:ss} %-5p
> %-20c{1} :: %m%n
> 
> # Jetty - Fuseki catches Jetty errors and reports them.
> log4j.logger.org.eclipse.jetty=FATAL
> 
> # Execution logging
> log4j.logger.com.hp.hpl.jena.arq.info=INFO
> log4j.logger.com.hp.hpl.jena.arq.exec=INFO
> 
> # TDB loader
> log4j.logger.com.hp.hpl.jena.tdb.loader=INFO
> # TDB syslog.
> log4j.logger.TDB=INFO
> 
> # Everything else in Jena
> log4j.logger.com.hp.hpl.jena=WARN
> log4j.logger.org.openjena=WARN
> log4j.logger.org.openjena.riot=INFO
> 
> # Fuseki
> # Server log.
> log4j.logger.org.openjena.fuseki.Server=INFO
> # Request log.
> log4j.logger.org.openjena.fuseki.Fuseki=INFO
> # Internal logs
> log4j.logger.org.openjena.fuseki=INFO
> 
> 
> 
> 
> On Tue, May 29, 2018 at 11:14 PM, Andy Seaborne <an...@apache.org> wrote:
> 
>>
>> Log4j initializes very early (use -Dlog4j.debug).
>>
>> It must be initialised before calling any Jena code except Log.setLog4j
>> (and that looks for file "log4j.properties", nothing else).
>>
>> Use -Dlog4j.configuration
>>
>> (Jena 2.10 is 5 years old)
>>
>>      Andy
>>
>> On 29/05/18 22:07, javed khan wrote:
>>
>>> I have already imported Jena-4jlog.properties, but still it gives the
>>> error.
>>>
>>                            ^^^^^^^^^^^^^^^^^^^^^
>> What does "import" mean?
>> What's that?
>>
>>
>>
>>>
>>>
>>> On Tue, May 29, 2018 at 9:56 PM, Andy Seaborne <an...@apache.org> wrote:
>>>
>>>
>>>>
>>>> On 29/05/18 20:29, javed khan wrote:
>>>>
>>>> Hello
>>>>>
>>>>> I have installed and importe Jena 2.10. When I run my program, it gives
>>>>> me
>>>>> the error:
>>>>> WARN No appenders could be found for logger
>>>>> (com.hp.hpl.jena.sparql.mgt.ARQMgt).
>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>
>>>>> I have included the "properties" file with the following code, but still
>>>>> it
>>>>> gives me the error.
>>>>>
>>>>>
>>>> The message means log4j1 can't find a logging setup.
>>>>
>>>> Add the appropriate "-Dlog4j.configuration=file:..."  to the java
>>>> invocation.
>>>>
>>>> Add "-Dlog4j.debug" to debug.
>>>>
>>>> See the log4j documentation.
>>>>
>>>>       Andy
>>>>
>>>>
>>>>
>>>> log4j.rootLogger=INFO, stdout
>>>>>
>>>>> # Direct log messages to stdout
>>>>> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>>>>> log4j.appender.stdout.Target=System.out
>>>>> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>>>>> log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}
>>>>> %-5p
>>>>> %c{1}:%L - %m%n
>>>>>
>>>>>
>>>>>
>>>
> 

Re: log4j error

Posted by javed khan <ja...@gmail.com>.
By import I mean include the file.

I have included the file with the following code:

log4j.rootLogger=INFO, stdlog
## log4j.rootLogger=INFO, FusekiFileLog

log4j.appender.stdlog=org.apache.log4j.ConsoleAppender
## log4j.appender.stdlog.target=System.err
log4j.appender.stdlog.layout=org.apache.log4j.PatternLayout
log4j.appender.stdlog.layout.ConversionPattern=%d{HH:mm:ss} %-5p %-20c{1}
:: %m%n

## # Example for file logging.
## log4j.appender.FusekiFileLog=org.apache.log4j.DailyRollingFileAppender
## log4j.appender.FusekiFileLog.DatePattern='.'yyyy-MM-dd
## log4j.appender.FusekiFileLog.File=fuseki-log
## log4j.appender.FusekiFileLog.layout=org.apache.log4j.PatternLayout
## log4j.appender.FusekiFileLog.layout.ConversionPattern=%d{HH:mm:ss} %-5p
%-20c{1} :: %m%n

# Jetty - Fuseki catches Jetty errors and reports them.
log4j.logger.org.eclipse.jetty=FATAL

# Execution logging
log4j.logger.com.hp.hpl.jena.arq.info=INFO
log4j.logger.com.hp.hpl.jena.arq.exec=INFO

# TDB loader
log4j.logger.com.hp.hpl.jena.tdb.loader=INFO
# TDB syslog.
log4j.logger.TDB=INFO

# Everything else in Jena
log4j.logger.com.hp.hpl.jena=WARN
log4j.logger.org.openjena=WARN
log4j.logger.org.openjena.riot=INFO

# Fuseki
# Server log.
log4j.logger.org.openjena.fuseki.Server=INFO
# Request log.
log4j.logger.org.openjena.fuseki.Fuseki=INFO
# Internal logs
log4j.logger.org.openjena.fuseki=INFO




On Tue, May 29, 2018 at 11:14 PM, Andy Seaborne <an...@apache.org> wrote:

>
> Log4j initializes very early (use -Dlog4j.debug).
>
> It must be initialised before calling any Jena code except Log.setLog4j
> (and that looks for file "log4j.properties", nothing else).
>
> Use -Dlog4j.configuration
>
> (Jena 2.10 is 5 years old)
>
>     Andy
>
> On 29/05/18 22:07, javed khan wrote:
>
>> I have already imported Jena-4jlog.properties, but still it gives the
>> error.
>>
>                           ^^^^^^^^^^^^^^^^^^^^^
> What does "import" mean?
> What's that?
>
>
>
>>
>>
>> On Tue, May 29, 2018 at 9:56 PM, Andy Seaborne <an...@apache.org> wrote:
>>
>>
>>>
>>> On 29/05/18 20:29, javed khan wrote:
>>>
>>> Hello
>>>>
>>>> I have installed and importe Jena 2.10. When I run my program, it gives
>>>> me
>>>> the error:
>>>> WARN No appenders could be found for logger
>>>> (com.hp.hpl.jena.sparql.mgt.ARQMgt).
>>>> log4j:WARN Please initialize the log4j system properly.
>>>>
>>>> I have included the "properties" file with the following code, but still
>>>> it
>>>> gives me the error.
>>>>
>>>>
>>> The message means log4j1 can't find a logging setup.
>>>
>>> Add the appropriate "-Dlog4j.configuration=file:..."  to the java
>>> invocation.
>>>
>>> Add "-Dlog4j.debug" to debug.
>>>
>>> See the log4j documentation.
>>>
>>>      Andy
>>>
>>>
>>>
>>> log4j.rootLogger=INFO, stdout
>>>>
>>>> # Direct log messages to stdout
>>>> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>>>> log4j.appender.stdout.Target=System.out
>>>> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>>>> log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}
>>>> %-5p
>>>> %c{1}:%L - %m%n
>>>>
>>>>
>>>>
>>

Re: log4j error

Posted by Andy Seaborne <an...@apache.org>.
Log4j initializes very early (use -Dlog4j.debug).

It must be initialised before calling any Jena code except Log.setLog4j 
(and that looks for file "log4j.properties", nothing else).

Use -Dlog4j.configuration

(Jena 2.10 is 5 years old)

     Andy

On 29/05/18 22:07, javed khan wrote:
> I have already imported Jena-4jlog.properties, but still it gives the error.
                           ^^^^^^^^^^^^^^^^^^^^^
What does "import" mean?
What's that?

> 
> 
> 
> On Tue, May 29, 2018 at 9:56 PM, Andy Seaborne <an...@apache.org> wrote:
> 
>>
>>
>> On 29/05/18 20:29, javed khan wrote:
>>
>>> Hello
>>>
>>> I have installed and importe Jena 2.10. When I run my program, it gives me
>>> the error:
>>> WARN No appenders could be found for logger
>>> (com.hp.hpl.jena.sparql.mgt.ARQMgt).
>>> log4j:WARN Please initialize the log4j system properly.
>>>
>>> I have included the "properties" file with the following code, but still
>>> it
>>> gives me the error.
>>>
>>
>> The message means log4j1 can't find a logging setup.
>>
>> Add the appropriate "-Dlog4j.configuration=file:..."  to the java
>> invocation.
>>
>> Add "-Dlog4j.debug" to debug.
>>
>> See the log4j documentation.
>>
>>      Andy
>>
>>
>>
>>> log4j.rootLogger=INFO, stdout
>>>
>>> # Direct log messages to stdout
>>> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>>> log4j.appender.stdout.Target=System.out
>>> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>>> log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}
>>> %-5p
>>> %c{1}:%L - %m%n
>>>
>>>
> 

Re: log4j error

Posted by javed khan <ja...@gmail.com>.
I have already imported Jena-4jlog.properties, but still it gives the error.



On Tue, May 29, 2018 at 9:56 PM, Andy Seaborne <an...@apache.org> wrote:

>
>
> On 29/05/18 20:29, javed khan wrote:
>
>> Hello
>>
>> I have installed and importe Jena 2.10. When I run my program, it gives me
>> the error:
>> WARN No appenders could be found for logger
>> (com.hp.hpl.jena.sparql.mgt.ARQMgt).
>> log4j:WARN Please initialize the log4j system properly.
>>
>> I have included the "properties" file with the following code, but still
>> it
>> gives me the error.
>>
>
> The message means log4j1 can't find a logging setup.
>
> Add the appropriate "-Dlog4j.configuration=file:..."  to the java
> invocation.
>
> Add "-Dlog4j.debug" to debug.
>
> See the log4j documentation.
>
>     Andy
>
>
>
>> log4j.rootLogger=INFO, stdout
>>
>> # Direct log messages to stdout
>> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>> log4j.appender.stdout.Target=System.out
>> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>> log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}
>> %-5p
>> %c{1}:%L - %m%n
>>
>>

Re: log4j error

Posted by Andy Seaborne <an...@apache.org>.

On 29/05/18 20:29, javed khan wrote:
> Hello
> 
> I have installed and importe Jena 2.10. When I run my program, it gives me
> the error:
> WARN No appenders could be found for logger
> (com.hp.hpl.jena.sparql.mgt.ARQMgt).
> log4j:WARN Please initialize the log4j system properly.
> 
> I have included the "properties" file with the following code, but still it
> gives me the error.

The message means log4j1 can't find a logging setup.

Add the appropriate "-Dlog4j.configuration=file:..."  to the java 
invocation.

Add "-Dlog4j.debug" to debug.

See the log4j documentation.

     Andy

> 
> log4j.rootLogger=INFO, stdout
> 
> # Direct log messages to stdout
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.Target=System.out
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p
> %c{1}:%L - %m%n
>