From b39de7282e3db69cc59cd640088b9c763169e40b Mon Sep 17 00:00:00 2001 From: Ilia Naryzhny Date: Thu, 8 Feb 2024 03:30:26 -0800 Subject: [PATCH] Bump up OrientDB, wicket and etc. Disable BPM and tours temporary --- .../core/orientd/plugin/OrienteerHazelcastPlugin.java | 3 ++- .../core/service/OrienteerEmbeddedStartupListener.java | 8 +++++++- .../component/OrienteerETLProcessorConfigurator.java | 7 ++++--- .../java/org/orienteer/pages/web/PageDelegate.java | 7 ++----- orienteer-tours/pom.xml | 4 ++-- .../orienteer/users/module/OrienteerUsersModule.java | 2 +- pom.xml | 10 +++++----- 7 files changed, 23 insertions(+), 18 deletions(-) diff --git a/orienteer-core/src/main/java/org/orienteer/core/orientd/plugin/OrienteerHazelcastPlugin.java b/orienteer-core/src/main/java/org/orienteer/core/orientd/plugin/OrienteerHazelcastPlugin.java index 49a786011..db6ef9c09 100644 --- a/orienteer-core/src/main/java/org/orienteer/core/orientd/plugin/OrienteerHazelcastPlugin.java +++ b/orienteer-core/src/main/java/org/orienteer/core/orientd/plugin/OrienteerHazelcastPlugin.java @@ -16,6 +16,7 @@ public OrienteerHazelcastPlugin() { super(); } + /* @Override protected HazelcastInstance configureHazelcast() throws FileNotFoundException { @@ -25,7 +26,7 @@ protected HazelcastInstance configureHazelcast() throws FileNotFoundException { hazelcastConfig.setClassLoader(this.getClass().getClassLoader()); } return Hazelcast.getOrCreateHazelcastInstance(hazelcastConfig); - } + }*/ } diff --git a/orienteer-core/src/main/java/org/orienteer/core/service/OrienteerEmbeddedStartupListener.java b/orienteer-core/src/main/java/org/orienteer/core/service/OrienteerEmbeddedStartupListener.java index af06e3f3e..d5becd172 100644 --- a/orienteer-core/src/main/java/org/orienteer/core/service/OrienteerEmbeddedStartupListener.java +++ b/orienteer-core/src/main/java/org/orienteer/core/service/OrienteerEmbeddedStartupListener.java @@ -1,9 +1,12 @@ package org.orienteer.core.service; import com.orientechnologies.orient.core.command.script.OScriptManager; +import com.orientechnologies.orient.core.config.OGlobalConfiguration; import com.orientechnologies.orient.core.db.ODatabasePool; import com.orientechnologies.orient.core.db.ODatabaseSession; import com.orientechnologies.orient.core.db.OrientDB; +import com.orientechnologies.orient.core.db.OrientDBConfig; +import com.orientechnologies.orient.core.db.OrientDBConfigBuilder; import com.orientechnologies.orient.core.db.OrientDBInternal; import com.orientechnologies.orient.core.db.document.ODatabaseDocument; import com.orientechnologies.orient.core.metadata.security.OUser; @@ -64,7 +67,10 @@ public void onAfterServerStartupAndActivation(OrientDbWebApplication app) throws Exception { IOrientDbSettings settings = app.getOrientDbSettings(); OrientDB orientDB = app.getServer().getContext(); - if (orientDB.createIfNotExists(settings.getDbName(), settings.getDbType())) { + if (orientDB.createIfNotExists(settings.getDbName(), settings.getDbType(), + OrientDBConfig.builder() + .addConfig(OGlobalConfiguration.CREATE_DEFAULT_USERS, true) + .build())) { try(ODatabaseSession session = orientDB.open(settings.getDbName(), OrientDbSettings.ADMIN_DEFAULT_USERNAME, OrientDbSettings.ADMIN_DEFAULT_PASSWORD)){ onDbCreated(session, settings); } diff --git a/orienteer-etl/src/main/java/org/orienteer/etl/component/OrienteerETLProcessorConfigurator.java b/orienteer-etl/src/main/java/org/orienteer/etl/component/OrienteerETLProcessorConfigurator.java index 3014ed7c6..fca343ac4 100644 --- a/orienteer-etl/src/main/java/org/orienteer/etl/component/OrienteerETLProcessorConfigurator.java +++ b/orienteer-etl/src/main/java/org/orienteer/etl/component/OrienteerETLProcessorConfigurator.java @@ -12,6 +12,7 @@ import com.orientechnologies.orient.etl.OETLProcessor; import com.orientechnologies.orient.etl.OETLProcessor.LOG_LEVELS; import com.orientechnologies.orient.etl.OETLProcessorConfigurator; +import com.orientechnologies.orient.etl.context.OETLContext; import com.orientechnologies.orient.etl.context.OETLContextWrapper; import com.orientechnologies.orient.etl.loader.OETLOrientDBLoader; @@ -36,7 +37,7 @@ public OrienteerETLProcessorConfigurator() { } public OETLProcessor parseConfigRecord(OTaskSessionRuntime taskSession,String config){ - final OCommandContext context = createDefaultContext(); + final OETLContext context = createDefaultContext(); ODocument configuration = new ODocument().fromJSON("{}"); configuration.merge(new ODocument().fromJSON(config, "noMap"), true, true); @@ -53,7 +54,7 @@ public OETLProcessor parseConfigRecord(OTaskSessionRuntime C configureComponent(C iComponent, ODocument iCfg, OCommandContext iContext) { if(iComponent instanceof OETLOrientDBLoader) { //TODO: reimplement - it should use current user rights OrienteerWebApplication app = OrienteerWebApplication.get(); @@ -64,6 +65,6 @@ protected void configureComponent(OETLComponent iComponent, ODocument iCfg, OCom iCfg.field("dbUser", settings.getAdminUserName()); iCfg.field("dbPassword", settings.getAdminPassword()); } - super.configureComponent(iComponent, iCfg, iContext); + return super.configureComponent(iComponent, iCfg, iContext); } } diff --git a/orienteer-pages/src/main/java/org/orienteer/pages/web/PageDelegate.java b/orienteer-pages/src/main/java/org/orienteer/pages/web/PageDelegate.java index b4835ce50..e3c583e1f 100644 --- a/orienteer-pages/src/main/java/org/orienteer/pages/web/PageDelegate.java +++ b/orienteer-pages/src/main/java/org/orienteer/pages/web/PageDelegate.java @@ -1,6 +1,5 @@ package org.orienteer.pages.web; -import com.orientechnologies.common.concur.resource.OPartitionedObjectPool; import com.orientechnologies.orient.core.command.script.OScriptManager; import com.orientechnologies.orient.core.db.ODatabaseDocumentInternal; import com.orientechnologies.orient.core.db.ODatabaseSession; @@ -89,9 +88,7 @@ public PageDelegate(WebPage page, ORID pageOrid, ORID docOrid) { OrientDB context = OrienteerWebApplication.lookupApplication().getOrientDbSettings().getContext(); OScriptManager scriptManager = OrientDBInternal.extract(context).getScriptManager(); ODatabaseDocumentInternal db = OrienteerWebSession.get().getDatabaseDocumentInternal(); - final OPartitionedObjectPool.PoolEntry entry = - scriptManager.acquireDatabaseEngine(db.getName(), "javascript"); - final ScriptEngine scriptEngine = entry.object; + final ScriptEngine scriptEngine = scriptManager.acquireDatabaseEngine(db.getName(), "javascript"); Bindings binding = null; try { binding = scriptManager.bind(scriptEngine, scriptEngine.getBindings(ScriptContext.ENGINE_SCOPE), @@ -107,7 +104,7 @@ public PageDelegate(WebPage page, ORID pageOrid, ORID docOrid) { } finally { if (scriptManager != null && binding != null) { scriptManager.unbind(scriptEngine, binding, null, null); - scriptManager.releaseDatabaseEngine("javascript", db.getName(), entry); + scriptManager.releaseDatabaseEngine("javascript", db.getName(), scriptEngine); } } } diff --git a/orienteer-tours/pom.xml b/orienteer-tours/pom.xml index 4850d4821..79ce5cffc 100644 --- a/orienteer-tours/pom.xml +++ b/orienteer-tours/pom.xml @@ -24,12 +24,12 @@ org.glassfish.jersey.media jersey-media-json-jackson - 2.32 + 3.0.2 org.glassfish.jersey.media jersey-media-jaxb - 2.32 + 3.0.2 org.webjars.npm diff --git a/orienteer-users/src/main/java/org/orienteer/users/module/OrienteerUsersModule.java b/orienteer-users/src/main/java/org/orienteer/users/module/OrienteerUsersModule.java index fa272caf0..8b57ec2d3 100644 --- a/orienteer-users/src/main/java/org/orienteer/users/module/OrienteerUsersModule.java +++ b/orienteer-users/src/main/java/org/orienteer/users/module/OrienteerUsersModule.java @@ -168,7 +168,7 @@ private void createUserSocialNetwork(OSchemaHelper helper) { private OClass updateUserOClass(OSchemaHelper helper) { helper.oClass(OUser.CLASS_NAME) - .oProperty(OrienteerUser.PROP_ID, OType.STRING).notNull() + .oProperty(OrienteerUser.PROP_ID, OType.STRING)//.notNull() .updateCustomAttribute(CustomAttribute.UI_READONLY, true) .oProperty(OrienteerUser.PROP_RESTORE_ID, OType.STRING) .updateCustomAttribute(CustomAttribute.UI_READONLY, true) diff --git a/pom.xml b/pom.xml index abc0ca25a..10044d7cc 100644 --- a/pom.xml +++ b/pom.xml @@ -70,9 +70,9 @@ 1.8 - 8.11.0 - 8.11.0 - 3.1.10 + 8.15.0 + 8.15.0 + 3.2.27 4.2.0 9.4.12.v20180830 2.0-SNAPSHOT @@ -500,7 +500,7 @@ orienteer-birt - orienteer-bpm + orienteer-camel orienteer-core orienteer-devutils @@ -518,7 +518,7 @@ orienteer-mail orienteer-metrics orienteer-users - orienteer-tours + orienteer-notification orienteer-twilio orienteer-rproxy