Alert Purge WLST Script
All,
I just wanted to share a WLST script I wrote that will purge old ALSB alerts older than 'n' days. Enjoy.
-John
import sys
# Usage:
# java weblogic.WLST deleteAlerts.py url username password keep_days
# eg, following will deleteAlerts older than 'n' days from the ALSB Alerts
# Example:
# java weblogic.WLST deleteAlerts.py t3://localhost:7001 weblogic weblogic 2
def getParam(pos, default):
value=None
try:
value=sys.argv[pos]
except:
value=default
return value
url = getParam(1, "t3://localhost:7001")
user = getParam(2, "weblogic")
password = getParam(3, "weblogic")
days = Integer(getParam(4, "2")).intValue() # need to do this because the ARGs are strings.
connect(user,password,url)
now=System.currentTimeMillis()
startTime=0
endTime=(now - days*3600*24*1000)
serverRuntime()
print "Deleting records older than", days, "days old from ALSB Alerts"
alsbAlerts = cmo.getWLDFRuntime().getWLDFAccessRuntime().lookupWLDFDataAccessRuntime('CUSTOM/com.bea.wli.monitoring.alert')
numDeleted = alsbAlerts.deleteDataRecords(startTime,endTime,"")
print "Number deleted =", numDeleted
disconnect()----------------------------
Edited by jgraves at 10/11/2007 9:00 PM
John,
thank you for sharing the code with the community. I am sure it will be usefull to a lot of people.
Dev2Dev has a placeholder for product samples. Samples usually come from BEA employees but everybody can contribute.
You can find more details at:
https://codesamples.projects.dev2dev.bea.com/
Gregory Haardt
ALSB Prg. Manager
[email protected]
Similar Messages
-
Purging OSB Alerts using WLST scripts
Hi,
I am using the below script to purge the OSB Alerts. I am connecting to the OSB managed server to purge the alerts.
*# Connect to server*
* connect(weblogic,welcome,intdev:8011)*
* # Calculate the start and end time for purging the alerts*
* now=System.currentTimeMillis()*
* startTime=0*
* endTime=(now - days*3600*24*1000)*
* # Purging the Alerts*
* serverRuntime()*
* print "Deleting records older than", days, "days from OSB Alerts"*
* print cmo*
* alsbAlerts = cmo.getWLDFRuntime().getWLDFAccessRuntime().lookupWLDFDataAccessRuntime('CUSTOM/com.bea.wli.monitoring.alert')*
* numDeleted = alsbAlerts.deleteDataRecords(startTime,endTime,"")*
* print "No. of Alerts deleted =", numDeleted*
* # Disconnect from the domain*
* disconnect()*
I am getting the below error while executing the script
Successfully connected to managed Server 'osb_server1' that belongs to domain 'soa_domain'.
Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.
Location changed to serverRuntime tree. This is a read-only tree with ServerRuntimeMBean as the root.
For more help, use help(serverRuntime)
Deleting records older than 60 days from OSB Alerts
+[MBeanServerInvocationHandler]com.bea:Name=osb_server1,Type=ServerRuntime+
Disconnected from weblogic server: osb_server1
Unexpected error: weblogic.management.ManagementException
Problem invoking WLST - Traceback (innermost last):
File "/home/soadev/WLST/FINAL/purging/purge_Alerts.py", line 41, in ?
weblogic.management.ManagementException:
at weblogic.diagnostics.accessor.WLSAccessorMBeanFactoryImpl.createDiagnosticDataAccessRuntime(WLSAccessorMBeanFactoryImpl.java:206)
at weblogic.diagnostics.accessor.AccessRuntime.lookupDataAccessRuntime(AccessRuntime.java:315)
at weblogic.diagnostics.accessor.DiagnosticAccessRuntime.lookupWLDFDataAccessRuntime(DiagnosticAccessRuntime.java:77)
at weblogic.diagnostics.accessor.DiagnosticAccessRuntime.lookupWLDFDataAccessRuntime(DiagnosticAccessRuntime.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.management.jmx.modelmbean.WLSModelMBean.invoke(WLSModelMBean.java:437)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)
at java.security.AccessController.doPrivileged(Native Method)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
at weblogic.management.mbeanservers.internal.JMXContextInterceptor.invoke(JMXContextInterceptor.java:268)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)
at java.security.AccessController.doPrivileged(Native Method)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
at weblogic.management.mbeanservers.internal.SecurityInterceptor.invoke(SecurityInterceptor.java:444)
at weblogic.management.jmx.mbeanserver.WLSMBeanServer.invoke(WLSMBeanServer.java:323)
at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder$11$1.run(JMXConnectorSubjectForwarder.java:663)
at java.security.AccessController.doPrivileged(Native Method)
at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder$11.run(JMXConnectorSubjectForwarder.java:661)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder.invoke(JMXConnectorSubjectForwarder.java:654)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427)
at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265)
at java.security.AccessController.doPrivileged(Native Method)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1367)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
at javax.management.remote.rmi.RMIConnectionImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
+Caused by: weblogic.management.ManagementException: [Diagnostics:320103]There was an error creating the DiagnosticDataRuntimeMBean instance with the given logical name CUSTOM/com.bea.wli.monitoring.alert.+
at weblogic.diagnostics.accessor.WLSAccessorMBeanFactoryImpl.createDataAccessRuntime(WLSAccessorMBeanFactoryImpl.java:228)
at weblogic.diagnostics.accessor.WLSAccessorMBeanFactoryImpl.access$000(WLSAccessorMBeanFactoryImpl.java:55)
at weblogic.diagnostics.accessor.WLSAccessorMBeanFactoryImpl$1.run(WLSAccessorMBeanFactoryImpl.java:201)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.diagnostics.accessor.WLSAccessorMBeanFactoryImpl.createDiagnosticDataAccessRuntime(WLSAccessorMBeanFactoryImpl.java:197)
+... 39 more+
weblogic.management.ManagementException: weblogic.management.ManagementException:
Please provide pointers to get rid of this issue.
Edited by: Chintan Parekh on Jun 1, 2011 2:41 AMPlease refer -
http://blogs.oracle.com/MarkSmith/entry/osb_alerts_purging_is_essentia
From the blog -
The components that make up WLDF will be targeted to a single managed server in a clustered environment or to the Admin server in a single server environment. To establish what managed server this is, check to see where the WLI Aggregator application is targeted to. The WLDF data will be stored under this single managed server in the following location: //domain_name/servers/server_name/data/store/diagnostics/Check that on which server WLI Aggregator application is targeted and connect to that server from your script.
Regards,
Anuj -
Hello everyone,
Trying to purge ALSB alerts using the WLST script extract found on the [Oracle website|http://blogs.oracle.com/MarkSmith/2008/11/osb_alerts_purging_is_essentia.html] yields the following exception, specifically when attempting to
access the com.bea.wli.monitoring.alert MBean using
alsbAlerts = cmo.getWLDFRuntime().getWLDFAccessRuntime().lookupWLDFDataAccessRuntime('CUSTOM/com.bea.wli.monitoring.alert')
The resulting strack trace looks like this:
Traceback (innermost last):
File "<console>", line 1, in ?
weblogic.management.ManagementException:
at weblogic.diagnostics.accessor.DiagnosticAccessRuntime.lookupWLDFDataAccessRuntime(DiagnosticAccessRuntime.java:150)
at weblogic.diagnostics.accessor.DiagnosticAccessRuntime.lookupWLDFDataAccessRuntime(DiagnosticAccessRuntime.java:95)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at weblogic.management.jmx.modelmbean.WLSModelMBean.invoke(WLSModelMBean.java:443)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:153)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:153)
at weblogic.management.mbeanservers.internal.SecurityInterceptor.invoke(SecurityInterceptor.java:443)
at weblogic.management.mbeanservers.internal.AuthenticatedSubjectInterceptor$10.run(AuthenticatedSubjectInterceptor.java:377)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.management.mbeanservers.internal.AuthenticatedSubjectInterceptor.invoke(AuthenticatedSubjectInterceptor.java:375)
at weblogic.management.jmx.mbeanserver.WLSMBeanServer.invoke(WLSMBeanServer.java:310)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1408)
at javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1245)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1348)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:782)
at javax.management.remote.rmi.RMIConnectionImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:479)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:475)
at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:59)
at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:1016)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Caused by: weblogic.management.ManagementException: [Diagnostics:320103]There was an error creating the DiagnosticDataRuntimeMBean instance with the given logical name CUSTOM/com.bea.wli.monitoring.alert.
at weblogic.diagnostics.accessor.DiagnosticDataAccessRuntime.createDiagnosticDataAccessRuntime(DiagnosticDataAccessRuntime.java:114)
at weblogic.diagnostics.accessor.DiagnosticAccessRuntime$1.run(DiagnosticAccessRuntime.java:145)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.diagnostics.accessor.DiagnosticAccessRuntime.lookupWLDFDataAccessRuntime(DiagnosticAccessRuntime.java:141)
... 32 more
weblogic.management.ManagementException: weblogic.management.ManagementException:
This is using WebLogic Server 10.0 and ALSB 3.0
Any ideas what's going on?
Cheers,
JanAfter reading your mail, I assume that you are using JMS reporting provider bundled with OSB. Please be advised that, the bundled version is not full-pledged reporting provider designed to suit all customer needs/use case. More of a bare bones version.
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/operations/wwimages/reporting_framework.gif--- Will give you better clarity on the architecture. ReportingDataManager is not designed to hold statistics. So OSB will cannot expose any JMX API.
The data/statistics showed in sbconsole are directly picked from Database http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/operations/wwimages/jms_reporting_provider.gif .
So if you wan to purge the details programatically then only option avaialble are
1) JDBC program to delete records from TABLES WLI_QS_REPORT_ATTRIBUTE,WLI_QS_REPORT_DATA (not recommended as reporting provider internal working is not in pubic domain. Said that it would not take much time to understand how report data is stored in the above tables).
2) Write a custom reporting provider which will have capability you are looking. http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/javadoc/index.html (easiest way)
Let me know if you need any clarification on the above.
Thanks
Manoj
Edited by: mneelapu on Apr 24, 2009 2:27 PM -
WLST Script for Disabling/Enabling Global SLA Alerting.
Hello,
I wanna find a way from the WLST to disable and enable the SLA Alerting which is under Operations-->Global Settings in the sbconsole. This is the global setting not per sercive!
I have found how to create a session and how to disable the alerts per service, but i cannot find which MBean is accessed when throught the sbconsole the global SLA alerting is disabled/enabled.
Can anybody point me to the right direction or help me to find how to do this from WLST.
Thanks.Hi Ganesh,
I have finally created the script i was looking for.. I copy-paste it below as a sample... For sure you need all the lines of code until the comment i have put "#####you need this code above"
now the code you see below the comment is for disabling the global sla alerting... you have to write a bit to target a specific service that you want to disable.
Keep in mind that after you make your change you hava to include those lines in order to activate the changes and disconnect and exit..
sessionMBean.activateSession(sessionName, "enable SLA")
disconnect()
exit()
If you have access to oracle support search for wlst script for osb it has a lot and you can find how to target a specific service...
I hope that i help a little bit
import sys
import wlstModule
from com.bea.wli.sb.management.configuration import SessionManagementMBean
from com.bea.wli.sb.management.configuration import ALSBConfigurationMBean
#from com.bea.wli.sb.management.configuration import ProxyServiceConfigurationMBean
from com.bea.wli.sb.management.configuration.operations import OperationsConfigMBean
from com.bea.wli.config import Ref
from com.bea.wli.sb.util import Refs
# Connect (username, password, URL)
connect('weblogic', 'password', 't3://localhost:7001')
domainRuntime()
# Create a session name
sessionName =sessionName = String("SessionScript"+Long(System.currentTimeMillis()).toString())
print('... after session. Session is: ', sessionName)
# Get the session MBean and create a session
sessionMBean = findService(SessionManagementMBean.NAME,SessionManagementMBean.TYPE)
print('-debug-this is the sessionbean',sessionMBean)
print('SessionMBean is: ', sessionMBean)
sessionMBean.createSession(sessionName)
print(String('Session was created ... ').concat(sessionName))
#####you need this code above
domainCustom()
cd('com.bea')
#path='com.bea:Name=OperationsConfig.'+sessionName+',Location=AdminServer,Type=com.bea.wli.sb.management.configuration.operations.OperationsConfigMBean'
cd('com.bea:Name=OperationsConfig.'+str(sessionName)+',Location=AdminServer,Type=com.bea.wli.sb.management.configuration.operations.OperationsConfigMBean')
set('DomainSLAAlertingEnabled',java.lang.Boolean("true"))
# Now commit (activate) the changes
sessionMBean.activateSession(sessionName, "enable SLA")
disconnect()
exit() -
ALSB Newbie: WLST script for SLA Alerts
Hi,
I am new to ALSB 2.6. Can anybody give me an idea how to write a WLST script to automate creation of SLA Alerts for all the proxy services(60) and business services(60).
Thanks,
SunnyHi,
I am new to ALSB 2.6. Can anybody give me an idea how to write a WLST script to automate creation of SLA Alerts for all the proxy services(60) and business services(60).
Thanks,
Sunny -
Creation of Customisation file from WLST Script in OSB
Hi,
Please help in creating Customisation file in OSB from WLST ScriptsHi,
Please refer -
Create Customization File in OSB 10g with WLST script
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/deploy/config_appx.html
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/javadoc/com/bea/wli/config/customization/Customization.html
Regards,
Anuj -
Creating SessionMBean error while deploying OSB through WLSt script
Hi All,
I am trying to deploy my OSB by using WLST scripts.
After setting the required properties in files,I ran the import.py script.But I got an error while creating an session bean
I have pasted the whole stcak here.It is going fine till creating a session.After that it is failing:
Any pointers in this regard will be helpful.
****************************the stack************************88
Your environment has been set.
CLASSPATH=E:\Oracle\Middleware\patch_wls1033\profiles\default\sys_manifest_class
path\weblogic_patch.jar;E:\Oracle\Middleware\patch_oepe1033\profiles\default\sys
manifestclasspath\weblogic_patch.jar;E:\Oracle\Middleware\patch_ocp353\profile
s\default\sys_manifest_classpath\weblogic_patch.jar;E:\Oracle\Middleware\jrockit
_160_17_R28.0.0-679\lib\tools.jar;E:\Oracle\Middleware\wlserver_10.3\server\lib\
weblogic_sp.jar;E:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.jar;E:\Or
acle\Middleware\modules\features\weblogic.server.modules_10.3.3.0.jar;E:\Oracle\
Middleware\wlserver_10.3\server\lib\webservices.jar;E:\Oracle\Middleware\modules
\org.apache.ant_1.7.1/lib/ant-all.jar;E:\Oracle\Middleware\modules\net.sf.antcon
trib_1.1.0.0_1-0b2/lib/ant-contrib.jar;;E:\Oracle\Middleware/Oracle_OSB1/lib/sb-
kernel-api.jar;E:\Oracle\Middleware/Oracle_OSB1/modules/com.bea.common.configfwk
_1.3.0.0.jar;E:\Oracle\Middleware/modules/com.bea.common.configfwk.wlinterop_10.
3.1.0
Apache Ant version 1.7.1 compiled on June 27 2008
Buildfile: ..\scripts\build.xml
Detected Java version: 1.6 in: E:\Oracle\Middleware\jrockit_160_17_R28.0.0-679\j
re
Detected OS: Windows XP
parsing buildfile C:\osb\build\scripts\build.xml with URI = file:/C:/osb/build/s
cripts/build.xml
Project base dir set to: C:\osb\build\scripts
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apach
e/tools/ant/antlib.xml. It could not be found.
[property] Loading Environment env.
[property] Loading C:\osb\build\dev\ant.properties
Build sequence for target(s) `import' is [import]
Complete build sequence is [import, ]
import:
[echo] importscript: c:/osb/build/scripts/import.py
[echo] importconfig: c:/osb/build/dev/import.properties
dropping E:\Oracle\Middleware\patch_wls1033\profiles\default\sys_manifest_classp
ath\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_oepe1033\profiles\default\sys_manifest_class
path\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_ocp353\profiles\default\sys_manifest_classpa
th\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic_sp.jar from path
as it doesn't exist
dropping E:\Oracle\Middleware\modules\com.bea.common.configfwk.wlinterop_10.3.1.
0 from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_wls1033\profiles\default\sys_manifest_classp
ath\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_oepe1033\profiles\default\sys_manifest_class
path\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_ocp353\profiles\default\sys_manifest_classpa
th\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic_sp.jar from path
as it doesn't exist
dropping E:\Oracle\Middleware\modules\com.bea.common.configfwk.wlinterop_10.3.1.
0 from path as it doesn't exist
[wlst] <WLSTTask> Executing the command line :
[wlst] E:\Oracle\Middleware\jrockit_160_17_R28.0.0-679\jre\bin\java.exe -Dd
ebug=true -DfailOnError=true -DexecuteScriptBeforeFile=true -DpropertiesFile=c:/
osb/build/dev/import.properties -DfileName=c:/osb/build/scripts/import.py -class
path E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-launcher.jar;E:\O
racle\Middleware\jrockit_160_17_R28.0.0-679\lib\tools.jar;E:\Oracle\Middleware\w
lserver_10.3\server\lib\weblogic.jar;E:\Oracle\Middleware\modules\features\weblo
gic.server.modules_10.3.3.0.jar;E:\Oracle\Middleware\wlserver_10.3\server\lib\we
bservices.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-all.jar;
E:\Oracle\Middleware\modules\net.sf.antcontrib_1.1.0.0_1-0b2\lib\ant-contrib.jar
;E:\Oracle\Middleware\Oracle_OSB1\lib\sb-kernel-api.jar;E:\Oracle\Middleware\Ora
cle_OSB1\modules\com.bea.common.configfwk_1.3.0.0.jar;E:\Oracle\Middleware\modul
es\org.apache.ant_1.7.1\lib\ant-antlr.jar;E:\Oracle\Middleware\modules\org.apach
e.ant_1.7.1\lib\ant-apache-bcel.jar;E:\Oracle\Middleware\modules\org.apache.ant_
1.7.1\lib\ant-apache-bsf.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\l
ib\ant-apache-log4j.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\an
t-apache-oro.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-apach
e-regexp.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-apache-re
solver.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-commons-log
ging.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-commons-net.j
ar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-jai.jar;E:\Oracle\M
iddleware\modules\org.apache.ant_1.7.1\lib\ant-javamail.jar;E:\Oracle\Middleware
\modules\org.apache.ant_1.7.1\lib\ant-jdepend.jar;E:\Oracle\Middleware\modules\o
rg.apache.ant_1.7.1\lib\ant-jmf.jar;E:\Oracle\Middleware\modules\org.apache.ant_
1.7.1\lib\ant-jsch.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant
-junit.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-netrexx.jar
;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-nodeps.jar;E:\Oracle\
Middleware\modules\org.apache.ant_1.7.1\lib\ant-starteam.jar;E:\Oracle\Middlewar
e\modules\org.apache.ant_1.7.1\lib\ant-stylebook.jar;E:\Oracle\Middleware\module
s\org.apache.ant_1.7.1\lib\ant-swing.jar;E:\Oracle\Middleware\modules\org.apache
.ant_1.7.1\lib\ant-testutil.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.
1\lib\ant-trax.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-web
logic.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant.jar;E:\Oracl
e\Middleware\modules\org.apache.ant_1.7.1\lib\xercesImpl.jar;E:\Oracle\Middlewar
e\modules\org.apache.ant_1.7.1\lib\xml-apis.jar weblogic.management.scripting.WL
STInterpreterInvoker
dropping E:\Oracle\Middleware\patch_wls1033\profiles\default\sys_manifest_classp
ath\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_oepe1033\profiles\default\sys_manifest_class
path\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_ocp353\profiles\default\sys_manifest_classpa
th\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic_sp.jar from path
as it doesn't exist
dropping E:\Oracle\Middleware\modules\com.bea.common.configfwk.wlinterop_10.3.1.
0 from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_wls1033\profiles\default\sys_manifest_classp
ath\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_oepe1033\profiles\default\sys_manifest_class
path\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_ocp353\profiles\default\sys_manifest_classpa
th\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic_sp.jar from path
as it doesn't exist
dropping E:\Oracle\Middleware\modules\com.bea.common.configfwk.wlinterop_10.3.1.
0 from path as it doesn't exist
[wlst] Executing 'E:\Oracle\Middleware\jrockit_160_17_R28.0.0-679\jre\bin\j
ava.exe' with arguments:
[wlst] '-Ddebug=true'
[wlst] '-DfailOnError=true'
[wlst] '-DexecuteScriptBeforeFile=true'
[wlst] '-DpropertiesFile=c:/osb/build/dev/import.properties'
[wlst] '-DfileName=c:/osb/build/scripts/import.py'
[wlst] '-classpath'
[wlst] 'E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-launcher.
jar;E:\Oracle\Middleware\jrockit_160_17_R28.0.0-679\lib\tools.jar;E:\Oracle\Midd
leware\wlserver_10.3\server\lib\weblogic.jar;E:\Oracle\Middleware\modules\featur
es\weblogic.server.modules_10.3.3.0.jar;E:\Oracle\Middleware\wlserver_10.3\serve
r\lib\webservices.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-
all.jar;E:\Oracle\Middleware\modules\net.sf.antcontrib_1.1.0.0_1-0b2\lib\ant-con
trib.jar;E:\Oracle\Middleware\Oracle_OSB1\lib\sb-kernel-api.jar;E:\Oracle\Middle
ware\Oracle_OSB1\modules\com.bea.common.configfwk_1.3.0.0.jar;E:\Oracle\Middlewa
re\modules\org.apache.ant_1.7.1\lib\ant-antlr.jar;E:\Oracle\Middleware\modules\o
rg.apache.ant_1.7.1\lib\ant-apache-bcel.jar;E:\Oracle\Middleware\modules\org.apa
che.ant_1.7.1\lib\ant-apache-bsf.jar;E:\Oracle\Middleware\modules\org.apache.ant
_1.7.1\lib\ant-apache-log4j.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.
1\lib\ant-apache-oro.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\a
nt-apache-regexp.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-a
pache-resolver.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-com
mons-logging.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-commo
ns-net.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-jai.jar;E:\
Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-javamail.jar;E:\Oracle\Mi
ddleware\modules\org.apache.ant_1.7.1\lib\ant-jdepend.jar;E:\Oracle\Middleware\m
odules\org.apache.ant_1.7.1\lib\ant-jmf.jar;E:\Oracle\Middleware\modules\org.apa
che.ant_1.7.1\lib\ant-jsch.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1
\lib\ant-junit.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-net
rexx.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-nodeps.jar;E:
\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-starteam.jar;E:\Oracle\M
iddleware\modules\org.apache.ant_1.7.1\lib\ant-stylebook.jar;E:\Oracle\Middlewar
e\modules\org.apache.ant_1.7.1\lib\ant-swing.jar;E:\Oracle\Middleware\modules\or
g.apache.ant_1.7.1\lib\ant-testutil.jar;E:\Oracle\Middleware\modules\org.apache.
ant_1.7.1\lib\ant-trax.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib
\ant-weblogic.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant.jar;
E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\xercesImpl.jar;E:\Oracle\M
iddleware\modules\org.apache.ant_1.7.1\lib\xml-apis.jar'
[wlst] 'weblogic.management.scripting.WLSTInterpreterInvoker'
[wlst]
[wlst] The ' characters around the executable and arguments are
[wlst] not part of the command.
dropping E:\Oracle\Middleware\patch_wls1033\profiles\default\sys_manifest_classp
ath\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_oepe1033\profiles\default\sys_manifest_class
path\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_ocp353\profiles\default\sys_manifest_classpa
th\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic_sp.jar from path
as it doesn't exist
dropping E:\Oracle\Middleware\modules\com.bea.common.configfwk.wlinterop_10.3.1.
0 from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_wls1033\profiles\default\sys_manifest_classp
ath\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_oepe1033\profiles\default\sys_manifest_class
path\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_ocp353\profiles\default\sys_manifest_classpa
th\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic_sp.jar from path
as it doesn't exist
dropping E:\Oracle\Middleware\modules\com.bea.common.configfwk.wlinterop_10.3.1.
0 from path as it doesn't exist
[wlst] Using input " "
[wlst] <WLSTTask> Loaded and set the properties from c:/osb/build/dev/impor
t.properties
[wlst] <WLSTTask> sys.argv is ['c:/osb/build/scripts/import.py']
[wlst] Connecting to server: t3://localhost:7001
[wlst] Connecting to t3://localhost:7001 with userid weblogic ...
[wlst] Successfully connected to Admin Server 'AdminServer' that belongs to
domain 'base_domain'.
[wlst]
[wlst] Warning: An insecure protocol was used to connect to the
[wlst] server. To ensure on-the-wire security, the SSL port or
[wlst] Admin port should be used instead.
[wlst]
[wlst] Location changed to domainRuntime tree. This is a read-only tree wit
h DomainMBean as the root.
[wlst] For more help, use help(domainRuntime)
[wlst]
[wlst] Starting import of: c:/osb/configuration/sbconfig.jar on ALSB Admin
Server: t3://localhost:7001
[wlst] Read import jar file
[wlst] Import file read successfully c:/osb/configuration/sbconfig.jar
[wlst] Creating unique session name
[wlst] Created session name : ALSBImportScript-1279101189649
[wlst] Creating SessionMBean
[wlst] Unexpected error: java.lang.RuntimeException
[wlst] Unexpected error: java.lang.RuntimeException
[wlst] No stack trace available.
[wlst] Traceback (innermost last):
[wlst] File "c:\osb\build\scripts\import.py", line 179, in ?
[wlst] File "c:\osb\build\scripts\import.py", line 47, in importToALSBDom
ain
[wlst] File "c:\osb\build\scripts\import.py", line 167, in getSessionMBea
n
[wlst] File "<iostream>", line 1162, in findService
[wlst] at weblogic.management.jmx.MBeanServerInvocationHandler.newProxy
Instance(MBeanServerInvocationHandler.java:621)
[wlst] at weblogic.management.jmx.MBeanServerInvocationHandler.invoke(M
BeanServerInvocationHandler.java:418)
[wlst] at $Proxy11.findService(Unknown Source)
[wlst] at weblogic.management.scripting.WLScriptContext.findService(WLS
criptContext.java:209)
[wlst] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[wlst] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
[wlst] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
[wlst] at java.lang.reflect.Method.invoke(Method.java:597)
[wlst]
[wlst] java.lang.RuntimeException: java.lang.RuntimeException: java.lang.Cl
assNotFoundException: com.bea.wli.sb.management.configuration.DelegatedSessionMa
nagementMBean
[wlst]
[wlst] Exception in thread "Main Thread" java.lang.IllegalStateException: T
raceback (innermost last):
[wlst] File "c:\osb\build\scripts\import.py", line 179, in ?
[wlst] File "c:\osb\build\scripts\import.py", line 47, in importToALSBDom
ain
[wlst] File "c:\osb\build\scripts\import.py", line 167, in getSessionMBea
n
[wlst] File "<iostream>", line 1162, in findService
[wlst] at weblogic.management.jmx.MBeanServerInvocationHandler.newProxy
Instance(MBeanServerInvocationHandler.java:621)
[wlst] at weblogic.management.jmx.MBeanServerInvocationHandler.invoke(M
BeanServerInvocationHandler.java:418)
[wlst] at $Proxy11.findService(Unknown Source)
[wlst] at weblogic.management.scripting.WLScriptContext.findService(WLS
criptContext.java:209)
[wlst] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[wlst] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
[wlst] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
[wlst] at java.lang.reflect.Method.invoke(Method.java:597)
[wlst]
[wlst] java.lang.RuntimeException: java.lang.RuntimeException: java.lang.Cl
assNotFoundException: com.bea.wli.sb.management.configuration.DelegatedSessionMa
nagementMBean
[wlst]
[wlst] at weblogic.management.scripting.WLSTInterpreterInvoker.printErr
or(WLSTInterpreterInvoker.java:110)
[wlst] at weblogic.management.scripting.WLSTInterpreterInvoker.executeP
yScript(WLSTInterpreterInvoker.java:103)
[wlst] at weblogic.management.scripting.WLSTInterpreterInvoker.main(WLS
TInterpreterInvoker.java:27)
BUILD FAILED
C:\osb\build\scripts\build.xml:13: Java returned: 1
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at weblogic.ant.taskdefs.management.WLSTTask.execute(WLSTTask.java:115)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1307)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1191)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:218)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Total time: 16 seconds
C:\osb\build\dev>^AHi,
I tried debugging it and i am still getting the same error. I used the script provided byoracle and the script which is given here.
Below is the error i am getting :
[java] ImportError: cannot import name SessionManagementMBean
I am getting an error at
def getSessionManagementMBean(sessionName):
SessionMBean = findService("SessionManagement", "com.bea.wli.sb.management.configuration.SessionManagementMBean")
SessionMBean.createSession(sessionName)
return SessionMBean
Its able to create a unique session , after that for creating session name its throwing error.
C:\Development\Build\scripts\build.xml:31: Java returned: 1
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at weblogic.ant.taskdefs.management.WLSTTask.execute(WLSTTask.java:115)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Any help on this?? -
Error While running WLST script to create SOA Domain in Clustered Environme
Hi,
I am trying to run WLST script to create SOA Domain in clustered environment.The script is as follows.
import sys
print "@@@ Starting the script ..."
global props
from wlstModule import *#@UnusedWildImport
from java.io import FileInputStream
from java.io import File
#=======================================================================================
# Create Boot Properties File
#=======================================================================================
def createBootPropertiesFile(directoryPath, username, password):
adminserverDir = File(directoryPath)
bool = adminserverDir.mkdirs()
fileNew=open(directoryPath + '/boot.properties', 'w')
fileNew.write('username=%s\n' % username)
fileNew.write('password=%s\n' % password)
fileNew.flush()
fileNew.close()
def createNodeManagerPropertiesFile(directoryPath, username, password):
adminserverDir = File(directoryPath)
bool = adminserverDir.mkdirs()
fileNew=open(directoryPath + '/nm_password.properties', 'w')
fileNew.write('username=%s\n' % username)
fileNew.write('password=%s\n' % password)
fileNew.flush()
fileNew.close()
def createAdminStartupPropertiesFile(directoryPath, args):
adminserverDir = File(directoryPath)
bool = adminserverDir.mkdirs()
fileNew=open(directoryPath + '/startup.properties', 'w')
args=args.replace(':','\\:')
args=args.replace('=','\\=')
fileNew.write('Arguments=%s\n' % args)
fileNew.flush()
fileNew.close()
I am getting the error :
Problem invoking WLST - Traceback (innermost last):
(no code object) at line 0
File "D:\Oracle\Middleware\Oracle_SOA1\bin\SOADomainScript.py", line 11
adminserverDir = File(directoryPath)
^
SyntaxError: invalid syntax
Do i need to set any jar in the classpath? Already jython.jar is available in the classapath.
Thanks in advance.
Regards,
SubhaHi,
I am trying to run WLST script to create SOA Domain in clustered environment.The script is as follows.
import sys
print "@@@ Starting the script ..."
global props
from wlstModule import *#@UnusedWildImport
from java.io import FileInputStream
from java.io import File
#=======================================================================================
# Create Boot Properties File
#=======================================================================================
def createBootPropertiesFile(directoryPath, username, password):
adminserverDir = File(directoryPath)
bool = adminserverDir.mkdirs()
fileNew=open(directoryPath + '/boot.properties', 'w')
fileNew.write('username=%s\n' % username)
fileNew.write('password=%s\n' % password)
fileNew.flush()
fileNew.close()
def createNodeManagerPropertiesFile(directoryPath, username, password):
adminserverDir = File(directoryPath)
bool = adminserverDir.mkdirs()
fileNew=open(directoryPath + '/nm_password.properties', 'w')
fileNew.write('username=%s\n' % username)
fileNew.write('password=%s\n' % password)
fileNew.flush()
fileNew.close()
def createAdminStartupPropertiesFile(directoryPath, args):
adminserverDir = File(directoryPath)
bool = adminserverDir.mkdirs()
fileNew=open(directoryPath + '/startup.properties', 'w')
args=args.replace(':','\\:')
args=args.replace('=','\\=')
fileNew.write('Arguments=%s\n' % args)
fileNew.flush()
fileNew.close()
I am getting the error :
Problem invoking WLST - Traceback (innermost last):
(no code object) at line 0
File "D:\Oracle\Middleware\Oracle_SOA1\bin\SOADomainScript.py", line 11
adminserverDir = File(directoryPath)
^
SyntaxError: invalid syntax
Do i need to set any jar in the classpath? Already jython.jar is available in the classapath.
Thanks in advance.
Regards,
Subha -
Using variables in WLST Script ant task
I have multiple scipts that are run using ant tasks, however, I do not want to have to enter the password every time one of these scripts is executed. Instead I would like to use the following ant task to store the password in a variable/property:
<target name="getPassword" >
<echo message="Domain: ${domain}" />
<echo message="Username: system" />
<input message="Please enter password:" addproperty="password" />
</target>
I would then like to use that variable/property everytime a script is executed like this:
<target name="deploy4x">
<echo message="***** Copying 4X.ear *****" />
<copy file="${build.path}\jar\4X.ear" todir="${apps.dir}" preservelastmodified="true"/>
<echo message="***** Updating 4X.ear on ${domain} *****"/>
<wlst debug="true" fileName="Deploy4X.py" executeScriptBeforeFile="true" failonerror="true" >
<script>
connect('system','%s' % ${password},'%s' % $url)
</script>
</wlst>
</target>
However, the script blows up every time I try to run it b/c of the connect() line. I have also tried connect('system','%s' % password, '%s' % url).
Has anyone else successfully used variables in an Ant WLST Script task?
Thanks.Hi,
when I use *XDIM_MEMBERSET ACCOUNT AS %TEST% = BAS(REVENUE) - it work fine.
BUT ! after my first commit, it seems like the variable value is lost. And the *Xdim_memberset takes all.....
Fortunately enough, *select still contains the variable value after *commit.
Thanks,
Joergen
*Correction !
It actually works, it still contains the variable value after commit !!
Edited by: Jørgen Dalby Andersen on Dec 30, 2011 1:33 PM -
Hello,
does anyone know sample wlst scripts for creating domain for soa suite 11.1.1.4 on top of weblogic 10.3.4?
I try to create a domain having a cluster with two managed servers in two linux machines.
Any help appreciated.
regards, MattiPlease refer -
http://download.oracle.com/docs/cd/E17904_01/web.1111/e13715/domains.htm
http://download.oracle.com/docs/cd/E17904_01/web.1111/e13715/intro.htm#WLSTG112
Regards,
Anuj -
How to parse a xml file within a WLST script
Hi all,
I'm using ALSB2.6 and I'm writing a WLST script that should read config info from a xml file and create an ALSB prj.
I got an error when I call:
xmldoc = minidom.parse(sock).documentElement
The code:
print '#### IPEventConfigFile: ', IPEventConfigFile
IPEventConfig = loadXML(IPEventConfigFile)
where
def loadXML(source):
sock = open(source)
xmldoc = minidom.parse(sock).documentElement
sock.close()
return xmldoc
The error:
[java] #### IPEventConfigFile: /products/software/terraferma/release3/EventBus/repository/events/DummyEvent/resource/DummyEvent-IPEventConfig.xml
[java] ===============================================================
[java] Unexpected error: exceptions.AttributeError
[java] ===============================================================
[java] No stack trace available.
[java] Unexpected error: exceptions.AttributeError
[java] No stack trace available.
[java] Problem invoking WLST - Traceback (innermost last):
[java] File "/products/software/terraferma/release3/EventBus/scripts/cloning.py", line 198, in ?
[java] File "/products/software/terraferma/release3/EventBus/scripts/cloning.py", line 102, in cloning
[java] File "/products/software/terraferma/release3/EventBus/scripts/cloning.py", line 178, in loadXML
[java] File "Lib/xml/dom/minidom.py", line 908, in parse
[java] File "Lib/xml/dom/minidom.py", line 900, in _doparse
[java] File "Lib/xml/dom/pulldom.py", line 251, in getEvent
[java] AttributeError: feed
Line 178 is:
xmldoc = minidom.parse(sock).documentElement
I'm trying to understand where I'm wrong.
Thanks in advance
ferpUsing the SAXParser in JAXP the parsing of the XML file is event driven.
Instantiate the parser:
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser = factory.newSAXParser();
InputSource is = new InputSource(new FileReader(theXML));call the parse method:
parser.parse(is, this);The following events are fired as the parser works through the XML public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws org.xml.sax.SAXException
public void endElement(String namespaceURI, String localName, String qName) throws org.xml.sax.SAXException
characters(char[] ch, int start, int length)etc.
You write what you want within each of these sections to handle the structure of your data. Keep in mind SAX is useful only when you know the structure of your XML. -
Automatic Generation of JMS event generator using WLST script
is there any way to create and deploy JMS event generator using WLST script. i am using weblogic server 10.3.1
You could see this informantion here:
http://docs.oracle.com/cd/E14981_01/wli/docs1031/deploy/cluster.html#wp1519038 -
Does anybody have a WLST script for step-by-step cluster restart?
Does anybody have a WLST script for step-by-step "smart" cluster restart?
Dear SAM,
are you looking for exchange 2013 installation. Please follow below link. I have done the same scenario as yours
1. install first VM - 2012
2. Static IP / loopback as primary DNS
3. install ADDS /DNS (forwarder to ISP)
4. install second VM - Static IP again
5. DNS of second VM to be the IP of first VM
6. this will join the domain
7. installation of exchange will be simple, configuration from this link : http://www.techieshelp.com/exchange-2013-step-by-step-configuration/
MARK AS USEFUL/ANSWER IF IT DID
Thanks
Happiness Always
Jatin -
OSB: WLST script using setPreserveExistingOperationalValues has no effect
Hi,
I have a WLST script which imports a sbconfig.jar into OSB and executes the file customization.xml. In this script I use the following options (although I know that "false" is the default value here):
alsbImportPlan.setPreserveExistingEnvValues(false)
alsbImportPlan.setPreserveExistingOperationalValues(false)
The idea behind is to overwrite the existing operational settings in OSB with the settings from the file sbconfig.jar.
But when I execute my WLST script, the operational settings are unchanged. What am I doing wrong?
Best regards,
KatjaHi,
thanks for your help. Now, I tried everything again from scratch and it worked!
I exported the sbconfig.jar from OSB and checked, that my settings were in the xml files. Then I modified the settings in OSB (that I can see a difference). I executed my WLST script with the new sbconfig.jar and checked the values in OSB. Now the values were changed as expected. I do not know what was wrong before, but maybe I mixed my versions of sbconfig.jar and used a wrong one...
So everything works fine.
Thanks,
Katja -
WLST script for changing password for userid in Weblogic 9.2
Hello Everyone,
We want to change password for userid in weblogic 9.2. Is there a way we can do this by using WLST script? If so please provide me with steps for doing that using WLST. Thanks in advance.
- - Weblogic ConsultantDid you try going to the WLST documentation and searching for it? Go to [http://edocs.bea.com/wls/docs92/pdf/config_scripting.pdf] and search for "Changing a Password". The example there seems to be what you need.
Maybe you are looking for
-
FI- Line Item Extraction- BWOM_SETTINGS- Control Table Entries
Gurus, I am working on FI- Line item extraction in the sand box. I have all my DS's in Nodes not connected. I transfereed the application component hierarchy in SBIW. Now I went to check on the basic settings before activating the DS's for FI line it
-
Migration Wizard throws exception on launch
PTPortal v5.0.1, After installation of the Exchange Integration Portlet suite, when I tried to launch the migration wizard to import the server packages (PTE's), I received the following java exception: Exception in thread main java.lang.Unsatisified
-
Generate a surregate key only when insert a new row - (SCD1)
Hi all, I´m starting with OWB (10gR2) and I'm creating a simple template dimension with SDC type 1 with one source, one target and a sequence do generate the surrogate key. The main properties configurations are: - Target property: Loading type = INS
-
So when did the iTunes Store restrict downloads to high-speed internet connections only. I had problems downloading music, like I couldn't and now that I got DSL, everything is fine. Is that a new requirement now? Because I downloaded music before wi
-
Hello. I have couple of computers with conky and cpufreq working. All fine there. It was so also on my notebook, which had Ubuntu 9.04 installed. I reinstalled to 9.10 and since then my conky reports full frequency. There was a lot of other issues, s