Tag Archives: JVM

Installing JRockit on Ubuntu

This post will show you how to install JRockit on Ubuntu 11.04. In later posts this will be used to run both WebLogic Server and Oracle Service Bus (OSB).

First download the installer from the JRockit download page. Make sure that the .bin file is executable. You can use chmod +x filename to make the file executable.

The installation guide for JRockit can be obtained from the JRockit Documentation page.

  • Start the installer: ./jrockit-jdk1.6.0_24-R28.1.3-4.0.1-linux-x64.bin from the directory you download it or copied it to. Extracting can take some time.
  • Click Next on the Welcome screen.
  • Choose the product installation directory eg /oracle/jrockit-jdk1.6.0_24 and click Next
  • Check optional components if you need them and click Next
  • Watch the progress bar 😉
  • The installation is complete so press Done.

The screenshots of the installation process are in this gallery:

JDeveloper on 64-bit Windows7

For a lot of us the migration to Windows7 will be the first time we get easy access to a 64-bit desktop OS. One of the first things after an upgrade like that is to get your tools, like in my case JDeveloper, working again. First step is to download the jdevinstall jar, and the Sun JDK. The installation worked fine:

1
java -jar jdevstudio11112install.jar

Running JDeveloper on 64-bit JVM

Running JDeveloper with the 64-bit JVM resulted in an error:

1
2
3
Unable TO launch the Java Virtual Machine  
located at path:  
C:\Java\jdk1.6.0_18\jre\bin\server\jvm.dll

A solution is to use the 32-bit JVM. To do this change the SetJavaHome in thejdev.conf that is located in the {JDEV_HOME}\jdev\bin\jdev.conf.

1
SetJavaHome C:\Java\jdk1.6.0_18_x86

Where the jdk1.6.0_18_x86 is a 32-bits JVM version.

Unable to create an instance on the Java Virtual Machine

After installing JDeveloper 11G successfully, we encountered the following error while starting JDeveloper:

Unable to create an instance on the Java Virtual Machine located on c:\jdeveloper11g\Middleware\jdk160_05\jre\bin\client\jvm.dll

Virtual Memory settings
Using Google and Oracle Support showed us that the virtual memory for the PC was not set to level that allowed the JVM to initialise.
The solution is to increase the virtual memory or swap area. To do this on Vista:
My Computer > Properties > Advanced System Settings > tab Advanced > Performance - Settings > tab Advanced > Virtual memory - Change

Tuning AQ for Oracle ESB

If you are using AQ within Oracle ESB there might be a point in time you want to tune AQ performance. In this post you’ll find the results of Metalink research, and our experience on a production system.

Queue compatibility

When creating the ORAESB schema (in version 10.1.3.3) using the script $ORACLE_HOME/integration/esb/sql/oracle/create_esb_topics.sql, the queues are created with 8.1 compatibility. This is solved in 10.1.3.4. To alter this find the statement

1
2
3
4
5
6
dbms_aqadm.create_queue_table
    ( Queue_table => qtablename
    , Queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE'
    , multiple_consumers => TRUE
    , compatible => '8.1'
    );

and change this to:

1
2
3
4
5
6
dbms_aqadm.create_queue_table
    ( Queue_table => qtablename
    , Queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE'
    , multiple_consumers => TRUE
    , compatible => '10.2'
    );

if you already created the queues, use this statement:

1
2
3
4
dbms_aqadm.migrate_queue_table
    ( queue_table => 'ESB_JAVA_DEFERRED'
    , compatible => '10.2'
    );

If you’re not sure check the compatibility with this query:

1
2
3
4
5
6
SELECT queue_table
,      compatible
,      recipients
FROM   dba_QUEUE_tables
WHERE  owner = 'ORAESB'
;

Streams pool size

Verify the current stream_pool_size using the following query:

1
2
3
4
5
6
7
SELECT component
,      current_size/1024/1024 "CURRENT_SIZE"
,      min_size/1024/1024 "MIN_SIZE"
,      user_specified_size/1024/1024 "USER_SPECIFIED_SIZE"
,      last_oper_type "TYPE" 
FROM   v$sga_dynamic_components
;

look for the streams pool. There are several Metalink notes on this setting (including 316889.1, 102926.1 and 335516.1). The latter has a general recommandetion per RDBMS version:

  • 11g: set STREAMS_POOL_SIZE to be greater or equal to 100 MB;
  • 10gR2: set SGA_TARGET > 0 and STREAMS_POOL_SIZE=0 to enable autotuning of the Streams pool;
  • 10gR1: use the STREAMS_POOL_SIZE init.ora parameter to configure the Streams memory allocation;

And of course you could use V$STREAMS_POOL_ADVICE to get advice for your specific situation.

Upgrade the JDK

A described here upgrading the JDK can also give a performance boost.

Change the JDK for Oracle Application Server 10g EE

This post describes how to change the JDK for an Oracle Application Server 10.1.3.x installation. To check which JDK versions are supported with Application Server releases, check Metalink note 258833.1.

  1. Stop all running Application Server processess.
  2. Rename the current JDK directory:
  3. 1
    2
    
    cd $ORACLE_HOME
    mv jdk jdk.old
  4. Install or copy the JDK version you need into $ORACLE_HOME/jdk
  5. Start the Application Server processess.
    1. You can check the JDK version:

      1
      
      $ /jdk/bin>./java -version

      AIX 5L specials

      If your systems are running AIX 5L there is some patching to be done. Assuming you’re using JDK 1.5 you have to apply patch 5261515.

      After upgrading to a IBM JDK it is very well possible to run into the JAVAX.NET.SSL.SSLKEYEXCEPTION:RSA PREMASTER SECRET ERROR. In that case you have to modify the $ORACLE_HOM/jdk/jre/lib/security/java.security to

      1
      2
      3
      4
      5
      
      security.provider.1=com.ibm.jsse2.IBMJSSEProvider2
      security.provider.2=com.ibm.crypto.provider.IBMJCE
      security.provider.3=com.ibm.security.jgss.IBMJGSSProvider
      security.provider.4=com.ibm.security.cert.IBMCertPath
      security.provider.5=com.ibm.security.sasl.IBMSASL

      and create a symbolic link (or copy the jar) from the directory $ORACLE_HOME/jre/lib/ext/ibmjsseprovider2.jar to $ORACLE_HOME/jdk/jre/lib/ibmjsseprovider2.jar as described in Metalink note 746423.1.

Oracle ESB using AQ on AIX – performance boost

One of the projects I’m involved in, uses Oracle ESB (from SOA Suite 10.1.3.3 MLR 18) running on AIX 5.3. Instead of using the default in-memory JMS the ESB is configured to use Oracle Advanced Queueing (AQ). Although there were tuning efforts before, the performance wasn’t up to par. AQ seemed to be the bottleneck, especially the dequeueing part. During the day we saw the number of messages queue up. Generally these numbers would decrease after business hours. This should have been a big problem if the number of messages wasn’t going to be tripled or quadrupled in the next month(s).

Upgrade the JVM

Previous attempts in cooperation with Oracle Consulting hadn’t done the trick, yet. To get a fresh view and some out-of-the-box thinking Marc joined the team. He performed a scan of the systems settings. Researching Oracle’s knowledge system resulted (searching on AIX & ESB & DB Adapter) in the clue to upgrade the JVM (6848406 – SLOW PERFORMANCE ON AIX ESB USING FILE AND DB ADAPTER). Although we were skeptic at first, because why tried a similar path before, we decided to give it a shot. The previous attempt resulted in errors in our code without enhancing the performance of the system.
With the AIX system a Java 5 is delivered in /usr/java5, to be more precise:

1
2
3
4
5
6
7
8
$:/jdk/bin>./java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pap32dev-20080315 (SR7))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 AIX ppc-32 j9vmap3223-20080315 (JIT enabled)
J9VM - 20080314_17962_bHdSMr
JIT  - 20080130_0718ifx2_r8
GC   - 200802_08)
JCL  - 20080314

To change this stop the SOA Suite and:

1
2
3
cd $ORACLE_HOME
mv jdk jdk.orginal           # rename jdk directory
ln –s /usr/java5 jdk         # Creates symbolic link

and the start the SOA Suite. With this newer Java version we had a significant performance improvement.

Remaining issue

If the change is performed as described above Enterprise Manager doesn’t allow you to browse the oc4j_soa anymore. This will result in the following error message:

Unable to make a connection to OC4J instance oc4j_soa on Application Server someserver.local. A common cause for this failure is an authentication error. The administrator password for each OC4J instance in the Cluster must be the same as the administrator password for the OC4J instance on which Application Server Control is running.

This can be solved by applying the patch for base bug 5261515. The patch adds some security jars and properties that are not in the AIX Java5 version.
Since this patch introduces issues in our code, we are working around the Em problems for now, while trying to resolve the issue.

Oracle gets Sun Microsystems (and MySQL for free)

Not to long ago Oracle tried to acquire MySQL, and Sun got away with the prize. Few years earlier, actually in 2005, Oracle acquired InnoDB. This was seen as an effort to lower the valuation of MySQL by removing one of it´s primary storage engines. Which (under the assumption that the valuation of Sun wasn´t raised to much after they got MySQL) succeeded in the end, since they got MySQL in the package.
Anyway for MySQL adapts the good news is that MySQL probably will stay open source according to a founding developer of WordPress.

Questions

As with any merger a lot of questions will be raised that can be answered in the following months (or years). Will Oracle continue with multiple JVMs? Both acquisition of BEA and Sun brought one into the company.
Same goes for application servers… Oracle had one, bought one with BEA, and one with Sun. Oracle favored WebLogic over OC4J. But will Glassfish remain in the portfolio?

However most worrying point for Oracle´s customers will be how this will effect release dates of (long) promised features, and bug fixes. Just like the integration effort after the acquisition of BEA is doing right now…

And what has MS got to do with it…

Did I already mention that Oracle now has also acquired Open Office. This means that these two rivals have created a new field to play the battle of giants.

Update June 8th, 2009 Sun´s special stockholder meeting to vote on the adoption of the merger agreement is scheduled for July 16, 2009.