nuix / nuix-java-engine-baseline Goto Github PK
View Code? Open in Web Editor NEWA Java project which can be adapted as a starting point for development against the Nuix Java Engine API
License: Apache License 2.0
A Java project which can be adapted as a starting point for development against the Nuix Java Engine API
License: Apache License 2.0
What is the Nuix Java Engine for?
Hi Nuix-Team,
I'm currently building a Java Application that uses the Nuix JAVA API to process data. What I noticed when processing docx-files was, that the files were marked as poisoned items. I found out that this was due to the fact, that the nuix jars couldn't find the passware.dll-files. I was able to get around this issue by setting the windows system path as you describe it in the read.me for this projekt.
In the future I want to let the user decide which engine he wants to use at runtime. This isn't possible when I need to put the bin-folders from a specific engine release on the systems path. I tried a couple of other options like setting -Djava.library.path and -Djna.library.path, but the passware.dll weren't found.
Do you have any tips for me concerning this problem?
Example:
System.setProperty("nuix.libdir", "C:\\EngineDist\\lib");
Should hopefully provide a fix for situation in which extremely long class path being passed to workers causes the worker invocation command to be too long.
Unfortunately the basic example is not working for me. I always get
Caused by: java.lang.ClassNotFoundException: org.picocontainer.MutablePicoContainer
The full error message is:
[Fatal Error] log4j2.yml:1:1: Content is not allowed in prolog.
Exception in thread "main" java.lang.NoClassDefFoundError: org/picocontainer/MutablePicoContainer
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at com.nuix.common.dependency.Dependencies.a(SourceFile:66)
at com.nuix.common.dependency.Dependencies.bootstrap(SourceFile:55)
at com.nuix.engine.e.<init>(SourceFile:46)
at com.nuix.engine.DefaultGlobalContainerFactory.createSpi(SourceFile:26)
at nuix.engine.GlobalContainerFactory.newContainer(SourceFile:66)
at com.nuix.enginebaseline.NuixEngine.ensureGlobalContainer(NuixEngine.java:479)
at com.nuix.enginebaseline.NuixEngine.getUtilities(NuixEngine.java:314)
at com.nuix.enginebaseline.NuixEngine.run(NuixEngine.java:337)
at com.nuix.enginebaseline.Main.main(Main.java:25)
Caused by: java.lang.ClassNotFoundException: org.picocontainer.MutablePicoContainer
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 18 more
Caused by: java.lang.ClassNotFoundException: org.picocontainer.MutablePicoContainer
Execution failed for task ':Main.main()'.
> Process 'command 'D:/Java/jdk-11.0.2/bin/java.exe'' finished with non-zero exit value 1
The Main class is very simple based on your example:
public class Main {
public static void main(String[] args) {
try {
LicenseResolver anyDongle = NuixLicenseResolver.fromDongle()
.withRequiredFeatures("CASE_CREATION");
NuixEngine.usingFirstAvailableLicense(anyDongle)
.setEngineDistributionDirectoryFromEnvVar()
.run((utilities -> {
//log.info("License was obtained!");
System.out.println("Licence obtained!");
// Do something with Utilities/API here
}));
}catch(Exception e){
System.out.println(e.getMessage());
}
}
}
Is there anything I need to check?
I am developing a project based on Nuix-Java-Engine-Baseline and the Nuix Engine. When switching the engine from 9.2.4.392 to 9.6.6.317 the execution of my program runs into an error. When using it with the engine version 9.2.4.392 it runs just fine.
C:\Users\user\Desktop\casemaker-0.0.1-SNAPSHOT>"C:\Program Files\Eclipse Foundation\jdk-11.0.12.7-hotspot\bin\java.exe" -Xms2G -Xmx2G -Dlog4j.configurationFile="C:\Users\user\Desktop\casemaker-0.0.1-SNAPSHOT\log4j2-nuix-9.yml" -Dnuix.logdir="C:\Nuix\engine-dist-win32-amd64-9.6.6.317\logs\20220102174752" -Dnuix.libdir="C:\Nuix\engine-dist-win32-amd64-9.6.6.317\lib" -cp lib\*;C:\Nuix\engine-dist-win32-amd64-9.6.6.317\lib\* de.comp.nuix.api.CreateCase "C:\Nuix\CaseFolder" "TestCase" "C:\Nuix_Evidence\Language_Test"
2022-02-01 17:47:53.833 +0100 [main] 1684 INFO de.comp.nuix.common.config.DataBridgeConfigurator - DataBridgeConfig gefunden in: dataBridgeConfig.json
2022-02-01 17:47:53.848 +0100 [main] 1699 INFO de.comp.nuix.api.EngineWrapper - Setting 'nuix.libdir' to: C:\Nuix\engine-dist-win32-amd64-9.6.6.317\lib
2022-02-01 17:47:53.864 +0100 [main] 1715 INFO de.comp.nuix.api.EngineWrapper - Creating GlobalContainer...
2022-02-01 17:47:54.834 +0100 [main] 2685 INFO com.nuix.storage.lowlevel.graph.a - Setting un-specified OrientDB System property 'memory.leftToOS' to Nuix default of '90%'.
2022-02-01 17:47:54.834 +0100 [main] 2685 INFO com.nuix.storage.lowlevel.graph.a - Setting un-specified OrientDB System property 'memory.useUnsafe' to Nuix default of 'false'.
2022-02-01 17:47:54.834 +0100 [main] 2685 INFO com.nuix.storage.lowlevel.graph.a - Setting un-specified OrientDB System property 'storage.compressionMethod' to Nuix default of 'gzip'.
2022-02-01 17:47:55.447 +0100 [main] 3298 INFO com.nuix.util.concurrent.d - Initialising with 2 IO threads
2022-02-01 17:47:55.460 +0100 [main] 3311 INFO com.nuix.util.concurrent.d - Initialising with 4 store threads
2022-02-01 17:47:55.622 +0100 [main] 3473 INFO com.nuix.util.jvm.classloader.EngineBootstrapClassLoader - EngineBootstrapClassLoader invoked.
2022-02-01 17:47:55.660 +0100 [main] 3511 INFO com.nuix.util.jvm.classloader.EngineBootstrapClassLoader - Trying to load JARS under this path- C:\Nuix\engine-dist-win32-amd64-9.6.6.317\lib\non-fips
2022-02-01 17:47:55.660 +0100 [main] 3511 INFO com.nuix.util.jvm.classloader.EngineBootstrapClassLoader - Valid ClassLoader Module Path resolved to C:\Nuix\engine-dist-win32-amd64-9.6.6.317\lib\non-fips
2022-02-01 17:47:55.776 +0100 [main] 3627 WARN com.nuix.util.jvm.classloader.EngineBootstrapClassLoader - Failed to invoke Load Module for EngineBootStrapClassLoader as java.base does not export jdk.internal.loader to unnamed module
2022-02-01 17:47:55.776 +0100 [main] 3627 INFO com.nuix.util.crypto.i - NuixSecurityServices created in non-FIPS mode
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.nuix.storage.lowlevel.graph.internal.impl.orientdb.e (file:/C:/Nuix/engine-dist-win32-amd64-9.6.6.317/lib/nuix-storage-lowlevel-9.6.6.317.jar) to method java.lang.ClassLoader.findLoadedClass(java.lang.String)
WARNING: Please consider reporting this to the maintainers of com.nuix.storage.lowlevel.graph.internal.impl.orientdb.e
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
2022-02-01 17:47:55.776 +0100 [main] 3627 INFO de.comp.nuix.api.EngineWrapper - Removing shutdown hook to EngineWrapper::close
Exception in thread "main" java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider
at com.nuix.util.crypto.i.a(SourceFile:35)
at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:167)
at com.nuix.util.k.e(SourceFile:107)
at com.nuix.util.jvm.classloader.EngineBootstrapClassLoader.b(SourceFile:86)
at com.nuix.util.jvm.classloader.EngineBootstrapClassLoader.run(SourceFile:81)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at com.nuix.engine.e.<init>(SourceFile:49)
at com.nuix.engine.DefaultGlobalContainerFactory.createSpi(SourceFile:23)
at nuix.engine.GlobalContainerFactory.newContainer(SourceFile:60)
at de.comp.nuix.api.EngineWrapper.withServerLicense(EngineWrapper.java:189)
at de.comp.nuix.api.CreateCase.main(CreateCase.java:95)
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 11 more
C:\Users\user\Desktop\casemaker-0.0.1-SNAPSHOT>PAUSE
I would expect it to run in the new version as in the old version.
Hi,
I have implemented nuix java based api with this i'm able to connect to licensed server then i got Utility instance so that i can able to create new case or open existed case. now i want to add evidence to existing case and need to process.
please could you help. thanks in advance
Hi Nuix Team,
I able to run the latest released nuix engine 9.10.xx version in intellij with VM arguments
--add-exports=javafx.base/com.sun.javafx.event=ALL-UNNAMED
now I generated build and run from executable jar like
java -Xms2g -Xmx4g -jar nuixEngineTest.jar --add-exports=java.base/jdk.internal.loader=ALL-UNNAMED
not working and throw error
ERROR com.nuix.util.jvm.classloader.EngineBootstrapClassLoader - Matching method not found for "load module "java.lang.NoSuchMethodException: org.springframework.boot.loader.LaunchedURLClassLoader.loadModule(java.lang.module.ModuleReference) at java.lang.Class.getMethod(Class.java:2108) ~[?:?] at com.nuix.util.jvm.classloader.EngineBootstrapClassLoader.a(SourceFile:139) ~[nuix-util-9.10.9.584.jar!/:?] at java.util.Optional.ifPresent(Optional.java:183) ~[?:?] at com.nuix.util.jvm.classloader.EngineBootstrapClassLoader.a(SourceFile:132) ~[nuix-util-9.10.9.584.jar!/:?] at com.nuix.util.jvm.classloader.EngineBootstrapClassLoader.run(SourceFile:74) ~[nuix-util-9.10.9.584.jar!/:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?] at com.nuix.engine.e.<init>(SourceFile:49) ~[nuix-engine-impl-9.10.9.584.jar!/:?] at com.nuix.engine.DefaultGlobalContainerFactory.createSpi(SourceFile:23) ~[nuix-engine-impl-9.10.9.584.jar!/:?] at nuix.engine.GlobalContainerFactory.newContainer(SourceFile:60) ~[nuix-engine-api-9.10.9.584.jar!/:?] at com.lio.eprintutility.services.LoginServiceImpl.getAllServerLicense(LoginServiceImpl.java:255) ~[classes!/:?] at com.lio.eprintutility.services.LoginServiceImpl$1.call(LoginServiceImpl.java:45) ~[classes!/:?] at com.lio.eprintutility.services.LoginServiceImpl$1.call(LoginServiceImpl.java:41) ~[classes!/:?] at javafx.concurrent.Task$TaskCallable.call(Task.java:1425) ~[javafx-graphics-11-win.jar!/:?] at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] at javafx.concurrent.Service.lambda$executeTask$6(Service.java:725) ~[javafx-graphics-11-win.jar!/:?] at java.security.AccessController.doPrivileged(Native Method) ~[?:?] at javafx.concurrent.Service.lambda$executeTask$7(Service.java:724) ~[javafx-graphics-11-win.jar!/:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:834) [?:?]
Could you please help me from the above issue.
Thank you .
Regard's
Ramesh
Hi,
Latest nuix engine release 9.6.. version but licenseproperties class not found exception at compile time in jar nuix-scripting-api-9.10.9.584.jar
could you please check update ASAP.
Thank you
Using your EngineWrapper (with the Nuix Engine v8.4.6.866) to obtain licenses from our NMS the execution hangs for close to a minute after this code section:
it seems that the executions stopps after the programm iterated over all available licenses on the server.
when I set the logging level to debug. I get the following debug messages after the last license where summarised:
2020-07-24 11:40:03 DEBUG com.nuix.util.net.f:a():82 - Resolving for _nuix2._tcp...
2020-07-24 11:40:24 DEBUG com.nuix.util.net.f:a():100 - No results for _nuix2._tcp
after that the executions continues without problem and a license is obtained. when is comment the code section above and don't iterate to the last license these Debug messages won't appear.
what is Nuix doing in the background and how can I stop it?
In the cloud licence mode of acquiring a licence the time to live on the acquired licence is typically going to be a long time so you should release it when the consumer's accept call is done.
That is, unless you want to support some sort of semi-offline mode like nuix console does with its -release switch (by default it holds the licence for another session on the same machine). In which case this wrapper would provide a means to specify whether to release the licence on cleanup or not.
Build in method for obtaining CLS license
Hi
I am working on admin user it is connecting to license server and third party dependency checker working but I am login with user it is not working.
Could you please help me this issue.
Thank you in advance.
NOTE: I gave same permission with User and Admin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.