Hide Forgot
Problem: the real exception gets eaten because of the static constructors. When running kie-wb from maciesj zip that works for everyone but me, I get this error message: Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.uberfire.java.nio.file.api.FileSystemProviders$FileSystemProvidersHolder at org.uberfire.java.nio.file.api.FileSystemProviders.getProvider(FileSystemProviders.java:99) at org.uberfire.java.nio.file.api.FileSystemProviders.resolveProvider(FileSystemProviders.java:92) at org.uberfire.java.nio.file.FileSystems.newFileSystem(FileSystems.java:117) at org.uberfire.java.nio.file.FileSystems.newFileSystem(FileSystems.java:83) at org.uberfire.io.impl.AbstractIOService.newFileSystem(AbstractIOService.java:206) at org.uberfire.metadata.io.IOServiceIndexedImpl.newFileSystem(IOServiceIndexedImpl.java:123) at org.uberfire.backend.server.config.ConfigurationServiceImpl.setup(ConfigurationServiceImpl.java:67) ... 79 more The real exception probably happened in FileSystemProvidersHolder.buildProviders() or FileSystemProvidersHolder.buildProvidersMap() but that exception got eaten so I am dead in the water to figure out what's wrong on my system (which could be anything from disk space to write permissions to startup speed to ...). Solution: Don't use static constructors. They are very complex to use correctly (see Java puzzlers on deadlocks with static constructors). PS: IIRC, all static constructors are run in the exact same thread, so synchronized is pointless for a static constructor.
How to reproduce: Inside one of the 2 methods of FileSystemProvidersHolder, just add this line: throw new IllegalStateException("This bug is caused by jack the ripper."); Then build run kie-wb.war. Notice that not a single error message mentions that jack the ripper did it.
I do agree that we need to make the code not eat the exception. Debugging these things is very painful.
Issue fixed and pushed to Uberfire master and 0.3.x branches: https://github.com/droolsjbpm/uberfire/commit/0f6548af0 https://github.com/droolsjbpm/uberfire/commit/46539438e
Confirmed fixed in the code.