-
1. Re: In infinispan-4.1.0.CR3,while starting Hotrod server - Found Log4j initialization errors
galder.zamarreno Aug 30, 2010 12:23 PM (in response to savin7)I don't have a Windows machine around, but works fine on Unix. In startServer.bat, there's a log4.configuration property like:
-Dlog4j.configuration=..\etc\log4j.xml
That should in theory work. Alternatively, try: -Dlog4j.configuration=file:/c:/path/to/log4j.xml
Btw, this is not an error, just a warning
-
2. Re: In infinispan-4.1.0.CR3,while starting Hotrod server - Found Log4j initialization errors
savin7 Sep 9, 2010 7:07 AM (in response to galder.zamarreno)Dear Galder,
Thanks - after modifying "file:/D:/full/path/log4j.xml" in the -Dlog4j.configuration of startServer.bat. It can able to detect the log4j.xml.
I do agree its a warning not a error my apologies for the same.
One small out of box question, Even If I gave the full relative path 'D:/full/path/log4j.xml' without 'file:/', its not able to pick up the log4j.xml file. Any reasons why we have to give file:/ in specific ? If time permits, Kindly let me know ??
Thanks & Regards,
Savin
-
3. Re: In infinispan-4.1.0.CR3,while starting Hotrod server - Found Log4j initialization errors
galder.zamarreno Sep 16, 2010 12:46 PM (in response to savin7)Tbh, I have no idea. I had a note from my Windows days on what logj4.configuration should look like.
Btw, can you try the following? -Dlog4j.configuration=file:/../etc/log4j.xml
-
4. Re: In infinispan-4.1.0.CR3,while starting Hotrod server - Found Log4j initialization errors
savin7 Sep 20, 2010 5:47 AM (in response to galder.zamarreno)Dear Galder,
As you have suggested, I have changed it to -Dlog4j.configuration=file:/../etc/log4j.xml but still it couldn't able to find the file path and results in below exception. For your inference I have pasted the exception below.
D:\Infinispan\infinispan-4.1.0.CR3-all\infinispan-4.1.0.CR3\bin>startServer.bat -l 10.38.54.192 -p 6900 -m 20 -t 20 -c ../etc/config-samples/minimal.xml -r hotrod -i 600
-n true -s 1024000 -e 1024000 -o 10.38.54.192 -x 6900
log4j:ERROR Could not parse url [file:/../etc/log4j.xml].
java.io.FileNotFoundException: \..\etc\log4j.xml (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
at org.apache.log4j.xml.DOMConfigurator$2.parse(DOMConfigurator.java:765)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:866)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:773)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:483)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at org.infinispan.util.logging.Log4JLogImpl.<init>(Log4JLogImpl.java:30)
at org.infinispan.util.logging.LogFactory.getLog(LogFactory.java:33)
at org.infinispan.util.logging.LogFactory.getLog(LogFactory.java:28)
at org.infinispan.util.TypedProperties.<clinit>(TypedProperties.java:28)
at org.infinispan.server.core.Main$.<init>(Main.scala:49)
at org.infinispan.server.core.Main$.<clinit>(Main.scala)
at org.infinispan.server.core.Main.main(Main.scala)
log4j:WARN No appenders could be found for logger (org.infinispan.server.core.Main$).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Thanks & Regards,
Savin
-
5. Re: In infinispan-4.1.0.CR3,while starting Hotrod server - Found Log4j initialization errors
adityalele Jul 19, 2012 4:32 AM (in response to galder.zamarreno)i tried using -Dlog4j.configuration=file:/c:/path/to/log4j.xml by saying i am starting a hotrod server startserver -r hotrod -p 19733 -Dlog4j.configuration=file:/c:/path/to/log4j.xml
the log4j.xml file exists at that path but still i get the
log4j:WARN No appenders could be found for logger (org.infinispan.server.core.Main$).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
message
I cant seem to be able to start a cluster between two servers ... it stops at the above WARN msg in both the servers i run ... i use two different ports
-
6. Re: In infinispan-4.1.0.CR3,while starting Hotrod server - Found Log4j initialization errors
galder.zamarreno Jul 19, 2012 10:05 AM (in response to adityalele)Try: -Dlog4j.configuration=file:///c:/path/to/log4j.xml
-
7. Re: In infinispan-4.1.0.CR3,while starting Hotrod server - Found Log4j initialization errors
adityalele Jul 19, 2012 11:24 AM (in response to galder.zamarreno)i have tried the following
-Dlog4j.configuration=file:///c:/path/to/log4j.xml
-Dlog4j.configuration=file:/c:/path/to/log4j.xml
-Dlog4j.configuration=file://c:/path/to/log4j.xml
also i have tried it with all backslashes instead of these
-
8. Re: In infinispan-4.1.0.CR3,while starting Hotrod server - Found Log4j initialization errors
dan.berindei Jul 25, 2012 7:24 AM (in response to adityalele)Aditya, make sure you replace the -Dlog4j.configuration value in startServer.bat. If you pass it as a command-line argument to startServer.bat, it will be considered a parameter of the Main class (and it will be ignored).
-
9. Re: In infinispan-4.1.0.CR3,while starting Hotrod server - Found Log4j initialization errors
galder.zamarreno Jul 25, 2012 8:13 AM (in response to dan.berindei)@Dan, it shouldn't be ignored, see: https://github.com/infinispan/infinispan/blob/master/server/core/src/main/scala/org/infinispan/server/core/Main.scala#L235
-
10. Re: In infinispan-4.1.0.CR3,while starting Hotrod server - Found Log4j initialization errors
galder.zamarreno Jul 25, 2012 8:14 AM (in response to galder.zamarreno)Hmmm, unless logging resolution happens before that line. @Aditya, defo worth a try to @Dan's suggestion.
-
11. Re: In infinispan-4.1.0.CR3,while starting Hotrod server - Found Log4j initialization errors
mircea.markus Jul 25, 2012 6:24 PM (in response to galder.zamarreno)Adding "-Dlog4j.debug" to the script should tell us more about how log4j boots - mind give it a try and post everything log4j outputs to the console?
-
12. Re: In infinispan-4.1.0.CR3,while starting Hotrod server - Found Log4j initialization errors
adityalele Jul 26, 2012 5:19 AM (in response to mircea.markus)startServer.bat -r hotrod -Dlog4j.debug
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
-
13. Re: In infinispan-4.1.0.CR3,while starting Hotrod server - Found Log4j initialization errors
nadirx Jul 26, 2012 10:14 AM (in response to adityalele)Aditya, you need to modify the script itself, not pass it as an argument.
-
14. Re: In infinispan-4.1.0.CR3,while starting Hotrod server - Found Log4j initialization errors
mircea.markus Jul 31, 2012 10:42 AM (in response to nadirx)This should be solved in the next 5.2 infinispan release. You can also find a workaround for this problem here: https://issues.jboss.org/browse/ISPN-2180