创建可移植的 Weblogic 脚本工具
Creating Portable Weblogic Scripting Tool
我想创建 WLST 以在我的服务器中执行脚本,因为我无权访问 wlst.sh。我使用 WLST 执行部署 war 文件的脚本。当我执行它时:
java -cp $(echo lib/*.jar | tr ' ' ':') -Dprod.props.file=lib/props.txt -Dbea.home= -Dweblogic.home=/drives/app/wlst weblogic.WLST /drives/app/wlst/deploy.py
我可以部署我的 war 文件(脚本正在运行),但它在执行脚本前后显示错误。
这个问题也很相似this,但是因为这个问题已经被回答而且看起来已经过时了(我使用的是Weblogic 12.2.1.3.0)所以我问这个问题。
我包含的模块是:
├── lib
│ ├── com.bea.core.xml.xmlbeans_1.0.0.0_2-6-0-12.1.3-0-0.jar
│ ├── com.oracle.cie.comdev_7.8.2.0.jar
│ ├── com.oracle.cie.config_8.6.0.0.jar
│ ├── com.oracle.cie.config-owsm_8.6.0.0.jar
│ ├── com.oracle.cie.config-security_8.6.0.0.jar
│ ├── com.oracle.cie.config-wls_8.6.0.0.jar
│ ├── com.oracle.cie.config-wls-schema_8.6.0.0.jar
│ ├── com.oracle.cie.dependency_1.8.2.0.jar
│ ├── com.oracle.cie.encryption_2.6.0.0.jar
│ ├── com.oracle.cie.service-table_1.6.0.0.jar
│ ├── com.oracle.cie.wizard_7.8.2.0.jar
│ ├── com.oracle.core.weblogic.msgcat-12.2.1-3-0.jar
│ ├── com.oracle.glcm.encryption_2.7.2.0.jar
│ └── jython-modules.jar
│ └── weblogic.jar
│ └── wlfullclient.jar
这是我执行脚本时遇到的错误:
java.lang.ClassNotFoundException: com.oracle.cie.gdr.external.InventoryFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.oracle.cie.common.ReflectionHelper.process(ReflectionHelper.java:43)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.init(EnvironmentServiceImpl.java:384)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.<init>(EnvironmentServiceImpl.java:89)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.getInstance(EnvironmentServiceImpl.java:364)
at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:35)
at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:72)
at com.oracle.cie.domain.script.jython.WLScriptContext.init(WLScriptContext.java:303)
at com.oracle.cie.domain.script.jython.WLScriptContext.setup(WLScriptContext.java:270)
at com.oracle.cie.domain.script.jython.WLST_offline.setupContext(WLST_offline.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.management.scripting.utils.WLSTUtil.initOfflineContext(WLSTUtil.java:514)
at weblogic.management.scripting.utils.WLSTUtil.setupOfflineInternal(WLSTUtil.java:488)
at weblogic.management.scripting.utils.WLSTUtil.setupOffline(WLSTUtil.java:361)
at weblogic.management.scripting.utils.WLSTUtilWrapper.setupOffline(WLSTUtilWrapper.java:29)
at weblogic.management.scripting.utils.WLSTInterpreter.<init>(WLSTInterpreter.java:250)
at weblogic.management.scripting.WLST.main(WLST.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.WLST.main(WLST.java:47)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.management.scripting.utils.WLSTUtil.initOfflineContext(WLSTUtil.java:514)
at weblogic.management.scripting.utils.WLSTUtil.setupOfflineInternal(WLSTUtil.java:488)
at weblogic.management.scripting.utils.WLSTUtil.setupOffline(WLSTUtil.java:361)
at weblogic.management.scripting.utils.WLSTUtilWrapper.setupOffline(WLSTUtilWrapper.java:29)
at weblogic.management.scripting.utils.WLSTInterpreter.<init>(WLSTInterpreter.java:250)
at weblogic.management.scripting.WLST.main(WLST.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.WLST.main(WLST.java:47)
Caused by: java.lang.IllegalStateException: com.oracle.cie.domain.env.EnvironmentServiceException: Failed to get inventory for /drives
at com.oracle.cie.domain.script.jython.WLScriptContext.init(WLScriptContext.java:353)
at com.oracle.cie.domain.script.jython.WLScriptContext.setup(WLScriptContext.java:270)
at com.oracle.cie.domain.script.jython.WLST_offline.setupContext(WLST_offline.java:46)
... 15 more
Caused by: com.oracle.cie.domain.env.EnvironmentServiceException: Failed to get inventory for /drives
at com.oracle.cie.domain.env.EnvironmentServiceImpl.init(EnvironmentServiceImpl.java:425)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.<init>(EnvironmentServiceImpl.java:89)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.getInstance(EnvironmentServiceImpl.java:364)
at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:35)
at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:72)
at com.oracle.cie.domain.script.jython.WLScriptContext.init(WLScriptContext.java:303)
... 17 more
Caused by: java.lang.ClassNotFoundException: com.oracle.cie.gdr.external.InventoryFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.oracle.cie.common.ReflectionHelper.process(ReflectionHelper.java:43)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.init(EnvironmentServiceImpl.java:384)
... 22 more
Error execing the Python script "/drives/app/wlst/lib/wlfullclient.jar!/wlstScriptDir/jrf_mt_provisioning_cli.py" caused an error "Traceback (innermost last):
File "/drives/app/wlst/lib/wlfullclient.jar!/wlstScriptDir/jrf_mt_provisioning_cli.py", line 19, in ?
ImportError: no module named lifecycle
"
Error execing the Python script "/drives/app/wlst/lib/wlfullclient.jar!/wlstScriptDir/coh_persistence.py" caused an error "Traceback (innermost last):
File "/drives/app/wlst/lib/wlfullclient.jar!/wlstScriptDir/coh_persistence.py", line 14, in ?
ImportError: no module named datagrid
"
这是我执行脚本后得到的错误:
SEVERE: Failed to get inventory for /drives
java.lang.ClassNotFoundException: com.oracle.cie.gdr.external.InventoryFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.oracle.cie.common.ReflectionHelper.process(ReflectionHelper.java:43)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.init(EnvironmentServiceImpl.java:384)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.<init>(EnvironmentServiceImpl.java:89)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.getInstance(EnvironmentServiceImpl.java:364)
at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:35)
at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:72)
at com.oracle.cie.domain.script.jython.WLScriptContext.init(WLScriptContext.java:303)
at com.oracle.cie.domain.script.jython.WLScriptContext.setup(WLScriptContext.java:270)
at com.oracle.cie.domain.script.jython.WLST_offline.setupContext(WLST_offline.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.management.scripting.utils.WLSTUtil.initOfflineContext(WLSTUtil.java:514)
at weblogic.management.scripting.utils.WLSTUtil.setupOfflineInternal(WLSTUtil.java:488)
at weblogic.management.scripting.utils.WLSTUtil.setupOffline(WLSTUtil.java:361)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.python.core.PyReflectedFunction.__call__(Unknown Source)
at org.python.core.PyReflectedFunction.__call__(Unknown Source)
at org.python.core.PyObject.__call__(Unknown Source)
at org.python.core.PyObject.invoke(Unknown Source)
at org.python.pycode._pyx24.disconnect(<iostream>:140)
at org.python.pycode._pyx24.call_function(<iostream>)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyFunction.__call__(Unknown Source)
at org.python.pycode._pyx23.f[=13=](/drives/app/wlst/deploy.py:25)
at org.python.pycode._pyx23.call_function(/drives/app/wlst/deploy.py)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyCode.call(Unknown Source)
at org.python.core.Py.runCode(Py.java:1226)
at org.python.util.PythonInterpreter.execfile(Unknown Source)
at weblogic.management.scripting.WLST.main(WLST.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.WLST.main(WLST.java:47)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.management.scripting.utils.WLSTUtil.initOfflineContext(WLSTUtil.java:514)
at weblogic.management.scripting.utils.WLSTUtil.setupOfflineInternal(WLSTUtil.java:488)
at weblogic.management.scripting.utils.WLSTUtil.setupOffline(WLSTUtil.java:361)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.python.core.PyReflectedFunction.__call__(Unknown Source)
at org.python.core.PyReflectedFunction.__call__(Unknown Source)
at org.python.core.PyObject.__call__(Unknown Source)
at org.python.core.PyObject.invoke(Unknown Source)
at org.python.pycode._pyx24.disconnect(<iostream>:140)
at org.python.pycode._pyx24.call_function(<iostream>)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyFunction.__call__(Unknown Source)
at org.python.pycode._pyx23.f[=13=](/drives/app/wlst/deploy.py:25)
at org.python.pycode._pyx23.call_function(/drives/app/wlst/deploy.py)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyCode.call(Unknown Source)
at org.python.core.Py.runCode(Py.java:1226)
at org.python.util.PythonInterpreter.execfile(Unknown Source)
at weblogic.management.scripting.WLST.main(WLST.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.WLST.main(WLST.java:47)
Caused by: java.lang.IllegalStateException: com.oracle.cie.domain.env.EnvironmentServiceException: Failed to get inventory for /drives
at com.oracle.cie.domain.script.jython.WLScriptContext.init(WLScriptContext.java:353)
at com.oracle.cie.domain.script.jython.WLScriptContext.setup(WLScriptContext.java:270)
at com.oracle.cie.domain.script.jython.WLST_offline.setupContext(WLST_offline.java:46)
... 33 more
Caused by: com.oracle.cie.domain.env.EnvironmentServiceException: Failed to get inventory for /drives
at com.oracle.cie.domain.env.EnvironmentServiceImpl.init(EnvironmentServiceImpl.java:425)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.<init>(EnvironmentServiceImpl.java:89)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.getInstance(EnvironmentServiceImpl.java:364)
at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:35)
at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:72)
at com.oracle.cie.domain.script.jython.WLScriptContext.init(WLScriptContext.java:303)
... 35 more
Caused by: java.lang.ClassNotFoundException: com.oracle.cie.gdr.external.InventoryFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.oracle.cie.common.ReflectionHelper.process(ReflectionHelper.java:43)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.init(EnvironmentServiceImpl.java:384)
... 40 more
我的另一个参考是 this thread。
我的问题是,是否可以解决此错误?我知道该错误不会影响我的脚本,但最好能消除此错误。我在想也许我错过了一些要包含的模块,但我不知道我要找的模块是什么。
当您进行锁定和编辑时,它会创建对域的非独占锁定,同样可以通过以下命令行实现:
使用以下方法从 weblogic 生成客户端 jar:
将目录更改为 server/lib 目录。
cd WL_HOME/server/lib
使用以下命令在server/lib目录中创建wlfullclient.jar:
java -jar ../../modules/com.bea.core.jarbuilder_X.X.X.X.jar
其中 X.X.X.X 是 WL_HOME/server/lib 目录中 jarbuilder 模块的版本号。
例如:
java -jar ../../../modules/com.bea.core.jarbuilder_1.0.1.0.jar
您现在可以复制 wlfullclient.jar 并将其与客户端应用程序捆绑在一起。将 wlfullclient.jar 添加到客户端应用程序的类路径。
完成后使用以下命令自动部署:
export CLASSPATH='location where your client jar resides'
java -cp $CLASSPATH weblogic.Deployer -adminurl ADMIN_URL:PORT -username weblogic -password weblogic1! -deploy app.war -name appname -targets AdminServer -debug - usenonexclusivelock
我想创建 WLST 以在我的服务器中执行脚本,因为我无权访问 wlst.sh。我使用 WLST 执行部署 war 文件的脚本。当我执行它时:
java -cp $(echo lib/*.jar | tr ' ' ':') -Dprod.props.file=lib/props.txt -Dbea.home= -Dweblogic.home=/drives/app/wlst weblogic.WLST /drives/app/wlst/deploy.py
我可以部署我的 war 文件(脚本正在运行),但它在执行脚本前后显示错误。
这个问题也很相似this,但是因为这个问题已经被回答而且看起来已经过时了(我使用的是Weblogic 12.2.1.3.0)所以我问这个问题。
我包含的模块是:
├── lib
│ ├── com.bea.core.xml.xmlbeans_1.0.0.0_2-6-0-12.1.3-0-0.jar
│ ├── com.oracle.cie.comdev_7.8.2.0.jar
│ ├── com.oracle.cie.config_8.6.0.0.jar
│ ├── com.oracle.cie.config-owsm_8.6.0.0.jar
│ ├── com.oracle.cie.config-security_8.6.0.0.jar
│ ├── com.oracle.cie.config-wls_8.6.0.0.jar
│ ├── com.oracle.cie.config-wls-schema_8.6.0.0.jar
│ ├── com.oracle.cie.dependency_1.8.2.0.jar
│ ├── com.oracle.cie.encryption_2.6.0.0.jar
│ ├── com.oracle.cie.service-table_1.6.0.0.jar
│ ├── com.oracle.cie.wizard_7.8.2.0.jar
│ ├── com.oracle.core.weblogic.msgcat-12.2.1-3-0.jar
│ ├── com.oracle.glcm.encryption_2.7.2.0.jar
│ └── jython-modules.jar
│ └── weblogic.jar
│ └── wlfullclient.jar
这是我执行脚本时遇到的错误:
java.lang.ClassNotFoundException: com.oracle.cie.gdr.external.InventoryFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.oracle.cie.common.ReflectionHelper.process(ReflectionHelper.java:43)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.init(EnvironmentServiceImpl.java:384)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.<init>(EnvironmentServiceImpl.java:89)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.getInstance(EnvironmentServiceImpl.java:364)
at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:35)
at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:72)
at com.oracle.cie.domain.script.jython.WLScriptContext.init(WLScriptContext.java:303)
at com.oracle.cie.domain.script.jython.WLScriptContext.setup(WLScriptContext.java:270)
at com.oracle.cie.domain.script.jython.WLST_offline.setupContext(WLST_offline.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.management.scripting.utils.WLSTUtil.initOfflineContext(WLSTUtil.java:514)
at weblogic.management.scripting.utils.WLSTUtil.setupOfflineInternal(WLSTUtil.java:488)
at weblogic.management.scripting.utils.WLSTUtil.setupOffline(WLSTUtil.java:361)
at weblogic.management.scripting.utils.WLSTUtilWrapper.setupOffline(WLSTUtilWrapper.java:29)
at weblogic.management.scripting.utils.WLSTInterpreter.<init>(WLSTInterpreter.java:250)
at weblogic.management.scripting.WLST.main(WLST.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.WLST.main(WLST.java:47)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.management.scripting.utils.WLSTUtil.initOfflineContext(WLSTUtil.java:514)
at weblogic.management.scripting.utils.WLSTUtil.setupOfflineInternal(WLSTUtil.java:488)
at weblogic.management.scripting.utils.WLSTUtil.setupOffline(WLSTUtil.java:361)
at weblogic.management.scripting.utils.WLSTUtilWrapper.setupOffline(WLSTUtilWrapper.java:29)
at weblogic.management.scripting.utils.WLSTInterpreter.<init>(WLSTInterpreter.java:250)
at weblogic.management.scripting.WLST.main(WLST.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.WLST.main(WLST.java:47)
Caused by: java.lang.IllegalStateException: com.oracle.cie.domain.env.EnvironmentServiceException: Failed to get inventory for /drives
at com.oracle.cie.domain.script.jython.WLScriptContext.init(WLScriptContext.java:353)
at com.oracle.cie.domain.script.jython.WLScriptContext.setup(WLScriptContext.java:270)
at com.oracle.cie.domain.script.jython.WLST_offline.setupContext(WLST_offline.java:46)
... 15 more
Caused by: com.oracle.cie.domain.env.EnvironmentServiceException: Failed to get inventory for /drives
at com.oracle.cie.domain.env.EnvironmentServiceImpl.init(EnvironmentServiceImpl.java:425)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.<init>(EnvironmentServiceImpl.java:89)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.getInstance(EnvironmentServiceImpl.java:364)
at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:35)
at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:72)
at com.oracle.cie.domain.script.jython.WLScriptContext.init(WLScriptContext.java:303)
... 17 more
Caused by: java.lang.ClassNotFoundException: com.oracle.cie.gdr.external.InventoryFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.oracle.cie.common.ReflectionHelper.process(ReflectionHelper.java:43)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.init(EnvironmentServiceImpl.java:384)
... 22 more
Error execing the Python script "/drives/app/wlst/lib/wlfullclient.jar!/wlstScriptDir/jrf_mt_provisioning_cli.py" caused an error "Traceback (innermost last):
File "/drives/app/wlst/lib/wlfullclient.jar!/wlstScriptDir/jrf_mt_provisioning_cli.py", line 19, in ?
ImportError: no module named lifecycle
"
Error execing the Python script "/drives/app/wlst/lib/wlfullclient.jar!/wlstScriptDir/coh_persistence.py" caused an error "Traceback (innermost last):
File "/drives/app/wlst/lib/wlfullclient.jar!/wlstScriptDir/coh_persistence.py", line 14, in ?
ImportError: no module named datagrid
"
这是我执行脚本后得到的错误:
SEVERE: Failed to get inventory for /drives
java.lang.ClassNotFoundException: com.oracle.cie.gdr.external.InventoryFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.oracle.cie.common.ReflectionHelper.process(ReflectionHelper.java:43)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.init(EnvironmentServiceImpl.java:384)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.<init>(EnvironmentServiceImpl.java:89)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.getInstance(EnvironmentServiceImpl.java:364)
at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:35)
at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:72)
at com.oracle.cie.domain.script.jython.WLScriptContext.init(WLScriptContext.java:303)
at com.oracle.cie.domain.script.jython.WLScriptContext.setup(WLScriptContext.java:270)
at com.oracle.cie.domain.script.jython.WLST_offline.setupContext(WLST_offline.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.management.scripting.utils.WLSTUtil.initOfflineContext(WLSTUtil.java:514)
at weblogic.management.scripting.utils.WLSTUtil.setupOfflineInternal(WLSTUtil.java:488)
at weblogic.management.scripting.utils.WLSTUtil.setupOffline(WLSTUtil.java:361)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.python.core.PyReflectedFunction.__call__(Unknown Source)
at org.python.core.PyReflectedFunction.__call__(Unknown Source)
at org.python.core.PyObject.__call__(Unknown Source)
at org.python.core.PyObject.invoke(Unknown Source)
at org.python.pycode._pyx24.disconnect(<iostream>:140)
at org.python.pycode._pyx24.call_function(<iostream>)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyFunction.__call__(Unknown Source)
at org.python.pycode._pyx23.f[=13=](/drives/app/wlst/deploy.py:25)
at org.python.pycode._pyx23.call_function(/drives/app/wlst/deploy.py)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyCode.call(Unknown Source)
at org.python.core.Py.runCode(Py.java:1226)
at org.python.util.PythonInterpreter.execfile(Unknown Source)
at weblogic.management.scripting.WLST.main(WLST.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.WLST.main(WLST.java:47)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.management.scripting.utils.WLSTUtil.initOfflineContext(WLSTUtil.java:514)
at weblogic.management.scripting.utils.WLSTUtil.setupOfflineInternal(WLSTUtil.java:488)
at weblogic.management.scripting.utils.WLSTUtil.setupOffline(WLSTUtil.java:361)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.python.core.PyReflectedFunction.__call__(Unknown Source)
at org.python.core.PyReflectedFunction.__call__(Unknown Source)
at org.python.core.PyObject.__call__(Unknown Source)
at org.python.core.PyObject.invoke(Unknown Source)
at org.python.pycode._pyx24.disconnect(<iostream>:140)
at org.python.pycode._pyx24.call_function(<iostream>)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyFunction.__call__(Unknown Source)
at org.python.pycode._pyx23.f[=13=](/drives/app/wlst/deploy.py:25)
at org.python.pycode._pyx23.call_function(/drives/app/wlst/deploy.py)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyCode.call(Unknown Source)
at org.python.core.Py.runCode(Py.java:1226)
at org.python.util.PythonInterpreter.execfile(Unknown Source)
at weblogic.management.scripting.WLST.main(WLST.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.WLST.main(WLST.java:47)
Caused by: java.lang.IllegalStateException: com.oracle.cie.domain.env.EnvironmentServiceException: Failed to get inventory for /drives
at com.oracle.cie.domain.script.jython.WLScriptContext.init(WLScriptContext.java:353)
at com.oracle.cie.domain.script.jython.WLScriptContext.setup(WLScriptContext.java:270)
at com.oracle.cie.domain.script.jython.WLST_offline.setupContext(WLST_offline.java:46)
... 33 more
Caused by: com.oracle.cie.domain.env.EnvironmentServiceException: Failed to get inventory for /drives
at com.oracle.cie.domain.env.EnvironmentServiceImpl.init(EnvironmentServiceImpl.java:425)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.<init>(EnvironmentServiceImpl.java:89)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.getInstance(EnvironmentServiceImpl.java:364)
at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:35)
at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:72)
at com.oracle.cie.domain.script.jython.WLScriptContext.init(WLScriptContext.java:303)
... 35 more
Caused by: java.lang.ClassNotFoundException: com.oracle.cie.gdr.external.InventoryFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.oracle.cie.common.ReflectionHelper.process(ReflectionHelper.java:43)
at com.oracle.cie.domain.env.EnvironmentServiceImpl.init(EnvironmentServiceImpl.java:384)
... 40 more
我的另一个参考是 this thread。
我的问题是,是否可以解决此错误?我知道该错误不会影响我的脚本,但最好能消除此错误。我在想也许我错过了一些要包含的模块,但我不知道我要找的模块是什么。
当您进行锁定和编辑时,它会创建对域的非独占锁定,同样可以通过以下命令行实现:
使用以下方法从 weblogic 生成客户端 jar:
将目录更改为 server/lib 目录。
cd WL_HOME/server/lib
使用以下命令在server/lib目录中创建wlfullclient.jar:
java -jar ../../modules/com.bea.core.jarbuilder_X.X.X.X.jar
其中 X.X.X.X 是 WL_HOME/server/lib 目录中 jarbuilder 模块的版本号。 例如:
java -jar ../../../modules/com.bea.core.jarbuilder_1.0.1.0.jar
您现在可以复制 wlfullclient.jar 并将其与客户端应用程序捆绑在一起。将 wlfullclient.jar 添加到客户端应用程序的类路径。
完成后使用以下命令自动部署:
export CLASSPATH='location where your client jar resides'
java -cp $CLASSPATH weblogic.Deployer -adminurl ADMIN_URL:PORT -username weblogic -password weblogic1! -deploy app.war -name appname -targets AdminServer -debug - usenonexclusivelock