Search This Blog

Wednesday, 26 December 2007

10.1.3.1 OPMN OC4J Log Files No Longer Displayed in ASC Log Files Screen

When using ASC (Application Server Console) in 10.1.3.0 you could view the OPMN OC4J log files in the screen "Log Files". Starting with 10.1.3.1 and above those log files no longer appear in ASC. This is due to a bug which should be fixed soon via a patchset for OAS, but for now you can easily re-enable this by following these steps.

1. Open the following file in a text editor.

$ORACLE_HOME\j2ee\home\applications\ascontrol\ascontrol\WEB-INF\config\registration\OPMN.xml

2. Make the following changes.

- Go to line 105 and make the change as outlined below.

<log path="'opmn/logs/HTTP_Server~1'" componentid="'OHS'">

to

<log path="'opmn/logs/HTTP_Server~1.log' componentId='OHS'>

- Go to to line 116 and make the change as outlined below.

<log
path='opmn/logs/%COMPONENT_TYPE%~%COMPONENT_NAME%~%OPMN_PROCESS_SET%~%OPMN_PROCESS_ID%'
componentId='OPMN'>

to

<log
path='opmn/logs/%COMPONENT_TYPE%~%COMPONENT_NAME%~%OPMN_PROCESS_SET%~%OPMN_PROCESS_ID%.log'
componentId='OPMN'>


3. Save the file and restart the instance where ASC is running which is normally HOME.

Now log in ASC and when you go to the "Log Files" screen the OPMN OC4J log files will be shown under the following tree items.

- OPMN
- Process Manager
- redirected output/errors

Monday, 17 December 2007

admin_client.jar giving standard "Could not get DeploymentManager" error.

There are a few blogs on what to check if your failing to use admin_client.jar to connect to an OPMN managed OC4J instance within OAS 10.1.3.x. For example the OPMN remote port is the first thing you check as outlined in steve's blog entry below.

http://buttso.blogspot.com/2006/11/tip-on-deploying-to-oracle-application.html

The problem with this error can be a number of different things, the opmn remote port is one of them but here is a few others
  • Invalid connection uri
  • Invalid username or password
The most tricky to diagnose is the invalid username/password , his what happens when you provide an invalid password which you are certain is correct and it's not the password

D:\jdev\oas-admin-distribution\10132\j2ee\home>java -jar admin_client.jar deployer:oc4j:opmn://papic
ell-au2.au.oracle.com:6007/home oc4jadmin invalidpassword -validateURI

Failed at "Could not get DeploymentManager".

This is typically the result of an invalid deployer URI format being supplied, the target server not
being in a started state or incorrect authentication details being supplied.

So by turning on logging we can get more information as to what is the real issue, which we do as follows.

1. Create a file called logging.properties with a single line as follows :

oracle.oc4j.admin.jmx.client.CoreRemoteMBeanServer.level=FINEST

2. Set -Djava.util.logging.config.file=logging.properties on the admin_client.jar command line as follows, and you get more detailed information which clearly shows you that the username/password you provided is the reason for the failure as shown below:

D:\jdev\oas-admin-distribution\10132\j2ee\home>java -Djava.util.logging.config.file=logging.properti
es -jar admin_client.jar deployer:oc4j:opmn://papicell-au2.au.oracle.com:6007/home oc4jadmin invalid
password -validateURI
FINE: CoreRemoteMBeanServer.fetchMBeanServerEjbRemote Getting remote RMI context for domain: opmn-ho
me+oc4j-papicell-au2.au.oracle.com-6007-default
FINE: CoreRemoteMBeanServer.fetchMBeanServerEjbRemote CoreRemoteMBeanServer url: ormi://papicell-au2
.au.oracle.com:12402/default
SEVERE: CoreRemoteMBeanServer.fetchMBeanServerEjbRemote Error reading application-client descriptor:
Error communicating with server: Lookup error: javax.naming.AuthenticationException: Not authorized
; nested exception is:
javax.naming.AuthenticationException: Not authorized; nested exception is:
javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException: Not author
ized; nested exception is:
javax.naming.AuthenticationException: Not authorized [Root exception is javax.naming.Authent
icationException: Not authorized] for URL: ormi://papicell-au2.au.oracle.com:12402/defaultjavax.nami
ng.NamingException: Error reading application-client descriptor: Error communicating with server: Lo
okup error: javax.naming.AuthenticationException: Not authorized; nested exception is:
javax.naming.AuthenticationException: Not authorized; nested exception is:
javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException: Not author
ized; nested exception is:
javax.naming.AuthenticationException: Not authorized [Root exception is javax.naming.Authent
icationException: Not authorized] [Root exception is java.lang.InstantiationException: Error communi
cating with server: Lookup error: javax.naming.AuthenticationException: Not authorized; nested excep
tion is:


Sometimes turning on logging is the only way your going to know exactly why it's failing.

Tuesday, 4 December 2007

Stand Alone OC4J 10.1.3.3 fails to start on solaris

On Solaris after downloading stand alone OC4J 10.1.3.3 and trying to start it the following error occurs and you can't start OC4J.
Error instantiating application at file ...META-INF/application.xml
The problem can be avoided by adding the following command line option when starting OC4J stand alone.
-Doc4j.autoUnpackLockCount=-1