[jitsi-dev] Loading class 'net.java.sip.communicator.util.FileHandler' failed


#1

Hi,

I've been trying to update Jitsi bundles in Android to the latest
version, but now it fails to start:

Loading class 'net.java.sip.communicator.util.FileHandler' failed
java.io.FileNotFoundException: /./log/jitsi0.log.0.lck: open failed:
ENOENT (No such file or directory)
java.lang.NullPointerException
at java.util.logging.Logger.setManager(Logger.java:449)
at java.util.logging.LogManager.readConfigurationImpl(LogManager.java:375)
at java.util.logging.LogManager.readConfiguration(LogManager.java:413)
at net.java.sip.communicator.util.JavaUtilLoggingConfig.<init>(JavaUtilLoggingConfig.java:81)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1130)
at net.java.sip.communicator.util.UtilActivator.loadLoggingConfig(UtilActivator.java:88)
at net.java.sip.communicator.util.UtilActivator.start(UtilActivator.java:73)
at org.jitsi.impl.osgi.framework.BundleImpl.start(BundleImpl.java:301)
at org.jitsi.impl.osgi.framework.launch.FrameworkImpl.startLevelChanged(FrameworkImpl.java:454)
at org.jitsi.impl.osgi.framework.startlevel.FrameworkStartLevelImpl$Command.run(FrameworkStartLevelImpl.java:127)
at org.jitsi.impl.osgi.framework.AsyncExecutor.runInThread(AsyncExecutor.java:112)
at org.jitsi.impl.osgi.framework.AsyncExecutor.access$000(AsyncExecutor.java:18)
at org.jitsi.impl.osgi.framework.AsyncExecutor$1.run(AsyncExecutor.java:221)

Does it have to do something with home directory ? I recall some
changes discussed on the list. Any hints how this can be solved or how
can I change this filename ? It's probably incorrect on Android.

Thanks,
Pawel


#2

Hi

I've been trying to update Jitsi bundles in Android to the latest
version, but now it fails to start:

Loading class 'net.java.sip.communicator.util.FileHandler' failed
java.io.FileNotFoundException: /./log/jitsi0.log.0.lck: open failed:
ENOENT (No such file or directory)
java.lang.NullPointerException
[...]
Does it have to do something with home directory ? I recall some
changes discussed on the list. Any hints how this can be solved or how
can I change this filename ? It's probably incorrect on Android.

Yes, this is most definitely due to my changes. In the Desktop-Jitsi,
SIPCommunicator.java takes care of setting the properties:

net.java.sip.communicator.SC_HOME_DIR_LOCATION
net.java.sip.communicator.SC_CACHE_DIR_LOCATION
net.java.sip.communicator.SC_LOG_DIR_LOCATION

SC_HOME_DIR_LOCATION is the existing one. In the desktop version and the
FileAccessService, the other two follow the HOME_DIR if they are not set.
But FileHandler.getPattern() is expecting the LOG_DIR to be set by the
launcher. I'd prefer this to be set in the launcher in Android as well
rather than to implement another check for fallback locations.

Btw: CACHE_DIR should probably point to Context.getCacheDir() [1] and
LOG_DIR... dunno... follow the HOME_DIR I guess.

Thanks,
Pawel

Ingo

[1]
http://developer.android.com/reference/android/content/Context.html#getCache
Dir()


#3

Hi Ingo,

ยทยทยท

On Fri, Nov 15, 2013 at 4:28 PM, Ingo Bauersachs <ingo@jitsi.org> wrote:

Hi

I've been trying to update Jitsi bundles in Android to the latest
version, but now it fails to start:

Loading class 'net.java.sip.communicator.util.FileHandler' failed
java.io.FileNotFoundException: /./log/jitsi0.log.0.lck: open failed:
ENOENT (No such file or directory)
java.lang.NullPointerException
[...]
Does it have to do something with home directory ? I recall some
changes discussed on the list. Any hints how this can be solved or how
can I change this filename ? It's probably incorrect on Android.

Yes, this is most definitely due to my changes. In the Desktop-Jitsi,
SIPCommunicator.java takes care of setting the properties:

net.java.sip.communicator.SC_HOME_DIR_LOCATION
net.java.sip.communicator.SC_CACHE_DIR_LOCATION
net.java.sip.communicator.SC_LOG_DIR_LOCATION

SC_HOME_DIR_LOCATION is the existing one. In the desktop version and the
FileAccessService, the other two follow the HOME_DIR if they are not set.
But FileHandler.getPattern() is expecting the LOG_DIR to be set by the
launcher. I'd prefer this to be set in the launcher in Android as well
rather than to implement another check for fallback locations.

Btw: CACHE_DIR should probably point to Context.getCacheDir() [1] and
LOG_DIR... dunno... follow the HOME_DIR I guess.

Thanks,
Pawel

Ingo

[1]
http://developer.android.com/reference/android/content/Context.html#getCache
Dir()

Thanks ! That worked and saved me a lot of time.