Restart JDBCSystemResource in WLST
I posted this question in the JDBC forum, but I realize it might me more appropriate here.
I'm trying to change the database connection for all existing JDBC Data Sources in WLST (Weblogic Server 10.3.4), to make it connect to a different database when the original database is being patched. I made the following script to do so:
edit()
startEdit()
# Change the URL for all Data Sources
for r in editService.getDomainConfiguration().getJDBCSystemResources():
r.getJDBCResource().getJDBCDriverParams().setUrl('jdbc:oracle:thin:@somehost:1521/SOMEDB.world')
save()
activate()The Admin Console tells me that this requires me to restart the changed JDBCResource, and allows me to do so in the View Changes and Restarts page. However, I need to implement this restart in my WLST script.
I tried to restart the Data Source with the following, but it just reconnects to the original database, not to the newly configured one:
# Restart the Data Sources
for server in domainRuntimeService.getServerRuntimes():
dataSources = server.getJDBCServiceRuntime().getJDBCDataSourceRuntimeMBeans()
for dataSource in dataSources:
#dataSource.reset()
dataSource.forceShutdown()
dataSource.start()How can I activate my changes/restart the JDBCResource in WLST?
Regards,
Peter.
datasource.reset() should do the trick.
From the documentation (http://docs.oracle.com/cd/E12839_01/apirefs.1111/e13951/mbeans/JDBCDataSourceRuntimeMBean.html)
"Resets the connection pool in the data source by shutting down and recreating all available database connections in the pool.
Use when a data source is in the health state of Unhealthy and needs to be reinitialized."
But I think it just re-uses what is in memory (the mbean settings I mean).
As you mentioned "The Admin Console tells me that this requires me to restart the changed JDBCResource, and allows me to do so in the View Changes and Restarts page"
when you perform this in the console, does it actually connect to the other database (seen a number of occasions where that was not happening and had the restart the
whole server).
You can use the ServerLifeCycleRuntimeMBean (http://docs.oracle.com/cd/E12839_01/apirefs.1111/e13951/mbeans/ServerLifeCycleRuntimeMBean.html) to start and stop servers,
an example is provided here http://middlewaremagic.com/weblogic/?p=8187 (see the 'Using Server Life Cycle Runtimes' section).
Similar Messages
-
Accessing JDBCSystemResources with WLST
Hi All,
I am getting an strange error while reading JDBCSystemResources with WLST. I am trying to read 'JDBCSystemResources/MedRecGlobalDataSource/JDBCResource/MedRecGlobalDataSource/JDBCDriverParams/MedRecGlobalDataS
ource/DriverName ( and all properties at this level) but I am getting "Key property can not be empty error" (javax.management.MalformedObjectNameException: Key properties cannot be empty)
Though I am able to traverse to this bean from wlst command line using cd () and lS() gives the value correctly but when I call get(), the above exception is thrown.
my sample python code is as follows:
try:
connect('weblogic','weblogic','t3://127.0.0.1:7011')
except:
print "Couldn't establish connection to adminserver."
print "Please check ADMIN_IP,ADMIN_PORT or AdminServer is running."
exit()
redirect('myoutput.txt')
property='JDBCSystemResources/MedRecGlobalDataSource/JDBCResource/MedRecGlobalDataSource/JDBCDriverParams/MedRecGlobalDataS
ource/DriverName'
propertyArray=property.split("/")
try:
param=get(property)
try:
print('\t' + propertyArray[-1] + '\t' + ':' + '\t' + param.toString())
except:
try:
print('\t' + propertyArray[-1] + '\t' + ':' + '\t' + param)
except:
try:
for x in param: print('\t' + propertyArray[-1] + '\t' + ':' + '\t' +
x.toString())
except:
print('\t' + propertyArray[-1] + '\t' + ':' + '\t' + 'null')
except:
dumpStack()
print(property)
stopRedirect()
disconnect()
exit()
I am really tensed ....Any help will be highly appreciated. I am using weblogic 9.2I don't know if Joe knows anything about your issue from my side is the first time I hear about WLST, anyway it sounds interesting, whenever I have the time to I will take a look at that. By the way be aware that it seems that your problem is not a jdbc related problem but a jmx one and maybe you have to put it in the weblogic.developer.interest.platform forum.
Have you tried to get that parameter directly accessing the MBean using Java?
http://edocs.bea.com/wls/docs92/jmx/accessWLS.html
Edited by jrenck at 06/08/2007 5:44 AM -
Start, stop, restart WebLogic with WLST
Hi,
does Oracle have any example WLST scipts to start/restart WebLogic server? Please point me to them, 'cos I haven't found any.
Thanks in advance.Hi,
http://download.oracle.com/docs/cd/E13222_01/wls/docs90/config_scripting/manage_servers.html#start_managed_server
You can record all that you doing in admin console and automatically you will get .py script for that operations.
Regards -
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 -
WLST modified db uname/pwd verification for JDBC resource-No Restart Server
Hi,
I have created a WLST script for changing the db username and password for a particular jdbc resource.It is working fine.
But to verify whether the right username and password has been provided ,is there a way to test the db connection for the changed user name and password without restarting the server.
I also understand that there would be the cached connections of the previous user name and password for the jdbc resource.
Please let me know if I can do this using any API's in WLST or any other way.
Idea is to execute the change db user name and password and verification in one go.
Cheers,
MohanYou could try something like
servers = domainRuntimeService.getServerRuntimes();
# this return an array, for example array(weblogic.management.runtime.ServerRuntimeMBean,[[MBeanServerInvocationHandler]com.bea:Name=AdminServer,Location=AdminServer,Type=ServerRuntime])
# we obtain the server to which the datasource is targetted
admin = servers[0];
jdbcruntime = admin.getJDBCServiceRuntime();
datasources = jdbcruntime.getJDBCDataSourceRuntimeMBeans();
# this returns an array of the active datasources on the server, for example array(weblogic.management.runtime.JDBCDataSourceRuntimeMBean,
# [[MBeanServerInvocationHandler]com.bea:ServerRuntime=AdminServer,Name=ExampleDataSource,Location=AdminServer,Type=JDBCDataSourceRuntime])
datasource = datasources[0];
# Reset the connection pool in the data source by shutting down and recreating all available database connections in the pool.
datasource.reset();
# Test the connection pool in the data source by reserving and releasing a connection from it.
test = datasource.testPool();
# Print out information about all the connections in the connection pool in the data source, if there are any.
datasource.dumpPool(); -
Wlst obiee restart .py script errors when cmd line; ok if type cmds
I pulled the scripts that are posted at http://obiee101.blogspot.com/2011/08/obiee-wlst-useful-scripts.html to automate some admin tasks. I downloaded and installed the zip version of wl s106_dev on my desktop. When I start wlst from command line and type commands they work just fine. When I try to run them from the cmd line as "java weblogic.WLST RestartOBI.py" I get error message shown below...???
Thanks
------------script start---------------------
connect('weblogic','welcome1','t3://obi5.mnapps.state.mn.us:7101',adminServerName='AdminServer');
print 'Connecting to Domain ...'
try:
domainCustom()
except:
print 'Already in domainCustom'
cd('..\..')
print 'Go to biee admin domain'
cd('oracle.biee.admin')
print 'Go to coreapplication_obips1 Mbean'
cd('oracle.biee.admin:oracleInstance=EPM91TD,type=BIDomain.BIInstanceDeployment.BIComponent,biInstance=coreapplication,process=coreapplication_obis1,group=Service')
------------script end---------------------
---works fine if it start wlst and type commands
when runing "java weblogic.WLST RestartOBI.py"
-----------------------------output from command line execution--------------------------
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Error: No domain or domain template has been read.
Connecting to Domain ...
You will need to be connected to a running server to execute this command
Go to biee admin domain
Error: No domain or domain template has been read.
Go to coreapplication_obips1 Mbean
ThanksFinally found a solution: removing the import of the wlstModule and calling the wlst commands directly works.
When using the wlstModule, I was in the wrong namespace, where there was no theInterpreter. -
Not able to restart managed servers after password change in console
im doin the following steps,am i doin anything wrong?
1)shutdown all managed servers
2)change pwd in admin console
3)edit boot.properties file with new pwd in admin server
4)copy these boot file to every managed server
5)now restart admin server.(able to do it succesfully)
6)not able to restart managed servers (im getting the following error.
Can any help me out plz very urgent?
<Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: weblogic.security.SecurityInitializationException: Authentication denied: Boot identity not valid; The user name and/or password from the boot identity file (boot.properties) is not valid. The boot identity may have been changed since the boot identity file was created. Please edit and update the boot identity file with the proper values of username and password. The first time the updated boot identity file is used to start the server, these new values are encrypted.
weblogic.security.SecurityInitializationException: Authentication denied: Boot identity not valid; The user name and/or password from the boot identity file (boot.properties) is not valid. The boot identity may have been changed since the boot identity file was created. Please edit and update the boot identity file with the proper values of username and password. The first time the updated boot identity file is used to start the server, these new values are encrypted.
at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.doBootAuthorization(Unknown Source)
at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(Unknown Source)
at weblogic.security.service.SecurityServiceManager.initialize(Unknown Source)
at weblogic.security.SecurityService.start(SecurityService.java:141)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
Truncated. see log file for complete stacktrace
<Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>Hi,
*1)In order to export the user data on to the server,do we have to create a specific directory to save this data into the server.*
Yes ....you can give any Existing Directory Path in the AdminConsole Export Page.... Any Directory in your File System.
*2)Is there any other way by not exporting or importing the data?*
That is the only way to prevent the Data Loss....There are some other ways to do it without using Admin Console like Using WLST or Using JMX you can export the Data but all these techniques will exactly do the same thing ... The AdminConsole is the easiest way to do it.
Thanks
Jay SenSharma
http://middlewaremagic.com/weblogic/ (Middleware Magic Is Here) -
WLST Exception while Creating JMS Resources
Hi,
I am using Weblogic version 10 MP!, Below is the WLST online script, You willl see a lot of variables in the script, the value which i am calling from another file, This is beacuse everytime instead of modifying the script i will modify the template. There is a lot of p.MS1, p.MS2, the information is called from a different file.
Please provide some kind of suggestion to fix this issue.
Thanks in Advance..
********************************************************************************************SCRIPT********************************************************************************
from weblogic.descriptor import BeanAlreadyExistsException
from java.lang.reflect import UndeclaredThrowableException
from java.lang import System
import javax
from java.util import *
from javax.management import *
import javax.management.Attribute
from javax import management
from javax.management import MBeanException
from javax.management import RuntimeMBeanException
import javax.management.MBeanException
from java.lang import UnsupportedOperationException
import Domain_info as p
import Cluster_info as q
domName = p.Domain_Name
adminServerName = p.Admin_Name
adminServerListenPort = p.AdminPort
adminServerListenAddress = p.AdminListen
userName = p.username
passWord = p.password
domainDir = p.domainDir
URL = "t3://143.192.44.41:7301"
ManagedServer1 = q.MS1
ManagedServer2 = q.MS2
ManagedServer3 = q.MS3
ManagedServer4 = q.MS4
JMSServer1 = q.JMS1
JMSServer2 = q.JMS2
JMSServer3 = q.JMS3
JMSServer4 = q.JMS4
Queue1 = q.Q1
Queue2 = q.Q2
Queue3 = q.Q3
Queue4 = q.Q4
Queue5 = q.Q5
JMS_resource = q.JMS_resource
connect(userName, passWord, URL)
clustHM = HashMap()
edit()
startEdit()
cd('/')
print JMS_resource
print JmsSystemResource
#create(JMS_resource,'JMSSystemResource')
cd('JMSSystemResource/'+JMS_resource+'JmsResource/')
#cd('/')
#create(Queue1,'Queue')
#setJNDIName('jms/'+Queue1)
#setSubDeploymentName(JMSServer1,JMSServer2)
#cd('/')
#cd('JMSSystemResource/'+JMS_resource)
#create(JMSServer1,JMSServer2, 'SubDeployment')
save()
activate(block="true")
disconnect()
print 'End of script ...'
exit()
****************************************************END OF SCRIPT ***********************************************************************************************************
Exception:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This Exception occurred at Sat Oct 18 18:13:50 GMT 2008.
javax.management.AttributeNotFoundException: com.bea:Name=Sample_1,Type=Domain:JMSSystemResource
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:221)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:224)
at javax.management.remote.rmi.RMIConnectionImpl_1001_WLStub.getAttribute(Unknown Source)
at weblogic.management.remote.common.RMIConnectionWrapper$11.run(ClientProviderBase.java:531)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.security.Security.runAs(Security.java:61)
at weblogic.management.remote.common.RMIConnectionWrapper.getAttribute(ClientProviderBase.java:529)
at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(RMIConnector.java:857)
at weblogic.management.scripting.BrowseHandler.regularPush(BrowseHandler.java:420)
at weblogic.management.scripting.BrowseHandler.splitPush(BrowseHandler.java:145)
at weblogic.management.scripting.BrowseHandler.cd(BrowseHandler.java:640)
at weblogic.management.scripting.WLScriptContext.cd(WLScriptContext.java:195)
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 org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:160)
at org.python.core.PyMethod.__call__(PyMethod.java:96)
at org.python.core.PyObject.__call__(PyObject.java:270)
at org.python.core.PyObject.invoke(PyObject.java:2041)
at org.python.pycode._pyx19.cd$5(<iostream>:161)
at org.python.pycode._pyx19.call_function(<iostream>)
at org.python.core.PyTableCode.call(PyTableCode.java:208)
at org.python.core.PyTableCode.call(PyTableCode.java:267)
at org.python.core.PyFunction.__call__(PyFunction.java:172)
at org.python.pycode._pyx18.f$0(/opt/SCRIPTS/Domain_Creation/Create_JMS.py:52)
at org.python.pycode._pyx18.call_function(/opt/SCRIPTS/Domain_Creation/Create_JMS.py)
at org.python.core.PyTableCode.call(PyTableCode.java:208)
at org.python.core.PyCode.call(PyCode.java:14)
at org.python.core.Py.runCode(Py.java:1135)
at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:167)
at weblogic.management.scripting.WLST.main(WLST.java:106)
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.WLST.main(WLST.java:29)
Caused by: javax.management.AttributeNotFoundException: com.bea:Name=Sample_1,Type=Domain:JMSSystemResource
at weblogic.management.jmx.modelmbean.WLSModelMBean.getPropertyDescriptorForAttribute(WLSModelMBean.java:1419)
at weblogic.management.mbeanservers.internal.SecurityInterceptor.getPropertyDescriptor(SecurityInterceptor.java:842)
at weblogic.management.mbeanservers.internal.SecurityInterceptor.checkGetSecurity(SecurityInterceptor.java:580)
at weblogic.management.mbeanservers.internal.SecurityInterceptor.getAttribute(SecurityInterceptor.java:297)
at weblogic.management.mbeanservers.internal.AuthenticatedSubjectInterceptor$5.run(AuthenticatedSubjectInterceptor.java:192)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.management.mbeanservers.internal.AuthenticatedSubjectInterceptor.getAttribute(AuthenticatedSubjectInterceptor.java:190)
at weblogic.management.jmx.mbeanserver.WLSMBeanServer.getAttribute(WLSMBeanServer.java:269)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1385)
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.getAttribute(RMIConnectionImpl.java:597)
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)
Problem invoking WLST - Traceback (innermost last):
File "/opt/SCRIPTS/Domain_Creation/Create_JMS.py", line 52, in ?
File "<iostream>", line 170, in cd
WLSTException: 'Error cding to the MBean'Hi David,
Thanks for replying...
Here i am trying to create connection Factory
i made some small changes to script and run ls() command...
****************************************************SCRIPT******************************************************************************
from weblogic.descriptor import BeanAlreadyExistsException
from java.lang.reflect import UndeclaredThrowableException
from java.lang import System
import javax
from java.util import *
from javax.management import *
import javax.management.Attribute
from javax import management
from javax.management import MBeanException
from javax.management import RuntimeMBeanException
import javax.management.MBeanException
from java.lang import UnsupportedOperationException
import Domain_info as p
import Cluster_info as q
import sys
from java.lang import System
domName = p.Domain_Name
adminServerName = p.Admin_Name
adminServerListenPort = p.AdminPort
adminServerListenAddress = p.AdminListen
userName = p.username
passWord = p.password
domainDir = p.domainDir
URL = "t3://143.192.44.41:7301"
ManagedServer1 = q.MS1
ManagedServer2 = q.MS2
ManagedServer3 = q.MS3
ManagedServer4 = q.MS4
JMSServer1 = q.JMS1
JMSServer2 = q.JMS2
JMSServer3 = q.JMS3
JMSServer4 = q.JMS4
Queue1 = q.Q1
Queue2 = q.Q2
Queue3 = q.Q3
Queue4 = q.Q4
Queue5 = q.Q5
JMS_resource = q.JMS_resource
Connection_Factory1 = q.CF1
connect(userName, passWord, URL)
clustHM = HashMap()
edit()
startEdit()
# Creating a JMS Connection
ls()
create(Connection_Factory1,"JMSConnectionFactory")
ls()
cd("JMSConnectionFactory/"+Connection_Factory1)
print("Created the JMS Connection Factory ...."+Connection_Factory1)
cmo.setJNDIName(jms/Connection_Factory1)
#cd('/')
#create(Queue1,'Queue')
#setJNDIName('jms/'+Queue1)
#setSubDeploymentName(JMSServer1,JMSServer2)
#cd('/')
#cd('JMSSystemResource/'+JMS_resource)
#create(JMSServer1,JMSServer2, 'SubDeployment')
save()
activate(block="true")
disconnect()
print 'End of script ...'
exit()
****************************************************************END********************************************************************************
ls() OUTPUT
dr-- AppDeployments
dr-- BridgeDestinations
dr-- Clusters
dr-- CustomResources
dr-- DeploymentConfiguration
dr-- Deployments
dr-- EmbeddedLDAP
dr-- ErrorHandlings
dr-- FileStores
dr-- InternalAppDeployments
dr-- InternalLibraries
dr-- JDBCDataSourceFactories
dr-- JDBCStores
dr-- JDBCSystemResources
dr-- JMSBridgeDestinations
dr-- JMSInteropModules
dr-- JMSServers
dr-- JMSSystemResources
dr-- JMX
dr-- JTA
dr-- JoltConnectionPools
dr-- Libraries
dr-- Log
dr-- LogFilters
dr-- Machines
dr-- MailSessions
dr-- MessagingBridges
dr-- MigratableTargets
dr-- RemoteSAFContexts
dr-- SAFAgents
dr-- SNMPAgent
dr-- SNMPAgentDeployments
dr-- Security
dr-- SecurityConfiguration
dr-- SelfTuning
dr-- Servers
dr-- ShutdownClasses
dr-- SingletonServices
dr-- StartupClasses
dr-- SystemResources
dr-- Targets
dr-- VirtualHosts
dr-- WLDFSystemResources
dr-- WLECConnectionPools
dr-- WSReliableDeliveryPolicies
dr-- WTCServers
dr-- WebAppContainer
dr-- WebserviceSecurities
dr-- XMLEntityCaches
dr-- XMLRegistries
-rw- AdminServerName Sample_AdminServer
-rw- AdministrationMBeanAuditingEnabled false
-rw- AdministrationPort 9002
-rw- AdministrationPortEnabled false
-rw- AdministrationProtocol t3s
-rw- ArchiveConfigurationCount 0
-rw- ClusterConstraintsEnabled false
-rw- ConfigBackupEnabled false
-rw- ConfigurationAuditType none
-rw- ConfigurationVersion 10.0.1.0
-rw- ConsoleContextPath console
-rw- ConsoleEnabled true
-rw- ConsoleExtensionDirectory console-ext
-rw- DomainVersion 10.0.1.0
-r-- LastModificationTime 0
-rw- Name Sample_1
-rw- Notes null
-rw- Parent null
-rw- ProductionModeEnabled false
-r-- RootDirectory /opt/Dev/Sample_1
-r-- Type Domain
-r-x freezeCurrentValue Void : String(attributeName)
-r-x isSet Boolean : String(propertyName)
-r-x restoreDefaultValue Void : String(attributeName)
-r-x unSet Void : String(propertyName)
No stack trace available.
Problem invoking WLST - Traceback (innermost last):
File "/opt/SCRIPTS/Domain_Creation/Create_JMS.py", line 60, in ?
File "<iostream>", line 511, in create
WLSTException: 'Error occured while performing create : Cannot create MBean of type JMSConnectionFactory. You can only create MBeans children to the current cmo. \nTo view the children types that you can create, use listChildTypes().' -
Problem with WLST in weblogic application server 10.3 on solaris 10 x86
Hi Friends, I installed Sun Solaris 10 on my desktop x86. I am able to install oracle weblogic application server 10.3.
I created one domain and I am trying to start AdminServer on that using WLST command.
Before that , I started the admin server from command as normal start ( nohup ./startWebLogic.sh &) and the server started perfectly alright. After that I was trying to open admin console in firefox browser. It was opening perfectly alright.
Now I stopped the server and checked no processes which are related to weblogic were running , and then initialized the WLST environment using the script "wlst.sh" , which is at (in my system) /usr/bea/wlserver_10.3/common/bin/wlst.sh. Now the environment had been set and the WLST offline prompt came up.
Now I used the below WLST scirpt command
startServer('AdminServer','mydomain','t3://localhost:7001','weblogic','weblogic1');
and the server started perfectly alright, now what I did was , I started admin console at FireFox browser , it prompted me to enter user name and password , I gave them , and once the login is done, then in my shell window , I am seeing error as
**wls:/offline> WLST-WLS-1263965848154: <Jan 19, 2010 11:39:24 PM CST> <Error> <HTTP> <BEA-101017> <[ServletContext@28481438[app:consoleapp module:console path:/console spec-version:2.5]] Root cause of ServletException.**
**WLST-WLS-1263965848154: java.lang.OutOfMemoryError: PermGen space**
**WLST-WLS-1263965848154: at java.lang.ClassLoader.defineClass1(Native Method)**
**WLST-WLS-1263965848154: at java.lang.ClassLoader.defineClass(ClassLoader.java:616)**
**WLST-WLS-1263965848154: at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)**
**WLST-WLS-1263965848154: at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:344)**
**WLST-WLS-1263965848154: at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:301)**
**WLST-WLS-1263965848154: Truncated. see log file for complete stacktrace**
**WLST-WLS-1263965848154: >**
**WLST-WLS-1263965848154: <Jan 19, 2010 11:39:24 PM CST> <Error> <JMX> <BEA-149500> <An exception occurred while registering the MBean com.bea:Name=mydomain,Type=SNMPAgentRuntime.**
**WLST-WLS-1263965848154: java.lang.OutOfMemoryError: PermGen space**
**WLST-WLS-1263965848154: at java.lang.ClassLoader.defineClass1(Native Method)**
**WLST-WLS-1263965848154: at java.lang.ClassLoader.defineClass(ClassLoader.java:616)**
**WLST-WLS-1263965848154: at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)**
**WLST-WLS-1263965848154: at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)**
**WLST-WLS-1263965848154: at java.net.URLClassLoader.access$000(URLClassLoader.java:56)**
**WLST-WLS-1263965848154: Truncated. see log file for complete stacktrace**
**WLST-WLS-1263965848154: >**
**WLST-WLS-1263965848154: Exception in thread "[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'" java.lang.OutOfMemoryError: PermGen space**
So I thought I have less memory consuming for this weblogic admin server and opened up ,
_/usr/bea/wlserver_10.3/common/bin/commEnv.sh_
and changed the memory arguments as
Sun)
JAVA_VM=-server
MEM_ARGS="-Xms1024m -Xmx1024m -XX:MaxPermSize=1024m" <---- previously these were 32m and 200m and MaxPermSize
and also in /usr/bea/wlserver10.3/common/bin/bin/setDomainEnv.sh_
and in this file also I changed the memory arguments as
*if [ "${JAVA_VENDOR}" = "Sun" ] ; then*
*WLS_MEM_ARGS_64BIT="-Xms256m -Xmx512m"*
*export WLS_MEM_ARGS_64BIT*
*WLS_MEM_ARGS_32BIT="-Xms1024m -Xmx1024m"*
*export WLS_MEM_ARGS_32BIT*
and restarted the server using the WLST command and again tried to open the admin console on a browser, same error is showing.
(1) Environment : Sun Solaris x86
(2) JDK : sun jdk 1.6._17
Please help me what I am doing wrong here and please let me know the solution.
I was trying to install jrockit 1.6 on this since my OS is sun solaris X86 , there is no compatible jrockit version is not there.
Thanks a lot
PeterHi Peter,
As you have mentioned in your Post that
MEM_ARGS="-Xms1024m -Xmx1024m -XX:MaxPermSize=1024m" <---- previously these were 32m and 200m and MaxPermSize
The Setting you have provided is wrong ...that is the reason you are gettingjava.lang.OutOfMemoryError: PermGen space. There is a RRation between PermSize and the maximum Heap Size...
Just a Bit Explaination:
Formula:
(OS Level)Process Size = Java Heap (+) Native Space (+) (2-3% OS related Memory)
PermSize : It's a Netive Memory Area Outside of the Heap, Where ClassLoading kind of things happens. In an operating System like Windows Default Process Size is 2GB (2048MB) default (It doesnt matter How much RAM do u have 2GB or 4GB or more)...until we dont change it by setting OS level parameter to increase the process size..Usually in OS like Solaris/Linux we get 4GB process size as well.
Now Lets take the default Process Size=2GB (Windows), Now As you have set the -Xmx512M, we can assume that rest of the memory 1536 Mb is available for Native codes.
(ProcessSize - HeapSize) = Native (+) (2-3% OS related Memory)
2048 MB - 512 MB = 1536 MB
THUMB RULES:
<h3><font color=red>
MaxPermSize = (MaxHeapSize/3) ----Very Special Cases
MaxPermSize = (MaxHeapSize/4) ----Recommended
</font></h3>
In your Case -Xmx (Max Heap Size) and -XX:MaxPermSize both were same ....That is the reason you are getting unexpected results. These should be in proper ration.
What should be the exact setting of these parameters depends on the Environment /Applications etc...
But Just try -Xmx1024m -Xms1024m -XX:MaxPermSize256m
Another recommendation for fine tuning always keep (Xmx MaxHeapSize & Xms InitialHeapSize same).
Thanks
Jay SenSharma
http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)
Edited by: Jay SenSharma on Jan 20, 2010 5:33 PM -
Wlst offline - create a new domain in weblogic portal 10.2
Hi,
Any one have automation script to create weblogic portal domain, create portlet data base ( not point base).and Domain resources: Machines,Servers, Clusters and data sources. I tried the one which comes with installation ( wlst offlie domain creation script), but it is just configuring weblogic server but not portal.
Thanks.
Krishna.#=======================================================================================
# WLST Common Script Library Functions (these functions support both WLS 8.1.x and 9.x)
#=======================================================================================
__all__ = []
import os
from java.io import FileInputStream
from java.util import Properties
from java.lang import String
import jarray
#=======================================================================================
# RAVI enable library functions to see and use WLST functions
#=======================================================================================
def initialise(topLevelNamespace):
for f in ("addTemplate", "closeDomain", "closeTemplate", "exit", "readDomain",
"readTemplate", "updateDomain", "writeDomain", "cd", "assign",
"assignAll", "create", "delete", "get", "loadDB", "set", "setOption",
"unassign", "unassignAll", "dumpStack", "dumpVariables", "help", "ls",
"prompt", "pwd", "startRecording", "stopRecording", ):
globals()[f] = topLevelNamespace[f]
__all__.append(f)
#=======================================================================================
# Load Properties
#=======================================================================================
def loadPropertiesFromFile(filename):
props = addPropertiesFromFile(filename, {})
return props
#=======================================================================================
# Load Properties
#=======================================================================================
def addPropertiesFromFile(filename, props):
properties = Properties()
input = FileInputStream(filename)
properties.load(input)
input.close()
for entry in properties.entrySet(): props[entry.key.strip()] = entry.value.strip()
return props
#=======================================================================================
# Get WebLogic Version (eg. returns '8.1.5.0', '9.1.0.0', '9.2.0.0')
#=======================================================================================
def getWebLogicVersion():
return cd('/').getConfigurationVersion()
#=======================================================================================
# Get Machine Create Type (returns 'UnixMachine' or 'Machine')
#=======================================================================================
def getMachineCreateType():
# On Unix, machine type is 'UnixMachine' on Windows it is 'Machine'
if os.pathsep == ':':
return 'UnixMachine'
else:
return 'Machine'
#=======================================================================================
# Get Machine Directory Type (returns 'UnixMachine' or 'Machine')
#=======================================================================================
def getMachineDirectoryType():
# On Unix, machine type is 'UnixMachine' on Windows it is 'Machine'
if os.pathsep == ':':
# When moving from WLS 9.1 to WLS 9.2, WLS changed name of unix machines from
# 'UnixMachine' to just 'Machine'
wlsVersion = getWebLogicVersion()
if wlsVersion.startswith('8') or wlsVersion.startswith('9.0') or wlsVersion.startswith('9.1'):
return 'UnixMachine'
else:
return 'Machine'
else:
return 'Machine'
#=======================================================================================
# Set Domain Options
#=======================================================================================
def setDomainOptions(prodMode, javaHome):
setOption('OverwriteDomain', 'true')
setOption('ServerStartMode', prodMode)
setOption('JavaHome', javaHome)
setOption('CreateStartMenu', 'false')
#=======================================================================================
# Set System User
#=======================================================================================
def setSystemUser(domainname, username, password):
sysUser = cd('/Security/%s/User/weblogic' % domainname)
sysUser.setName(username)
sysUser.setPassword(password)
#=======================================================================================
# Create WLS81 Oracle Database Pool
#=======================================================================================
def createWLS81OracleDatabasePool(dbName, dbUsername, dbPassword, dbDriver, dbUrl):
newPool = create(dbName, 'JDBCConnectionPool')
newPool.setDriverName(dbDriver)
newPool.setURL(dbUrl)
newPool.setPassword(dbPassword)
newPool.setInitialCapacity(5)
newPool.setTestFrequencySeconds(60)
newPool.setTestConnectionsOnRelease(1)
newPool.setTestConnectionsOnReserve(1)
newPool.setConnectionReserveTimeoutSeconds(60)
newPool.setUserName(dbUsername)
return newPool
#=======================================================================================
# Create WLS81 Data Source
#=======================================================================================
def createWLS81DataSource(dsType, dsName, jndiName, poolName):
ds = create(dsName, dsType)
ds.setJNDIName(jndiName)
ds.setPoolName(poolName)
return ds
#=======================================================================================
# Configure WLS9 Oracle Database
#=======================================================================================
def configureWLS9OracleDatabase(dsName, jndiNames, driver, host, port, sid, username, password, targets):
cd('/')
dataSource = create(dsName, 'JDBCSystemResource')
cd('/JDBCSystemResource/' + dsName + '/JdbcResource/' + dsName)
dbParam = create('dbParams','JDBCDriverParams')
cd('JDBCDriverParams/NO_NAME_0')
dbParam.setDriverName(driver)
set('URL', 'jdbc:oracle:thin:@' + host + ':' + port + ':' + sid)
dbParam.setPasswordEncrypted(password)
dbProps = create('props','Properties')
cd('Properties/NO_NAME_0')
dbUser = create('user', 'Property')
dbUser.setValue(username)
cd('/JDBCSystemResource/' + dsName + '/JdbcResource/' + dsName)
create('jdbcDataSourceParams','JDBCDataSourceParams')
cd('JDBCDataSourceParams/NO_NAME_0')
set("JNDINames", jndiNames)
cd('/JDBCSystemResource/' + dsName + '/JdbcResource/' + dsName)
create('jdbcConnectionPoolParams','JDBCConnectionPoolParams')
cd('JDBCConnectionPoolParams/NO_NAME_0')
set('TestTableName','SQL SELECT 1 FROM DUAL')
set('TestConnectionsOnReserve','true')
assign('JDBCSystemResource', dsName, 'Target', targets)
return dataSource
#=======================================================================================
# Configure WLS102 DB2
#=======================================================================================
def configureWLS102DB2(dsName, jndiNames, driver, host, port, sid, username, password, targets, trans, url, testquery):
print 'datasource('+dsName+','+ jndiNames+','+ driver+','+ host+','+ port+','+ sid+','+ username+','+ password+','+targets+','+ trans+','+url+',' + testquery +'):'
cd('/')
dataSource = create(dsName, 'JDBCSystemResource')
cd('/JDBCSystemResource/' + dsName + '/JdbcResource/' + dsName)
dbParam = create('dbParams','JDBCDriverParams')
cd('JDBCDriverParams/NO_NAME_0')
dbParam.setDriverName(driver)
#set('URL', 'jdbc:bea:db2://' + host + ':' + port)
set('URL', url)
dbParam.setPasswordEncrypted(password)
#dbParam.setPassword(password)
dbProps = create('props','Properties')
cd('Properties/NO_NAME_0')
dbUser = create('user', 'Property')
dbUser.setValue(username)
dbPortNumber = create('portNumber', 'Property')
dbPortNumber.setValue(port)
dbDbName = create('databaseName', 'Property')
dbDbName.setValue(sid)
dbHost = create('serverName', 'Property')
dbHost.setValue(host)
dbBatch = create('batchPerformanceWorkaround', 'Property')
dbBatch.setValue('true')
cd('/JDBCSystemResource/' + dsName + '/JdbcResource/' + dsName)
create('jdbcDataSourceParams','JDBCDataSourceParams')
cd('JDBCDataSourceParams/NO_NAME_0')
jndiNamesAray=jndiNames.split(',')
set('JNDINames', jndiNamesAray)
set('GlobalTransactionsProtocol', trans)
#cd('/JDBCSystemResources/ttttt/JDBCResource/ttttt/JDBCDataSourceParams/ttttt')
#cd('/JDBCSystemResource/' + dsName + '/JdbcResource/' + dsName)
#cd('JDBCDataSourceParams/NO_NAME_0')
#dbDatasource = cmo
#dbDatasource.setGlobalTransactionsProtocol(trans)
cd('/JDBCSystemResource/' + dsName + '/JdbcResource/' + dsName)
create('jdbcConnectionPoolParams','JDBCConnectionPoolParams')
cd('JDBCConnectionPoolParams/NO_NAME_0')
#set('TestTableName','SQL SELECT COUNT(*) FROM SYSIBM.SYSTABLES')
set('TestTableName',testquery)
set('TestConnectionsOnReserve','true')
assign('JDBCSystemResource', dsName, 'Target', targets)
cd('/JDBCSystemResources/'+dsName)
#targetsAray=[targets]
#set('Targets',targetsAray)
return dataSource
#=======================================================================================
# Set Common Server Settings
#=======================================================================================
def setCommonServerSettings(server):
server.setNativeIOEnabled(1)
server.setWeblogicPluginEnabled(1)
#=======================================================================================
# Set Server Logging
#=======================================================================================
def setServerLogging(server, logpath, level):
cd('/Server/' + server.getName())
log = create(server.getName(), 'Log')
log.setFileName(logpath + '/' + server.getName() + '.log')
log.setRotationType('byTime')
log.setRotationTime('02:00')
log.setFileTimeSpan(24)
log.setFileCount(7)
log.setLogFileSeverity(level)
#=======================================================================================
# Set Web Server
#=======================================================================================
def setWebServer(server, logpath, frontEndHost, frontEndPort, frontEndSSLPort):
cd('/Server/' + server.getName())
webServer = create(server.getName(), 'WebServer')
webServer.setFrontendHost(frontEndHost)
webServer.setFrontendHTTPPort(frontEndPort)
webServer.setFrontendHTTPSPort(frontEndSSLPort)
wlsVersion = getWebLogicVersion()
if wlsVersion.startswith('9') or wlsVersion.startswith('10'):
cd('/Server/' + server.getName() + '/WebServer/' + server.getName())
webServerLog = create(server.getName(),'WebServerLog')
webServerLog.setFileName(logpath + '/' + server.getName() + '_access.log')
webServerLog.setRotationType('byTime')
webServerLog.setRotationTime('02:00')
webServerLog.setFileTimeSpan(24)
webServerLog.setFileCount(7)
else:
webServer.setLogFileName(logpath + '/' + server.getName() + '_access.log')
webServer.setLogRotationType('date')
webServer.setLogRotationTimeBegin('01-01-2006-2:00:00')
webServer.setLogRotationPeriodMins(1440)
webServer.setLogFileCount(7)
#=======================================================================================
# Create Boot Properties File
#=======================================================================================
def createBootPropertiesFile(directoryPath, username, password):
file = open (directoryPath + '/boot.properties', 'w')
file.write('username=%s\n' % username)
file.write('password=%s\n' % password)
file.flush()
file.close()
Hopefully this will work for you -
WLST Domain Creation using JRF template throws SQLRecoverableException
I am working on domain creation using templates and included the JRF template to use OPSS functionality.
I have run the RCU utility to create the required components that will have necessary tables to host OPSS data and also tested that it works with CC_STB user that i will use to connect from WLS.
I am able to ping the database server having RCU components from the VM where i want to create and configure the domain but when i configure the LocalSvcTblDataSource with the same ip address and try to setup the OPSS datasources, it gives me "Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified Error Code: 17002"
Below is my WLST python script:
#=======================================================================================
# Open a domain template.
#=======================================================================================
readTemplate("/u01/app/mw/Oracle_Home/wlserver/common/templates/wls/wls.jar")
#=======================================================================================
# Update the domain to enable the WebLogic Server domain with JRF and EM.
#=======================================================================================
addTemplate('/u01/app/mw/Oracle_Home/oracle_common/common/templates/wls/oracle.jrf_template_12.1.2.jar')
addTemplate('/u01/app/mw/Oracle_Home/em/common/templates/wls/oracle.em_wls_template_12.1.2.jar')
#=======================================================================================
# Configure the Administration Server and SSL port.
# To enable access by both local and remote processes, you should not set the
# listen address for the server instance (that is, it should be left blank or not set).
# In this case, the server instance will determine the address of the machine and
# listen on it.
#=======================================================================================
cd('Servers/AdminServer')
set('ListenAddress','')
set('ListenPort', 7001)
create('AdminServer','SSL')
cd('SSL/AdminServer')
set('Enabled', 'True')
set('ListenPort', 7002)
#=======================================================================================
# Define the user password for weblogic.
#=======================================================================================
cd('/')
cd('Security/base_domain/User/weblogic')
# Please set password here before using this script, e.g. cmo.setPassword('value')
cmo.setPassword('password')
#=======================================================================================
# Create and configure a JDBC Data Source, and sets the JDBC user.
#=======================================================================================
# Get RCU Configuration using RCU service table (STB) schema credentials
cd('/')
cd('JDBCSystemResource/LocalSvcTblDataSource/JdbcResource/LocalSvcTblDataSource')
cd('JDBCDriverParams/NO_NAME_0')
set('DriverName','oracle.jdbc.OracleDriver')
set('URL','jdbc:oracle:thin:@XX.XX.XX.XX:15210/xe')
set('PasswordEncrypted', 'password')
set('UseXADataSourceInterface', 'false')
cd('Properties/NO_NAME_0')
cd('Property/user')
cmo.setValue('CC_STB')
getDatabaseDefaults()
#=======================================================================================
# Write the domain and close the domain template.
#=======================================================================================
setOption('OverwriteDomain', 'true')
writeDomain('/u01/data/user_projects/domains/cc_domain')
closeTemplate()
#=======================================================================================
# Exit WLST.
#=======================================================================================
exit()
And the complete exception trace.
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
Error: writeDomain() failed. Do dumpStack() to see details.
wls:/offline/base_domain>dumpStack();
com.oracle.cie.domain.script.jython.WLSTException: com.oracle.cie.domain.script.ScriptException: Domain Creation Failed!
Domain Location: /u01/data/user_projects/domains/cc_domain
Reason: oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
Exception:
oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
at com.oracle.cie.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:55)
at com.oracle.cie.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:1967)
at com.oracle.cie.domain.script.jython.WLScriptContext.writeDomain(WLScriptContext.java:1126)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.python.core.PyReflectedFunction.__call__(Unknown Source)
at org.python.core.PyMethod.__call__(Unknown Source)
at org.python.core.PyObject.__call__(Unknown Source)
at org.python.core.PyInstance.invoke(Unknown Source)
at org.python.pycode._pyx5.writeDomain$15(/tmp/WLSTOfflineIni4846195865917165143.py:73)
at org.python.pycode._pyx5.call_function(/tmp/WLSTOfflineIni4846195865917165143.py)
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._pyx93.f$0(<console>:1)
at org.python.pycode._pyx93.call_function(<console>)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyCode.call(Unknown Source)
at org.python.core.Py.runCode(Unknown Source)
at org.python.core.Py.exec(Unknown Source)
at org.python.util.PythonInterpreter.exec(Unknown Source)
at org.python.util.InteractiveInterpreter.runcode(Unknown Source)
at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
at weblogic.management.scripting.WLST.main(WLST.java:219)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at weblogic.WLST.main(WLST.java:29)
Caused by: com.oracle.cie.domain.script.ScriptException: Domain Creation Failed!
Domain Location: /u01/data/user_projects/domains/cc_domain
Reason: oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
Exception:
oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
at com.oracle.cie.domain.script.ScriptExecutor.runGenerator(ScriptExecutor.java:3706)
at com.oracle.cie.domain.script.ScriptExecutor.writeDomain(ScriptExecutor.java:991)
at com.oracle.cie.domain.script.jython.WLScriptContext.writeDomain(WLScriptContext.java:1117)
... 29 more
Caused by: com.oracle.cie.domain.security.external.ConfigSecurityException: oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
at oracle.security.opss.tools.lifecycle.cie.OpssSecurityConfiguration.initializeSubsystem(OpssSecurityConfiguration.java:129)
at com.oracle.cie.domain.DomainGenerator.run(DomainGenerator.java:315)
at java.lang.Thread.run(Thread.java:744)
Caused by: oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
at oracle.security.opss.tools.lifecycle.OpssDomainConfigImpl.checkIfFarmExists(OpssDomainConfigImpl.java:708)
at oracle.security.opss.tools.lifecycle.OpssDomainConfigImpl.configureDBSecurityStore(OpssDomainConfigImpl.java:339)
at oracle.security.opss.tools.lifecycle.OpssDomainConfigImpl.initializeSubsystem(OpssDomainConfigImpl.java:166)
at oracle.security.opss.tools.lifecycle.cie.OpssSecurityConfiguration.initializeSubsystem(OpssSecurityConfiguration.java:126)
... 2 more
Caused by: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.processJPAException(JpsDBDataManager.java:2088)
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.init(JpsDBDataManager.java:955)
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.beginTransaction(JpsDBDataManager.java:1459)
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.beginTransaction(JpsDBDataManager.java:1455)
at oracle.security.jps.internal.common.rdbms.util.JpsDbBootstrapImpl.<init>(JpsDbBootstrapImpl.java:162)
at oracle.security.opss.tools.lifecycle.OpssDomainConfigImpl.checkIfFarmExists(OpssDomainConfigImpl.java:679)
... 5 more
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:614)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:186)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:278)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:304)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:282)
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.getVersion(JpsDBDataManager.java:1027)
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.getEMFAndSubject(JpsDBDataManager.java:1124)
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.init(JpsDBDataManager.java:907)
... 9 more
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:319)
at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138)
at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:690)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:215)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:554)
... 16 more
Caused by: java.sql.SQLRecoverableException: IO Error: Unknown host specified
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:465)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:232)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:187)
at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)
... 20 more
Caused by: oracle.net.ns.NetException: Unknown host specified
at oracle.net.resolver.HostnameNamingAdapter.resolve(HostnameNamingAdapter.java:191)
at oracle.net.resolver.NameResolver.resolveName(NameResolver.java:133)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:416)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:687)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:247)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1109)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:316)
... 27 more
Any help/pointers/hints will be helpful
Thanks,
SantoshHi Micheal,
Thanks a Lot for your response.
We have checked the OS requirements :
System Itanium 11i (11.31) B.11.31.0803.318a Base Quality Pack Bundle for HP-UX 11i v3, March 2008+
Response:
======
We have the higher version installed for this quality pack.
QPKBASE B.11.31.1109.367a Base Quality Pack Bundle for HP-UX 11i v3, September 2011
2) Required Packages : HPDesktopDev (version B.11.31.01)
Response:
=======
This package is also installed.
X11MotifDevKit B.11.31.01 HP-UX Desktop Developer's Toolkit - X11, Motif, and Imake
3) Required Operating System Patches
PHKL_36248
PHKL_36249
PHSS_37202
PHSS_37501
PHCO_38050
PHSS_38139
Response:
========
We have the supersets for these patches installed. The installation logs also confirm these patches at the OS level.
Check Name:Patches
Check Description:This is a prerequisite condition to test whether the patches recommended for installing the product are available on the system.
Checking for PHKL_36248; found PHKL_36248. Passed
Checking for PHKL_36249; found PHKL_36249. Passed
Checking for PHSS_37202; found PHSS_37202. Passed
Checking for PHSS_37501; found PHSS_37501. Passed
Checking for PHCO_38050; found PHCO_38050. Passed
Checking for PHSS_38139; found PHSS_38139. Passed
Check complete. The overall result of this check is: Passed
Regards
Sumit Kapila -
Hi all,
I have installed WebLogic Integration 8.5 bundle. Meaning i have also installed weblogic server 8.1. on Windows XP
I am now trying to use Weblogic Scripting Tool WLST. But there is no tools on the menu(tools->weblogic scripting tool) this was added in the 9.1 installation...
How do I configure my installation weblogic server 8.1 with WLI8.5 to run WLST?
after i run setELSEnv.cmd to set the environment. Then i try java weblogic.WLST and the error is "java.lang.NoClassDefFoundError: weblogic/WLST"
Where are the libs, how do i configure WLST to run.
I also tried starting the WLST from the 9.1 installation, but it cannot connect to 8.1 installation, tough connecting to 9.1 installation is no problem. If i try i get this error: "weblogic.management.ManagementRuntimeException: java.lang.NoSuchMethodError: isCachable"
(I installed weblogic 9.1 and there the WLST was installed during installation and all works just fine. unfortenatly my system must run on 8.1->wli8.5)Hi
I am trying to use WLST tool for configuring Weblogic domain in 9.1 OFFLINE.
I have done with almost all except JTA configuration.
Can you please give me smaples for the same.
The following is part iof my script...
readTemplate('F:/AuctionDoc/Installer/inDomain.jar')
cd('/JDBCSystemResource/localNonTxPool/JdbcResource/localNonTxPool')
create('myJdbcDataSourceParams','JDBCDataSourceParams')
cd('JDBCDataSourceParams/NO_NAME_0')
set('JNDIName', 'jdbc/NonTxDataSource')
#JDBC settings and other JMS settings worked
But the JTA settings dint work
#=======================================================================================
# Set JTA timeout
#=======================================================================================
cd("/JTA/inInstDomain")
set("TimeoutSeconds", "1200")
set("AbandonTimeoutSeconds", "1200")
I have to do the above OFFLINE.
I could not locate the JTA folder or any thing related with JTA configuration to do offline using WLST
Can you please give an example of JTA settings
Thanks
Binu -
Passing a variable to command in WLST script
I have a script I have written to suspend and resume connection pools based on a specific path using the managed server as the variable.
The problem is that when I pass the managed server name as a variable, the cd() command never gets it.
Does anyone have any suggestions here?
import os
singlqt = "'"
connect('weblogic', sys.argv[1], sys.argv[2])
if sys.argv[4] == 'show_pools':
try:
domainConfig()
ls('JDBCSystemResources')
sys.exit(0)
except:
print "Error showing pools ", sys.argv[4]
sys.exit(1)
tempPoolPathVar = os.path.join('/ServerRuntimes/', sys.argv[3], 'ApplicationRuntimes/', sys.argv[5], 'ComponentRuntimes', sys.argv[5])
poolPathVar = "%s%s%s" % (singlqt, tempPoolPathVar, singlqt)
if sys.argv[4] == 'suspend_pool':
try:
domainRuntime()
print poolPathVar
cd(poolPathVar)
cmo.suspend()
except:
print "Error suspending pool", sys.argv[5]
so when you print poolPathVar it shows:
'/ServerRuntimes/myManagedServer1/ApplicationRuntimes/ConnectionPool1/ComponentRuntimes/ConnectionPool1
with the single quotes included.
I tried to feed this variable to cd() but it gets lost for some reason.
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Connecting to t3://myAdminServer1:7001 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer'1 that belongs to domain 'mydomain'.
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 domainRuntime tree. This is a read-only tree with DomainMBean as the root.
For more help, use help(domainRuntime)
'/ServerRuntimes/myManagedServer1/ApplicationRuntimes/ConnectionPool1/ComponentRuntimes/ConnectionPool1
This Exception occurred at Tue Jul 01 16:32:42 PDT 2008.
javax.management.AttributeNotFoundException: com.bea:Name=mydomain,Type=DomainRuntime:'
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:221)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:224)
at javax.management.remote.rmi.RMIConnectionImpl_1001_WLStub.getAttribute(Unknown Source)
at weblogic.management.remote.common.RMIConnectionWrapper$11.run(ClientProviderBase.java:531)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.security.Security.runAs(Security.java:61)
at weblogic.management.remote.common.RMIConnectionWrapper.getAttribute(ClientProviderBase.java:529)
at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(RMIConnector.java:857)
at weblogic.management.scripting.BrowseHandler.regularPush(BrowseHandler.java:420)
at weblogic.management.scripting.BrowseHandler.splitPush(BrowseHandler.java:145)
at weblogic.management.scripting.BrowseHandler.cd(BrowseHandler.java:640)
at weblogic.management.scripting.WLScriptContext.cd(WLScriptContext.java:195)
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 org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:160)
at org.python.core.PyMethod.__call__(PyMethod.java:96)
at org.python.core.PyObject.__call__(PyObject.java:270)
at org.python.core.PyObject.invoke(PyObject.java:2041)
at org.python.pycode._pyx19.cd$5(<iostream>:161)
at org.python.pycode._pyx19.call_function(<iostream>)
at org.python.core.PyTableCode.call(PyTableCode.java:208)
at org.python.core.PyTableCode.call(PyTableCode.java:267)
at org.python.core.PyFunction.__call__(PyFunction.java:172)
at org.python.pycode._pyx18.f$0(/tmp/wl_pool_control.wlst:50)
at org.python.pycode._pyx18.call_function(/tmp/wl_pool_control.wlst)
at org.python.core.PyTableCode.call(PyTableCode.java:208)
at org.python.core.PyCode.call(PyCode.java:14)
at org.python.core.Py.runCode(Py.java:1135)
at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:167)
at weblogic.management.scripting.WLST.main(WLST.java:106)
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.WLST.main(WLST.java:29)
Caused by: javax.management.AttributeNotFoundException: com.bea:Name=qapoc-core,Type=DomainRuntime:'
at weblogic.management.jmx.modelmbean.WLSModelMBean.getPropertyDescriptorForAttribute(WLSModelMBean.java:1419)
at weblogic.management.mbeanservers.internal.SecurityInterceptor.getPropertyDescriptor(SecurityInterceptor.java:842)
at weblogic.management.mbeanservers.internal.SecurityInterceptor.checkGetSecurity(SecurityInterceptor.java:580)
at weblogic.management.mbeanservers.internal.SecurityInterceptor.getAttribute(SecurityInterceptor.java:297)
at weblogic.management.mbeanservers.internal.AuthenticatedSubjectInterceptor$5.run(AuthenticatedSubjectInterceptor.java:192)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.management.mbeanservers.internal.AuthenticatedSubjectInterceptor.getAttribute(AuthenticatedSubjectInterceptor.java:190)
at weblogic.management.jmx.mbeanserver.WLSMBeanServer.getAttribute(WLSMBeanServer.java:269)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1387)
at javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1247)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1350)
at javax.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.java:599)
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)
Error suspending pool ConnectionPool1Try prepending your string with "serverRuntime:", i.e.,
cd ("serverRuntime:/WLDFRuntime")
Think of it like changing drives on a DOS system. You're trying to change to a serverRuntime "dir" from the domainRuntime "drive". Prepending the drive prefix should fix it. -
Error JRF when start AdminServer with WLST
Hello,
I have a problem when I want to start the AdminServer with my WLST command :
startServer('AdminServer','mydomain','t3://localhost:7001','user','pwd', 'D:/Oracle/Middleware/user_projects/domains/mydomain',jvmArgs='-Ddomain.home=D:/Oracle/Middleware/user_projects/domains/mydomain -Doracle.security.jps.config=D:/Oracle/Middleware/user_projects/domains/mydomain/config/fmwconfig/jps-config.xml -Doracle.domain.config.dir=D:/Oracle/Middleware/user_projects/domains/mydomain/config')
Here is the error (sorry, it's in French) :
WLST-WLS-1336736583189: <11 mai 2012 13 h 43 CEST> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "JRF Startup Class", oracle.jrf.UnknownPlatformException: JRF ne peut pas déterminer la plate-forme de serveur d'applications en cours.
WLST-WLS-1336736583189: oracle.jrf.UnknownPlatformException: JRF ne peut pas déterminer la plate-forme de serveur d'applications en cours.
WLST-WLS-1336736583189: at oracle.jrf.ServerPlatformSupportFactory.getInstance(ServerPlatformSupportFactory.java:79)
WLST-WLS-1336736583189: at oracle.jrf.wls.JRFStartup.main(JRFStartup.java:42)
WLST-WLS-1336736583189: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
WLST-WLS-1336736583189: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
WLST-WLS-1336736583189: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Even with all these Warning/Error, I can use the Administration Console, but not the EM...
nodemanager.domains : The domain directory is good.
nodemanager.properties : StartScriptEnabled=true
I run setDomainEnv.cmd before each run of the command.
Do you have any idea/advice ?
Thanks !Hello,
I tried to start the AdminServer with the nodemanager and it works perfectly :
"nmConnect('NMUser','NMpwd','localhost','5556','DomaineName','Domainedirectory')"
I had to change the NM user and NM Password in "domain_name, Security, General, and then expand the Advanced options at the bottom.".
But because of this action, I can't manage my others WebApp on the second host :
Here is my error :
"<Could not execute command "getVersion" on the node manager. Reason: "Access to domain 'DomaineName' for user 'NMUser' denied".> "
Here is my configuration :
Domain is setup on the HOST1
AdminServer : HOST1
WebApp1 : HOST1
WebApp2 : Host2
I can't manage WebApp2. I restarted the NodeManager on Host2. Same error...
Do you already have this error ? The nodemanager.properties and nodemanager.domains are ok the Host2.
Thanks for your help ! -
OBIEE Repository and webcatalog deployment with WLST
Hi,
Being novice in weblogic with integration of OBIEE 11G, i heard we have WLST (Weblogic Scripting Tool), is it something like UNIX scripting?, My references told me that we can do many administration tasks that are done in GUI consoles with help of WLST using OEPE (Oracle Enterpise Pack for Eclipse). Now my question is can we deploy OBIEE Repository, OBIEE catalog and start/restart/stop BI services using WLST?
Thanks,
SreekanthHi Sreekanth
Have a look into the Oracle BI Systems Management API;
http://download.oracle.com/docs/cd/E14571_01/bi.1111/e10541/admin_api.htm
http://www.rittmanmead.com/files/oow2011_rittman_chgmgmt.pdf
http://www.rittmanmead.com/files/oow2011_rittman_sysman.pdf
Good Luck,
Daan Bakboord
http://obibb.wordpress.com
Maybe you are looking for
-
Repeated lost connections when using WRT54g
Hello everyone. I have a Lynksys WRT54g v5 and a cable modem, my ISP is Virgin Mobile. Every half an hour or so my internet connection is lost and can only be regained by reseting my modem by turning it on and off. The lost connections appear to occu
-
We explored using sbRIO for our project, for different reasons we ended up going with a different embedded solution . We are currently evaluating the LabVIEW C Generator to convert some of the core analysis routines from LabVIEW to C so the team that
-
Problem with marking in a file
Hi, I am trying to read a file sequentially, and in between i set a mark so that i can come back again to read a specific line. now while i try to mark, i pass the size of the file as the argument.. Can there be a condition where such marking can fai
-
Extracting string from a file name
Hello, I have a legacy (read: I didn't build it) SharePoint list that includes some validation when uploading files that's giving me some trouble. Basically, our users are required to add files to a list in a certain filename format and based on the
-
ILLUSTRATOR CS5 AND INDESIGN CS5
Well... I've been looking the new CS5 programs. It's time to change. Now, Illustrator artboards (pages) can be rearranged and named. You can paste a objet in multiple artboards and they preserve their relative location in the artboards too (imagine t