From 7109757ee37815ea5f42d63aadc7e411e5a73006 Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 11 Jan 2024 15:58:04 +0100 Subject: [PATCH] BIMServer-Fehler BimserverLockConflictException beim Aufbereiten einer hochgeladenen IFC-Datei http://bitnami/issues/7803 --- Bdb/pom.xml | 2 +- BimServer/pom.xml | 2 +- .../berkeley/BerkeleyKeyValueStore.java | 4 ++- BimServerClientLib/pom.xml | 2 +- BimServerJar/pom.xml | 2 +- .../org.eclipse.wst.common.component | 32 ++++++++++++------- BimServerWar/pom.xml | 2 +- .../bimserver/web/WarServerInitializer.java | 22 +++++++++++++ PluginBase/pom.xml | 2 +- Shared/pom.xml | 2 +- Tests/pom.xml | 2 +- pom.xml | 4 +-- 12 files changed, 55 insertions(+), 23 deletions(-) diff --git a/Bdb/pom.xml b/Bdb/pom.xml index a81046ef34..7489decd61 100644 --- a/Bdb/pom.xml +++ b/Bdb/pom.xml @@ -4,7 +4,7 @@ de.weltweitbau parent - 1.3.2 + 1.3.3 jar Bdb diff --git a/BimServer/pom.xml b/BimServer/pom.xml index f96c1a1032..e8d5a5440f 100644 --- a/BimServer/pom.xml +++ b/BimServer/pom.xml @@ -5,7 +5,7 @@ de.weltweitbau parent - 1.3.2 + 1.3.3 src diff --git a/BimServer/src/org/bimserver/database/berkeley/BerkeleyKeyValueStore.java b/BimServer/src/org/bimserver/database/berkeley/BerkeleyKeyValueStore.java index 1cfb00c5ce..2c8e5e5912 100644 --- a/BimServer/src/org/bimserver/database/berkeley/BerkeleyKeyValueStore.java +++ b/BimServer/src/org/bimserver/database/berkeley/BerkeleyKeyValueStore.java @@ -115,8 +115,10 @@ public BerkeleyKeyValueStore(Path dataDir, Properties properties) throws Databas envConfig.setTxnTimeout(10, TimeUnit.SECONDS); if(properties == null || !properties.containsKey(EnvironmentConfig.LOCK_TIMEOUT)) { - envConfig.setLockTimeout(1, TimeUnit.MILLISECONDS); + envConfig.setLockTimeout(2000, TimeUnit.MILLISECONDS); } + + LOGGER.info("bdb timeout ms:" + envConfig.getLockTimeout(TimeUnit.MILLISECONDS)); envConfig.setConfigParam(EnvironmentConfig.CHECKPOINTER_HIGH_PRIORITY, "true"); envConfig.setConfigParam(EnvironmentConfig.CLEANER_THREADS, "5"); diff --git a/BimServerClientLib/pom.xml b/BimServerClientLib/pom.xml index b698ab88e0..716d9ce756 100644 --- a/BimServerClientLib/pom.xml +++ b/BimServerClientLib/pom.xml @@ -6,7 +6,7 @@ de.weltweitbau parent - 1.3.2 + 1.3.3 3.3.2 diff --git a/BimServerJar/pom.xml b/BimServerJar/pom.xml index a6937028e6..aec94651b4 100644 --- a/BimServerJar/pom.xml +++ b/BimServerJar/pom.xml @@ -7,7 +7,7 @@ de.weltweitbau parent - 1.3.2 + 1.3.3 src diff --git a/BimServerWar/.settings/org.eclipse.wst.common.component b/BimServerWar/.settings/org.eclipse.wst.common.component index 052ff97a52..c9fb60c748 100644 --- a/BimServerWar/.settings/org.eclipse.wst.common.component +++ b/BimServerWar/.settings/org.eclipse.wst.common.component @@ -1,36 +1,44 @@ - + + - - + + + + - + + - + uses - + uses - + uses - + uses - + + - + + - + + - + + diff --git a/BimServerWar/pom.xml b/BimServerWar/pom.xml index 85533abc75..ed363c9b67 100644 --- a/BimServerWar/pom.xml +++ b/BimServerWar/pom.xml @@ -7,7 +7,7 @@ de.weltweitbau parent - 1.3.2 + 1.3.3 src diff --git a/BimServerWar/src/org/bimserver/web/WarServerInitializer.java b/BimServerWar/src/org/bimserver/web/WarServerInitializer.java index bb40152546..53544cad07 100644 --- a/BimServerWar/src/org/bimserver/web/WarServerInitializer.java +++ b/BimServerWar/src/org/bimserver/web/WarServerInitializer.java @@ -19,9 +19,11 @@ import java.io.File; import java.io.IOException; +import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.Properties; import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; @@ -105,6 +107,9 @@ public void contextInitialized(ServletContextEvent servletContextEvent) { } catch (IOException e1) { e1.printStackTrace(); } + + fetchBdbProperties(config); + config.setStartEmbeddedWebServer(false); bimServer = new BimServer(config); @@ -130,6 +135,23 @@ public void contextInitialized(ServletContextEvent servletContextEvent) { } servletContext.setAttribute("bimserver", bimServer); } + + private void fetchBdbProperties(BimServerConfig config) { + try { + Path bdbPropertiesFile = config.getHomeDir().resolve("bdb.properties"); + if (Files.exists(bdbPropertiesFile)) { + try (InputStream inputStream = Files.newInputStream(bdbPropertiesFile)) { + Properties properties = new Properties(); + properties.load(inputStream); + config.setBdbEnvironmentProperties(properties); + } catch (IOException e) { + e.printStackTrace(); + } + } + } catch (Exception e) { + // no logger yet + } + } private void setupLogging(Path homeDir) { LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); diff --git a/PluginBase/pom.xml b/PluginBase/pom.xml index 728efd2c90..7874b88d62 100644 --- a/PluginBase/pom.xml +++ b/PluginBase/pom.xml @@ -7,7 +7,7 @@ de.weltweitbau parent - 1.3.2 + 1.3.3 src diff --git a/Shared/pom.xml b/Shared/pom.xml index 84cf5b589d..d9ba54a2da 100644 --- a/Shared/pom.xml +++ b/Shared/pom.xml @@ -6,7 +6,7 @@ de.weltweitbau parent - 1.3.2 + 1.3.3 src diff --git a/Tests/pom.xml b/Tests/pom.xml index 6297950b27..ba17e16493 100644 --- a/Tests/pom.xml +++ b/Tests/pom.xml @@ -5,7 +5,7 @@ de.weltweitbau parent - 1.3.2 + 1.3.3 src diff --git a/pom.xml b/pom.xml index f6ede9b24a..a551f1e74b 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 de.weltweitbau parent - 1.3.2 + 1.3.3 pom This is the parent pom, no idea why this is being released @@ -13,7 +13,7 @@ https://github.com/WeltWeitBau/BIMserver.git scm:git:https://github.com/WeltWeitBau/BIMserver.git scm:git:https://github.com/WeltWeitBau/BIMserver.git - v1.3.2 + v1.3.3 OpenSource BIM