| Summary: | Out-of-the-box installation: improve UF error message "Could not initialize class ...FileSystemProviders$FileSystemProvidersHolder" | ||
|---|---|---|---|
| Product: | [Retired] JBoss BRMS Platform 6 | Reporter: | Geoffrey De Smet <gdesmet> |
| Component: | Business Central | Assignee: | Alexandre Porcelli <porcelli> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Lukáš Petrovický <lpetrovi> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.0.0 | CC: | etirelli, porcelli |
| Target Milestone: | ER5 | ||
| Target Release: | 6.0.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-08-06 20:19:33 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
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. |
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.