Page 1 of 1

Urgent ! - Weblogic agent error of Solaris 10 SPARC

Posted: Wed Dec 16, 2015 12:49 pm
by Sundar
Dear Forum,

We are trying to configure wlsagent (wlsagent-r185.tar.gz) on weblogic 12 server, that runs on Solaris 10 SPARC and we get the below error

"java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long|" while we run the below command

./wlsagent.sh 'hostname=localhost&port=8001&username=xxxxxx&password=xxxxxx&jvm=UsedMemory,90,95'

We referred the below link, but unsure if those steps can be followed or familiar with those steps, to see if they can cause any impact to the application

https://code.google.com/p/wlsagent/issues/detail?id=24

Please check and advise if there is any workaround or how/where these steps need to be performed as in the article

need to modify init() method in WLSProxy class:
1. change Map<String, String> map = new HashMap<String,String>() to Map<String, Object> map = new HashMap<String,Object>()
2. change map.put("jmx.remote.x.request.waiting.timeout", "20000") to map.put("jmx.remote.x.request.waiting.timeout", 20000L)

Regards,
Sundar

Re: Urgent ! - Weblogic agent error of Solaris 10 SPARC

Posted: Wed Dec 16, 2015 1:43 pm
by rkennedy
As this is a third party plugin, we do not know exactly how it's made. I did find some text as reference.

Taken from the last post on that page -
I've just figure out how to fix problem: need to modify init() method in WLSProxy class:
1. change Map<String, String> map = new HashMap<String,String>() to Map<String, Object> map = new HashMap<String,Object>()
2. change map.put("jmx.remote.x.request.waiting.timeout", "20000") to map.put("jmx.remote.x.request.waiting.timeout", 20000L)
3. build application with ant (perhaps, you should rename jar file from wlsagent.jar to wlsagent-r185.jar)
4. run application and use
After these modifications it worked on Weblogic 12c
I would assume these changes need to be made in the WLSProxy.class file as directed.