java.lang.NoClassDefFoundError
Christian Schlichtherle
christian at schlichtherle.de
Wed Feb 4 14:08:31 UTC 2015
Hi,
Alan, how could the default file system provider get replaced? AFAIK from reading the source code of the java.nio.file package, it’s hard coded. The root cause exception says the JVM can’t initialize java.nio.file.FileSystems$DefaultFileSystemHolder. I can spot no recursion in the entire stack trace.
Lars, I suppose something must be unique to your environment. Maven Central statistics tell me there are more than thousand downloads of TrueZIP components from unique IPs every month, but I have not heard of this problem before nor am I able to reproduce it. Maybe the JDK installation just got corrupted and a simple reinstall would fix it?
Regards,
Christian Schlichtherle
> Am 04.02.2015 um 14:48 schrieb Alan Bateman <Alan.Bateman at oracle.com>:
>
>
> If I read the stack trace correctly then java.nio.file.spi.DefaultFileSystemProvider has been set to configure TrueZip to be the default file system provider. It is possible that TrueZip is hitting a recursive initialization issue? The stack trace doesn't tell all so it's not clear what is triggering de.schlichtherle.truezip.fs.archive.tar.TarDriverService to load. Christian might be able to provide a bit more background as to how it initializes.
>
> -Alan
>
> On 04/02/2015 12:40, Lars Seifert wrote:
>> Hello,
>>
>> i have a problem with my free multiplatform flightbook Airtome and
>> Christian Schlichtherle (TrueZip) suggested to me, that someone here can
>> help me or give me a hint.
>>
>> Airtome is working fine with Windows, Linux and OSX (Java 6), but in OSX
>> Yosemite with Java 7 or 8, i get a NoClassDefFoundError.
>>
>> The problem is the following line:
>> File g = new TFile(System.getProperties().getProperty("user.dir") + "/"
>> + "airtome.userdir");
>>
>> Apparently the JVM can’t initialize the class
>> java.nio.file.FileSystems$DefaultFileSystemHolder .
>>
>> The code in TrueZIP 7.7.6 which triggers this initialization is this:
>> private static final Path TEMP_DIR =
>> Paths.get(System.getProperty("java.io.tmpdir"));
>>
>>
>> java.util.ServiceConfigurationError:
>> de.schlichtherle.truezip.fs.spi.FsDriverService: Provider
>> de.schlichtherle.truezip.fs.archive.tar.TarDriverService could not be
>> instantiated
>> at java.util.ServiceLoader.fail(ServiceLoader.java:224)
>> at java.util.ServiceLoader.access$100(ServiceLoader.java:181)
>> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:377)
>> at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
>> at
>> de.schlichtherle.truezip.fs.sl.FsDriverLocator$Boot.<clinit>(FsDriverLocator.java:59)
>> at
>> de.schlichtherle.truezip.fs.sl.FsDriverLocator.get(FsDriverLocator.java:41)
>> at
>> de.schlichtherle.truezip.file.TArchiveDetector.extensions(TArchiveDetector.java:80)
>> at
>> de.schlichtherle.truezip.file.TArchiveDetector.<init>(TArchiveDetector.java:123)
>> at
>> de.schlichtherle.truezip.file.TArchiveDetector.<init>(TArchiveDetector.java:103)
>> at
>> de.schlichtherle.truezip.file.TArchiveDetector.<clinit>(TArchiveDetector.java:66)
>> at de.schlichtherle.truezip.file.TConfig.<init>(TConfig.java:330)
>> at de.schlichtherle.truezip.file.TConfig.<clinit>(TConfig.java:274)
>> at de.schlichtherle.truezip.file.TFile.<init>(TFile.java:476)
>> at de.schlichtherle.truezip.file.TFile.<init>(TFile.java:455)
>> at airtome.JCommon.DetermineSavePath(JCommon.java:109)
>> at airtome.Main.main(Main.java:403)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:606)
>> at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
>> at com.install4j.runtime.launcher.MacLauncher.main(Unknown Source)
>> Caused by: java.lang.NoClassDefFoundError: Could not initialize class
>> java.nio.file.FileSystems$DefaultFileSystemHolder
>> at java.nio.file.FileSystems.getDefault(FileSystems.java:176)
>> at java.nio.file.Paths.get(Paths.java:84)
>> at
>> de.schlichtherle.truezip.fs.nio.file.TempFilePool.<clinit>(TempFilePool.java:41)
>> at
>> de.schlichtherle.truezip.fs.nio.file.TempFilePoolService.get(TempFilePoolService.java:23)
>> at
>> de.schlichtherle.truezip.socket.sl.IOPoolLocator$Boot.create(IOPoolLocator.java:99)
>> at
>> de.schlichtherle.truezip.socket.sl.IOPoolLocator$Boot.<clinit>(IOPoolLocator.java:64)
>> at
>> de.schlichtherle.truezip.socket.sl.IOPoolLocator.get(IOPoolLocator.java:51)
>> at
>> de.schlichtherle.truezip.fs.archive.tar.TarDriver.<init>(TarDriver.java:69)
>> at
>> de.schlichtherle.truezip.fs.archive.tar.TarDriverService.<clinit>(TarDriverService.java:51)
>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>> at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>> at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>> at java.lang.Class.newInstance(Class.java:379)
>> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:373)
>> ... 19 more
>>
>>
>>
>> Thank you very much!
>> Lars
>>
>>
>>
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.openjdk.java.net/pipermail/nio-discuss/attachments/20150204/5caf026e/signature.asc>
More information about the nio-discuss
mailing list