Thursday, November 19, 2015

"Unable to launch The Java Virtual Machine Located at path: C:\jdev11.1.2.4\jdk160_24\bin\msvcr71.dll" Error starting JDeveloper

If you try to open JDev64.exe (located in C:\JDev11124\jdeveloper\jdev\bin) in Windows 7 64 bit machine, you might run into the following error:

Unable to launch The Java Virtual Machine Located at path: C:\jdev11.1.2.4\jdk160_24\bin\msvcr71.dll

This is an issue related to the JDK used in JDeveloper 11.1.2.
You installed JDeveloper in 64 bit machine. When you try to start the jdev64.exe, you run intio the above error since the JDK that comes with JDeveloper is 32 bit. That is why the jdev.exe starts fine and not jdev64.exe.

To resolve the above issue:

1. Rename the jdk located in JDev11124_Home\jdk160_24
    to JDev11124_Home\jdk160_24_Orig

2. Download jdk 1.6.0_24 64 bit version ( jdk-6u24-windows-x64.exe)

3. If you jave jdeveloper in this location for example, c:\jdev11124, then install jdk 64 bit here:
    c:\jdev11124\jdk160_24

4. Now you should be able to start jdev64.exe

Wednesday, October 7, 2015

Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now? Warning in Excel


When you export data to Excel and you try to open it with Excel 2007 and later, you will get the following warning:

The file you are trying to open 'TestData.xls', is in a different format than specified by the
file extension. Verify that the file is not corrupted and is from a trusted source before
opening the file. Do you want to open the file now?

If you click on Yes, the file opens and display the right data. But this warning is annoying to the user and can sometimes be misleading

This is an issue with Excel itself. Follow these steps to fix it:

1- Open your Registry (Start -> Run -> regedit.exe)
2- Navigate to HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\OFFICE\12.0\EXCEL\SECURITY
3- Right click in the right window and choose New -> DWORD
4- Type “ExtensionHardening” as the name (without the quotes)
5- Verify that the data has the value “0″ 

There is another way to do the same fix:
http://support.microsoft.com/kb/948615

Tuesday, October 6, 2015

How to change Screen Resolution for Virtual Box running Mac Virtual Machine

1. Click on Finder --> Preferences --> Sidebar
   then check Hard disks

2. Open the Hard disk and navigate to Extra folder.
Add the following lines to org.chameleon.Boot.plist file and save it

<key>Graphics Mode</key>
<string>1600x900x32</string>

3. Shutdown the OS, then the machine

4. Close Virtual Box

5. Start the command line and navigate to where you installed virtual box.

cd C:\Program Files\Oracle\VirtualBox

6. Execute the following command:

VBoxManage setextradata "Mac OS Mavericks" "CustomVideoMode1" "1600x900x32"

7. Start the Virtual Box and then Start the Virtual Machine

Thursday, September 17, 2015

Lock error when trying to install a patch in Weblogic 12c

Problem
======

When you use opatch to install a PSU update to Weblogic 12, you might run into the following error:

No read or write permission to ORACLE_HOME/.patch_storage
Central Inventory is locked by another OUI instance
No read permission to Central Inventory
The lock file exists in ORACLE_HOME/.patch_storage
The Oracle Home does not exist in Central Inventory


Solution
=======

There are different solution to this issue depending on the cause. I am going to mention the solution that is related to the permission cause.

If you happen to use Windows machine, try to start the command line where you will run the opatch command as administrator.

Let's take an example installing PSU4 on WLS 12.1.3

Extract the zip file containing patch 20838345 (this the PSY 4 patch for Weblogic 12.1.3)

Start a command prompt as administrator using this path:
Start --> All Programs --> Acessories --> Right click on Command Prompt --> Run as administrator

Set the environment in the Command Prompt session:

C:\windows\system32>set ORACLE_HOME=c:\Programs\WLS1213

C:\windows\system32>set PATH=c:\Programs\WLS1213\OPatch;%PATH%

C:\windows\system32>set JAVA_HOME=c:\Programs\WLS1213\oracle_common\jdk

Navigate to where you extracted the patch:

C:\windows\system32>cd c:\PSU4\20838345

Run the opatch command:

C:\windows\system32>opatch apply -jdk %JAVA_HOME%


How to deploy an ADF web application to a Standalone Weblogic 12.1.3

I- ADF Runtime Installation

1. Download the Application Development Runtime 12.1.3 (Oracle ADF ) from here :

2. Follow this document to install the ADF Runtime to Standalone WLS 12.1.3


a. Run WLS1213\oracle_common\bin\rcu.bat script to create the database schema
b. Run the WLS1213\oracle_common\bin\config.bat script
c. select Create a New Domain and click Next.
d. In the Templates page, select Create Domain Using Product Templates.

   The option Basic WebLogic Server Domain - 12.1.2.0 [wlserver] is already selected.

f. Select Oracle JRF - 12.1.2.0 [oracle_common]

3. Download the following sample ADF application and open the .jws workspace in JDeveloper 12.1.3.
4. Build it and run the jsp file to test it inside Jdeveloper

II-  Start Weblogic server

III - Deploying the application to Weblogic 12.1.3

1. Select the ViewController project and then Click on File --> New --> From Gallery
2. Select the Deployment profiles and chose WAR File
3. Click on OK. Give a name to your war file (webapp1) and click OK. Then click OK and another OK again to finish creating it. You do not have to access this file for now.
4. Then click top arrow box next to SampleAppModule and select Application Properties
5. Click on Deployment then on the right side click on the middle icon (page with a start) to create a new ear file. You can give it a name for example: application1 (make sure the Profile type is set to EAR)
6. Click ok.
7. Then click on Application Assembly.
8. Expand both Model.jpr and ViewController.jpr
9. In the Model.jpr check SampleApModule_Model and SampleApModule_Model_adflib
10. In the ViewController.jpr, check the webapp1 (the war file that was created in the first steps)
Click ok.

11. Then click top arrow box next to SampleAppModule  again and select Deploy --> application1

12. Then chose the application server and then the managed server and finish to deploy to your managed server.

13. Before you can test it, add the following line after the first occurrence of the set JAVA_PROPERTIES in setDomainEnv.bat or setDomainEnv.sh file (wls_home\user_projects\domains\yourdomain\bin)

set JAVA_PROPERTIES=%JAVA_PROPERTIES% -Djps.app.credential.overwrite.allowed=true

14. Restart the weblogic server

Note
------
If the above line is not added you will get the following error when you try to access
your app at: http://localhost:7003/SampleApp/faces/Home.jsf

oracle.jbo.DMLException: JBO-29114 ADFContext is not setup to process messages for this exception
Caused by: java.sql.SQLException: ORA-01005: null password given; logon denied

15. Now you can test using the URL:
http://localhost:7003/SampleApp/faces/Home.jsf

You need to change the localhost and port with your equivalents.