[opensuse] What means this java error?
Hi, I have a test install of Leap 42.1, where I try to run a certain java application and get this error instead: cer@Gestor:~/Moria/Gigaset/cridmanager> java -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView log4j:WARN No appenders could be found for logger (net.sourceforge.cridmanager.Settings). log4j:WARN Please initialize the log4j system properly. cer@Gestor:~/Moria/Gigaset/cridmanager> (I try to search for a package with "log4j" in the name, but https://software.opensuse.org/ seems down) Normally, what I do is install the SUN java package instead of openjdk. I'm trying to avoid that in this system. I don't know if this is some missing package, or it is an incompatibility on the application I try to run. -- Cheers / Saludos, Carlos E. R. (from openSUSE Leap 42.1 x86_64 (test)) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 02/19/2016 07:49 PM, Carlos E. R. wrote:
(I try to search for a package with "log4j" in the name, but https://software.opensuse.org/ seems down)
Now it works, and I found the package. yast installs that and xerces-j2 as a dependency. But I still get the same error: cer@Gestor:~/Moria/Gigaset/cridmanager> java -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView log4j:WARN No appenders could be found for logger (net.sourceforge.cridmanager.Settings). log4j:WARN Please initialize the log4j system properly. cer@Gestor:~/Moria/Gigaset/cridmanager> -- Cheers / Saludos, Carlos E. R. (from openSUSE Leap 42.1 x86_64 (test)) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hi, I don't know everything but. Log4J is a logging package that some applications use (actually, a lot). The fact that it can spew out those errors means it is already there. So you have that covered. But there could be an incompatibility between the version that the application expects, and the version that is installed (if they are not packaged together). I believe an Appender is simply a "component" in that system that allows the application to send its log output somewhere. WARN is a logging level, but it should not be fatal. So I don't know why the program exits. This error would be generated by log4j when the program tries to send log output for the first time but there is a configuration error. From what I know, log4j initializes itself automatically upon the first call, but it might mean that it is using log4j 1 and I don't know about that. However, from what I understand typically a log4j application is initialized using an xml file. It *could* be that the xml file is missing for the automatic configuration of log4j in this application. Again, that might point to a version mismatch. You would expect this xml file to be embedded in the jar file for the application, so unless there is a packaging error, that should really not happen. It is also unlikely that the application itself would have faulty initialization considering all other problems are gone. So again that really points to a version mismatch. On the other hand the WARN error should really not be fatal. The application might not even know about that error and normally log4j would probably not exit upon it. There is some Logger being used and it is not configured with an Appender. So the system does not know where to send its output. That's all there is to it, normally such a thing would not be fatal. When it says "No appenders could be found for logger (net.sourceforge.cridmanager.Settings)." it means that the application has created or requested a "Logger" instance for a specific class or its fully qualified class name. This is the default. Loggers are just given names according to the class that creates them. So something in that Settings class tries to create a logger and it fails, or it tries to use one and it fails. Depending on when the library would issue that warning. Log4j comes in two versions, version one and two, and one is being phased out. The newest version should really always work (either newest version 1 or newest version 2). You might try to install it from the web: http://search.maven.org/remotecontent?filepath=org/apache/logging/log4j/log4... http://search.maven.org/remotecontent?filepath=org/apache/logging/log4j/log4... that's version 2. Version one is, but it is old: http://search.maven.org/remotecontent?filepath=log4j/log4j/1.2.17/log4j-1.2.... But I'm not sure if that would fix it for you. Sorry I can't help more than this. Regards, Xen. Op 19-2-2016 om 19:49 schreef Carlos E. R.:
Hi,
I have a test install of Leap 42.1, where I try to run a certain java application and get this error instead:
cer@Gestor:~/Moria/Gigaset/cridmanager> java -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView log4j:WARN No appenders could be found for logger (net.sourceforge.cridmanager.Settings). log4j:WARN Please initialize the log4j system properly. cer@Gestor:~/Moria/Gigaset/cridmanager>
(I try to search for a package with "log4j" in the name, but https://software.opensuse.org/ seems down)
Normally, what I do is install the SUN java package instead of openjdk. I'm trying to avoid that in this system. I don't know if this is some missing package, or it is an incompatibility on the application I try to run.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hi, Actually, that message: "No appenders..." means that what you're missing is not Log4J itself, but the configuration for it -- typically a file called either "log4j.properties" or "log4j2.xml". If you're not interested in seeing the log output of the program, you can just ignore the messages. Otherwise, you can try putting the following into a file called "log4j.properties" and add the directory it's in to the classpath (the -cp option you're already specifying): log4j.rootLogger=WARN, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout The above will cause the messages to appear on stdout. Brendan On 19/02/16 18:49, Carlos E. R. wrote:
Hi,
I have a test install of Leap 42.1, where I try to run a certain java application and get this error instead:
cer@Gestor:~/Moria/Gigaset/cridmanager> java -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView log4j:WARN No appenders could be found for logger (net.sourceforge.cridmanager.Settings). log4j:WARN Please initialize the log4j system properly. cer@Gestor:~/Moria/Gigaset/cridmanager>
(I try to search for a package with "log4j" in the name, but https://software.opensuse.org/ seems down)
Normally, what I do is install the SUN java package instead of openjdk. I'm trying to avoid that in this system. I don't know if this is some missing package, or it is an incompatibility on the application I try to run.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
That's true, isn't it. But that doesn't explain why the program is exiting. Op 19-2-2016 om 21:44 schreef Brendan McKenna:
Hi,
Actually, that message: "No appenders..." means that what you're missing is not Log4J itself, but the configuration for it -- typically a file called either "log4j.properties" or "log4j2.xml". If you're not interested in seeing the log output of the program, you can just ignore the messages.
Otherwise, you can try putting the following into a file called "log4j.properties" and add the directory it's in to the classpath (the -cp option you're already specifying):
log4j.rootLogger=WARN, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
The above will cause the messages to appear on stdout.
Brendan
On 19/02/16 18:49, Carlos E. R. wrote:
Hi,
I have a test install of Leap 42.1, where I try to run a certain java application and get this error instead:
cer@Gestor:~/Moria/Gigaset/cridmanager> java -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView log4j:WARN No appenders could be found for logger (net.sourceforge.cridmanager.Settings). log4j:WARN Please initialize the log4j system properly. cer@Gestor:~/Moria/Gigaset/cridmanager>
(I try to search for a package with "log4j" in the name, but https://software.opensuse.org/ seems down)
Normally, what I do is install the SUN java package instead of openjdk. I'm trying to avoid that in this system. I don't know if this is some missing package, or it is an incompatibility on the application I try to run.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 02/19/2016 09:44 PM, Brendan McKenna wrote:
Hi,
Actually, that message: "No appenders..." means that what you're missing is not Log4J itself, but the configuration for it -- typically a file called either "log4j.properties" or "log4j2.xml". If you're not interested in seeing the log output of the program, you can just ignore the messages.
It refuses to start. The thing is that it works perfectly with Java from Sun on another install.
Otherwise, you can try putting the following into a file called "log4j.properties" and add the directory it's in to the classpath (the -cp option you're already specifying):
log4j.rootLogger=WARN, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
The above will cause the messages to appear on stdout.
Well, now the program simply does not start, without any error message. The message was a red herring. File log4j.properties saved cer@Gestor:~/Moria/Gigaset/cridmanager> java -cp cridmanager-1.4.3.jar net.sourceforge.cridremote.RemoteControlView cer@Gestor:~/Moria/Gigaset/cridmanager> I guess I have to install the JRE. which fails :-? Gestor:/data/storage_c/repositorios_zypp/LocalRPMs # rpm --install jre-8u66-linux-x64.rpm Unpacking JAR files... plugin.jar... javaws.jar... deploy.jar... rt.jar... jsse.jar... charsets.jar... localedata.jar... jfxrt.jar... /var/tmp/rpm-tmp.QSj6nc: line 638: /usr/sbin/alternatives: No such file or directory warning: %post(jre1.8.0_66-1.8.0_66-fcs.x86_64) scriptlet failed, exit status 127 Gestor:/data/storage_c/repositorios_zypp/LocalRPMs # It wants "/usr/sbin/alternatives", which does not exist. :-? I don't remember how I solved this previously. I'll think about this later. -- Cheers / Saludos, Carlos E. R. (from openSUSE Leap 42.1 x86_64 (test)) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Brendan McKenna
-
Carlos E. R.
-
Xen