Showing posts with label oas. Show all posts
Showing posts with label oas. Show all posts

Wednesday, October 7, 2009

Failed to set the internal configuration of the OC4J JMS Server with: XMLJMSServerConfig

After setting up a few jms queues, if the oc4j did not shutdown properly, (ie) shutting down the machine without issuing "opmnctl stopall", the above error is very likely to occur.

To fix this just rename the <ORACLE_HOME>/j2ee/<soa_instance>/persistence folder and create an empty folder in its place.

Now if you start the server, it should startup fine.

Tuesday, April 21, 2009

How to Change Oracle ORAWSM Database Password

If you are reading this you already know that the WSM uses the ORAWSM user in the infra database. If you need to change the Oracle database password for the ORAWSM user, you would guess that you will may have to change the password in some configuration files for the webservices manager to use the new password. However that process is not that simple. Here are the steps you need to follow.



Step 1: Change the password directly in the database.

Login as sysdba and change the password of orawsm.

Step 2: Change the password in WSM configuration files
Reffer to steps described in the following url. (Content copied here for your reference.)
http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b31007.pdf (appendix C - Changing Passwords)

The following procedure describes how to change a database password for a single instance of an Oracle WSM Database.
To change a password for a single database instance
1. Edit the attribute db.password in the ORACLE_HOME/owsm/bin/coresv.properties file.
2. From the command prompt, execute the following command:
wsmadmin encodePasswords coresv.properties dataload.messagelog.db.password
3. From the command prompt, execute the wsmadmin copyDBConfig command:
wsmadmin copyDBConfig
4. From the command prompt, execute the wsmadmin deploy command:
wsmadmin deploy application_server_password component
See Appendix B, "Oracle Web Services Manager WSMADMIN Commands" for more information.

The following procedure describes how to change your database password when you have multiple instances of Oracle WSM Database.

To update and reconcile a password for multiple database instances
1. Update the relevant attribute in the application properties file for each application.
These are located under ORACLE_HOME/owsm/config/application_name.
2. Update and reconcile the passwords for all the database instances.
3. From the command prompt, execute the wsmadmin encodePassword command
for each affected file:
wsmadmin encodePasswords path_to_file properties
4. From the command prompt, execute the wsmadmin deploy command:
wsmadmin deploy application_server_password component
See Appendix B, "Oracle Web Services Manager WSMADMIN Commands" for more
information.

Step 3: Change the password in the policy configuration for each gateway defined.

For each gateway and agent in your system, there is a property - cfluent.messagelog.db.password - which has to be manually changed to the correct password value for your OWSM schema, as it is left unaffected by the redeployment of the OWSM applications.
This is handled through the OWSM console by accessing the properties screen for each gateway and agent (Policy Management > Manage Policies > Edit Component Properties).
The password that you enter should be the actual password with no encryption. The value will be encrypted before it is stored in to the orawsm.policy_manager_objects table.

Monday, December 15, 2008

oc4j classloading diagnostics using MBean

Class Loading can be tricky in a J2EE environment. The Oracle Application server documentation provides good explanation on how the classloading works. However, at times, it is easier to just test if the classloader can find a class without having to go through the hops to execute the class. Fortunately, oc4j offers a MBean that can be used for that purpose. Here is the detail step to test if a class can be found by the classloader.

1. Log in enterprise manager console.
2. Click on your OC4J container name on the main topology web site.
3. Click on the link "Administration".
4. Click on the "Go To Task" icon as follows.

JMX -> System MBean Browser

5. Expand the ClassLoading node in the navigation pane, then select the singleton MBean instance.
6. Click the Operations tab in the right-hand pane, then click the executeQuery operation.

Three versions of the executeQuery operation are exposed. Click the version that takes one parameter.

7. Enter in a value as follows under the "Parameters" heading -> LoaderTree
8. Click the Invoke button to call the operation.

This will display the class loading hirearchy.

To test if a given class can be found by the classloader, repeat steps 7 & 8 with the following command in the parameters tree

FindResource(packagename.classname)


There are other queries/commands that you can run on the MBean. For a complete list reffer to the oracle documentation here

Wednesday, March 12, 2008

OAS and XE conflict on DHCP enabled machines

Recently I was trying to install Oracle Application Server and the Oracle XE database along with the SOA suite and BPEL engine on a laptop. The installation process went okay till I had to reboot the machine. After I reboot the machine, the TNS LISTNER (tnslsnr.exe) will not run. As soon as the process starts, it will crash with an error window saying some unexpected error occurred. Further looking for any log information showed that somehow the tnslistner is picking up files from the OAS installation rather than the XE installation.

Reinstalling the SOA suite did not help. I discussed this with an Oracle consultant who suggested that the issue might be due to some network setting and he was asking me if I got any DHCP warning during installation. Since I remember ignoring an error about DHCP, I decided to read the OAS installation manual that had a section about DHCP. After following the instructions there and installing a loopback adaptor and reinstalling the OAS, I was able to have both XE and the OAS BPEL engine run on the same laptop.

If you are a person who likes to just install the software without reading the manual first, there will be few glitches that will happen if you are installing OAS. So I would recommend taking some time to read the manuals before you start installation that would save you from trouble later. Unfortunately, I had to learn it the hard way.

The install guide is typically found under the doc\install.1013\ folder when you unzip the download installation binary. A few tips from my install experience:
1) If you are installing the OAS applications on a laptop, run the installation script with the laptop unplugged from any network. When I had the installation running while connected to my work network, and try to bring up the OAS from home while connected to my work network through VPN, the OPNM failed to start till I disconnect from the VPN connection. However, adding the loopback adaptor and installing OAS while unplugged from the network, helped resolve this issue.
2) If you are adding the BPEL engine later after installing the base OAS, you will have to run the scripts to create the schema on the database, manually. The instructions are on the manual. If you are installing this on a windows box and your environment variables are not set properly you may encounter some issues. the Integration Repository Creation Assistant (IRCA) script needs the ORACLE_HOME and JAVA_HOME variables to be set properly. If the path contains and spaces, it will not work. So you may have to edit the path with the short file names with no spaces.

Hopefully, your installation goes smooth. It really helps to read the documentation.

Monday, March 3, 2008

Oracle application server- standard out and error

Recently I was troubleshooting an application under Oracle Application Server (OAS 10g) and I was wondering where the standard out and error were getting routed. I was looking for the script that starts the oc4j to see where it is getting redirected. However, oracle is doing things their own way and using a executable file to start the jvm if we are using oc4j as part of the opmn.
So I had to digup the oracle documentation and found where they are supposed to go and how to control them. This website has good documentation on the various setting. However if you like to setup quickly here is what I did and hope this will help.

1) Update your opmn config file so it prints the system out and system.err to a file.
To do this, edit the rocess-type definition related to the oc4j instance where the app is deployed and add the following line just below the java-options line under start-parameters.

If you are not comfortable editing the file manually, you can use the enterprose manager tool and add new properties (yourInstance->Administration->Server Properties)to the startup parameters. You will have to add one option per line.
Here is the sample process definition:


<process-type id="myappinstance" module-id="OC4J" status="enabled">
<module-data>
<category id="start-parameters">
<data id="java-options" value="-server -Djava.security.policy=$ORACLE_HOME/j2ee/myappinstance/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Dstdstream.filesize=2.5"/>
<data id="oc4j-options" value="-out oc4j.out.txt -err oc4j.err.txt"/>
</category>
<category id="stop-parameters">
<data id="java-options" value="-Djava.security.policy=$ORACLE_HOME/j2ee/myappinstance/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/>
</category>
</module-data>
<start timeout="600" retry="2"/>
<stop timeout="120"/>
<restart timeout="720" retry="2"/>
<port id="default-web-site" range="12501-12600" protocol="ajp"/>
<port id="rmi" range="12401-12500"/>
<port id="rmis" range="12701-12800"/>
<port id="jms" range="12601-12700"/>
<process-set id="default_group" numprocs="1"/>
</process-type>


2) Restart the instance and now you should see the outputs from any System.out outputs in the new file.

The location of the files are little strange. You will find them under %ORACLE_HOME%\j2ee\home\%INSTANCE_NAME%_default_group_1.