I am new to Broadleaf Ecommerce and have installed the same couple of days back. Maven build is successful however getting below error while starting Startadmin.batch file. I have tried increasing heap memory however it didn't help. Any of you faced similar error?
Error opening zip file or JAR manifest missing :
target/agents/spring-instrument .jar
Error occurred during initialization of VM agent library failed to
init: instrument
Error occurred during initialization of VM Too small initial heap
Error occurred during initialization of VM Too small initial heap
ERROR: Cannot load this JVM TI agent twice, check your java command
line for dup licate jdwp options.
Error occurred during initialization of VM agent library failed to
init: jdwp
The error seems to indicate that Spring-instruments.jar file was not downloaded. That means that your local maven failed on the "#copy-agent" goal that is responsible for installing that jar in the correct directory. Try doing a mvn install with Maven 3.3.9 and turning on the #echo when running the bat script to make sure that jar is installed.
Also change the %TOMCAT_MEMORY% line to be this:
IF "%TOMCAT_MEMORY%"=="" SET TOMCAT_MEMORY=-Xmx1536M -XX:MaxPermSize=512M
This will change the Heap size from 1536 bytes to a more suitable size.
Related
I'm working on an open-source project called "Cloudnet-v3". I am using a symlink /data on my local machine to the data-point in my IntelliJProjects-Folder.
I got the following startup command:
[java, -XX:+UseG1GC, -XX:MaxGCPauseMillis=50, -XX:-UseAdaptiveSizePolicy, -XX:CompileThreshold=100, -XX:+UnlockExperimentalVMOptions, -XX:+UseCompressedOops, -Dcom.mojang.eula.agree=true, -Djline.terminal=jline.UnsupportedTerminal, -Dfile.encoding=UTF-8, -Dio.netty.noPreferDirect=true, -Dclient.encoding.override=UTF-8, -Dio.netty.maxDirectMemory=0, -Dio.netty.leakDetectionLevel=DISABLED, -Dio.netty.recycler.maxCapacity=0, -Dio.netty.recycler.maxCapacity.default=0, -DIReallyKnowWhatIAmDoingISwear=true, -Dcloudnet.wrapper.receivedMessages.language=english, -Xmx372M, -javaagent: "/data/temp/caches/wrapper.jar", -cp, "/data/launcher/libs/io/kubernetes/client-java/4.0.0/client-java-4.0.0.jar:/data/launcher/libs/io/netty/netty-codec-http/4.1.36.Final/netty-codec-http-4.1.36.Final.jar:/data/launcher/libs/io/netty/netty-handler/4.1.36.Final/netty-handler-4.1.36.Final.jar:/data/launcher/libs/io/netty/netty-transport-native-epoll/4.1.36.Final/netty-transport-native-epoll-4.1.36.Final-linux-x86_64.jar:/data/launcher/libs/io/netty/netty-transport-native-kqueue/4.1.36.Final/netty-transport-native-kqueue-4.1.36.Final-osx-x86_64.jar:/data/launcher/libs/io/kubernetes/client-java-api/4.0.0/client-java-api-4.0.0.jar:/data/launcher/libs/io/kubernetes/client-java-proto/4.0.0/client-java-proto-4.0.0.jar:/data/launcher/libs/org/yaml/snakeyaml/1.19/snakeyaml-1.19.jar:/data/launcher/libs/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/data/launcher/libs/org/apache/commons/commons-compress/1.18/commons-compress-1.18.jar:/data/launcher/libs/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7.jar:/data/launcher/libs/com/squareup/okhttp/okhttp-ws/2.7.5/okhttp-ws-2.7.5.jar:/data/launcher/libs/com/google/guava/guava/25.1-jre/guava-25.1-jre.jar:/data/launcher/libs/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar:/data/launcher/libs/org/bouncycastle/bcprov-ext-jdk15on/1.59/bcprov-ext-jdk15on-1.59.jar:/data/launcher/libs/org/bouncycastle/bcpkix-jdk15on/1.59/bcpkix-jdk15on-1.59.jar:/data/launcher/libs/com/google/protobuf/protobuf-java/3.4.0/protobuf-java-3.4.0.jar:/data/launcher/libs/com/google/code/gson/gson/2.8.2/gson-2.8.2.jar:/data/launcher/libs/io/netty/netty-codec/4.1.36.Final/netty-codec-4.1.36.Final.jar:/data/launcher/libs/io/netty/netty-transport-native-unix-common/4.1.36.Final/netty-transport-native-unix-common-4.1.36.Final.jar:/data/launcher/libs/io/netty/netty-transport/4.1.36.Final/netty-transport-4.1.36.Final.jar:/data/launcher/libs/io/netty/netty-buffer/4.1.36.Final/netty-buffer-4.1.36.Final.jar:/data/launcher/libs/io/netty/netty-resolver/4.1.36.Final/netty-resolver-4.1.36.Final.jar:/data/launcher/libs/io/netty/netty-common/4.1.36.Final/netty-common-4.1.36.Final.jar:/data/launcher/libs/io/sundr/builder-annotations/0.9.2/builder-annotations-0.9.2.jar:/data/launcher/libs/io/swagger/swagger-annotations/1.5.12/swagger-annotations-1.5.12.jar:/data/launcher/libs/com/squareup/okhttp/logging-interceptor/2.7.5/logging-interceptor-2.7.5.jar:/data/launcher/libs/com/squareup/okhttp/okhttp/2.7.5/okhttp-2.7.5.jar:/data/launcher/libs/joda-time/joda-time/2.9.3/joda-time-2.9.3.jar:/data/launcher/libs/org/joda/joda-convert/1.2/joda-convert-1.2.jar:/data/launcher/libs/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar:/data/launcher/libs/org/checkerframework/checker-qual/2.0.0/checker-qual-2.0.0.jar:/data/launcher/libs/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.jar:/data/launcher/libs/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar:/data/launcher/libs/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar:/data/launcher/libs/org/bouncycastle/bcprov-jdk15on/1.59/bcprov-jdk15on-1.59.jar:/data/launcher/libs/io/sundr/sundr-core/0.9.2/sundr-core-0.9.2.jar:/data/launcher/libs/io/sundr/sundr-codegen/0.9.2/sundr-codegen-0.9.2.jar:/data/launcher/libs/io/sundr/resourcecify-annotations/0.9.2/resourcecify-annotations-0.9.2.jar:/data/launcher/libs/com/squareup/okio/okio/1.6.0/okio-1.6.0.jar:/data/launcher/versions/3.0.0-RELEASE-e48128a/driver.jar:/data/temp/caches/wrapper.jar", de.dytanic.cloudnet.wrapper.Main, nogui]
And my current workdir is: /data/temp/services/Lobby-1#4a517311-09e6-4f77-89a5-64b4bc15399a
So whenever I am in the workdir and execute the given command, it fails with the following error: Error opening zip file or JAR manifest missing :
Error occurred during initialization of VM
agent library failed to init: instrument Full Log
Now I am wondering because it's working in the automatic-environment but there are no changes to the master-Branch Source e.g. a changed Path to /data/launcher instead of launcher (System.getProperty("cloudnet.launcher.dir", "/data/launcher"))[https://github.com/CloudNetService/CloudNet-v3/blob/master/cloudnet-launcher/src/main/java/de/dytanic/cloudnet/launcher/Constants.java].
A short lookup: ls -laR /Users/.../Documents/IdeaProjects/cloudnet-parent/data
javaagent option is misused. Correct syntax is
-javaagent:/data/temp/caches/wrapper.jar
I'm trying to create and deploy AWS Lambda function in Java using Micronaut, GraalVM, and Docker. I'm following this tutorial to create AWS lambda with GraalVM runtime.
I've created java project using micronaut command $ mn create-app my-app --features aws-api-gateway-graal. And then without any change in code or config files, try to build a Docker image with GraalVM native image. In the step of docker build when graalvm native image is building I get these warnings:
Warning: Aborting stand-alone image build. No instances are allowed in
the image heap for a class that is initialized or reinitialized at
image runtime com.amazonaws.serverless.proxy.model.ContainerConfig.
Try marking this class for build-time initialization with
--initialize-at-build-time=com.amazonaws.serverless.proxy.model.ContainerConfig
Detailed message:
Trace: field io.micronaut.function.aws.proxy.AbstractLambdaContainerHandler.config
Warning: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying
exception*
Warning: Image 'server' is a fallback image that requires a JDK for
execution (use --no-fallback to suppress fallback image generation).
After build I export docker image with bootstrap file to function.zip file as it's written in tutorial. Then I upload function.zip file to my created AWS lambda function and when I try to test function I get this error:
{ "errorType": "Runtime.ExitError",
"errorMessage": "RequestId: 888854d7-0e0e-42b4-a138-9a003c3455e1 Error: Runtime exited with error:
exit status 1"
}
START RequestId: 888854d7-0e0e-42b4-a138-9a003c3455e1 Version:
$LATEST
Error: No bin/java and no environment variable JAVA_HOME END RequestId: 888854d7-0e0e-42b4-a138-9a003c3455e1 REPORT RequestId:
888854d7-0e0e-42b4-a138-9a003c3455e1 Duration: 415.09 ms Billed
Duration: 500 ms Memory Size: 128 MB Max Memory Used: 16 MB
RequestId: 888854d7-0e0e-42b4-a138-9a003c3455e1 Error: Runtime exited
with error: exit status 1 Runtime.ExitError
I don't know what is wrong. I haven't found any solution for this problem yet.
This classes invokes static method defaultConfig of the ContainerConfig class.
io.micronaut.function.aws.proxy.AbstractLambdaContainerHandler
com.amazonaws.serverless.proxy.internal.LambdaContainerHandler
To resolve the issue we need to to initialize that classes at run-time instead of compile time.
I'm totally new to GraalVM and for now can't explain what the reason of that.
My native-image configurations.
native-image
--delay-class-initialization-to-runtime=io.micronaut.function.aws.proxy.AbstractLambdaContainerHandler,com.amazonaws.serverless.proxy.internal.LambdaContainerHandler
--no-fallback
--no-server
-cp build/libs/yourJarName.jar
Resources:
https://medium.com/graalvm/understanding-class-initialization-in-graalvm-native-image-generation-d765b7e4d6ed
I am new to cordova and am trying to create an android HelloWold project.
When I use cordova platforms add android, it throws some exception:
D:\CordovaSpace\helloWorld>cordova platforms add android
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms\android
Package: com.example.helloworld
Name: HelloWorld
Activity: MainActivity
Android target: android-24
Subproject Path: CordovaLib
Android project created with cordova-android#6.0.0
Installing "cordova-plugin-whitelist" for android
ANDROID_HOME=D:\Java_Android_SDK\android_sdk
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_73
Subproject Path: CordovaLib
Starting a new Gradle Daemon for this build (subsequent builds will be faster).
FAILURE: Build failed with an exception.
* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Failed to install 'cordova-plugin-whitelist':Error: cmd: Command failed with exit code 1
at ChildProcess.whenDone (D:\CordovaSpace\helloWorld\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
Error: cmd: Command failed with exit code 1
Try again after increasing your Java VM(?) memory size.
Here is how to fix it on a Windows platform:
Go to Start -> Control Panel -> System -> Advanced(tab) -> Environment Variables -> System Variables -> New:
Variable name: _JAVA_OPTIONS
Variable value: -Xmx512M
Don't ignore the score and underscore characters.
I had the exact same problem. I switched to use 64-bit JDK as suggested in here and it worked fine. I was using Ionic 3.5.0 on Windows 10.
this worked for my ionic app.
Change line on
// to allow dex in process
'org.gradle.jvmargs': '-Xmx1024m',
from
// to allow dex in process
'org.gradle.jvmargs': '-Xmx2048m',
in your
<app path>\platforms\android\cordova\lib\config
thanks
args.push('-Dorg.gradle.jvmargs=-Xmx2048m')
into
args.push('-Dorg.gradle.jvmargs=-Xmx1024m');
on the following location files.
project-folder\platforms\android\cordova\lib\builders\GradleBuilder.js
project-folder\platforms\android\cordova\lib\builders\StudioBuilder.js
Go to : \platforms\android\cordova\lib\config\GradlePropertiesParser.js
constructor (platformDir) {
this._defaults = {
// 10 seconds -> 6 seconds
'org.gradle.daemon': 'true',
// to allow dex in process
'org.gradle.jvmargs': '-Xmx2048m',
// allow NDK to be used - required by Gradle 1.5 plugin
'android.useDeprecatedNdk': 'true'
// Shaves another 100ms, but produces a "try at own risk" warning. Not worth it (yet):
// 'org.gradle.parallel': 'true'
};
And change the 'org.gradle.jvmargs': '-Xmx2048m', to 'org.gradle.jvmargs': '-Xmx1024m',
args.push('-Dorg.gradle.jvmargs=-Xmx2048m')
to
args.push('-Dorg.gradle.jvmargs=-Xmx1024m');
on the following location files.
project-folder\platforms\android\cordova\lib\builders\builders.js
project-folder\platforms\android\cordova\lib\builders\GradleBuilder.js
project-folder\platforms\android\cordova\lib\builders\StudioBuilder.js
Go to Start -> Control Panel -> System -> Advanced(tab) -> Environment Variables -> System Variables
Add/change JAVA_HOME value
from C:\Program Files (x86)\Java\jdk1.8.0_192
to C:\Program Files\Java\jdk1.8.0_192
That is, change from Program Files (x86) path to Program Files path.
I had a same problem.
Anyway, here is how to fix it:
Go to Start->Control Panel->System->Advanced(tab)->Environment Variables->System Variables->New:
Variable name: _JAVA_OPTIONS
Variable value: -Xmx512M
if 512 not work then change it to.
Variable value: -Xmx1024M
And also change the path.
Variable name: Path
Variable value: ;C:\Program Files\Java\jre6\bin;F:\JDK\bin;
Change this to your appropriate path.
Setting the environment variable at system level as in the #kemal's solution will set the memory size for all the JVM applications in the system, which is not a what most would want to do.
Instead, set the heap size in your cordova gradlebuilder property file.
args.push('-Dorg.gradle.jvmargs=-Xmx2048m');
I get an error while I try to Sync Gradle in IDEA.. I tried many things like setting gradle folder in the path variable and also setting the GRADLE_HOME path in System Vraiable but nothings seems to work.
Here is the error:
Error:Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/2.3/userguide/gradle_daemon.html
Please read the following process output to find out more:
13:20:19.766 [main] DEBUG o.g.l.daemon.bootstrap.DaemonMain - Assuming the daemon was started with following jvm opts: [-XX:MaxPermSize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Xmx1024m, -Dfile.encoding=windows-1252, -Duser.country=US, -Duser.language=en, -Duser.variant]
13:20:20.093 [main] DEBUG o.g.l.daemon.server.DaemonServices - Creating daemon context with opts: [-XX:MaxPermSize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Xmx1024m, -Dfile.encoding=windows-1252, -Duser.country=US, -Duser.language=en, -Duser.variant]
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
It may occur for inconsitent cache value of gradle daemon. You could kill all running gradle daemon manually and then run:
gradle clean build --refresh-dependencies
P.S.: I'm not entirely sure but deleting .gradle and reimporting project may fix it for IDEA.
My project has an interesting issue with Gradle. When running "gradle build" from inside Intellij 13 (windows or linux), I get the following error message:
10:05:48 PM: Executing external task 'build'...
:processResources UP-TO-DATE
:compileAspect FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileAspect'.
> Error creating temporary file
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 7.434 secs
Access is denied
10:05:56 PM: External task execution finished 'build'.
From here, I ran a full debug located here: Pastebin
Which shows it failing in the AjcTask.java file at the below line:
1993 tmpFile = File.createTempFile("argfile", "", userDir);
Might be related to GRADLE-1400 which is for and older version but unresolved. On linux, if I cd to the project directory, I can run "gradle build" without trouble after that first time, then I can run it from Intellij as well without an issue.
Maybe the environment vars getting nuke somehow?
It looks like GRADLE-2532.
user.dir property defaults to C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.1.1\jre\jre\bin in your case which causes Access Denied error.
In IDEA 13.1.2 and previous versions enabling Use customizable gradle wrapper option should help. This will set user.dir to the project root directory.
In IDEA 13.1.3 and later versions there are different workarounds available, check this comment.