0

I am using a tc-server and I need to set different URLs based on environment. We have this practice of setting it as a jvm argument and using it in the application. When i try the property like below in setenv.sh, the server does not even come up. Below is the jvm arg that I am setting and the error. I hate to split the args just because its not working. Any idea what i need to do make it work as single arg with escaping characters are any?

It works fine if i don't have "&" in the value.

jvm.opts.28=-Dservice.rest.base.url=http://stg.sample.com?key=sample&value=sample

Could not load Logmanager "com.springsource.tcserver.serviceability.logging.TcServerLogManager" java.lang.ClassNotFoundException: com.springsource.tcserver.serviceability.logging.TcServerLogManager

TC server version : 7.0.42.A.RELEASE JDK: java 7

minion
  • 4,313
  • 2
  • 20
  • 35

2 Answers2

1

Have you tried putting single quotes around the URL?

jvm.opts.28=-Dservice.rest.base.url='http://stg.sample.com?key=sample&value=sample'

Looks like it works when you do that.

Jason K.
  • 272
  • 1
  • 10
0

Can you briefly describe your environment in clear(Ex:what server, what version jdk)?

For the time being, this can shed some light on the real issue.

https://netbeans.org/bugzilla/show_bug.cgi?id=106300

Cmen535
  • 25
  • 1
  • 3
  • 15
  • I have added the details to the post. – minion Mar 10 '15 at 20:03
  • With available resources, I couldn't directly help you.But this article will fix ur problem for sure. https://blogs.oracle.com/jmxetc/entry/connecting_through_firewall_using_jmx . Let me know,if that doesnt help – Cmen535 Mar 10 '15 at 20:08
  • This has nothing to do with JMX. It works fine if i dont have & in the value. – minion Mar 10 '15 at 20:15