Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PROG_DIR incorrectly set resulting in log4j:ERROR Ignoring configuration file [file://./conf/log4j.properties] #67

Open
robert-s-lee opened this issue Apr 30, 2023 · 0 comments

Comments

@robert-s-lee
Copy link

bin/jsqsh does not reliably work to identify dirname of the jsqsh

https://github.com/scgray/jsqsh/blob/master/jsqsh-dist/dist/unix/jsqsh#L16

the PROG_DIR is . resulting in the err message

arcion@4b5153db9d81:/opt/jsqsh/jsqsh-dist-3.0-SNAPSHOT$ bin/jsqsh
log4j:ERROR Could not read configuration file from URL [file://./conf/log4j.properties].
java.net.UnknownHostException: .
        at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:567)
        at java.base/java.net.Socket.connect(Socket.java:633)
        at java.base/sun.net.ftp.impl.FtpClient.doConnect(FtpClient.java:1045)
        at java.base/sun.net.ftp.impl.FtpClient.tryConnect(FtpClient.java:1010)
        at java.base/sun.net.ftp.impl.FtpClient.connect(FtpClient.java:1102)
        at java.base/sun.net.ftp.impl.FtpClient.connect(FtpClient.java:1088)
        at java.base/sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:320)
        at java.base/sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:426)
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:557)
        at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
        at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
        at org.apache.log4j.Logger.getLogger(Logger.java:104)
        at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:262)
        at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:108)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
        at org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1025)
        at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:844)
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:541)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:292)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:669)
        at org.apache.commons.digester3.Digester.<init>(Digester.java:282)
        at org.sqsh.CommandManager.load(CommandManager.java:149)
        at org.sqsh.CommandManager.init(CommandManager.java:132)
        at org.sqsh.CommandManager.<init>(CommandManager.java:54)
        at org.sqsh.SqshContext.<init>(SqshContext.java:108)
        at org.sqsh.SqshContext.getThreadLocal(SqshContext.java:355)
        at org.sqsh.JSqsh.main(JSqsh.java:158)
log4j:ERROR Ignoring configuration file [file://./conf/log4j.properties].
log4j:WARN No appenders could be found for logger (org.apache.commons.digester3.Digester.sax).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Welcome to JSqsh 3.0-SNAPSHOT
Type "\help" for help topics, "quit" to exit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant