Mule ESB vm arguments are ignored - jvm

I am trying for couple of hours now and it seem I cannot find a solution, how to set vm arguments when mule standalone is started.
There are many sources that are saying I could set arguments in wrapper.conf like so: wrapper.java.additional.21=-Djavax.net.debug=all or when starting mule through command line like so: ./mule -M-Djavax.net.debug=all but nothing is working.
I made no changes to mule file or any other that I think matters.
What am I doing wrong?
ESB standalone version: 3.7 CE

I found out that if you set parameter in wrapper and when starting mule then somehow setting is ignored. Make sure you use it only at one place.

Related

How to add arguments for run command in Mule Anypoint Studio

I'm trying to use Mule Credentials Vault security feature from Anypoint Studio. As in Mule's example I need to have:
.properties file with encrypted data
Global element - Similar to Mule's example
In mule-app.properties - similar to Mule's example:
When running it from command line I put the password as argument:
The error I get is:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'key' threw exception; nested exception is java.lang.RuntimeException: Property code could not be found
When I enter the password directly to the global element the app is deployed and running.
How can I insert the password on runtime (similar to how I enter it via command line)?
Thanks,
Keren
The -M is a way of passing arguments to the JVM if you are using the standalone Mule only. In studio you just need to pass -D.
If you want to set the code property through JVM argument, insert the -M-Dcode=24681357 in the VM arguments (and in the program arguments).
If you want to set the code property in the mule-app.properties, the line should be code=24681357 instead of -M-Dcode=24681357.
Thoose are two ways of setting properties in mule (can use wrapper.conf too). You should choose the one that fits your needs (and not use both simultaneously)

Mule redeploy timer

Whenever we run Mule server, it gives a message on Console saying "Mule is up and kicking (every 5000ms)". I want to change this time from 5000ms to any other value. I am using Community edition of Mule server 3.5
You can configure it setting using mule.launcher.changeCheckInterval system property. Your start command should look like:
bin/mule start -M-Dmule.launcher.changeCheckInterval=3000
Alternatively you can add this line to your conf/wrapper.conf file:
wrapper.java.additional.<n>=-Dmule.launcher.changeCheckInterval=3000
where is the lower available number (if you didn't touch this file before is 4).
start -M-Dmule.launcher.changeCheckInterval=xxxx will help.
In wrapper.conf file add the following line:
wrapper.java.additional.<n>=-Dmule.launcher.changeCheckInterval=xxxx

Mule EE jars command populate_m2_repo needs %MULE_HOME% env variable set in windows

When running populate_m2_repo C:\Users\me.m2\repository I get asked for %MULE_HOME% to be set. Typically on my computer I have more than one standalone version available for testing so its inconvenient to keep changing this variable every time a new standalone comes out.
Can someone explain why populate_m2_repo needs %MULE_HOME% to be set?
thanks
Ever since mule 3.1.0 it is recommended not to set system wide the %MULE_HOME%, since the mule.bat script set it for you when not available.
That said the populate_m2_repo needs it to know where to find the artifact that need to be installed.
HTH

mule-standalone-3.3.1 won't start on Windows 7

I got following issue when starting mule server in windows 7.
I have set JAVA_HOME and MULE_HOME properly.
MULE_HOME is set to C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-standalone-3.3.1 Running in console/foreground mode by default, use Ctrl-C to exit...
--> Wrapper Started as Console Launching a JVM... Unable to execute Java command. The system cannot find the file specified. (0x2)
"java" -Dmule.home="C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-standalone-3.3.1"
-Dmule.base="C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-standalone-3. :MaxPermSize=128m "-Djava.endorsed.dirs=C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-standalone-3.3.1\lib\endorsed"
-Xmx512m -Djava.library.path="%LD_LIBRARY_P
3.3.1\mule-standalone-3.3.1/lib/boot" -classpath "%MULE_LIB%;C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-standalone-3.3.1/conf;C:\BAM\Linux\fresh\mule-standal /commons-cli-1.2.jar;C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-standalone-3.3.1/lib/boot/log4j-1.2.16.jar;C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-stan .3.1.jar;C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-standalone-3.3.1/lib/boot/mule-module-logging-3.3.1.jar;C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-sta t-3.3.1.jar;C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-standalone-3.3.1/lib/boot/wrapper-3.2.3.jar"
-Dwrapper.key="IqO3S6Ox0DeEiEkH" -Dwrapper.port=32000 -Dw port.max=31999 -Dwrapper.pid=3224 -Dwrapper.version="3.2.3"
-Dwrapper.native_library="wrapper" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 org.mule.module.rebo Critical error: wait for JVM process failed Press any key to continue . . .
Environment
OS - Windows 7 64 bit
JAVA - 1.7.0_10 64 bit
Can someone help me to fix this issue.
Thanks,
Kasun.
It looks like mule can't find the java executable. An easy way to address this is to edit the ${mule.home}/conf/wrapper.conf file and specify the whole path for the property wrapper.java.command, i.e:
wrapper.java.command=c:/java7/jre/bin/java
On a side note you shouldn't set the MULE_HOME env var anymore since mule will take care of setting it itself upon statup.
Is your %JAVA_HOME%\bin; set as Path variable
I had the same error. But in my case i had the MULE_HOME variable set to a wrong path. Once i deleted that variable, the error was resolved and the server started.

Jdeveloper - Unrecognized option: -jrockit

Every time I try to run a weblogic webcenter application on Jdev I get the following error and I cant find any reference on how to fix this anywhere on the web.
starting weblogic with Java version: Could not create the Java virtual
machine. Unrecognized option: -jrockit
Try modifying the startWebLogic.cmd file (WIN7)
c:\users\{user}\AppData\Roaming\JDeveloper\system{version}\DefaultDomain\bin\startWebLogic.cmd
to contain
set JAVA_VM=-server
set MEM_ARGS=-Xms512m -Xmx1024m -XX:MaxPermSize=512m
Jdeveloper 11g do not support jdk 1.7
https://forums.oracle.com/thread/2482850
I fixed it by add to top of c:\users{user}\AppData\Roaming\JDeveloper\system{version}\DefaultDomain\bin\setDomainEnv.cmd:
set SUN_JAVA_HOME=E:\Oracle\Java\jdk1.6.0_37
set JAVA_VENDOR=Sun
In OSX, look for the this folder /Users/{USERNAME}/.jdeveloper/system{VERSION}/DefaultDomain/bin
Edit the file setDomainEnv.sh and look for SUN_JAVA_HOME and make sure the value is the same value as your JAVA_HOME, i.e. /Library/Java/JavaVirtualMachines/jdk${JDK_VERSION}.jdk/Contents/Home, by default it seems it is set to an empty string "".
Edit the file startWebLogic.sh and add the following before setDomainEnv.sh is called.
JAVA_VENDOR=Sun
You can test it out by running sh ./startWebLogic.sh, if it runs with -jrockit error, then all is good :)
I've also tested with Java JDK 1.7 and it seems to work.
The reason is, that older Weblogic Versions use the Java VM "JRockit"
http://www.oracle.com/technetwork/middleware/jrockit/overview/index.html
The JRockit VM is no longer supported in Java 7 or higher.
All of the other solutions here seem to be hacks and none of them helped me.
I had the same Problem with a Weblogic 10.3.5 and I found out, the installation was incorrect.
The Problem is, that there is no java version check in the installer, so if you don't know that you can't use Java 7 or higher you are screwed.
These steps fixed it for me:
You need to make sure you have Java 6 or lower installed.
Reinstall the Weblogic and make sure to specify the correct JDK