Ashar
Ashar

Reputation: 3065

How to export osb resources sbconfig.jar to a directory using WLST

I login to Oracle Service Bus web console below URL.

https://mybank:7001/servicebus/faces/resources

enter image description here

I click on Export icon -> "export resources" -> export contents(resources + include resource dependencies) -> Export(button) to /tmp/sbconfig.jar.

"All projects" should be checked and "protect sensitive data" should be unchecked.

Need wlst script for this export activity.

I tried the below but it fails:

wls:/base_domain/domainRuntime/DomainServices/ALSBConfiguration> domainRuntime()
Already in Domain Runtime Tree
wls:/base_domain/domainRuntime/DomainServices/ALSBConfiguration> cd('/DomainServices/ALSBConfiguration')
wls:/base_domain/domainRuntime/DomainServices/ALSBConfiguration> configMBean = getMBean('/DomainServices/ALSBConfiguration')
wls:/base_domain/domainRuntime/DomainServices/ALSBConfiguration> exportParams = configMBean.createExportParams()
Traceback (innermost last):
  File "<console>", line 1, in ?
AttributeError: createExportParams

as well as this:

wls:/base_domain/domainRuntime/DomainServices/ALSBConfiguration> sessionMBean = findService("ALSBConfiguration", "com.bea.wli.config.session.ALSSessionManager")

wls:/base_domain/domainRuntime/DomainServices/ALSBConfiguration>     exportParams = sessionMBean.getExportSettings()
Traceback (innermost last):
  File "<console>", line 1, in ?
AttributeError: 'NoneType' object has no attribute 'getExportSettings'
wls:/base_domain/domainRuntime/DomainServices/ALSBConfiguration>

Can you please suggest?

Upvotes: -1

Views: 68

Answers (1)

Jesper
Jesper

Reputation: 56

In your first attempt it seems the object stored in configMBean doesn't have a method called createExportParams which causes the error.

In your second attempt it seems that findService did not find MBean which means you cannot run getExportSettings().

You could try switching your path to /AppConfig/sbconfig.

Upvotes: 0

Related Questions