Showing posts with label Weblogic. Show all posts
Showing posts with label Weblogic. Show all posts

Tuesday, November 3, 2015

Install and Deinstall Oracle Patches use Opatch command.

Opatch (Apply Oracle Patches )

Install and Deinstall Oracle Patches use Opatch command.
(After complete this demo you will able to Apply oracle Patches on Middleware home or Jdeveloper Home)

Download patches
1-      Download your patch from Oracle Support .
             Login to Oracle Support > Patches and Updates
·         Go to search tab and write your patch number or search criteria.
·         Download your patch .






2-      Create a new folder in OS root to locate your patch , and unzip  patch file  into this folder

                                          C:\OraclePatches



             
               ------------------------------------------------------------

Pre Installation

3-      Set System environment variable ORACLE_HOME

-          Weblogic set variable to  your middleware directory (For Weblogic )

          Oracle_Home =  [MW_HOME]\ oracle_common  

-          Jdeveloper set variable to you Jdeveloper Home

        Oracle_Home =   [Jdeveloper_HOME]\jdeveloper






4-      Stop All managed servers and Admin Server before apply patch. I prefer to backup your MW_HOME directory.
                If you apply patch in Jdeveloper ,  please shutdown Integrated Weblogic  and close Jdeveloper IDE.

5-      Open cmd Command and set your current directory to directory where your patch is located .
                   
                                     cd  C:\OraclePatches\21768703\oui

6-      Use Opatch Apply command to apply current patch .
(may you will face a conflict when applying the patch ,because patch already applied before )

                       C:\OraclePatches\21768703\oui>opatch apply –Jdk [JDK path]



------------------------------------------------------------


  Post Installation
7-      For Jdeveloper: Open Jdeveloper and clean project and rebuild, then start Integrated Weblogic and run and test your application after patch and check problem is resolved .
8-       For standalone Weblogic server : start Admin Server , then start node manager , then start Managed Server . and check your Problem is resolved .
      
          ------------------------------------------------------------


List Patches installed in your Oracle_Home
   
             to list all patches installed in your Oeracle_Home 

                  Open cmd command and write command
   
                                 /> Opatch lsinventory





------------------------------------------------------------


Deinstall patch  

1-      Stop All managed servers and Admin Server before apply patch . If you apply patch in Jdeveloper ,  please shutdown Integrated Weblogic  and close Jdeveloper IDE.

2-      Open cmd Command and set your current directory to directory where your patch is located .

cd  C:\OraclePatches\21768703\oui

3-      Use Opatch rollback  command to deinstall current patch .

C:\OraclePatches\21768703\oui>opatch rollback –Jdk [JDK path]

4-      Clean you all files in tmp folder in OS User Directory

Jdeveloper  :
  [JDEV_USER_DIR]\DefaultDomain\servers\DefaultServer\tmp\*


Middleware:
  [MW_HOME]/user_projects/domains/[DOMAIN_NAME]/servers/[SERVER NAME]/tmp/*

               ------------------------------------------------------------

Post DeInstallation
1-      For Jdeveloper: Open Jdeveloper and clean project and rebuild, then start Integrated Weblogic and run and test your application after patch and check problem is resolved .
2-       For standalone Weblogic server : start Admin Server , then start node manager , then start Managed Server . and check your Problem is resolved .





Sunday, November 1, 2015

Weblogic does not start ,throw Exception: java.lang.NumberFormatException BEA-000386


Weblogic does not start and throw an exception: java.lang.NumberFormatException
    <Critical> <WebLogicServer> <BEA-000386>

When i tried to start Weblogic Server , server did not work , and gave me an exception java.lang.NumberFormatException= null


<01/11/2015 6:17:36 AM UTC> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to /u02/Oracle/user_projects/domains/mcitucm_domain/servers/AdminServer/logs/AdminServer.log42150. Log messages will continue to be logged in /u02/Oracle/user_projects/domains/mcitucm_domain/servers/AdminServer/logs/AdminServer.log.>
<01/11/2015 6:17:36 AM UTC> <Notice> <Log Management> <BEA-170019> <The server log file /u02/Oracle/user_projects/domains/mcitucm_domain/servers/AdminServer/logs/AdminServer.log is opened. All server side log events will be written to this file.>
<01/11/2015 6:17:38 AM UTC> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: java.lang.NumberFormatException: null
java.lang.NumberFormatException: null
        at java.lang.Integer.parseInt(Integer.java:417)
        at java.lang.Integer.parseInt(Integer.java:499)
        at weblogic.ldap.EmbeddedLDAP.validateVDEDirectories(EmbeddedLDAP.java:1104)
        at weblogic.ldap.EmbeddedLDAP.start(EmbeddedLDAP.java:242)
        at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
        Truncated. see log file for complete stacktrace
>
<01/11/2015 6:17:38 AM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>
<01/11/2015 6:17:38 AM UTC> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down>
<01/11/2015 6:17:38 AM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
 This problem may happen because i changed some server configurations when server running and made a corruption if file replicas.prop in the server .
Solution  : Remove this corrupted file , and let Weblogic auto generate this file again when server restart .
1- Open your server which weblogic installed.
2- go to this path
$<YourDomain>/servers/AdminServer/data/ldap/conf



3- rename this file replicas.prop to old-replicas.prop
4- restart  Weblogic server .
5- Smile every thing is Okay now ....

O racle  SQL WITH Clause         subquery factoring     or         Materializing   subqueries                                 (Sim...