log4j WARNINGS affect the cluetered results

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

log4j WARNINGS affect the cluetered results

Gaurang Patel
I am getting following warnings while running clustering example ClusteringDataFromDocumentSources through command line. In the effect, wrong clusters are being formed:

log4j:WARN No appenders could be found for logger (org.carrot2.clustering.lingo.
LingoClusteringAlgorithm).
log4j:WARN Please initialize the log4j system properly.

I used following command to run:

java -classpath C:\DOCUME~1\Gaurang\workspace\org.codehaus.jackson\jackson-0.9.2-patched.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.commons\commons-codec-1.3.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.commons\commons-logging-1.1.1.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.commons\commons-httpclient-3.1.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.commons\commons-lang-2.4.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-util-attribute\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\cern.colt\colt.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-util-matrix\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\carrot2-util-common\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\bak.pcj\pcj.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.lucene\lucene-core-2.4.0.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.lucene\lucene-analyzers-2.4.0.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-util-text\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\org.apache.log4j\log4j-1.2.14.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-algorithm-lingo\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\carrot2-source-google\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\com.google.collections\google-collections.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-examples\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\carrot2-core\tmp\eclipse org.carrot2.examples.clustering.ClusteringDataFromDocumentSources "Sachin Tendulkar"

Can anybody tell me, how to get rid of this warning? Or how can I get correct lingo clustering algo
results inspite of these warnings?

-Gaurang
Reply | Threaded
Open this post in threaded view
|

Re: log4j WARNINGS affect the cluetered results

Stanislaw Osinski
Administrator
Hello,

"Please initialize the log4j system properly" means that you, well, need to configure log4j. You need to include a log4j configuration file in the classpath. An example configuration file for Debug level logging you'll find here:

http://fisheye3.atlassian.com/browse/carrot2/trunk/core/carrot2-util-log4j/src/log4j.xml?r=trunk (please note it includes other files)

In general, if you Google for "Please initialize the log4j system properly", you'll find lots of advice on how to configure log4j.

Cheers,

S.

On Tue, Nov 17, 2009 at 02:31, Gaurang Patel <[hidden email]> wrote:

I am getting following warnings while running clustering example
ClusteringDataFromDocumentSources through command line. In the effect, wrong
clusters are being formed:

log4j:WARN No appenders could be found for logger
(org.carrot2.clustering.lingo.
LingoClusteringAlgorithm).
log4j:WARN Please initialize the log4j system properly.


I used following command to run:

java -classpath
C:\DOCUME~1\Gaurang\workspace\org.codehaus.jackson\jackson-0.9.2-patched.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.commons\commons-codec-1.3.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.commons\commons-logging-1.1.1.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.commons\commons-httpclient-3.1.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.commons\commons-lang-2.4.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-util-attribute\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\cern.colt\colt.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-util-matrix\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\carrot2-util-common\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\bak.pcj\pcj.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.lucene\lucene-core-2.4.0.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.lucene\lucene-analyzers-2.4.0.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-util-text\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\org.apache.log4j\log4j-1.2.14.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-algorithm-lingo\tmp\eclipse;C:
 \DOCUME~1\Gaurang\workspace\carrot2-source-google\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\com.google.collections\google-collections.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-examples\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\carrot2-core\tmp\eclipse
org.carrot2.examples.clustering.ClusteringDataFromDocumentSources "Sachin
Tendulkar"


Can anybody tell me, how to get rid of this warning? Or how can I get
correct lingo clustering algo
results inspite of these warnings?

-Gaurang
--
View this message in context: http://n2.nabble.com/log4j-WARNINGS-affect-the-cluetered-results-tp4015935p4015935.html
Sent from the Carrot2 Users and Developers Forum mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: log4j WARNINGS affect the cluetered results

Gaurang Patel
Hey, thanks for reply.

I am trying on to initialize log4j properly to get rid of these warnings.

MEANWHILE:

Could this errors be the reason for different clustering results while running the java program using 1) Eclipse and 2) command line?



Let me tell you what I did to run the program through command line:

Initially, I specified classpaths for only two files as seen in the .classpath file from eclipse.

command:
 java -classpath /home/gaurang/workspace/carrot2-examples/tmp/eclipse/:/home/gaurang/workspace/com.google.collections/google-collections.jar:/home/gaurang/workspace/carrot2-component-suites/tmp/eclipse/ org.carrot2.examples.clustering.ClusteringDataFromDocumentSources India

Note: Here 'India' is the argument to the ClusteringDataFromDocumentSources program.

This didn't work. The program was still looking for some more classes(throwing java.lang.NoClassDefFoundError exceotions), which I manually added classpaths for by trial and error. I kept adding each and every file(class/jar files) needed by the program. Following is the final command I stopped at without any error. This command run successfully and gave me clustering results.

java -classpath /home/gaurang/workspace/carrot2-examples/tmp/eclipse/:/home/gaurang/workspace/carrot2-core/tmp/eclipse/:/home/gaurang/workspace/com.google.collections/google-collections.jar:/home/gaurang/workspace/carrot2-source-google/tmp/eclipse/:/home/gaurang/workspace/carrot2-algorithm-lingo/tmp/eclipse/:/home/gaurang/workspace/org.apache.log4j/log4j-1.2.14.jar:/home/gaurang/workspace/carrot2-util-text/tmp/eclipse/:/home/gaurang/workspace/org.apache.lucene/lucene-core-2.4.0.jar:/home/gaurang/workspace/org.apache.lucene/lucene-analyzers-2.4.0.jar:/home/gaurang/workspace/bak.pcj/pcj.jar:/home/gaurang/workspace/carrot2-util-common/tmp/eclipse/:/home/gaurang/workspace/carrot2-util-matrix/tmp/eclipse/:/home/gaurang/workspace/cern.colt/colt.jar:/home/gaurang/workspace/carrot2-util-attribute/tmp/eclipse/:/home/gaurang/workspace/org.apache.commons/commons-lang-2.4.jar:/home/gaurang/workspace/org.apache.commons/commons-io-1.4.jar:/home/gaurang/workspace/org.apache.commons/commons-httpclient-3.1.jar:/home/gaurang/workspace/org.apache.commons/commons-collections-3.1.jar:/home/gaurang/workspace/org.apache.commons/commons-codec-1.3.jar:/home/gaurang/workspace/org.apache.commons/commons-logging-1.1.1.jar:/home/gaurang/workspace/org.codehaus.jackson/jackson-0.9.2-patched.jar org.carrot2.examples.clustering.ClusteringDataFromDocumentSources India

Wierd thing happens now, is that I am getting different clustering results than what I got while running the program in Eclipse.

NOTE: I did not compile the java file and other projects using command line. Instead I am using class/jar files generated by Eclipse only.


Please let me know if I am doing something wrong in running the program through command line.

Thanks & Regards,
Gaurang



Stanislaw Osinski wrote
Hello,

"Please initialize the log4j system properly" means that you, well, need to
configure log4j. You need to include a log4j configuration file in the
classpath. An example configuration file for Debug level logging you'll find
here:

http://fisheye3.atlassian.com/browse/carrot2/trunk/core/carrot2-util-log4j/src/log4j.xml?r=trunk(please
note it includes other files)

In general, if you Google for "Please initialize the log4j system properly",
you'll find lots of advice on how to configure log4j.

Cheers,

S.

On Tue, Nov 17, 2009 at 02:31, Gaurang Patel <gaurangtpatel@gmail.com>wrote:

>
> I am getting following warnings while running clustering example
> ClusteringDataFromDocumentSources through command line. In the effect,
> wrong
> clusters are being formed:
>
> log4j:WARN No appenders could be found for logger
> (org.carrot2.clustering.lingo.
> LingoClusteringAlgorithm).
> log4j:WARN Please initialize the log4j system properly.
>
>
> I used following command to run:
>
> java -classpath
>
> C:\DOCUME~1\Gaurang\workspace\org.codehaus.jackson\jackson-0.9.2-patched.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.commons\commons-codec-1.3.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.commons\commons-logging-1.1.1.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.commons\commons-httpclient-3.1.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.commons\commons-lang-2.4.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-util-attribute\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\cern.colt\colt.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-util-matrix\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\carrot2-util-common\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\bak.pcj\pcj.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.lucene\lucene-core-2.4.0.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.lucene\lucene-analyzers-2.4.0.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-util-text\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\org.apache.log4j\log4j-1.2.14.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-algorithm-lingo\tmp\eclipse;C:
>
>  \DOCUME~1\Gaurang\workspace\carrot2-source-google\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\com.google.collections\google-collections.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-examples\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\carrot2-core\tmp\eclipse
> org.carrot2.examples.clustering.ClusteringDataFromDocumentSources "Sachin
> Tendulkar"
>
>
> Can anybody tell me, how to get rid of this warning? Or how can I get
> correct lingo clustering algo
> results inspite of these warnings?
>
> -Gaurang
> --
> View this message in context:
> http://n2.nabble.com/log4j-WARNINGS-affect-the-cluetered-results-tp4015935p4015935.html
> Sent from the Carrot2 Users and Developers Forum mailing list archive at
> Nabble.com.
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Carrot2-developers mailing list
Carrot2-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: log4j WARNINGS affect the cluetered results

Gaurang Patel
I have been waiting on this. Could anybody reply?

Thanks,
Gaurang


Gaurang Patel wrote
Hey, thanks for reply.

I am trying on to initialize log4j properly to get rid of these warnings.

MEANWHILE:

Could this errors be the reason for different clustering results while running the java program using 1) Eclipse and 2) command line?



Let me tell you what I did to run the program through command line:

Initially, I specified classpaths for only two files as seen in the .classpath file from eclipse.

command:
 java -classpath /home/gaurang/workspace/carrot2-examples/tmp/eclipse/:/home/gaurang/workspace/com.google.collections/google-collections.jar:/home/gaurang/workspace/carrot2-component-suites/tmp/eclipse/ org.carrot2.examples.clustering.ClusteringDataFromDocumentSources India

Note: Here 'India' is the argument to the ClusteringDataFromDocumentSources program.

This didn't work. The program was still looking for some more classes(throwing java.lang.NoClassDefFoundError exceotions), which I manually added classpaths for by trial and error. I kept adding each and every file(class/jar files) needed by the program. Following is the final command I stopped at without any error. This command run successfully and gave me clustering results.

java -classpath /home/gaurang/workspace/carrot2-examples/tmp/eclipse/:/home/gaurang/workspace/carrot2-core/tmp/eclipse/:/home/gaurang/workspace/com.google.collections/google-collections.jar:/home/gaurang/workspace/carrot2-source-google/tmp/eclipse/:/home/gaurang/workspace/carrot2-algorithm-lingo/tmp/eclipse/:/home/gaurang/workspace/org.apache.log4j/log4j-1.2.14.jar:/home/gaurang/workspace/carrot2-util-text/tmp/eclipse/:/home/gaurang/workspace/org.apache.lucene/lucene-core-2.4.0.jar:/home/gaurang/workspace/org.apache.lucene/lucene-analyzers-2.4.0.jar:/home/gaurang/workspace/bak.pcj/pcj.jar:/home/gaurang/workspace/carrot2-util-common/tmp/eclipse/:/home/gaurang/workspace/carrot2-util-matrix/tmp/eclipse/:/home/gaurang/workspace/cern.colt/colt.jar:/home/gaurang/workspace/carrot2-util-attribute/tmp/eclipse/:/home/gaurang/workspace/org.apache.commons/commons-lang-2.4.jar:/home/gaurang/workspace/org.apache.commons/commons-io-1.4.jar:/home/gaurang/workspace/org.apache.commons/commons-httpclient-3.1.jar:/home/gaurang/workspace/org.apache.commons/commons-collections-3.1.jar:/home/gaurang/workspace/org.apache.commons/commons-codec-1.3.jar:/home/gaurang/workspace/org.apache.commons/commons-logging-1.1.1.jar:/home/gaurang/workspace/org.codehaus.jackson/jackson-0.9.2-patched.jar org.carrot2.examples.clustering.ClusteringDataFromDocumentSources India

Wierd thing happens now, is that I am getting different clustering results than what I got while running the program in Eclipse.

NOTE: I did not compile the java file and other projects using command line. Instead I am using class/jar files generated by Eclipse only.


Please let me know if I am doing something wrong in running the program through command line.

Thanks & Regards,
Gaurang



Stanislaw Osinski wrote
Hello,

"Please initialize the log4j system properly" means that you, well, need to
configure log4j. You need to include a log4j configuration file in the
classpath. An example configuration file for Debug level logging you'll find
here:

http://fisheye3.atlassian.com/browse/carrot2/trunk/core/carrot2-util-log4j/src/log4j.xml?r=trunk(please
note it includes other files)

In general, if you Google for "Please initialize the log4j system properly",
you'll find lots of advice on how to configure log4j.

Cheers,

S.

On Tue, Nov 17, 2009 at 02:31, Gaurang Patel <gaurangtpatel@gmail.com>wrote:

>
> I am getting following warnings while running clustering example
> ClusteringDataFromDocumentSources through command line. In the effect,
> wrong
> clusters are being formed:
>
> log4j:WARN No appenders could be found for logger
> (org.carrot2.clustering.lingo.
> LingoClusteringAlgorithm).
> log4j:WARN Please initialize the log4j system properly.
>
>
> I used following command to run:
>
> java -classpath
>
> C:\DOCUME~1\Gaurang\workspace\org.codehaus.jackson\jackson-0.9.2-patched.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.commons\commons-codec-1.3.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.commons\commons-logging-1.1.1.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.commons\commons-httpclient-3.1.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.commons\commons-lang-2.4.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-util-attribute\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\cern.colt\colt.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-util-matrix\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\carrot2-util-common\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\bak.pcj\pcj.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.lucene\lucene-core-2.4.0.jar;C:\DOCUME~1\Gaurang\workspace\org.apache.lucene\lucene-analyzers-2.4.0.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-util-text\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\org.apache.log4j\log4j-1.2.14.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-algorithm-lingo\tmp\eclipse;C:
>
>  \DOCUME~1\Gaurang\workspace\carrot2-source-google\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\com.google.collections\google-collections.jar;C:\DOCUME~1\Gaurang\workspace\carrot2-examples\tmp\eclipse;C:\DOCUME~1\Gaurang\workspace\carrot2-core\tmp\eclipse
> org.carrot2.examples.clustering.ClusteringDataFromDocumentSources "Sachin
> Tendulkar"
>
>
> Can anybody tell me, how to get rid of this warning? Or how can I get
> correct lingo clustering algo
> results inspite of these warnings?
>
> -Gaurang
> --
> View this message in context:
> http://n2.nabble.com/log4j-WARNINGS-affect-the-cluetered-results-tp4015935p4015935.html
> Sent from the Carrot2 Users and Developers Forum mailing list archive at
> Nabble.com.
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Carrot2-developers mailing list
Carrot2-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: log4j WARNINGS affect the cluetered results

Dawid Weiss-2
> I have been waiting on this. Could anybody reply?

Perhaps nobody has anything to say about it... I don't know why you're
getting different results. They should be identical or
nearly-identical. Some differences may exist due to different rounding
of numbers during processing (depending on whether the JIT compiled
the code to native code or if the code executes in interpreted mode),
but they should not be noticeable.

Dawid

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers