Migration Guide
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
While the process of switching to WebLogic JRockit 8.1 JVM from another JVM is relatively easy and generally problem-free, you might encounter some known issues while or after making this switch. This section describes some of those issues and describes some simple workarounds. The issues that might occur are:
I cannot get my favorite Java application to run on WebLogic JRockit. What am I doing wrong?
Many problems with running applications on WebLogic JRockit is due to erroneous environment variables or non-standard startup options.
Start by ensuring that your environment variables are set up correctly. Make sure that you have set your JAVA_HOME
environment variable correctly, i.e. set to the directory where WebLogic JRockit has been installed, and that "%JAVA_HOME%\bin"
is available in your PATH
environment variable before any other directory where any version of java.exe may exist. When running applications as Windows services it is crucial that you set these environment variables system wide. To do this:
Applications are often started via scripts. Make sure that none of the startup scripts includes non-standard startup options for java. See Tuning WebLogic JRockit 8.1 JVM for complete documentation of standard and non-standard options.
Why does it take longer for my applications to start with WebLogic JRockit?
Java programs are compiled into byte code by a Java compiler. Many JVMs, including the Sun JVM, interprets this byte code each time it is executed. WebLogic JRockit, however, uses code generation technology to generate native machine code from the byte code. This is sometimes called Just-In-Time (JIT) compilation. The code generation step imposes an initial time penalty before execution. Normally, the subsequent execution of the code is faster than interpreting the byte code. WebLogic JRockit is optimized for server applications that normally run for long periods of times. The initial time penalty is normally negligible in comparison to the performance gains of code generation over time.
Why does my applications consume more memory when running on WebLogic JRockit?
The Java programming language relies on a mechanism called garbage collection (GC) to free memory when it is no longer being used. There is no equivalence to the delete
operator in the C++ programming language or the free
function in the C programming language. Any Java virtual machine must include a garbage collector that handles the task of finding unreferenced objects, possibly invoke their finalizers and free the memory used to hold their state.
The WebLogic JRockit garbage collectors are described in Selecting and Running a Memory Management System in Using WebLogic JRockit 8.1 SDK. Generally, the WebLogic JRockit garbage collection implementations trade high memory usage for speed and minimal program wide halts; that is, acquiring system wide locks.
I have a script/program that use WebLogic JRockit for certain tasks. Why is it slower than when I use the Sun JVM, HotSpot?
This might be related to the Slow-to-Start Applications above. Scripts or other programs may start many Java processes and may therefore experience bad performance compared to the Sun JVM, since WebLogic JRockit has a code generation penalty when starting up. When starting many Java processes and running them only for a short time, this penalty can become significant.
Why does my application have randomly appearing bugs when running on WebLogic JRockit that it doesn't have when running on the Sun JVM?
You may be experiencing synchronization bugs in your application. It is not uncommon that such bugs are revealed when switching JVMs. The Java Virtual machine specification and the Java language specification leaves plenty of room for optimization that may cause unsynchronized access to shared data, to cause different behavior on different JVMs.
http://java.sun.com/docs/books/jls/second_edition/html/memory.doc.html
http://java.sun.com/docs/books/vmspec/2nd-edition/html/Threads.doc.html
Why is WebLogic JRockit throwing IllegalAccessError
, ClassFormatError
, IncompatibleClassChangeError
or other LinkageError
exceptions when the Sun JVM is not?
Verification ensures that the binary representation of a class or interface is structurally correct. For example, it checks that every instruction has a valid operation code; that every branch instruction branches to the start of some other instruction, rather than into the middle of an instruction; that every method is provided with a structurally correct signature; and that every instruction obeys the type discipline of the Java programming language.
If an error occurs during verification, then an instance of the following subclass of class LinkageError
will be thrown at the point in the program that caused the class to be verified
Example: Using JTidy throws IllegalAccessError
In an early version of JTidy from Apache Software Foundation, the compiler had incorrectly inlined a reference to a private variable belonging to an outer class. This caused an exception to be thrown since WebLogic JRockit does stricter verification than the Sun JVM is. The old Tidy.jar
should be replaced with the new and correctly compiled version.
Why is WebLogic JRockit slower when WebLogic Server is running in development mode?
When WebLogic Server is started in development mode, WebLogic JRockit is by default started with the -Xdebug
option. This makes WebLogic JRockit run with some overhead.
Note: This option is purely for diagnostics use and should therefore not be used in a production type environment.
I cannot get WebLogic JRockit to run Jakarta Tomcat as a Windows service. What am I doing wrong?
The quick answer to this problem is: if you are using jk_nt_service
, do everything that you need to do for the Sun JVM, then exchange the non-standard Sun JVM -Xrs
startup option with the non-standard WebLogic JRockit -Xnohup
in the wrapper.properties
configuration file. The rest of this answer is a slightly more detailed description of this.
Many people use the jk_nt_service
windows service wrapper to run java applications; for example, Jakarta Tomcat, as a Windows service (see http://members.ozemail.com.au/~lampante/howto/tomcat/iisnt/). Independently of what Windows service you may be using you must make sure that it is not using any non-standard startup options. When using jk_nt_service
, the startup is defined in:
wrapper.tomcat_home
, wrapper.java_home
and wrapper.cmd_line
are set accordingly:wrapper.tomcat_home
must be set with the installation directory of tomcatwrapper.java_home
must be set to the same value as the JAVA_HOME
environment variable.wrapper.cmd_line
defines the startup command. At the time of writing, this property should be set to:wrapper.cmd_line=$(wrapper.javabin) -Xnohup -Djava.security.policy=="$(wrapper.tomcat_policy)" -Dtomcat.home="$(wrapper.tomcat_home)" -classpath $(wrapper.class_path) $(wrapper.startup_
Does WebLogic JRockit support the /3GB Windows startup option?
This version of WebLogic JRockit does not support the /3GB option. It will be supported in the next release. I you want to use this feature—with the understanding that it is not supported, use the Microsoft Visual Studio tool, editbin.exe
, on java.exe
to enable it.
Does WebLogic JRockit support Physical Address Extension (PAE) on Windows?
Physical Address Extension provides the possibility to map physical memory into your process virtual memory address space. At any given time, you can still have just 2 GB mapped (3 GB with the /3GB option; see Support for the /3GB Windows Startup Option for limitations of this option with this version of WebLogic JRockit); that is, you have to re-use a portion of the virtual address space to map different portions of the physical address space. Therefore you cannot simply address more memory with regular pointers. This does not work well with a normal Java heap, which uses 32-bit pointers to reference objects and needs the entire heap in the virtual address space at all times.
PAE works well with applications that can jointly control mapping and memory access. At this point this is not well suited for Java. However a native database driver might use PAE to cache data. You should discuss with the various database vendors how to make this happen (if it is not available already). You might even create a custom cache by rolling your own "DB access layer" on top of a native database API using JNI.
Other ways of using your plentiful physical memory includes using several Java processes (each Windows process can get 2 GB physical memory to use for its private address space).
If you a need a larger Java heap, you need to use a 64-bit implementation of WebLogic JRockit; that is, the IA-64 versions for Windows 2003 or Linux.
What is a Java virtual machine?
As described by the Java Virtual Machine Specification:
"The Java virtual machine is the cornerstone of the Java and Java 2 platforms. It is the component of the technology responsible for its hardware- and operating system- independence, the small size of its compiled code, and its ability to protect users from malicious programs."
What is the difference between the Sun JVM and WebLogic JRockit?
The most well know JVM is the implementation from Sun. The Sun JVM is called HotSpot. The Sun JVM is shipped in the Java Developer's Kit (JDK) and Java Runtime Environment (JRE) from Sun.
The WebLogic JRockit JVM from BEA systems is optimized for reliability and performance for server side applications. To achieve this, WebLogic JRockit uses technologies such as code generation, hot spot detection, code optimization, advanced garbage collection algorithms and tight operating system integration.
Should I write my applications differently for WebLogic JRockit?
No! You should not write your applications in any other way for WebLogic JRockit than you should for any other JVM. You should, however, design and implement your applications well in order for them to run well on WebLogic JRockit.
Should I use thin threads with BEA WebLogic Server?
We don't recommend it. Thin threads is an alternative to the traditional 1:1 thread mapping model. It may offer improved scalability and performance if used with an application with many (for example, greater than 100 threads); you may want to try this threading implementation if your application is so characterized. Please note, however, that thin threads is experimental in this release.
![]() ![]() |
![]() |
![]() |