Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Wednesday, May 26, 2010

vi line too long error

Most of the times while viewing big log files in vi editor, you would get "Line too Long" error. A simple solution to this problem is to use the fold command:

fold -80 yourfile.log > folded.log

What code is called by DBUA

We have standardized on DBUA for all our upgrades and do not use the manual upgrade process. Manual upgrade process is preferred by DBAs for the amount of control it gives them. However, manual is prone to more human errors. As per My Oracle Support Article ID 870814.1, when you start an upgrade through DBUA it performs the following checks:

=> Invalid user accounts or roles
=> Invalid data types or invalid objects
=> De-supported character sets
=> Adequate resources, including rollback segments, tablespaces, and free disk space
=> Missing SQL scripts needed for the upgrade
=> Listener running (if Oracle Enterprise Manager Database Control upgrade or configuration is requested)
=> Oracle Database software linked with Database Vault option. If Database Vault is enabled, then DBUA will return an error asking you to disable Database Vault prior to upgrade. See "Disable Oracle Database Vault"
=> Stale optimizer statistics
=> Time zone file versions
=> Enterprise Manager Database control Repository exists in the database or not

However, when DBUA gets stuck or reports errors in its pretty face GUI, we do not know what has gone wrong. If you upgrade to 11g the DBUA logs are present in $ORACLE_BASE/cfgtoollogs/dbua. But the logs do not really tell you what scripts were called. So I decided to check what's in dbua.

cd $ORACLE_HOME/bin
file dbua
dbua: executable shell script

I opened dbua in vi and towards the end it has:

CLASSPATH=$DBMA_CLASSPATH:$JRE_CLASSPATH:$EWT_CLASSPATH:$SWING_CLASSPATH:$SHARE_
CLASSPATH:$GDK_CLASSPATH:$ASSISTANTS_COMMON_CLASSPATH:$HELP_CLASSPATH:$ICE_BROWS
ER_CLASSPATH:$NETCFG_CLASSPATH:$I18_CLASSPATH:$XMLPARSER_CLASSPATH:$JDBC_CLASSPA
TH:$SRVM_CLASSPATH:$EM_CLASSPATH:$INSTALLER_CLASSPATH

#run dbma
$JRE_DIR/bin/java $JRE_OPTION $IBM_STREAM_NIO -Dsun.java2d.font.DisableAlgorithm
icStyles=true $INSTALL_LIB_LOCATION -DORACLE_HOME=$OH -mx128m -classpath $CLASS
PATH oracle.sysman.assistants.dbma.Dbma $*

So it calls a java class oracle.sysman.assistants.dbma.Dbma

All the code that is being called seems to be inside $ORACLE_HOME/assistants/dbua

There's a file called mep.cfg in this directory, which has the minimum values for init.ora parameters, obsolete parameter list, changed parameter list etc.

There is a file called dbma.jar in /gpsatc10/oracle/11.2.0/assistants/dbua/jlib

This jar file has all the code which is called by DBUA. These are java classes. I downloaded the jar file and unzipped it on my PC. However class files are binary in nature and you can't really see all the code. I'll try to map the information in the log file with the java classes and update this article in future.

Thursday, April 29, 2010

Open docx, xlsx, pptx formats in MS Office 2000 - 2003

How to open docx, xlsx, pptx files in MS Office 2000 ? This was a question posed by Anand. A few google search revealed Microsoft Office Compatibility Pack.

By installing the Compatibility Pack in addition to Microsoft Office 2000, Office XP, or Office 2003, you will be able to open, edit, and save files using the file formats in newer versions of Word, Excel, and PowerPoint . The Compatibility Pack can also be used in conjunction with the Microsoft Office Word Viewer 2003, Excel Viewer 2003, and PowerPoint Viewer 2003 to view files saved in these new formats.

Wednesday, April 21, 2010

java.security.cert.CertificateException: sun.security.pkcs.ParsingException: ObjectIdentifier() -- data isn't an object ID (tag = 48)

Sameer had reported this error whenever he tried to use any web application which used Sun JRE:

Java Plug-in 1.6.0_19
Using JRE version 1.6.0_19-b04 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\MyUser
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to
----------------------------------------------------


java.security.cert.CertificateException: sun.security.pkcs.ParsingException: ObjectIdentifier() -- data isn't an object ID (tag = 48)
at sun.security.provider.X509Factory.engineGenerateCertificates(Unknown Source)
at java.security.cert.CertificateFactory.generateCertificates(Unknown Source)
at com.sun.deploy.security.WIExplorerCertStore.generateCertificate(Unknown Source)
at com.sun.deploy.security.WIExplorerCertStore.loadCertificates(Native Method)
at com.sun.deploy.security.WIExplorerCertStore.load(Unknown Source)
at com.sun.deploy.security.WIExplorerCertStore.load(Unknown Source)
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.isTrustedByTrustDecider(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.getTrustedCodeSources(Unknown Source)
at com.sun.deploy.security.CPCallbackHandler$ParentCallback.strategy(Unknown Source)
at com.sun.deploy.security.CPCallbackHandler$ParentCallback.openClassPathElement(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$700(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: sun.security.pkcs.ParsingException: ObjectIdentifier() -- data isn't an object ID (tag = 48)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
at sun.security.pkcs.PKCS7.(Unknown Source)
at sun.security.provider.X509Factory.parseX509orPKCS7Cert(Unknown Source)
... 33 more
Caused by: java.io.IOException: ObjectIdentifier() -- data isn't an object ID (tag = 48)
at sun.security.util.ObjectIdentifier.(Unknown Source)
at sun.security.util.DerInputStream.getOID(Unknown Source)
at sun.security.pkcs.ContentInfo.(Unknown Source)
at sun.security.pkcs.PKCS7.parse(Unknown Source)
... 36 more
java.lang.reflect.InvocationTargetException
at com.sun.deploy.util.DeployAWTUtil.invokeAndWait(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.runOnEDT(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.SecurityException: trusted loader attempted to load sandboxed resource from http://ovoupmom.admin.net.ge.com:8180/OVPM/client/tsc.jar
at com.sun.deploy.security.CPCallbackHandler$ParentCallback.check(Unknown Source)
at com.sun.deploy.security.CPCallbackHandler$ParentCallback.access$1400(Unknown Source)
at com.sun.deploy.security.CPCallbackHandler$ChildElement.checkResource(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.checkResource(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.defineClassHelper(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.access$100(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$12.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception: java.lang.reflect.InvocationTargetException

Today I finally nailed it. At first we thought it was due to IE8. So we reinstalled IE8. The error remained. Then I saw that Sameer had Sun JRE 1.6.0_19. We already know of issues of E-Business Suite with versions 18, 19 and 20. So I got that uninstalled. We kept the version 1.6.0_15. The error did not appear again and the applications using Sun JRE started working again.

What really happens when you enable maintenance mode before applying patches

Maintenance Mode was introduced in AD.I patchset. Here's what the readme of AD.I (Article ID: 233044.1):

Maintenance mode provides a clear separation between normal runtime operation of Oracle Applications and system downtime for maintenance. Enabling the maintenance mode feature shuts down the Workflow Business Events System and sets up function security so that no Oracle Applications functions are available to users. Used only during AutoPatch sessions, maintenance mode ensures optimal performance and reduces downtime when applying a patch. For more information, refer to Preparing your System for Patching in Oracle Applications Maintenance Utilities.

You may also refer to Article ID 291901.1, which has more information about Maintenance Mode.

Interestingly R12 has some additional steps to enable maintenance mode. Plese refer to Article ID 558274.1: Instructions for configuring maintenance mode for R12.

Wednesday, April 7, 2010

Replacement for ftp to updates.oracle.com

Ever since Metalink was decommissioned, Oracle also decommissioned the ftp site updates.oracle.com. Since then many DBAs have asked me how to download patches directly on the server.

Oracle has mentioned in Article ID 468460.1:

It is possible to download Oracle software directly to the local machine.

----->It is possible only by using a web browser (like Firefox or Internet Explorer).

----->It is not possible to use FTP, because Oracle does not provide software via FTP.

----->It is not possible to use wget, because downloading software requires a browser that accepts cookies.

In summary, downloading Oracle software directly to the local machine is possible only through a web browser.

I had devised a way to use wget which used to work fine with old metalink but doesn’t work properly with the new My Oracle Support.

You can use Firefox or Opera installed on your Unix server to download patches. Here are the steps to use Opera to download patches.

Set DISPLAY to your vnc port

opera &

Click on Tools > Preferences > Advanced > Network > Proxy Servers button

Enter the values for your proxy server.

I have found that Opera is unable to launch flash on Solaris 10, even after installing flash player on unix. So here's how you do it without flash:

Go to site: http://supporthtml.oracle.com

Login with your “My Oracle Support” username and password.

Once you login, type this in the address bar:

https://updates.oracle.com/Orion/SimpleSearch/get_form?email=vikramdas@justanexample.com&userid=O-vikramdas@justanexample.com&

Replace vikramdas@justanexample.com with your email/My Oracle Support userid

You’ll get the patch search page from where you can search and download patches.