Standalone WLST for both WebLogic 8.1 and 9.2?

Posted by imiric on Server Fault See other posts from Server Fault or by imiric
Published on 2011-02-24T14:37:28Z Indexed on 2011/02/24 15:26 UTC
Read the original article Hit count: 317

Filed under:
|
|

Hi,

I'm writing a simple script to facilitate changing JDBC connection URLs in several WL environments, among these both v8.1 and v9.2.

I want to create a standalone script, outside of any WL installation, just including wlst.jar/jython.jar/weblogic.jar, that will work both on WL 8.1 and 9.2 (obviously by referencing different MBeans).

Now, this works OK for WL 8.1. I copy weblogic.jar from the server, and have managed to get ahold of both wlst.jar and jython.jar (wasn't easy, Oracle doesn't host them anymore). Also I need to make sure to locally run under the same JRE as the server (WL8.1 runs on Java 1.4.2).

But if I try to connect to WL 9.2 from this setup, I get a NullPointerException when trying to access any MBean (probably because I'm running on JRE 1.4.2 and WL 9.2 uses 1.5.0).

Also, I am unable to create a standalone environment for WL 9.2. If I copy weblogic.jar from 9.2 and run WLST like so:

java -cp "wlst.jar:jython.jar:weblogic-92.jar" weblogic.WLST

I get a java.lang.NoClassDefFoundError: weblogic/management/configuration/RepositoryMBean error. I can't find this class in weblogic92/server/lib, but it IS inside weblogic.jar from WL 8.1.

So I'm really losing my patience here...

Is there any way to create a standalone WLST client that can connect to any version of WebLogic (8.1 & 9.2 in the meantime)?

I really wouldn't want to have to ssh into the WL environment to run my WLST script...

Any ideas/suggestions are welcome.

Thanks,

Ivan

© Server Fault or respective owner

Related posts about script

Related posts about weblogic