Coder Social home page Coder Social logo

olca-modules's People

Contributors

dependabot[bot] avatar dr0nius avatar francoislerall avatar manea-eugen avatar miguel-g-c avatar msrocka avatar sebastiangreve-greendelta avatar tngtudor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

olca-modules's Issues

Database update v8

  • Set the database schema version to 8
  • Add a table tbl_source_links with the fields f_owner and f_source: this table will store the 1:n-links between entities (process, LCIA method) and their sources
  • Copy the content of tbl_process_sources to the new table tbl_source_links. We will not drop the table tbl_process_sources during the update (just to avoid data loss if the update fails) but will remove it from the schema
  • Add a field preceding_dataset to the table tbl_process_docs (type varchar(36)): this field can contain an UUID of a data set from which this data set was derived (e.g. the activity UUID of an ecoinvent data set or the content of the same field in the ILCD format)
  • Add a field is_system_link to the table tbl_process_links (type small/tiny int) that contains 1/true when it is a link to a sub-system
  • Add two fields f_author and f_generator to the table tbl_impact_methods both are 64bit integers that can link to actors
  • Add a field is_disabled to the table tbl_project_variants (type small/tiny int)

How to connect to collaboration server?

Hello, could someone please help me by connecting to collaboration server on a linux machine without a gui? cannot find the "cloud" module...
Best Regards and thanks in advance!

FlowIndexBuilder

If the allocation method for a system is set to "As defined in processes", then the flowindexbuilder.build will ignore all unlinked co-products even if all processes in the system have allocation set to "None". I think it would be desirable to have these flows included.

Support product systems in product systems

The work related to that is currently done in branch systems2. This issue is intended for tracking and collecting the things that we need /want to change for this:

  • we added a field isSystemLink to the ProcessLink class-> we need to write a database update for that ; basically just somthing like alter table tbl_process_links add column is_system_link smallint default 0; (note that we also need to add other fields like the originalProcessRefID (or something better) for processes in this update)
  • add a Provider class that is used in the TechIndex -> providers are process - flow or product system - flow pairs
  • processes of sub-systems are mapped to the inventory matrices in the same way as for the host system (processes that occur in the sub- and host- systems only occur ones in the matrices)
  • for each sub-systems we add additional matrix rows and columns; inputs/outputs that are linked to a sub-system are mapped to these indices
  • currently the TechIndex has the function of mapping process-flow pairs to the matrix indices and also stores the links; we should split these roles
  • get rid of the *ResultProvider classes -> we can store the descriptors directly in the indices
  • create indices and matrices in a single table scan using blockm
  • build (sparse) matrices with uncertainty distribtuions only when needed: UCell holds the distribution and conversion parameters; UMatrix maps the resulting values to the respective numeric matrix cells
  • as we now directly use the descriptors in the indices we may should improve the performance of the descriptor queries (currently there is a lot of indirection there); e.g. the db fields could be accessed by field index which is much faster than getting them by field name
  • rename *single* to *direct* and *total* to *upstream* in the different result types
  • rename ImpactCategoryDescriptor to ImpactDescriptor; that should be clear enough and makes lot of the calculation/result code much more readable
    ...

Derby and Mysql schemas

a direct conversion of the derby schema:

  • olca-modules/olca-core/src/main/resources/org/openlca/core/database/internal/current_schema_derby.sql
    following the substitutions suggested on top of the file, do not produce a file identical to:
  • olca-modules/olca-core/src/main/resources/org/openlca/core/database/internal/current_schema_mysql.sql

Using directly the olca-modules/olca-core/src/main/resources/org/openlca/core/database/internal/current_schema_mysql.sql to initialize a remote mysql database for example, will not work with release 1.5

sed -e "s/CLOB(64 K)/TEXT/" -e "s/SMALLINT default 0/TINYINT default 0/" -e "s/BLOB(16 M)/MEDIUMBLOB/" current_schema_derby.sql > current_schema_mysql_derived.sql
diff current_schema_mysql.sql current_schema_derby.sql > schemas_mysql.diff

schemas_mysql.diff.txt

JsonWriter can not be resolved to a type

the json-simple-1.1 can not be copied into libs by 'maven package' command, as a result, a error is indicated by Eclipse as that 'JsonWriter can not be resolved to a type'. i have tried to add the jar through JavaPath, but it is failure. is it a existing issue? or there is something wrong with my methods to deploy? thanks.

Close mapped byte buffers

We use mapped byte buffers when we dump matrices into files. However, there
is currently no way to close a MappedByteBuffer via public API. On Windows
this means that the file keeps open and cannot be deleted, renamed, etc. The
mapped byte buffer is closed when it is garbage collected so we could try to
invoke garbage collection after mapping or use the internal Cleaner API.

For example, this will fail on Windows:

@Test
public void testDeleteTempFile() throws Exception {
  File file = Files.createTempFile("_file_del_test", ".txt").toFile();
  try (RandomAccessFile f = new RandomAccessFile(file, "rw");
       FileChannel chan = f.getChannel()) {
    MappedByteBuffer buf = chan.map(
        FileChannel.MapMode.READ_WRITE, 0, 42);
    for (int i = 0; i < 42; i++) {
      buf.put((byte) 42);
    }
    buf.force();
  }
  Assert.assertTrue(file.delete());
}

Adding a Cleaner call currently works but it is internal API and it seems
that this was removed in Java 9:

// ...
buf.force();
Cleaner cleaner = ((sun.nio.ch.DirectBuffer) buf).cleaner();
if (cleaner != null) {
  cleaner.clean();
}
// ...

This issue is just for tracking this as there seem to be no real solution to
this problem available currently.

References:

Compilation fails on olca-formula

Dear all,

I have tried to follow the instructions and then I tried to install the modules as suggested.
It always fails on the olca-formula module.

Could you please help?

~/eclipse-workspace/olca-modules$ mvn -e install -DskipTests=true
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Error stack traces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] org.openlca:olca-modules [pom]
[INFO] org.openlca:olca-formula [jar]
[INFO] olca-core [jar]
[INFO] olca-ecospold-1 [jar]
[INFO] olca-ecospold-2 [jar]
[INFO] olca-ilcd [jar]
[INFO] olca-io [jar]
[INFO] olca-proto-io [jar]
[INFO] olca-git [jar]
[INFO] olca-ipc [jar]
[INFO]
[INFO] ----------------------< org.openlca:olca-modules >----------------------
[INFO] Building org.openlca:olca-modules 2.0.0 [1/10]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] >>> maven-source-plugin:3.0.1:jar (attach-sources) > generate-sources @ olca-modules >>>
[INFO]
[INFO] <<< maven-source-plugin:3.0.1:jar (attach-sources) < generate-sources @ olca-modules <<<
[INFO]
[INFO]
[INFO] --- maven-source-plugin:3.0.1:jar (attach-sources) @ olca-modules ---
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ olca-modules ---
[INFO] Installing /home/user/eclipse-workspace/olca-modules/pom.xml to /home/user/.m2/repository/org/openlca/olca-modules/2.0.0/olca-modules-2.0.0.pom
[INFO]
[INFO] ----------------------< org.openlca:olca-formula >----------------------
[INFO] Building org.openlca:olca-formula 2.0.0 [2/10]
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The artifact org.slf4j:slf4j-log4j12:jar:1.7.35 has been relocated to org.slf4j:slf4j-reload4j:jar:1.7.35
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ olca-formula ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/user/eclipse-workspace/olca-modules/olca-formula/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ olca-formula ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 80 source files to /home/user/eclipse-workspace/olca-modules/olca-formula/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for org.openlca:olca-modules 2.0.0:
[INFO]
[INFO] org.openlca:olca-modules ........................... SUCCESS [ 0.484 s]
[INFO] org.openlca:olca-formula ........................... FAILURE [ 0.346 s]
[INFO] olca-core .......................................... SKIPPED
[INFO] olca-ecospold-1 .................................... SKIPPED
[INFO] olca-ecospold-2 .................................... SKIPPED
[INFO] olca-ilcd .......................................... SKIPPED
[INFO] olca-io ............................................ SKIPPED
[INFO] olca-proto-io ...................................... SKIPPED
[INFO] olca-git ........................................... SKIPPED
[INFO] olca-ipc ........................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.945 s
[INFO] Finished at: 2022-03-02T17:13:26+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project olca-formula: Fatal error compiling: error: invalid target release: 17 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project olca-formula: Fatal error compiling
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Fatal error compiling
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:1086)
at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:168)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.codehaus.plexus.compiler.CompilerException: error: invalid target release: 17
at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess (JavaxToolsCompiler.java:173)
at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile (JavacCompiler.java:174)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:1075)
at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:168)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.IllegalArgumentException: error: invalid target release: 17
at com.sun.tools.javac.main.Arguments.error (Arguments.java:907)
at com.sun.tools.javac.main.Arguments.doProcessArgs (Arguments.java:383)
at com.sun.tools.javac.main.Arguments.processArgs (Arguments.java:347)
at com.sun.tools.javac.main.Arguments.init (Arguments.java:246)
at com.sun.tools.javac.api.JavacTool.getTask (JavacTool.java:185)
at com.sun.tools.javac.api.JavacTool.getTask (JavacTool.java:119)
at com.sun.tools.javac.api.JavacTool.getTask (JavacTool.java:68)
at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess (JavaxToolsCompiler.java:125)
at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile (JavacCompiler.java:174)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:1075)
at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:168)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :olca-formula

Could not find artifact org.openlca:olca-core:jar:2.0.0 in central

Hello,

when running mvn package -P server-app I get:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.358 s
[INFO] Finished at: 2021-08-09T10:57:02+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project olca-ipc: Could not resolve dependencies for project org.openlca:olca-ipc:jar:2.0.0: The following artifacts could not be resolved: org.openlca:olca-core:jar:2.0.0, org.openlca:olca-io:jar:2.0.0: Could not find artifact org.openlca:olca-core:jar:2.0.0 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Is this known or reproducible by others?

OLCA-Geo Maven links out of date

Hi there,

Having some trouble with Maven not finding the following artifacts when running mvn install

org.geotools:gt-shapefile:jar:10.3, org.geotools:gt-opengis:jar:10.3, org.geotools:gt-api:jar:10.3, org.geotools:gt-main:jar:10.3, org.geotools.xsd:gt-xsd-kml:jar:10.3, org.geotools.xsd:gt-xsd-core:jar:10.3: Could not find artifact org.geotools:gt-shapefile:jar:10.3 in osgeo (**http://download.osgeo.org/webdav/geotools/**)
Does the url in bold need updating perhaps?

Lower Java dependency

It would be easier to deploy olca-modules if the required version of Java was lower, for instance Java 11 instead of Java 14. Many big companies need to follow processes and keep environments for ages and are not likely to move to Java 14 soon. Also Java 11 is a LTS version.

I had a look a the code and the only Java 14 feature used in the code is the functional switch.
So I wanted to know if you would like a contribution to lower the Java dependency ?

ILCD Import: Cache mapped flows

In the ILCD import, mapped flows are currently not cached which means that we are accessing the databases for these flows again and again. Basically, we just have to load the FlowMapEntry in the class ExchangeFlow in another place. Also, when importing all flows we could already cache the mapped flows (see the TODO in ILCDImport).

No result after "Impact factor matrix ready"

Hello,

I'm running an headless IPC server version of the 1.11 release. Everything work just fine except when I try to run a calculation. Everything seems to stop after the creation of the Impact factor matrix. I have try to let it run for 5 hours with no result.

Same setup and same Olca version but from GUI work just fine, I got a result in under 2 min. I don't know what I am doing wrong here.

Here is the log output from IPC calculation.

[NanoHttpd Request Processor (#1)] TRACE org.openlca.ipc.Server - handle request 1/get/model
[NanoHttpd Request Processor (#1)] TRACE org.openlca.ipc.Server - Call method get/model
[NanoHttpd Request Processor (#1)] TRACE org.openlca.core.database.Query - Get all class org.openlca.core.model.ImpactMethod with query select e from ImpactMethod e where e.refId = :refId
[NanoHttpd Request Processor (#1)] DEBUG org.openlca.core.database.Query - 1 results
[NanoHttpd Request Processor (#1)] TRACE org.openlca.core.database.EntityCache$Loader - register descriptor DAOs
[NanoHttpd Request Processor (#1)] TRACE org.openlca.core.database.EntityCache$Loader - register class class org.openlca.core.model.FlowProperty
[NanoHttpd Request Processor (#1)] TRACE org.openlca.core.database.FlowPropertyDao - get class org.openlca.core.model.FlowProperty for id=740
[NanoHttpd Request Processor (#1)] TRACE org.openlca.core.database.EntityCache$Loader - register class class org.openlca.core.model.Category
[NanoHttpd Request Processor (#1)] TRACE org.openlca.core.database.CategoryDao - get class org.openlca.core.model.Category for id=503
[NanoHttpd Request Processor (#1)] TRACE org.openlca.core.database.FlowPropertyDao - get class org.openlca.core.model.FlowProperty for id=736
[NanoHttpd Request Processor (#1)] TRACE org.openlca.core.database.FlowPropertyDao - get class org.openlca.core.model.FlowProperty for id=735
[NanoHttpd Request Processor (#1)] TRACE org.openlca.core.database.FlowPropertyDao - get class org.openlca.core.model.FlowProperty for id=734
[NanoHttpd Request Processor (#1)] TRACE org.openlca.core.database.FlowPropertyDao - get class org.openlca.core.model.FlowProperty for id=737
[NanoHttpd Request Processor (#1)] TRACE org.openlca.core.database.FlowPropertyDao - get class org.openlca.core.model.FlowProperty for id=738
[NanoHttpd Request Processor (#2)] TRACE org.openlca.ipc.Server - handle request 2/calculate
[NanoHttpd Request Processor (#2)] TRACE org.openlca.ipc.Server - Call method calculate
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.Query - Get all class org.openlca.core.model.ProductSystem with query select e from ProductSystem e where e.refId = :refId
[NanoHttpd Request Processor (#2)] DEBUG org.openlca.core.database.Query - 1 results
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.derby.DerbyDatabase - create connection: jdbc:derby:/olca-modules/olca-ipc/db
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - HikariPool-1 - configuration:
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - allowPoolSuspension.............false
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - autoCommit......................false
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - catalog.........................none
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - connectionInitSql...............none
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - connectionTestQuery.............none
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - connectionTimeout...............30000
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - dataSource......................none
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - dataSourceClassName.............none
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - dataSourceJNDI..................none
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - dataSourceProperties............{password=<masked>}
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - driverClassName.................none
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - healthCheckProperties...........{}
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - healthCheckRegistry.............none
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - idleTimeout.....................600000
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - initializationFailTimeout.......1
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - isolateInternalQueries..........false
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - jdbcUrl.........................jdbc:derby:/olca-modules/olca-ipc/db
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - leakDetectionThreshold..........0
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - maxLifetime.....................1800000
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - maximumPoolSize.................10
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - metricRegistry..................none
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - metricsTrackerFactory...........none
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - minimumIdle.....................10
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - password........................<masked>
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - poolName........................"HikariPool-1"
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - readOnly........................false
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - registerMbeans..................false
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - scheduledExecutor...............none
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - schema..........................none
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - threadFactory...................internal
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - transactionIsolation............default
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - username........................none
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.HikariConfig - validationTimeout...............5000
[NanoHttpd Request Processor (#2)] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.util.DriverDataSource - Loaded driver with class name org.apache.derby.jdbc.AutoloadedDriver for jdbcUrl=jdbc:derby:/olca-modules/olca-ipc/db
[NanoHttpd Request Processor (#2)] INFO com.zaxxer.hikari.pool.PoolBase - HikariPool-1 - Driver does not support get/set network timeout for connections. (Feature not implemented: No details.)
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection org.apache.derby.impl.jdbc.EmbedConnection@417643963 (XID = 12517732), (SESSIONID = 3), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null) 
[NanoHttpd Request Processor (#2)] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Executed rollback on connection org.apache.derby.impl.jdbc.EmbedConnection@417643963 (XID = 12517732), (SESSIONID = 3), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null)  due to dirty commit state on close().
[NanoHttpd Request Processor (#2)] INFO org.openlca.ipc.handlers.Calculator - Calculate product system 05475ad7-3559-4fbe-a6e4-5cf436d33330
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.matrix.cache.FlowTable - initialize flow index
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.derby.DerbyDatabase - create connection: jdbc:derby:/olca-modules/olca-ipc/db
[HikariPool-1 housekeeper] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Pool stats (total=1, active=1, idle=0, waiting=0)
[HikariPool-1 connection adder] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection org.apache.derby.impl.jdbc.EmbedConnection@1078207422 (XID = 12517738), (SESSIONID = 5), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null) 
[HikariPool-1 connection adder] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection org.apache.derby.impl.jdbc.EmbedConnection@24717701 (XID = 12517740), (SESSIONID = 7), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null) 
[HikariPool-1 connection adder] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection org.apache.derby.impl.jdbc.EmbedConnection@808595148 (XID = 12517742), (SESSIONID = 9), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null) 
[HikariPool-1 connection adder] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection org.apache.derby.impl.jdbc.EmbedConnection@1633081034 (XID = 12517744), (SESSIONID = 11), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null) 
[HikariPool-1 connection adder] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection org.apache.derby.impl.jdbc.EmbedConnection@1145670905 (XID = 12517746), (SESSIONID = 13), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null) 
[HikariPool-1 connection adder] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection org.apache.derby.impl.jdbc.EmbedConnection@1696090925 (XID = 12517748), (SESSIONID = 15), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null) 
[HikariPool-1 connection adder] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection org.apache.derby.impl.jdbc.EmbedConnection@1816469787 (XID = 12517750), (SESSIONID = 17), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null) 
[HikariPool-1 connection adder] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection org.apache.derby.impl.jdbc.EmbedConnection@1980381 (XID = 12517752), (SESSIONID = 19), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null) 
[HikariPool-1 connection adder] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection org.apache.derby.impl.jdbc.EmbedConnection@993182150 (XID = 12517754), (SESSIONID = 21), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null) 
[HikariPool-1 connection adder] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - After adding stats (total=10, active=1, idle=9, waiting=0)
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Executed rollback on connection org.apache.derby.impl.jdbc.EmbedConnection@417643963 (XID = 12517732), (SESSIONID = 3), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null)  due to dirty commit state on close().
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.derby.DerbyDatabase - create connection: jdbc:derby:/olca-modules/olca-ipc/db
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Executed rollback on connection org.apache.derby.impl.jdbc.EmbedConnection@417643963 (XID = 12517732), (SESSIONID = 3), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null)  due to dirty commit state on close().
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.matrix.cache.ProcessTable - build process index table
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.derby.DerbyDatabase - create connection: jdbc:derby:/olca-modules/olca-ipc/db
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Executed rollback on connection org.apache.derby.impl.jdbc.EmbedConnection@417643963 (XID = 12517732), (SESSIONID = 3), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null)  due to dirty commit state on close().
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.derby.DerbyDatabase - create connection: jdbc:derby:/olca-modules/olca-ipc/db
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Executed rollback on connection org.apache.derby.impl.jdbc.EmbedConnection@417643963 (XID = 12517732), (SESSIONID = 3), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null)  due to dirty commit state on close().
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.NativeSql - execute query select f_owner, f_flow, is_input from tbl_exchanges
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.derby.DerbyDatabase - create connection: jdbc:derby:/olca-modules/olca-ipc/db
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Executed rollback on connection org.apache.derby.impl.jdbc.EmbedConnection@417643963 (XID = 12517732), (SESSIONID = 3), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null)  due to dirty commit state on close().
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.matrix.cache.ProcessTable - 20801 providers mapped
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.math.SystemCalculator - calculate product system - full result
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.derby.DerbyDatabase - create connection: jdbc:derby:/olca-modules/olca-ipc/db
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Executed rollback on connection org.apache.derby.impl.jdbc.EmbedConnection@417643963 (XID = 12517732), (SESSIONID = 3), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null)  due to dirty commit state on close().
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.derby.DerbyDatabase - create connection: jdbc:derby:/olca-modules/olca-ipc/db
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Executed rollback on connection org.apache.derby.impl.jdbc.EmbedConnection@417643963 (XID = 12517732), (SESSIONID = 3), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null)  due to dirty commit state on close().
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.derby.DerbyDatabase - create connection: jdbc:derby:/olca-modules/olca-ipc/db
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Executed rollback on connection org.apache.derby.impl.jdbc.EmbedConnection@417643963 (XID = 12517732), (SESSIONID = 3), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null)  due to dirty commit state on close().
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.NativeSql - execute query select scope, f_owner, name, is_input_param, value, formula from tbl_parameters
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.derby.DerbyDatabase - create connection: jdbc:derby:/olca-modules/olca-ipc/db
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Executed rollback on connection org.apache.derby.impl.jdbc.EmbedConnection@417643963 (XID = 12517732), (SESSIONID = 3), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null)  due to dirty commit state on close().
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.matrix.cache.FlowTable - initialize flow index
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.derby.DerbyDatabase - create connection: jdbc:derby:/olca-modules/olca-ipc/db
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Executed rollback on connection org.apache.derby.impl.jdbc.EmbedConnection@417643963 (XID = 12517732), (SESSIONID = 3), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null)  due to dirty commit state on close().
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.derby.DerbyDatabase - create connection: jdbc:derby:/olca-modules/olca-ipc/db
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Executed rollback on connection org.apache.derby.impl.jdbc.EmbedConnection@417643963 (XID = 12517732), (SESSIONID = 3), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null)  due to dirty commit state on close().
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.NativeSql - execute query SELECT id, flow_type FROM tbl_flows
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.derby.DerbyDatabase - create connection: jdbc:derby:/olca-modules/olca-ipc/db
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Executed rollback on connection org.apache.derby.impl.jdbc.EmbedConnection@417643963 (XID = 12517732), (SESSIONID = 3), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null)  due to dirty commit state on close().
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.NativeSql - execute query SELECT id, f_owner, f_flow, f_flow_property_factor, f_unit, resulting_amount_value, resulting_amount_formula, is_input, avoided_product, f_default_provider, cost_value, cost_formula, f_currency, distribution_type, parameter1_value, parameter2_value, parameter3_value FROM tbl_exchanges
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.derby.DerbyDatabase - create connection: jdbc:derby:/olca-modules/olca-ipc/db
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Executed rollback on connection org.apache.derby.impl.jdbc.EmbedConnection@417643963 (XID = 12517732), (SESSIONID = 3), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null)  due to dirty commit state on close().
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.matrix.format.MatrixBuilder - Fill rate = 0.001018500155142017
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.matrix.format.MatrixBuilder - Finish matrix builder with sparse 10812*10812 matrix
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.matrix.format.MatrixBuilder - Fill rate = 0.005394028069981991
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.matrix.format.MatrixBuilder - Finish matrix builder with sparse 4147*10812 matrix
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.matrix.ImpactTable$ImpactTableBuilder - Build impact factor matrix for method 2157574
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.NativeSql - execute query SELECT id, ref_id, name, description, version, last_change, reference_unit FROM tbl_impact_categories where f_impact_method = 2157574
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.derby.DerbyDatabase - create connection: jdbc:derby:/olca-modules/olca-ipc/db
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Executed rollback on connection org.apache.derby.impl.jdbc.EmbedConnection@417643963 (XID = 12517732), (SESSIONID = 3), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null)  due to dirty commit state on close().
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.matrix.cache.ImpactFactorCache$FactorLoader - load impact factors for multiple categories
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.database.derby.DerbyDatabase - create connection: jdbc:derby:/olca-modules/olca-ipc/db
[NanoHttpd Request Processor (#2)] DEBUG com.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Executed rollback on connection org.apache.derby.impl.jdbc.EmbedConnection@417643963 (XID = 12517732), (SESSIONID = 3), (DATABASE = /olca-modules/olca-ipc/db), (DRDAID = null)  due to dirty commit state on close().
[NanoHttpd Request Processor (#2)] TRACE org.openlca.core.matrix.ImpactTable$ImpactTableBuilder - Impact factor matrix ready
[HikariPool-1 housekeeper] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Pool stats (total=10, active=0, idle=10, waiting=0)

I appreciate if you can take a look and maybe help me figuring out why it is not working

Calculation via IPC Server Fails With `NullPointerException`

[Updated because I messed up the list of "bad" commits]

Hi there,

We are in the process of automating our calculations using the standalone IPC server (org.openlca.ipc) running in a Docker container. Recent commits on master (as of this writing 1a4ac58 is the most recent commit) throw exceptions when attempting to run the calculation.

The IPC client (Python olca-ipc==0.0.11) reports an -32000: Unhandled server error: null.

More interestingly, on the server's side:

[NanoHttpd Request Processor (#36)] ERROR org.openlca.ipc.handlers.Calculator - Calculation failed
java.lang.NullPointerException
	at java.base/java.util.Objects.requireNonNull(Objects.java:208)
	at org.openlca.core.matrix.index.TechIndex.of(TechIndex.java:105)
	at org.openlca.core.math.SystemCalculator.with(SystemCalculator.java:89)
	at org.openlca.core.math.SystemCalculator.calculateFull(SystemCalculator.java:84)
	at org.openlca.ipc.handlers.Calculator.calculate(Calculator.java:257)
	at org.openlca.ipc.handlers.Calculator.calculate(Calculator.java:99)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.openlca.ipc.Server$Handler.invoke(Server.java:153)
	at org.openlca.ipc.Server.getResponse(Server.java:127)
	at org.openlca.ipc.Server.serve(Server.java:113)
	at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:945)
	at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)
	at java.base/java.lang.Thread.run(Thread.java:833)

Using git bisect I have narrowed the issue down to the following commits (some commits cannot be compiled):

commit 19d4a50cde68b4dc34bedf124272c0ac65197d6c
Author: msrocka <[email protected]>
Date:   Tue Mar 1 09:58:14 2022 +0100

    fix compiler error in proto-io

commit df31361f2be0c936f08191522266591afe582da1 
Author: msrocka <[email protected]>
Date:   Mon Feb 28 18:05:15 2022 +0100

    upgrade field names III

commit 9145b972ca43de5e89d42f6b15d6198a5b2c1178
Author: msrocka <[email protected]>
Date:   Mon Feb 28 18:05:01 2022 +0100

    upgrade field names III

commit 30a7ff2a4c1f742e29c794c3ac7937b36c1790b0
Author: msrocka <[email protected]>
Date:   Mon Feb 28 16:53:52 2022 +0100

    upgrade field names II

commit 3a508fda642b8b2a3641e03c40168485ce3e9095
Author: msrocka <[email protected]>
Date:   Mon Feb 28 16:26:43 2022 +0100

    upgrade field names I

commit 5aaf46c6fdd8ef8249439c7494889dffb5d96502
Author: msrocka <[email protected]>
Date:   Mon Feb 28 14:32:16 2022 +0100

    sync category paths in import

commit 4fb7b4aff059b864224f4888c40b066d9d3b081d (HEAD, refs/bisect/bad)
Author: msrocka <[email protected]>
Date:   Mon Feb 28 12:55:33 2022 +0100

    add a CategorySync

The last commit that we can run calculations with is:

commit 2d3bb62e33be7e48a6ddc37034133ce05aae83e7 (refs/bisect/good-2d3bb62e33be7e48a6ddc37034133ce05aae83e7)
Author: msrocka <[email protected]>
Date:   Mon Feb 28 11:24:09 2022 +0100

    replace category references with paths

This is not a particularly urgent issue for us but I thought I'd let you know.

Appreciate your work on openLCA!

Multiple Issues with MySQL schema on version 1.11.0

Hello everyone,

I was trying to create a remote MySQL database to use with the v1.11.0 release of openLCA using this schema:

I converted the code as described in the header, however I could not create the schema with this code, as this part of the schema produced an error (shortened for better readability):
CREATE TABLE tbl_flows ( synonyms VARCHAR(32672), );
Apparently, this exceeds the maximum row size for VARCHAR. I noticed, that in newer versions of the code on the master branch, this was replaced by VARCHAR(16383) , which to my knowledge should work, but the error persisted until I shrunk it down to ~VARCHAR(13000). Using LONGVARCHAR also works.

I managed to set up the MySQL database with these alterations, and connect to it via the openLCA desktop app. However, I could not import any LCA datasets into this remote database. When trying to import the ecoinvent 3.8 APOS UNIT DBfor example, I got this error message in the log file:

 Internal Exception: java.sql.SQLSyntaxErrorException: Unknown column 'preceding_dataset' in 'field list'
    Error Code: 1054
    Call: INSERT INTO tbl_process_docs (id, completeness, copyright, creation_date, data_collection_period, data_selection, data_treatment, geography, intended_application, inventory_method, modeling_constants, preceding_dataset, project, restrictions, review_details, sampling, technology, time, valid_from, valid_until, f_data_documentor, f_data_generator, f_dataset_owner, f_publication, f_reviewer) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

The column preceding_dataset seems to be missing entirely from the relevant table. When looking through other versions of the database schema on the master branch, I noticed that this column is only present in the schema in versions named 10 or newer (like in commit a1751a2)

I tried running the remote DB on the schema from this commit, but it doesn't seem to match (as is expected), so I switched back to using the altered code from the link at the top. When adding the column to the table manually, creating a new database and trying to import the ecoinvent DB again, I got new errors in the log-file:

Internal Exception: java.sql.SQLSyntaxErrorException: Unknown column 'is_system_link' in 'field list'
    Error Code: 1054
Internal Exception: java.sql.SQLSyntaxErrorException: Unknown column 'f_author' in 'field list'
    Error Code: 1054

Both errors appeared while Importing ProductSystems and ImpactMethods. When reviewing the master branch again, I noticed that the mentioned columns are present in this commit (v10): a1751a2 but are no longer present in this commit (v11): bf6c8b1.

When manually adding these columns to the relevant tables, as well as f_generator BIGINT in tbl_impact_methods, the import goes through without errors. All Flows seem to be present and functional, the processes however are present, but not functional. They appear empty with this error message:

Local Exception Stack: 
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.3.v20180807-4be1041): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: Table 'test_db_4.tbl_source_links' doesn't exist
Error Code: 1146
Call: SELECT t1.id, t1.description, t1.external_file, t1.last_change, t1.name, t1.ref_id, t1.tags, t1.text_reference, t1.url, t1.version, t1.source_year, t1.f_category FROM tbl_source_links t0, tbl_sources t1 WHERE ((t0.f_owner = ?) AND (t1.id = t0.f_source))
	bind => [1 parameter bound]

I feel like I am just working with the wrong code or commit, but I am somewhat confused which schema I should use. Could someone point me to the correct version? If you want me to elaborate on anything, feel free to message me.

Kind regards

NPE in org.openlca.io.ilcd.output.ExportDispatch

There's a small bug in the checkRunFlowExport method where the Flow object parameter is not being instantiated in the FlowExport object. Thus, when the FlowExport's run method is called it blows on an NPE when it calls makeDataSetInfo() which is expecting the flow attribute to have been initialized.

One fix is to instantiate the FlowExport object with the FlowExport(database,target,flow) signature; In our local branch I chose to modify the FlowExport run method by adding this.flow=flow to the first line.

This problem also occurs in checkRunFlowPropertyExport and checkRunActorExport for the same reason and put a similar mod in ActorExport and FlowPropertyExport.

I can put in a pull request on our branch. Or, you can apply your preferred fix and I'll merge.

Compile error in org.openlca.ilcd.commons.Refs.java

[ERROR] /Users/gary.moore/git/olca-modules/olca-ilcd/src/main/java/org/openlca/ilcd/commons/Ref.java:[114,21] type org.openlca.ilcd.commons.Class does not take parameters

Fixed by adding java.lang.Class<? extends IDataSet> getDataSetClass() to method signature.

This using java 1.8.0_111 on MacOs.

Compilation fails for olca-proto module

I followed the instructions per the README:
git clone https://github.com/GreenDelta/olca-modules.git
mvn install -DskipTests

The compilation fails with the following exception:

[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/spietzn/GIT/foreign/olca-modules/olca-proto/src/test/java/org/openlca/proto/server/DataUpdateTest.java:[123,25] cannot find symbol
  symbol:   method getDescriptorForType()
  location: variable proto of type java.lang.Object
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for org.openlca:olca-modules 2.0.0:
[INFO] 
[INFO] org.openlca:olca-modules ........................... SUCCESS [  0.523 s]
[INFO] org.openlca:olca-formula ........................... SUCCESS [  0.749 s]
[INFO] olca-core .......................................... SUCCESS [  0.496 s]
[INFO] olca-cloud ......................................... SUCCESS [  0.087 s]
[INFO] olca-ecospold-1 .................................... SUCCESS [  0.128 s]
[INFO] olca-ecospold-2 .................................... SUCCESS [  0.094 s]
[INFO] olca-ilcd .......................................... SUCCESS [  0.212 s]
[INFO] olca-simapro-csv ................................... SUCCESS [  0.077 s]
[INFO] olca-io ............................................ SUCCESS [  3.473 s]
[INFO] olca-ipc ........................................... SUCCESS [  0.080 s]
[INFO] olca-proto ......................................... FAILURE [  5.217 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  11.417 s
[INFO] Finished at: 2021-08-09T15:59:15+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:testCompile (default-testCompile) on project olca-proto: Compilation failure
[ERROR] /home/spietzn/GIT/foreign/olca-modules/olca-proto/src/test/java/org/openlca/proto/server/DataUpdateTest.java:[123,25] cannot find symbol
[ERROR]   symbol:   method getDescriptorForType()
[ERROR]   location: variable proto of type java.lang.Object
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :olca-proto

I am using maven version 3.6.3 and openjdk-14.0.2
When removing the olca-proto module from the root pom.xml everything works fine.

This can be reproduced with the following Dockerfile:

FROM maven:3.6-openjdk-14
RUN microdnf install git; microdnf clean all
RUN mkdir /db
RUN git clone https://github.com/GreenDelta/olca-modules.git
WORKDIR /olca-modules/
#RUN sed -i 's/.*olca-proto.*//' pom.xml
RUN mvn clean install -DskipTests
WORKDIR /olca-modules/olca-ipc
CMD mvn -P server-app exec:java -Dexec.mainClass=org.openlca.ipc.Main -Dexec.args="-db /db"

Uncommenting line 6 leads to a working image.

es2 import: include more attributes for generating the process IDs

Currently, the process IDs are generated from the activity ID and ID of the reference product of a data set. But, we should also include the activity type (1: unit process, 2: terminated system) and system model (APOS etc.) here. Then we should have different IDs for all ei process packages.

How to binds flows descriptor to tech matrix

Hi,

I'm trying to hack the LcaCalculator class for performing new analysis, but I'm stucked on retrieving the flows and processes names. I would like to describe the elements of the technology matrix with the associated flows and processes.
What I don't understand is that in my example (glass wool mat at plant from ecoivent 2.1), I have the following dimensions:

  • technology matrix inventoryMatrix.getTechnologyMatrix() 1956x1956
  • flows list inventoryMatrix.getFlowIndex().getFlowIds() = 1340
    So, I'm wrong :-)
    But how can I get the corresponding flow and process of an element of the technology matrix?
    Thanks

Do we really need so many descriptor types?

It probably makes no sense to have classes like this:

package org.openlca.core.model.descriptors;
import org.openlca.core.model.ModelType;

public class ActorDescriptor extends CategorizedDescriptor {

private static final long serialVersionUID = -981953936862691061L;

  public ActorDescriptor() {
    setType(ModelType.ACTOR);
  }
}

In most cases we could just replace such descriptors with instances of CategorizedDescriptor... However, we need to check this regarding the EntityCache, navigation, etc... And when we remove these descriptors, we can also replace the getters and setters with plain public fields.

Howto use olca-core in custom project

Hello there,

I would like to remotly compute data throught openLCA model on my server database (without using python)

  • User send Data to the server
  • Server run a program who compute data through olca-core
  • Server return the result to the User
flowchart LR
    external(external App)
    app(openlca)
    db[(Database)]
    runner{{ process data }}
    app-->|configure LCA|db <--> runner <--> external

Copying example from examples in olca-core repo.

        var dbPath = "../db";
        var productSystemId = "45fbd13f-618c-4d9f-add1-2d409f7514e7";
        var impactMethodId = "7c122634-f88e-381e-be4b-a102078a0803";
        IDatabase db = new DerbyDatabase(new File(dbPath));
        ProductSystem system = new ProductSystemDao(db).getForRefId(productSystemId);
        ImpactMethodDao idao = new ImpactMethodDao(db);
        ImpactMethodDescriptor method = idao.getDescriptorForRefId(impactMethodId);
        CalculationSetup setup = new CalculationSetup(CalculationType.CONTRIBUTION_ANALYSIS, system);
        setup.impactMethod = method;

        for (ImpactCategoryDescriptor i : idao.getCategoryDescriptors(method.id)) {
            System.out.println(i.id + i.name);
        }

        SystemCalculator calc = new SystemCalculator(MatrixCache.createEager(db), new DenseSolver());
        FullResult r = calc.calculateFull(setup);
        FlowDescriptor flow = r.flowIndex.at(0);
        System.out.println(
                flow.name + "  -> " +
                        r.getTotalFlowResult(flow));

        ImpactCategoryDescriptor impact = r.impactIndex.at(0);
        System.out.println(
                impact.name + "  -> " +
                        r.getTotalImpactResult(impact));

Trying to run the script, I ended with :

java.lang.UnsatisfiedLinkError: 'int org.openlca.eigen.Lapack.dInvert(int, double[])'

at FullResult r = calc.calculateFull(setup);

do you have any documentation, tutorial or advice to guide me on this task ?

Any help would be grateful

Thanks

Loading zolca file in olca-ipc

Hello,

I'm interested in loading an existing zolca file into the server when running olca-ipc as an IPC server, specifically https://simapro.com/products/agribalyse-agricultural-database/.

How do I do that? I looked around in the RPC handlers, and found nothing that corresponded to the 'restore database' menu option in the app.

I tried to just unzip the zolca file in a directory, and use that directory as -db option. The server started, but I'm not yet sure if this will lead to the expected results..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.