Kavin's SOA Blog

June 18, 2009

Error: Cannot load page due to truncated or corrupt class

Filed under: Debugging, Setup — Tags: , , , , , , — Kavin @ 12:30 pm

One of the reason for it could be some hiccup while applying patch.

I would recommend comparing ORACLE_HOME\bpel\system\services\lib\orabpel.ear file sizes in your ORACLE_HOME. In fact, you might want to go trough tedious process of making sure that all files mentioned in post.sh [or .bat] are updated correctly.

  1. Compare $ORACLE_HOME/bpel/system/services/lib/orabpel.ear with $ORACLE_HOME/j2ee/$CONTAINER/applications/orabpel.ear
  2. Delete any EAR file if present in $ORACLE_HOME/j2ee/$CONTAINER/application-deployments/ folder
  3. Check if size of $ORACLE_HOME/bpel/system/j2ee/orabpel.ear equals $PATCH_HOME/files/bpel/system/j2ee/orabpel.ear. If not then move $ORACLE_HOME/bpel/system/j2ee/orabpel.ear to backup directory and copy $PATCH_HOME/files/bpel/system/j2ee/orabpel.ear. You might need to run additional steps as per post.sh (or.bat) file.
  4. Check if size of $ORACLE_HOME/bpel/system/services/lib/orabpel.ear equals $ORACLE_HOME/j2ee/$CONTAINER/applications/orabpel.ear. if not then move $ORACLE_HOME/j2ee/$CONTAINER/applications/orabpel.ear to backup folder and copy the one from $ORACLE_HOME/bpel/system/services/lib/orabpel.ear
  5. Repeat same process for hw_services.ear and other files in post.sh (or.bat) file.

May 28, 2009

Unable to login to BPEL or ESB Console after unsuccessful login

After providing invalid credentials at BPEL Console, BPEL Admin Console, or ESB Control, if valid credentials are entered, then every attempt to log in will result in the "Authentication Failed" error message.

Reason is that the OC4J instance uses the parameter  ‘-Doc4j.formauth.redirect=true’, and OC4J does not redirect correctly.  This invalid redirection prevents BPEL and ESB from being redirected to the correct page after a successful login attempt if there was a failed login attempt.

Workaround is you take login_error.jsp off from URL http://<host>:<port>/BPELConsole/login_error.jsp, So your URL would look like http://<host>:<port>/BPELConsole/. This will automatically log you in. Since the problem was with redirection and not with your credentials

Fix is to apply patch 7202167 from metalink. 

May 19, 2009

oc4jadmin password change in SOA Suite

The administrator password for each OC4J instance in the Cluster must be the same as the administrator password for the OC4J instance on which Application Server Control is running. So if you have something like home which is your admin instance and than you  have oc4j_soa, oc4j_wsm, oc4j_gtwy and you have to change password of oc4jadmin then you have to perform following steps.

  1. Change oc4jadmin password for admin oc4j in cluster. 
    • Simply log in using the oc4jadmin user name and password, and then click Setup.
  2. On each node and oc4j edit ORACLE_HOME/j2ee/oc4j_instance_name/config/system-jazn-data.xml to update oc4jadmin password
<user>
     <name>oc4jadmin</name>
     <display-name>OC4J Administrator</display-name>
     <guid>41A2E560C96711DABFD08D3BF8B780C4</guid>
     <description>OC4J Administrator</description>
     <credentials>{903}4nlfYYDwaqMJipVbGXuS2ce8egfwBPqp</credentials>
</user>
Modify credentials to say password123. Please remember to put ! as the exclamation point (!) ensures that the password will be encrypted in the configuration file.
<credentials>!password123</credentials>

Node:There is another approach of modifying with EM console where you go to Cluster Topology > <remote_oc4j> > Administration > Security Providers > Instance Level Security > Realms > click the number in the Users column. Click oc4jadmin and modify password. Return to the Cluster Topology page and restart the remote OC4J instance.

May 14, 2009

SOA Suite Log File Rotation

Filed under: Configuration, Maintenance, Setup — Tags: , , , — Kavin @ 5:41 pm

In <ORACLE_HOME>/opmn/conf/opmn.xml, apply the following changes for each OC4J you want to modify log file settings

  • Add -Dstdstream.filesize=FILE_SIZE_IN_MB -Dstdstream.filenumber=TOTAL_NO_OF_FILES parameters in the <java-options>. For example, if you want to limit log file size to 10MB and total number of files to be created to 10 than add

-Dstdstream.filesize=10 -Dstdstream.filenumber=10

  • Add -out and -err parameters to the <oc4j-options> to specify standard output and standard error log files.

-out $ORACLE_HOME/opmn/logs/soa_log.out -err $ORACLE_HOME/opmn/logs/soa_log.err

Apply the changes and restart OC4J. If you are just restarting OC4J make sure to reload opmn before restarting.

After restart you should be able to see log files soa_log_YYYY_MM_DD_HH_MI_SS.out and  soa_log_YYYY_MM_DD_HH_MI_SS.err created under $ORACLE_HOME/opmn/logs/<oc4j_name>_<group_name>_<jvm_id> folder.

How To Control The Size Of The BPEL domain.log File

1.  Logon to your server and navigate to directory BPEL_HOME/domains/<domain name>/config.

2.  Make a backup copy of the log4j-config.xml file.

3.  Open the log4j-config.xml file for edit.

4.  Change the appender class from com.collaxa.cube.util.CXRollingFileAppender to org.apache.log4j.RollingFileAppender.

5.  Add the property MaxFileSize:

<param value="10MB" name="MaxFileSize" />

Here, a maximum file size of 10MB is specified, but you can make it whatever value suits your environment.  The top of the log4j-config.xml file now looks like:

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender class="com.collaxa.cube.util.CXRollingFileAppender" name="A1">
<param value="true" name="ImmediateFlush" />
<param value="false" name="Append" />
<param value="C:/oracle/ora10g/soasuite/bpel/domains/default/logs/domain.log" name="File" />
<param value="10" name="MaxBackupIndex" />
<param value="10MB" name="MaxFileSize"/>
<layout class="org.apache.log4j.PatternLayout">

6.  Save the file, and restart the BPEL container.

Please note that these changes will be carried forward to any new domain that you create.  If you have already created domains in addition to default, you will need to change the log4j-config.xml file for each of these domains to limit the size of those log files.

Older Posts »

Theme: Shocking Blue Green. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.