cancel
Showing results for 
Search instead for 
Did you mean: 

Groovy custom vmoptions not loaded

SOLVED
Highlighted
New Contributor

Groovy custom vmoptions not loaded

I'm importing an external jar that requires some runtime options so I added them to the .vmoptions file (and I did have an extra white line at the end) 

 

-Denv=dev
-Djmx.address=0.0.0.0
-Djavaro_udp_port=7000
-Djmx.registerPort=7777
-Djmx.serverPort=7778

 

But it doesn't seem to be taken...

==> ERROR [UDPServiceImpl] init(); 0; Can't start because of error: Invalid UDP port: -1 (should be 7000)

 

When I run that jar from IntelliJ with those VM options I see port = 7000.

 

Is there a way in groovy to print the value of JAVA_OPTS (vmoptions) to validate the arguments used at runtime? Am I doing something wrong?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Groovy custom vmoptions not loaded

Not just for your properties, even some pre-existing ones are also not reproducible.

By the way, you can see what are available using Menu -> Help -> System Properties

To address your problem, you can add them to soapui.bat / .sh (similarly required in testrunner utility as well if you are running the test command line)

Add them in JAVA_OPTS as shown in the below thread:
https://stackoverflow.com/questions/44436512/how-to-handle-utf-8-character-encoding-in-http-log-in-s...

NOTE: have a backup of the original scripts before making the suggested change.


Regards,
Rao.

View solution in original post

3 REPLIES 3
Highlighted
New Contributor

Re: Groovy custom vmoptions not loaded

I did a small test

log.info(System.properties['java.security.manager']); ==> com.smartbear.ready.ReadyApiSecurityManager

log.info(System.properties['jmx.address']); ==> null

 

For all -Dvariables that I added I get null when I run that in groovy. I did restart ReadyAPI after modifying the vmoption file.

Highlighted
Community Manager

Re: Groovy custom vmoptions not loaded

Community, is there anything we can suggest here?

---------
Tanya Gorbunova
SmartBear Community Manager

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
Community Hero

Re: Groovy custom vmoptions not loaded

Not just for your properties, even some pre-existing ones are also not reproducible.

By the way, you can see what are available using Menu -> Help -> System Properties

To address your problem, you can add them to soapui.bat / .sh (similarly required in testrunner utility as well if you are running the test command line)

Add them in JAVA_OPTS as shown in the below thread:
https://stackoverflow.com/questions/44436512/how-to-handle-utf-8-character-encoding-in-http-log-in-s...

NOTE: have a backup of the original scripts before making the suggested change.


Regards,
Rao.

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Compete with community members in the TechCorner Challenge and get into the Leaderboard!

Rank Participant Points Earned
1 msiadak 9
2 nmrao 6
3 HimanshuTayal 3
Top Kudoed Authors