Wednesday, April 23, 2014

Error while creating datasource using WLST - java.lang.ClassCastException

Error while creating datasource using WLST - java.lang.ClassCastException

When we are creating the datasource through WLST script in weblogic server may may receive the following exception in create method.

Creating DataSource:  EAISOAMetadataSource  ....
Problem invoking WLST - Traceback (innermost last):
  File "/reuters/oracle/as01/wlst/", line 115, in ?
  File "/reuters/oracle/as01/wlst/", line 108, in main
  File "/reuters/oracle/as01/wlst/", line 39, in createGridLinkJDBCResources
  File "<iostream>", line 528, in create
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(

java.lang.ClassCastException: java.lang.ClassCastException: java.lang.reflect.InvocationTargetException cannot be cast to

I colud not able to find the exact root cause but able to resolve the issue "Undo All Changes" from weblogic console and re-exectiong the script.

Steps to resolve the issue

Login to weblogic admin console
Verify whether any changes are pending to be activated.
Perform Activate Changes or Undo All Changes

Re-execute the script, this time script will create the datasource successfully.

No comments:

Post a Comment