Search code examples
javaweblogicweblogic11gwlst

Error while creating datasource using WLST


I am trying to create a datasource using wlst. I am using the jython script and created a file named createDataSource.py. when i try to run this file from ant script i am getting the below error.

[wlst] Creating JDBCSystemResource with name MyDataSource
    [wlst] Traceback (innermost last):
  [wlst]   File "<iostream>", line 528, in create
    [wlst]  at weblogic.management.scripting.EditHandler.create(EditHandler.java:531)
    [wlst]  at     weblogic.management.scripting.WLScriptContext.create(WLScriptContext.java:332)
    [wlst]  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [wlst]  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [wlst]  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [wlst]  at java.lang.reflect.Method.invoke(Unknown Source)
    [wlst] java.lang.ClassCastException: java.lang.ClassCastException:   java.lang.reflect.InvocationTargetException cannot be cast to     weblogic.management.scripting.ScriptException

Solution

  • thanks for the useful comments from @Mani. it was my mistake i have provided the wrong password.