Wednesday 6 January 2021

ERROR: Invalid java version found: /u01/app/oratest/product/12.1.0.2/dbhome_1/appsutil/jre/bin/java: cannot execute binary file


This post describes how to resolve  error "ERROR: Invalid java version found:" while creating DB node context file in R12.X


Let us assume we have restored and recovered database as part of cloning in new build. We want to generate context file. 

 

Issue: Getting below error while generating DB context file using adbldxml.pl. 

[oratest@apps bin]$ perl adbldxml.pl appsuser=apps appspass=xxxxxxx

Starting context file generation for db tier..

ERROR: Invalid java version found: /u01/app/oratest/product/12.1.0.2/dbhome_1/appsutil/jre/bin/java: /u01/app/oratest/product/12.1.0.2/dbhome_1/appsutil/jre/bin/java: cannot execute binary file


Solution:

[oratest@apps bin]$ which java                             
/usr/bin/java 

Note: If the environment is new build and could not find java, then get java installed in the server and follow next steps.

[oratest@apps bin]$ ls -ltr /usr/bin/java
lrwxrwxrwx 1 root root 22 May 27  2019 /usr/bin/java -> /etc/alternatives/java

[oratest@apps bin]$ ls -ltr /etc/alternatives/java
lrwxrwxrwx 1 root root 41 May 27  2019 /etc/alternatives/java -> /usr/java/jdk1.8.0_191-amd64/jre/bin/java
[oratest@apps bin]$

Use below command to fix the issue.

[oratest@apps bin]$ perl adbldxml.pl appsuser=apps appspass=xxxxxxxx jtop=/usr/java/jdk1.8.0_191-amd64/jre


This action plan fixes the issue.



Thanks for going through the post...............

No comments:

Post a Comment