3 ms·
NoClassDefFoundError? But it’s right there! Although in this case the cause was very different, it reminds me of an old "trap for young players" with loading s
by userbinator 8y ago
NoClassDefFoundError? But it’s right there!
Although in this case the cause was very different, it reminds me of an old "trap for young players" with loading shared libraries dynamically --- the library itself can exist and be readable and executable, and yet attempting to load it fails with a "file not found" error. This happens when one of its dependencies, directly or indirectly, is missing.
- sk5t 8y agoAh! This was one of my very, very least favorite things about developing win32 DLLs, way back in the day.
- Lazare 8y agoI ran across another similar-yet-very-different example of this once in a completely different language. In my case, we added a new class, it worked fine on dev, then failed on staging (and would have failed in production if we'd let it go that far). This was confusing, because we were using Vagrant to ensure our dev and staging environments were identical. What could be going on? Well, our linux VMs were being hosted in OS X, with shared folders for the code, and by default OS X volumes are not case sensitive. Meanwhile the linux staging and production environments were using actual linux filesystems, which were case sensitive. So someone added a new class MyFancyClass, then tried to import it as MyFancyclass, and it worked great in dev since the underlying FS of the host OS could find the file, then failed on staging. A fun debugging ride, and a good reminder that 1) having dev and staging the same is really important and 2) that might be harder than you think. :)
- kiallmacinnes 8y agoI've had this one a few times recently, and every time, it stumps for for a few minutes! Yes, I know the details, no I never remember them when it happens to me ;)
- jpitz 8y agoI recall, back in the mid-to-late 2000s, investigating OutOfMemoryError on a Windows server, to find that the cause was an inability to create a thread, because the kernel buffer space for managing threads was exhausted ( many thousands of threads created ) https://dzone.com/articles/outofmemoryerror-unable-create https://dzone.com/articles/outofmemoryerror-unable-create