Java as windows service with Apache Procrun and --add-module --add-opens --add-exports - java-9

We witched to Java11 and had to add
--add-module
--add-opens
--add-exports
as JVM parameters
The java program is running as a windows service via Apache Procrun.
Adding one of the above mentioned parameters to Java Parameters leads to a non starting service.
If I remove these lines, the JVM comes up.
I already updated the procrunsvr and procrunmgr to the latest version.
There are Java 9 Options. But even if I am adding here the above mentioned parameters the service comes not up and ends with
[2021-05-27 13:09:53] [error] ( javajni.c:828 ) [ 8948] CreateJavaVM Failed with error [-1]
[2021-05-27 13:09:53] [error] ( javajni.c:828 ) [ 8948] The system cannot find the file specified.
[2021-05-27 13:09:53] [debug] ( javajni.c:1087) [ 8948] Java worker thread finished : with status = 2
[2021-05-27 13:09:53] [error] ( prunsrv.c:1386) [ 8892] Failed to start Java
[2021-05-27 13:09:53] [error] ( prunsrv.c:1740) [ 8892] ServiceStart returned 4.
[2021-05-27 13:09:53] [debug] ( prunsrv.c:1032) [ 8892] reportServiceStatusE: dwCurrentState = 1, dwWin32ExitCode = 1066, dwWaitHint = 0, dwServiceSpecificExitCode = 4.
[2021-05-27 13:09:53] [info] ( prunsrv.c:1808) [ 8536] Run service finished.
[2021-05-27 13:09:53] [info] ( prunsrv.c:1980) [ 8536] Apache Commons Daemon procrun finished.
I have this JVM Params:
--add-modules java.se
--add-exports java.base/jdk.internal.ref=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.nio=ALL-UNNAMED
--add-opens java.base/sun.nio.ch=ALL-UNNAMED
--add-opens java.management/sun.management=ALL-UNNAMED
--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED
How I can add Java 9 and above parameters to procrun?
Thanks to Nikolais hint I had to add the =sign.
--add-modules=java.se
--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.nio=ALL-UNNAMED
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
--add-opens=java.management/sun.management=ALL-UNNAMED
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED

Related

How a Quarkus native image running in a Linux-based host system (i.e. Ubuntu) resolves JNI method calls?

I am using Tesseract for Java for OCR text extraction, which makes JNI native calls to Leptonica system library.
When running a Quarkus application in JVM mode in a Linux-based host it resolves JNI method calls correctly,
and all works as expected. But when running as a native image, an UnsatisfiedLinkError exception is thrown when making a call to pixReadMem metohd, which is not found.
The stack trace when running the native image is:
2022-12-16 08:20:29,736 ERROR [org.jbo.res.rea.com.cor.AbstractResteasyReactiveContext] (executor-thread-0) Request failed: java.lang.UnsatisfiedLinkError: Error looking up function 'pixReadMem': com.sun.jna.Native.findSymbol(JLjava/lang/String;)J [symbol: Java_com_sun_jna_Native_findSymbol or Java_com_sun_jna_Native_findSymbol__JLjava_lang_String_2]
at com.sun.jna.Function.<init>(Function.java:252)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:600)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:576)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:562)
at com.sun.jna.Library$Handler.invoke(Library.java:243)
at com.sun.proxy.$Proxy107.pixReadMem(Unknown Source)
at com.itextpdf.pdfocr.tesseract4.TesseractOcrUtil.readPix(TesseractOcrUtil.java:662)
at com.itextpdf.pdfocr.tesseract4.TesseractOcrUtil.readPix(TesseractOcrUtil.java:641)
at com.itextpdf.pdfocr.tesseract4.ImagePreprocessingUtil.preprocessImage(ImagePreprocessingUtil.java:166)
at com.itextpdf.pdfocr.tesseract4.Tesseract4LibOcrEngine.getOcrResultForSinglePage(Tesseract4LibOcrEngine.java:314)
at com.itextpdf.pdfocr.tesseract4.Tesseract4LibOcrEngine.doTesseractOcr(Tesseract4LibOcrEngine.java:189)
at com.itextpdf.pdfocr.tesseract4.AbstractTesseract4OcrEngine.processInputFiles(AbstractTesseract4OcrEngine.java:494)
at com.itextpdf.pdfocr.tesseract4.AbstractTesseract4OcrEngine.doImageOcr(AbstractTesseract4OcrEngine.java:232)
at es.gen.quarkus.ocr.service.TesseractService.extratTextFromJPG(TesseractService.java:42)
at es.gen.quarkus.ocr.service.TesseractService_ClientProxy.extratTextFromJPG(Unknown Source)
at es.gen.quarkus.ocr.service.OCRService.extractTextFromPDF(OCRService.java:34)
at es.gen.quarkus.ocr.service.OCRService_ClientProxy.extractTextFromPDF(Unknown Source)
at es.gen.quarkus.ocr.resource.OCRResource.extractTextFromPDF(OCRResource.java:46)
at es.gen.quarkus.ocr.resource.OCRResource$quarkusrestinvoker$extractTextFromPDF_21209ffb320090ffe15503899b13ececc74cb601.invoke(Unknown Source)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:114)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:145)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base#11.0.17/java.lang.Thread.run(Thread.java:829)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203)`
```
I have tried to set Java system properties with no success:
- `java.library.path` (the current value includes the linux system folders).
- `jna.debug_load=true` does not log any information.
Add this to properties
quarkus.native.additional-build-args=--initialize-at-build-time=java.awt.image.DirectColorModel --trace-class-initialization=sun.awt.image.IntegerInterleavedRaster\\,java.awt.image.DataBufferByte\\,java.awt.Rectangle\\,java.awt.image.SinglePixelPackedSampleModel\\,sun.java2d.StateTrackableDelegate$2\\,java.awt.image.PackedColorModel\\,java.awt.image.DirectColorModel\\,java.awt.image.BufferedImage\\,java.awt.image.DataBuffer\\,java.awt.Toolkit\\,java.awt.color.ColorSpace$BuiltInSpace\\,sun.awt.image.IntegerComponentRaster\\,sun.awt.image.SunWritableRaster\\,java.awt.image.ComponentSampleModel\\,java.awt.image.ColorModel\\,java.awt.image.BandedSampleModel\\,java.awt.image.WritableRaster\\,java.awt.Image\\,java.awt.image.SampleModel\\,java.awt.image.Raster\\,java.awt.image.DataBufferInt\\,sun.java2d.StateTrackableDelegate\\,sun.awt.image.ByteBandedRaster
install libtesseract5 because latest code uses that. this is how I installed it
sudo add-apt-repository ppa:alex-p/tesseract-ocr5
sudo apt update
sudo apt install libtesseract5
then I manage to get the runner executable. no need to run install just mvn package -Pnative will do fine.
When I ran in my local and send a pdf, got another exception.
/quarkus-ocr$ ./target/quarkus-ocr-1.0.0-SNAPSHOT-runner
__ ____ __ _____ ___ __ ____ ______
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2022-12-20 19:09:30,419 INFO [com.zhe.qua.ocr.res.OCRResource] (executor-thread-0) Extracting text from PDF: Profile.pdf (58739 bytes)
java.io.IOException: Error: Could not find referenced cmap stream Identity-H
at org.apache.fontbox.cmap.CMapParser.getExternalCMap(CMapParser.java:492)
at org.apache.fontbox.cmap.CMapParser.parsePredefined(CMapParser.java:99)
at org.apache.pdfbox.pdmodel.font.CMapManager.getPredefinedCMap(CMapManager.java:55)
at org.apache.pdfbox.pdmodel.font.PDType0Font.readEncoding(PDType0Font.java:287)
at org.apache.pdfbox.pdmodel.font.PDType0Font.<init>(PDType0Font.java:204)
at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:97)
at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:146)
at org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:66)
at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:966)
at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:541)
at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:516)
at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:155)
at org.apache.pdfbox.text.LegacyPDFStreamEngine.processPage(LegacyPDFStreamEngine.java:155)
at org.apache.pdfbox.text.PDFTextStripper.processPage(PDFTextStripper.java:363)
at org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:291)
at org.apache.pdfbox.text.PDFTextStripper.writeText(PDFTextStripper.java:238)
at org.apache.pdfbox.text.PDFTextStripper.getText(PDFTextStripper.java:202)
at com.zheta.quarkus.ocr.service.OCRService.extractTextFromPDF(OCRService.java:30)
at com.zheta.quarkus.ocr.service.OCRService_ClientProxy.extractTextFromPDF(Unknown Source)
at com.zheta.quarkus.ocr.resource.OCRResource.extractTextFromPDF(OCRResource.java:43)
at com.zheta.quarkus.ocr.resource.OCRResource$quarkusrestinvoker$extractTextFromPDF_924fb8ae275125151f52704028fdf25205ebf12f.invoke(Unknown Source)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:114)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:145)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base#17.0.5/java.lang.Thread.run(Thread.java:833)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203)
2022-12-20 19:09:30,429 INFO [com.zhe.qua.ocr.res.OCRResource] (executor-thread-0) Extracted text from PDF: Profile.pdf (58739 bytes) finished in 10 ms
build log to show versions
mintozzy#laptop:~/tmp/quarkus-ocrmvn clean package -Pnativer
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< com.zheta.quarkus:quarkus-ocr >--------------------
[INFO] Building quarkus-ocr 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # quarkus-ocr ---
[INFO] Deleting /home/mintozzy/tmp/quarkus-ocr/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # quarkus-ocr ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- quarkus-maven-plugin:2.14.3.Final:generate-code (default) # quarkus-ocr ---
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # quarkus-ocr ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to /home/mintozzy/tmp/quarkus-ocr/target/classes
[INFO]
[INFO] --- quarkus-maven-plugin:2.14.3.Final:generate-code-tests (default) # quarkus-ocr ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # quarkus-ocr ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/mintozzy/tmp/quarkus-ocr/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) # quarkus-ocr ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M7:test (default-test) # quarkus-ocr ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # quarkus-ocr ---
[INFO] Building jar: /home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT.jar
[INFO]
[INFO] --- quarkus-maven-plugin:2.14.3.Final:build (default) # quarkus-ocr ---
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: /home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/quarkus-ocr-1.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from /home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/quarkus-ocr-1.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM 22.3.0 Java 17 EE (Java Version 17.0.5+9-LTS-jvmci-22.3-b07)
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] /home/mintozzy/.sdkman/candidates/java/graalvm-ee-java17-22.3.0/bin/native-image -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dlogging.initial-configurator.min-level=500 -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=3 -J-Duser.language=en -J-Duser.country=GB -J-Dfile.encoding=UTF-8 --features=io.quarkus.runner.Feature,io.quarkus.runtime.graal.ResourcesFeature,io.quarkus.runtime.graal.DisableLoggingFeature,io.quarkus.awt.runtime.graal.AwtFeature,io.quarkus.awt.runtime.graal.DarwinAwtFeature -J--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED -J--add-opens=java.base/java.text=ALL-UNNAMED -J--add-opens=java.base/java.io=ALL-UNNAMED -J--add-opens=java.base/java.lang.invoke=ALL-UNNAMED -J--add-opens=java.base/java.util=ALL-UNNAMED -H:+CollectImageBuildStatistics -H:ImageBuildStatisticsFile=quarkus-ocr-1.0.0-SNAPSHOT-runner-timing-stats.json -H:BuildOutputJSONFile=quarkus-ocr-1.0.0-SNAPSHOT-runner-build-output-stats.json --initialize-at-build-time=java.awt.image.DirectColorModel --trace-class-initialization=sun.awt.image.IntegerInterleavedRaster,java.awt.image.DataBufferByte,java.awt.Rectangle,java.awt.image.SinglePixelPackedSampleModel,sun.java2d.StateTrackableDelegate\$2,java.awt.image.PackedColorModel,java.awt.image.DirectColorModel,java.awt.image.BufferedImage,java.awt.image.DataBuffer,java.awt.Toolkit,java.awt.color.ColorSpace\$BuiltInSpace,sun.awt.image.IntegerComponentRaster,sun.awt.image.SunWritableRaster,java.awt.image.ComponentSampleModel,java.awt.image.ColorModel,java.awt.image.BandedSampleModel,java.awt.image.WritableRaster,java.awt.Image,java.awt.image.SampleModel,java.awt.image.Raster,java.awt.image.DataBufferInt,sun.java2d.StateTrackableDelegate,sun.awt.image.ByteBandedRaster -H:+AllowFoldMethods -J-Djava.awt.headless=true --no-fallback --link-at-build-time -H:+ReportExceptionStackTraces -H:-AddAllCharsets --enable-url-protocols=http -H:NativeLinkerOption=-no-pie -H:-UseServiceLoaderFeature -H:+StackTrace -J--add-exports=org.graalvm.sdk/org.graalvm.nativeimage.impl=ALL-UNNAMED -J--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk=ALL-UNNAMED quarkus-ocr-1.0.0-SNAPSHOT-runner -jar quarkus-ocr-1.0.0-SNAPSHOT-runner.jar
========================================================================================================================
GraalVM Native Image: Generating 'quarkus-ocr-1.0.0-SNAPSHOT-runner' (executable)...
========================================================================================================================
[1/7] Initializing... (11.3s # 0.19GB)
Version info: 'GraalVM 22.3.0 Java 17 EE'
Java version info: '17.0.5+9-LTS-jvmci-22.3-b07'
C compiler: gcc (linux, x86_64, 9.4.0)
Garbage collector: Serial GC
5 user-specific feature(s)
- io.quarkus.awt.runtime.graal.AwtFeature
- io.quarkus.awt.runtime.graal.DarwinAwtFeature
- io.quarkus.runner.Feature: Auto-generated class by Quarkus from the existing extensions
- io.quarkus.runtime.graal.DisableLoggingFeature: Disables INFO logging during the analysis phase for the [org.jboss.threads] categories
- io.quarkus.runtime.graal.ResourcesFeature: Register each line in META-INF/quarkus-native-resources.txt as a resource on Substrate VM
# Printing class initialization configuration to: /home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/reports/class_initialization_configuration_20221220_193027.csv
# Printing class initialization configuration to: /home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/reports/class_initialization_configuration_20221220_193129.csv
# Printing class initialization dependencies to: /home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/reports/class_initialization_dependencies_20221220_193205.dot
# Printing class initialization report to: /home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/reports/class_initialization_report_20221220_193205.csv
[2/7] Performing analysis... [*********] (98.7s # 2.15GB)
15,243 (88.71%) of 17,182 classes reachable
25,842 (62.65%) of 41,250 fields reachable
88,340 (59.44%) of 148,629 methods reachable
516 classes, 118 fields, and 2,372 methods registered for reflection
179 classes, 1,537 fields, and 2,092 methods registered for JNI access
7 native libraries: dl, freetype, m, pthread, rt, stdc++, z
[3/7] Building universe... (9.6s # 2.71GB)
[4/7] Parsing methods... [***] (11.5s # 2.63GB)
[5/7] Inlining methods... [***] (4.4s # 1.94GB)
[6/7] Compiling methods... [**************] (214.3s # 1.47GB)
[7/7] Creating image... (13.4s # 2.06GB)
46.92MB (44.56%) for code area: 51,972 compilation units
55.45MB (52.66%) for image heap:1,114,462 objects and 302 resources
2.93MB ( 2.78%) for other data
105.29MB in total
------------------------------------------------------------------------------------------------------------------------
Top 10 packages in code area: Top 10 object types in image heap:
3.17MB com.oracle.svm.core.code 12.28MB o.a.c.imaging.common.itu_t4.HuffmanTree$Node
1.66MB sun.security.ssl 9.53MB byte[] for code metadata
1.37MB java.util 4.56MB byte[] for general heap data
1.12MB com.oracle.svm.core.jni 4.53MB byte[] for embedded resources
986.77KB sun.font 3.77MB byte[] for java.lang.String
971.69KB io.netty.buffer 3.75MB java.lang.String
914.40KB com.sun.crypto.provider 2.74MB java.lang.Class
881.87KB java.lang.invoke 2.48MB java.lang.Object[]
718.86KB java.lang 1.60MB int[]
641.56KB io.vertx.core.http.impl 1.58MB java.util.HashMap$Node
34.23MB for 623 more packages 7.67MB for 3524 more object types
------------------------------------------------------------------------------------------------------------------------
16.3s (4.3% of total time) in 146 GCs | Peak RSS: 4.75GB | CPU load: 6.64
------------------------------------------------------------------------------------------------------------------------
Produced artifacts:
/home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/quarkus-ocr-1.0.0-SNAPSHOT-runner (executable)
/home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/quarkus-ocr-1.0.0-SNAPSHOT-runner-build-output-stats.json (json)
/home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/quarkus-ocr-1.0.0-SNAPSHOT-runner-timing-stats.json (raw)
/home/mintozzy/tmp/quarkus-ocr/target/quarkus-ocr-1.0.0-SNAPSHOT-native-image-source-jar/quarkus-ocr-1.0.0-SNAPSHOT-runner.build_artifacts.txt (txt)
========================================================================================================================
Finished generating 'quarkus-ocr-1.0.0-SNAPSHOT-runner' in 6m 14s.
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] objcopy --strip-debug quarkus-ocr-1.0.0-SNAPSHOT-runner
[INFO] [io.quarkus.deployment.QuarkusAugmentor] Quarkus augmentation completed in 381602ms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 06:25 min
[INFO] Finished at: 2022-12-20T19:36:34Z
[INFO] ------------------------------------------------------------------------
what libraries it depends
mintozzy#laptop:~/tmp/quarkus-ocr$ ldd ./target/quarkus-ocr-1.0.0-SNAPSHOT-runner
linux-vdso.so.1 (0x00007fff0f5ff000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fdbd2522000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fdbd23d3000)
libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fdbd2314000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fdbd22f8000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fdbd22d5000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fdbd22cf000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fdbd22b2000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdbd20c0000)
/lib64/ld-linux-x86-64.so.2 (0x00007fdbd2720000)
libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fdbd2088000)

validating Logstash configuration

I am trying to validate my logstash configuration.
Using :
sudo -u logstash /usr/share/logstash/bin/logstash --path.settings -t -f /etc/logstash/conf.d
I received the following error:
penJDK 64-Bit Server VM warning: If the number of processors is
expected to increase from one, then you should configure the number of
parallel GC threads appropriately using -XX:ParallelGCThreads=N
WARNING: Could not find logstash.yml which is typically located in
$LS_HOME/config or /etc/logstash. You can specify the path using
--path.settings. Continuing using the defaults Could not find log4j2 configuration at path /tmp/hsperfdata_logstash/-t/log4j2.properties.
Using default config which logs errors to the console [INFO ]
2018-10-09 14:56:50.240 [main] scaffold - Initializing module
{:module_name=>"fb_apache",
:directory=>"/usr/share/logstash/modules/fb_apache/configuration"}
[INFO ] 2018-10-09 14:56:50.265 [main] scaffold - Initializing module
{:module_name=>"netflow",
:directory=>"/usr/share/logstash/modules/netflow/configuration"} [INFO
] 2018-10-09 14:56:50.378 [main] writabledirectory - Creating
directory {:setting=>"path.queue",
:path=>"/usr/share/logstash/data/queue"} [INFO ] 2018-10-09
14:56:50.380 [main] writabledirectory - Creating directory
{:setting=>"path.dead_letter_queue",
:path=>"/usr/share/logstash/data/dead_letter_queue"} [WARN ]
2018-10-09 14:56:51.099 [LogStash::Runner] multilocal - Ignoring the
'pipelines.yml' file because modules or command line options are
specified [INFO ] 2018-10-09 14:56:51.126 [LogStash::Runner] agent -
No persistent UUID file found. Generating new UUID
{:uuid=>"80207611-d5b8-47dd-b229-23c2ade385ae",
:path=>"/usr/share/logstash/data/uuid"} [INFO ] 2018-10-09
14:56:51.568 [LogStash::Runner] runner - Starting Logstash
{"logstash.version"=>"6.2.4"} [INFO ] 2018-10-09 14:56:52.021 [Api
Webserver] agent - Successfully started Logstash API endpoint
{:port=>9600} [ERROR] 2018-10-09 14:56:53.586 [Ruby-0-Thread-1:
/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:22]
beats - Invalid setting for beats input plugin:
input {
beats {
# This setting must be a path
# File does not exist or cannot be opened /etc/pki/tls/certs/logstash-forwarder.crt
ssl_certificate => "/etc/pki/tls/certs/logstash-forwarder.crt"
...
} } [ERROR] 2018-10-09 14:56:53.588 [Ruby-0-Thread-1: /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:22]
beats - Invalid setting for beats input plugin:
input {
beats {
# This setting must be a path
# File does not exist or cannot be opened /etc/pki/tls/private/logstash-forwarder.key
ssl_key => "/etc/pki/tls/private/logstash-forwarder.key"
...
} } [ERROR] 2018-10-09 14:56:53.644 [Ruby-0-Thread-1: /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:22]
agent - Failed to execute action
{:action=>LogStash::PipelineAction::Create/pipeline_id:main,
:exception=>"LogStash::ConfigurationError", :message=>"Something is
wrong with your configuration.",
:backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/config/mixin.rb:89:in
config_init'",
"/usr/share/logstash/logstash-core/lib/logstash/inputs/base.rb:62:in
initialize'",
"/usr/share/logstash/logstash-core/lib/logstash/plugins/plugin_factory.rb:89:in
plugin'",
"/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:112:in
plugin'", "(eval):8:in <eval>'", "org/jruby/RubyKernel.java:994:in
eval'",
"/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:84:in
initialize'",
"/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:169:in
initialize'",
"/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:40:in
execute'",
"/usr/share/logstash/logstash-core/lib/logstash/agent.rb:315:inblock
in converge_state'",
"/usr/share/logstash/logstash-core/lib/logstash/agent.rb:141:in
with_pipelines'",
"/usr/share/logstash/logstash-core/lib/logstash/agent.rb:312:inblock
in converge_state'", "org/jruby/RubyArray.java:1734:in each'",
"/usr/share/logstash/logstash-core/lib/logstash/agent.rb:299:in
converge_state'",
"/usr/share/logstash/logstash-core/lib/logstash/agent.rb:166:in block
in converge_state_and_update'",
"/usr/share/logstash/logstash-core/lib/logstash/agent.rb:141:in
with_pipelines'",
"/usr/share/logstash/logstash-core/lib/logstash/agent.rb:164:in
converge_state_and_update'",
"/usr/share/logstash/logstash-core/lib/logstash/agent.rb:90:in
execute'",
"/usr/share/logstash/logstash-core/lib/logstash/runner.rb:348:in
block in execute'",
"/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:24:in
block in initialize'"]}
I would appreciate any help with this.
Please check logstash.yml file available on /etc/logstash ? If it available stop the logstash service and kill if any processes ruining on background. Save your config file on /etc/logstash/conf.d/your_file.conf. To run the config test go to, logstash bin directory and run
./logstash -f /etc/logstash/conf.d/your_config_file.conf --config.test_and_exit

Bash script adding arguments from variable

I'm working on a Bash Script that will add module customization if it detects that the Java version is greater than 10. I can't seem to get the customizations to be read in properly as a parameter to the java command
#!/bin/bash
# Expect format: java full version "10.0.1+10"
jver="$( java -fullversion 2>&1)"
IFS='.-_^+^"'
read -ra ADDR <<< "$jver" # jver is read into an array as tokens separated by IFS
#java version < 10
if [ ${ADDR[1]} -lt 10 ]; then
moduleCustomizations=""
else
moduleCustomizations=("--illegal-access=warn" "--add-opens java.desktop/java.awt.color=ALL-UNNAMED" "--add-opens java.desktop/sun.font=ALL-UNNAMED" "--add-opens java.desktop/java.beans=ALL-UNNAMED" "--add-opens java.base/java.lang=ALL-UNNAMED" "--add-opens java.base/java.lang.module=ALL-UNNAMED" "--add-opens java.desktop/javax.swing=ALL-UNNAMED" "--add-opens java.desktop/java.awt=ALL-UNNAMED" "--add-opens java.desktop/sun.awt.image=ALL-UNNAMED" "--add-opens java.desktop/javax.accessibility=ALL-UNNAMED" "--add-opens java.desktop/sun.awt=ALL-UNNAMED" "--add-opens java.base/jdk.internal.module=ALL-UNNAMED" "--add-opens java.base/java.security.cert=ALL-UNNAMED" "--add-opens java.base/java.security=ALL-UNNAMED" "--add-opens java.base/java.net=ALL-UNNAMED" "--add-opens java.base/java.lang.ref=ALL-UNNAMED")
fi
set -x
java "${moduleCustomizations[#]}" -Xmx1024m com.test.myClass
Which through debug, bash interprets as:
java --illegal-access=warn '--add-opens java.desktop/java.awt.color=ALL-UNNAMED' '--add-opens java.desktop/sun.font=ALL-UNNAMED' '--add-opens java.desktop/java.beans=ALL-UNNAMED' '--add-opens java.base/java.lang=ALL-UNNAMED' '--add-opens java.base/java.lang.module=ALL-UNNAMED' '--add-opens java.desktop/javax.swing=ALL-UNNAMED' '--add-opens java.desktop/java.awt=ALL-UNNAMED' '--add-opens java.desktop/sun.awt.image=ALL-UNNAMED' '--add-opens java.desktop/javax.accessibility=ALL-UNNAMED' '--add-opens java.desktop/sun.awt=ALL-UNNAMED' '--add-opens java.base/jdk.internal.module=ALL-UNNAMED' '--add-opens java.base/java.security.cert=ALL-UNNAMED' '--add-opens java.base/java.security=ALL-UNNAMED' '--add-opens java.base/java.net=ALL-UNNAMED' '--add-opens java.base/java.lang.ref=ALL-UNNAMED' -Xmx1024m com.test.myClass
So I believe the problem is that the single quotes are appearing in all but the first item passed to the java command. How can I get bash to properly pass the arguments?
EDIT:
Adding another method I've tried keeping $moduleCustomizations as one string:
#!/bin/bash
# Expect format: java full version "10.0.1+10"
jver="$( java -fullversion 2>&1)"
IFS='.-_^+^"'
read -ra ADDR <<< "$jver" # jver is read into an array as tokens separated by IFS
#java version < 10
if [ ${ADDR[1]} -lt 10 ]; then
moduleCustomizations=""
else
moduleCustomizations="--illegal-access=warn --add-opens java.desktop/java.awt.color=ALL-UNNAMED --add-opens java.desktop/sun.font=ALL-UNNAMED --add-opens java.desktop/java.beans=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.module=ALL-UNNAMED --add-opens java.desktop/javax.swing=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED --add-opens java.desktop/sun.awt.image=ALL-UNNAMED --add-opens java.desktop/javax.accessibility=ALL-UNNAMED --add-opens java.desktop/sun.awt=ALL-UNNAMED --add-opens java.base/jdk.internal.module=ALL-UNNAMED --add-opens java.base/java.security.cert=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang.ref=ALL-UNNAMED"
fi
set -x
java "${moduleCustomizations}" -Xmx1024m com.test.myClass
But this turns into:
java '--illegal-access=warn --add-opens java.desktop/java.awt.color=ALL-UNNAMED --add-opens java.desktop/sun.font=ALL-UNNAMED --add-opens java.desktop/java.beans=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.module=ALL-UNNAMED --add-opens java.desktop/javax.swing=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED --add-opens java.desktop/sun.awt.image=ALL-UNNAMED --add-opens java.desktop/javax.accessibility=ALL-UNNAMED --add-opens java.desktop/sun.awt=ALL-UNNAMED --add-opens java.base/jdk.internal.module=ALL-UNNAMED --add-opens java.base/java.security.cert=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang.ref=ALL-UNNAMED' -Xmx1024m com.test.myClass
And bash interprets the argument as one big argument.
EDIT2:
Trying again but this time without quotes around ${moduleCustomizations}. It seems to remove all dashes:
java '' '' illegal 'access=warn ' '' add 'opens java' desktop/java awt color=ALL 'UNNAMED ' '' add 'opens java' desktop/sun font=ALL 'UNNAMED ' '' add 'opens java' desktop/java beans=ALL 'UNNAMED ' '' add 'opens java' base/java lang=ALL 'UNNAMED ' '' add 'opens java' base/java lang module=ALL 'UNNAMED ' '' add 'opens java' desktop/javax swing=ALL 'UNNAMED ' '' add 'opens java' desktop/java awt=ALL 'UNNAMED ' '' add 'opens java' desktop/sun awt image=ALL 'UNNAMED ' '' add 'opens java' desktop/javax accessibility=ALL 'UNNAMED ' '' add 'opens java' desktop/sun awt=ALL 'UNNAMED ' '' add 'opens java' base/jdk internal module=ALL 'UNNAMED ' '' add 'opens java' base/java security cert=ALL 'UNNAMED ' '' add 'opens java' base/java security=ALL 'UNNAMED ' '' add 'opens java' base/java net=ALL 'UNNAMED ' '' add 'opens java' base/java lang ref=ALL UNNAMED -Xmx1024m com.test.myClass
The problem is that you're merging together what should be two separate arguments:
"--add-opens java.desktop/java.awt.color=ALL-UNNAMED"
Don't try to make it harder than it is, because you wouldn't try to run:
java "--add-opens java.desktop/java.awt.color=ALL-UNNAMED"
Just put whatever you would add after the java command directly inside the array without trying to add additional quoting:
java --add-opens java.desktop/java.awt.color=ALL-UNNAMED
becomes:
args=( --add-opens java.desktop/java.awt.color=ALL-UNNAMED )
java "${args[#]}"
In your code:
#!/bin/bash
# Expect format: java full version "10.0.1+10"
jver="$( java -fullversion 2>&1)"
# jver is read into an array as tokens separated by IFS
IFS='.-_^+"' read -ra ADDR <<< "$jver"
#java version < 10
if [[ "${ADDR[1]}" -lt 10 ]]; then
moduleCustomizations=()
else
moduleCustomizations=(
--illegal-access=warn
--add-opens java.desktop/java.awt.color=ALL-UNNAMED
--add-opens java.desktop/sun.font=ALL-UNNAMED
--add-opens java.desktop/java.beans=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.lang.module=ALL-UNNAMED
--add-opens java.desktop/javax.swing=ALL-UNNAMED
--add-opens java.desktop/java.awt=ALL-UNNAMED
--add-opens java.desktop/sun.awt.image=ALL-UNNAMED
--add-opens java.desktop/javax.accessibility=ALL-UNNAMED
--add-opens java.desktop/sun.awt=ALL-UNNAMED
--add-opens java.base/jdk.internal.module=ALL-UNNAMED
--add-opens java.base/java.security.cert=ALL-UNNAMED
--add-opens java.base/java.security=ALL-UNNAMED
--add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/java.lang.ref=ALL-UNNAMED
)
fi
set -x
java "${moduleCustomizations[#]}" -Xmx1024m com.test.myClass
Also note that any quotes that do or don't appear in set -x output are purely disambiguation notation for your benefit. They don't change or decide what's being passed to the command. It's just so that your human eyes can tell the difference between argument arrays like (in Java notation):
{"hello", "world"}
{"hello", "world", ""}
{"hello world"}
{"hello world", "", ""}
Because if you just appended and printed the words, all these different arrays would read hello world and that's not very helpful when debugging.

IntelliJ Idea 15 hangs when starting and debuging

this is my first question.
I'm confusing on my IntelliJ Idea hanging 1 minute when starting and debugging with network on. Could anyone help me? Thanks.
I have tried IntelliJC and IntelliJU which are both 15.0.4. When I cut down the network, It works with no problem. But, with network on, it becomes hanging when starting and debugging.
Through logs, I found that there's almost 1 minute between I starting IntelliJ and its log beginning.
I even captured its network packets, found nothing, there was no connection.
I'm using Macbook, and I found the system log:
Mar 11 07:49:36 Coderec's MBP idea[1867]: Value of IDEA_JDK: (null)
Mar 11 07:49:36 Coderec's MBP idea[1867]: fullFileName is: /Applications/IntelliJ IDEA 15 CE.app/Contents/bin/idea.vmoptions
Mar 11 07:49:36 Coderec's MBP idea[1867]: fullFileName exists: /Applications/IntelliJ IDEA 15 CE.app/Contents/bin/idea.vmoptions
Mar 11 07:49:36 Coderec's MBP idea[1867]: Value of IDEA_VM_OPTIONS is (null)
Mar 11 07:49:36 Coderec's MBP idea[1867]: Processing VMOptions file at /Applications/IntelliJ IDEA 15 CE.app/Contents/bin/idea.vmoptions
Mar 11 07:49:36 Coderec's MBP idea[1867]: Done
and the IntelliJ log:
2016-03-11 07:50:37,529 [ 60385] INFO - #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------
2016-03-11 07:50:37,559 [ 60415] INFO - #com.intellij.idea.Main - IDE: IntelliJ IDEA (build #IC-143.2287.1, 23 Feb 2016 00:00)
2016-03-11 07:50:37,559 [ 60415] INFO - #com.intellij.idea.Main - OS: Mac OS X (10.11.3, x86_64)
2016-03-11 07:50:37,559 [ 60415] INFO - #com.intellij.idea.Main - JRE: 1.8.0_40-release-b132 (JetBrains s.r.o)
2016-03-11 07:50:37,559 [ 60415] INFO - #com.intellij.idea.Main - JVM: 25.40-b25 (OpenJDK 64-Bit Server VM)
2016-03-11 07:50:37,560 [ 60416] INFO - #com.intellij.idea.Main - JVM Args: -Dfile.encoding=UTF-8 -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Xverify:none -Xbootclasspath/a:../lib/boot.jar -Xms128m -Xmx750m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=240m -XX:+UseCompressedOops -Djb.vmOptionsFile=/Applications/IntelliJ IDEA 15 CE.app/Contents/bin/idea.vmoptions -Didea.java.redist=custom-jdk-bundled -Didea.home.path=/Applications/IntelliJ IDEA 15 CE.app/Contents -Didea.executable=idea -Didea.paths.selector=IdeaIC15
2016-03-11 07:50:37,561 [ 60417] INFO - #com.intellij.idea.Main - ext: /Applications/IntelliJ IDEA 15 CE.app/Contents/jre/jdk/Contents/Home/jre/lib/ext: [cldrdata.jar, dnsns.jar, jaccess.jar, jfxrt.jar, localedata.jar, meta-index, nashorn.jar, sunec.jar, sunjce_provider.jar, sunpkcs11.jar, zipfs.jar]
2016-03-11 07:50:37,561 [ 60417] INFO - #com.intellij.idea.Main - ext: /System/Library/Java/Extensions: [MRJToolkit.jar]
2016-03-11 07:50:37,581 [ 60437] INFO - #com.intellij.idea.Main - JNA library loaded (64-bit) in 20 ms
2016-03-11 07:50:37,584 [ 60440] INFO - #com.intellij.idea.Main - initializing environment
2016-03-11 07:50:37,585 [ 60441] INFO - .intellij.util.EnvironmentUtil - loading shell env: /bin/zsh -l -i -c '/Applications/IntelliJ IDEA 15 CE.app/Contents/bin/printenv.py' '/private/var/folders/w9/rkmh4kqs2l3bd5nf5mlp7k100000gq/T/intellij-shell-env.0.tmp'
2016-03-11 07:50:38,546 [ 61402] INFO - .intellij.util.EnvironmentUtil - shell environment loaded (19 vars)
2016-03-11 07:50:38,784 [ 61640] INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor duplicates-groovy.xml
2016-03-11 07:50:39,050 [ 61906] INFO - llij.ide.plugins.PluginManager - 31 plugins initialized in 436 ms
2016-03-11 07:50:39,052 [ 61908] INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: Android Support (10.1.3.0), Ant Support (1.0), Bytecode Viewer (0.1), CVS Integration (11), Copyright (8.1), Coverage (143.SNAPSHOT), Eclipse Integration (3.0), EditorConfig (1.0), Git Integration (8.1), GitHub (143.2287.1), Gradle (143.2287.1), Groovy (9.0), I18n for Java (143.2287.1), IDEA CORE (143.SNAPSHOT), IntelliLang (8.0), JUnit (1.0), Java Bytecode Decompiler (0.1), JavaFX (1.0), Kotlin (1.0.0-release-IJ143-75), Maven Integration (143.2287.1), Plugin DevKit (1.0), Properties Support (143.SNAPSHOT), Settings Repository (143.2287.1), Subversion Integration (1.1), Task Management (1.0), Terminal (0.1), TestNG-J (8.0), UI Designer (143.2287.1), XPathView + XSLT Support (4), XSLT-Debugger (1.4), hg4idea (10.0)
2016-03-11 07:50:39,384 [ 62240] INFO - ellij.util.io.PagedFileStorage - lower=100; upper=500; buffer=10; max=739246080
2016-03-11 07:50:39,415 [ 62271] INFO - pl.local.NativeFileWatcherImpl - Starting file watcher: /Applications/IntelliJ IDEA 15 CE.app/Contents/bin/fsnotifier
2016-03-11 07:50:39,423 [ 62279] INFO - pl.local.NativeFileWatcherImpl - Native file watcher is operational.
2016-03-11 07:50:40,025 [ 62881] INFO - rains.ide.BuiltInServerManager - built-in server started, port 63342
2016-03-11 07:50:40,564 [ 63420] INFO - plication.impl.ApplicationImpl - 84 application components initialized in 1951 ms
2016-03-11 07:50:40,581 [ 63437] INFO - .intellij.idea.IdeaApplication - App initialization took 63756 ms
2016-03-11 07:50:40,588 [ 63444] INFO - ntellij.util.proxy.CommonProxy - <html>You have JVM property "socksProxyHost" set to "127.0.0.1".<br>This may lead to incorrect behaviour. Proxy should be set in Settings | HTTP Proxy<br>This JVM property is old and its usage is not recommended by Oracle.<br>(Note: It could have been assigned by some code dynamically.)
2016-03-11 07:50:40,647 [ 63503] INFO - ntellij.util.proxy.CommonProxy - <html>You have JVM property "socksProxyHost" set to "127.0.0.1".<br>This may lead to incorrect behaviour. Proxy should be set in Settings | HTTP Proxy<br>This JVM property is old and its usage is not recommended by Oracle.<br>(Note: It could have been assigned by some code dynamically.)
2016-03-11 07:50:41,176 [ 64032] INFO - CompilerWorkspaceConfiguration - Available processors: 8
2016-03-11 07:50:41,575 [ 64431] INFO - ellij.project.impl.ProjectImpl - 148 project components initialized in 746 ms
2016-03-11 07:50:41,723 [ 64579] INFO - le.impl.ModuleManagerComponent - 2 module(s) loaded in 147 ms
2016-03-11 07:50:43,450 [ 66306] INFO - tartup.impl.StartupManagerImpl - /Users/coderec/IdeaProjects/pttms-server/pttms-server/.idea/misc.xml case-sensitivity: false
2016-03-11 07:50:44,351 [ 67207] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 22ms; general responsiveness: ok; EDT responsiveness: ok
2016-03-11 07:50:44,934 [ 67790] INFO - tor.impl.FileEditorManagerImpl - Project opening took 4133 ms
2016-03-11 07:50:45,903 [ 68759] INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 1551ms; general responsiveness: ok; EDT responsiveness: ok
2016-03-11 07:50:46,373 [ 69229] INFO - lij.tasks.impl.TaskManagerImpl - Updating issues cache (every 20 min)
2016-03-11 07:50:47,309 [ 70165] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: /Applications/IntelliJ IDEA 15 CE.app/Contents/lib/jps-launcher.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/lib/tools.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/optimizedFileManager.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/ecj-4.4.jar
2016-03-11 07:50:47,678 [ 70534] INFO - ution.rmi.RemoteProcessSupport - "/Applications/IntelliJ IDEA 15 CE.app/Contents/jre/jdk/Contents/Home/jre/bin/java" -d64 -Djava.awt.headless=true -Didea.version==15.0.4 -Xmx512m -Didea.maven.embedder.version=3.0.5 -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/resources_en.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/log4j.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/slf4j-api-1.7.10.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/slf4j-log4j12-1.7.10.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/jna-platform.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/snappy-in-java-0.3.1.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/picocontainer.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/jna.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/oromatcher.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/annotations.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/trove4j.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/jdom.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/util.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/lucene-core-2.4.1.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven-server-api.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3-server-common.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3-server-lib/archetype-catalog-2.2.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3-server-lib/archetype-common-2.2.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3-server-lib/maven-dependency-tree-1.2.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3-server-lib/nexus-indexer-3.0.4.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3-server-lib/nexus-indexer-artifact-1.0.1.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven30-server-impl.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/aether-api-1.13.1.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/aether-connector-wagon-1.13.1.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/aether-impl-1.13.1.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/aether-spi-1.13.1.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/aether-util-1.13.1.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/commons-cli-1.2.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/commons-io-2.2.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/commons-lang-2.6.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/maven-aether-provider-3.0.5.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/maven-artifact-3.0.5.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/maven-compat-3.0.5.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/maven-core-3.0.5.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/maven-embedder-3.0.5.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/maven-model-3.0.5.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/maven-model-builder-3.0.5.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/maven-plugin-api-3.0.5.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/maven-repository-metadata-3.0.5.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/maven-settings-3.0.5.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/maven-settings-builder-3.0.5.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/plexus-cipher-1.7.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/plexus-component-annotations-1.5.5.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/plexus-interpolation-1.14.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/plexus-sec-dispatcher-1.3.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/plexus-utils-2.0.6.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/sisu-guava-0.9.9.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/sisu-guice-3.1.0-no_aop.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/sisu-inject-bean-2.3.0.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/sisu-inject-plexus-2.3.0.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/wagon-file-2.8.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/wagon-http-2.8-shaded.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/wagon-http-shared-2.8.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/lib/wagon-provider-api-2.8.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.4.jar" org.jetbrains.idea.maven.server.RemoteMavenServer
2016-03-11 07:50:47,917 [ 70773] INFO - ution.rmi.RemoteProcessSupport - Port/ID: 4823/Maven30ServerImplf51fe04a
2016-03-11 07:50:48,891 [ 71747] INFO - ution.rmi.RemoteProcessSupport - 0 [RMI TCP Connection(3)-127.0.0.1] DEBUG Sisu - Add publisher: com.google.inject.internal.InjectorImpl#5fd5172c
2016-03-11 07:50:48,891 [ 71747] INFO - ution.rmi.RemoteProcessSupport -
2016-03-11 07:50:48,891 [ 71747] INFO - ution.rmi.RemoteProcessSupport - -----[explicit bindings]-------------------------------------------------------
2016-03-11 07:50:48,891 [ 71747] INFO - ution.rmi.RemoteProcessSupport - 0. ProviderInstanceBinding{key=Key[type=com.google.inject.Injector, annotation=[none]], source=[unknown source], scope=Scopes.NO_SCOPE, provider=Provider<Injector>}
2016-03-11 07:50:48,891 [ 71747] INFO - ution.rmi.RemoteProcessSupport - 1. ProviderInstanceBinding{key=Key[type=java.util.logging.Logger, annotation=[none]], source=[unknown source], scope=Scopes.NO_SCOPE, provider=Provider<Logger>}
2016-03-11 07:50:48,891 [ 71747] INFO - ution.rmi.RemoteProcessSupport - 2. ProviderInstanceBinding{key=Key[type=org.slf4j.Logger, annotation=[none]], source=[unknown source], scope=Scopes.NO_SCOPE, provider=Provider<org.slf4j.Logger>}
2016-03-11 07:50:48,891 [ 71747] INFO - ution.rmi.RemoteProcessSupport - 3. InstanceBinding{key=Key[type=com.google.inject.Stage, annotation=[none]], source=[unknown source], instance=DEVELOPMENT}
2016-03-11 07:50:48,891 [ 71747] INFO - ution.rmi.RemoteProcessSupport - 4. InstanceBinding{key=Key[type=org.codehaus.plexus.context.Context, annotation=[none]], source=org.codehaus.plexus.DefaultPlexusContainer$ContainerModule.configure(DefaultPlexusContainer.java:800), instance={plexus=org.codehaus.plexus.DefaultPlexusContainer#290238e6}}
2016-03-11 07:50:48,891 [ 71747] INFO - ution.rmi.RemoteProcessSupport - 5. InstanceBinding{key=Key[type=java.util.Map, annotation=#org.sonatype.inject.Parameters], source=org.codehaus.plexus.DefaultPlexusContainer$ContainerModule.configure(DefaultPlexusContainer.java:801), instance=null}
2016-03-11 07:50:48,891 [ 71747] INFO - ution.rmi.RemoteProcessSupport - 6. InstanceBinding{key=Key[type=org.sonatype.guice.bean.locators.MutableBeanLocator, annotation=[none]], source=org.codehaus.plexus.DefaultPlexusContainer$ContainerModule.configure(DefaultPlexusContainer.java:803), instance=org.sonatype.guice.bean.locators.DefaultBeanLocator#47715323[Locked by thread RMI TCP Connection(3)-127.0.0.1]}
6~235, omitted
2016-03-11 07:50:48,904 [ 71760] INFO - ution.rmi.RemoteProcessSupport - 235. ConstructorBinding{key=Key[type=org.apache.maven.lifecycle.internal.LifecyclePluginResolver, annotation=[none]], source=ClassRealm[plexus.core, parent: null], scope=Scopes.SINGLETON}
2016-03-11 07:50:48,904 [ 71760] INFO - ution.rmi.RemoteProcessSupport - 236. ConstructorBinding{key=Key[type=org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder, annotation=[none]], source=ClassRealm[plexus.core, parent: null], scope=Scopes.SINGLETON}
2016-03-11 07:50:48,904 [ 71760] INFO - ution.rmi.RemoteProcessSupport - 237. ConstructorBinding{key=Key[type=org.apache.maven.lifecycle.internal.MojoDescriptorCreator, annotation=[none]], source=ClassRealm[plexus.core, parent: null], scope=Scopes.SINGLETON}
2016-03-11 07:50:48,904 [ 71760] INFO - ution.rmi.RemoteProcessSupport - -----[implicit bindings]-------------------------------------------------------
2016-03-11 07:50:48,904 [ 71760] INFO - ution.rmi.RemoteProcessSupport - -------------------------------------------------------------------------------
2016-03-11 07:50:48,904 [ 71760] INFO - ution.rmi.RemoteProcessSupport -
2016-03-11 07:50:49,935 [ 72791] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: /Applications/IntelliJ IDEA 15 CE.app/Contents/lib/jps-launcher.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/lib/tools.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/optimizedFileManager.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/ecj-4.4.jar
I finally solved this problem with resetting the host name of my mac, which was set with blank like "Coderec's MBP".
The illegal host name caused this confusing problem.

windows procrun - OrientDB install

I've been triying to install orientDB service from their documentation page: http://www.orientechnologies.com/docs/last/orientdb.wiki/Windows-Service.html
I've manage to create the service the with Instrucctions that are inside.
This is the log the that is giving me.
[2015-02-04 23:35:54] [info] ( prunsrv.c:1596) [ 208] Running 'OrientDBGraph' Service...
[2015-02-04 23:35:54] [debug] ( prunsrv.c:1374) [ 2348] Inside ServiceMain...
[2015-02-04 23:35:54] [debug] ( prunsrv.c:844 ) [ 2348] reportServiceStatusE: 2, 0, 3000, 0
[2015-02-04 23:35:54] [info] ( prunsrv.c:1127) [ 2348] Starting service...
[2015-02-04 23:35:54] [debug] ( javajni.c:233 ) [ 2348] loading jvm 'C:\Program Files\Java\jre1.8.0_31\bin\server\jvm.dll'
[2015-02-04 23:35:54] [debug] ( javajni.c:278 ) [ 2348] Setting DLL search path to 'C:\Program Files\Java\jre1.8.0_31\bin\server'
[2015-02-04 23:35:54] [debug] ( javajni.c:278 ) [ 2348] Setting DLL search path to 'C:\Program Files\Java\jre1.8.0_31\bin'
[2015-02-04 23:35:54] [error] ( javajni.c:291 ) [ 2348] %1 no es una aplicación Win32 válida.
[2015-02-04 23:35:54] [error] ( prunsrv.c:1162) [ 2348] Failed creating java C:\Program Files\Java\jre1.8.0_31\bin\server\jvm.dll
[2015-02-04 23:35:54] [error] ( prunsrv.c:1162) [ 2348] %1 no es una aplicación Win32 válida.
[2015-02-04 23:35:54] [error] ( prunsrv.c:1536) [ 2348] ServiceStart returned 1
[2015-02-04 23:35:54] [error] ( prunsrv.c:1536) [ 2348] %1 no es una aplicación Win32 válida.
[2015-02-04 23:35:54] [debug] ( prunsrv.c:844 ) [ 2348] reportServiceStatusE: 1, 1066, 0, 1
[2015-02-04 23:35:54] [info] ( prunsrv.c:1598) [ 208] Run service finished.
[2015-02-04 23:35:54] [info] ( prunsrv.c:1764) [ 208] Commons Daemon procrun finished
And this is mi PATH
C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\
This has nothing to do with OrientDB. You problably installed the wrong JVM (32 bits systems need 32 bits version, 64 bits systems need 64 bits version!)

Resources