Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic

Weblogic: Article

Migrating from WebLogic 6.1 to 8.1

Catching the fine points

BEA's name is synonymous with the application server. Most applications running on Unix in North America run on BEA's WebLogic server, particularly financial apps. The current stable WebLogic 8.1 version does a lot more than earlier versions. Migrating to new versions is always challenging and risky, but is done for efficiency and new capabilities, and to stay current with a vendor's products and support.

Most applications developed on the WebLogic 6.1 used JDK 1.3 or earlier. A move from WebLogic 6.1 to 8.1 means making our applications compatible with JDK 1.4.1 or higher since WebLogic 8.1 shipped with JDK 1.4. Most of the common migration hazards are discussed at bea.com. I am going to share few personal observations.

These will be our discussion points.

  • 6.1 to 8.1 migration, the current application scenario
  • Common upgrade issues
  • Getter and setter methods
  • Serializable objects
  • WL cache
  • Tweak JVM memory usage
  • Page directive with language attributes
  • Java.net.SocketException: Too many open files
  • Miscellaneous issues

6.1 to 8.1 Migration - The Current Application Scenario
Our application will be migrated to WebLogic 8.1. The current environment is:
Operating System: Solaris 5.8 P4
WebLogic Server 8.1P2
Java Release 1.4.2_06
Actuate 7.1SP6
Popular RDBMS and it has no impact on migration
Struts1.1 Framework
Model II Web Architecture

Common Upgrade Issues
Common issues in migrating from WebLogic 6.1 to 8.1 like class path, system path, environmental variables, data sources, deployment, JSP parsing, security, server configuration, and XML parsing are discussed in length at www.bea.com.

For example, take XML parsing. Unlike WebLogic 6.1 and earlier, WebLogic 8.1 doesn't tolerate encoding errors. So modify encoding from Unicode to utf-16.

Also there are no more JSP recompilations so the following lines have to be removed from the web.xml.




Getter and Setter Methods
Applications running under WebLogic 8.1 use JDK 1.4 or later. So when we migrate from WebLogic 6.1 to 8.1, we are obviously moving to JDK 1.4.1 or later. The later versions of JDK adhere to stricter Java specifications, which means that any improper code that may have worked well under earlier JDKs can cause errors in the JDK 1.4.1 and later.

For example, there was an error in using tag library uri='/WEB-INF/tlds/taglib.tld' prefix='j2ee': There is no setter method for property 'Items' for Tag class 'com.sun.j2ee.apps.application.taglib.list. SearchListTag' probably occurred because of an error in /template.JSP line 8: <%@ taglib uri="/WEB-INF/tlds/taglib.tld" prefix="j2ee" %>

This failure occurs in JSPs and beans that are subject to the Introspector API. One good example is getter and setter methods. If the setter is an integer, the getter must be an integer too, and can't be a string.

Serializable Objects
To support the replication of an Http session in memory, all object data have to be serializable. Otherwise session replication would fail. When debugging is enabled, WebLogic outputs a warning message indicating that the session hasn't replicated:


"Failed to replicate non-serializable object"

If this happens, find the page throwing the error and make sure that all the data put in the session is serializable. Every object stored in the session has to implement a serializable interface for replication to happen.

WL Cache
The cache always has to be removed from each node for WebLogic to pick up any revised code using scripts. (Normally there are multiple nodes in a production environment for contingency, fault tolerance, and load balancing.) The WebLogic 8.1 server cache tag has attributes such as timeout, scope, key, async, name, size, and flush. When flush is set to true, the cache is flushed. A simple cache tag is shown below:


<!--the content between these tags will only be
 refreshed on server restart-->

Using a cache tag forces the cached values to be erased every time fresh values are calculated. The cache must be named with the name attribute. The size attribute will flush all values; the key attribute will flush specific values. WebLogic 8.1 has two versions of cache and this gives us the option of using the soft references for caching to avoid excessive use of the system memory. However, we can't use soft references when WebLogic is running in the Hotspot VM.

Tweak JVM Memory Usage
If the new environment has a JVM with a limited heap size then the files will have to be refactored. If we try to incorporate lots of content on a JSP page, it will have JVM memory problems. We all know that the JSP gets compiled into a servlet as a single method. If there are more tags, then the servlet method will be too big for the JVM to understand. In that case, the user will see an error saying, "Illegal target of jump or branch." It means that the JSP has exceeded the size and has to refactor them.

One solution is to increase the JVM's heap size to a higher value if more memory is required to run the files. Increasing the heap size can reduce delay and add stability. So, on the JVM options line in the binTogether.bat file, change -Xms64m to -Xms256m (or higher).

Another solution is to break a big page into many smaller pages and bring them together at runtime using include. Using <%@include> won't work because that's a compile-time include.

Still another approach is to look for places to save the tags. For example, the tag <html:option>, which was extended to let the text display. You can replace this:


<Html:option ... ><bean:message key="foo"/></html:option>

with this:


<html:option ... key="foo"/>

The more cases of this type there are the better the situation. Besides the <html:option> tag, some other struts tags are shortcuts to including the text. You might also consider replacing <html:option> sequences with <html:options> if you can build an appropriate collection upfront.

One resolution is to have our own tags. Changing some frequently used tags by extending BodyTagSupport to extending Tag Support and marking them with <body content>empty</body content> in the .tld file significantly reduces generated code size. This may not always be the way out, but it helps.

Whenever the JSP is too big, one must set the variable com.sun.tools.javac.main.largebranch to true.

In that case, you have to use JRocket, which is bundled with WebLogic 8.1. It can handle memory better than the JDK.

Page Directive with Language Attribute
In some JSP code, the value for attribute language is specified multiple times. This worked in WebLogic 6.1 but in migrating code to WebLogic 8.1, we can specify the values only once or else it will throw an JSPException as required in the J2EE specification.

Java.net.SocketException: Too Many Open Files
Just after converting to WebLogic 8.1, the server is going to go down and send the following message. It may not be related to the migration, but it has to be resolved.


<Critical> <WebLogicServer> <BEA-000204>
<Failed to listen on port 7001, failure count: 1, failing for 0 seconds,
java.net.Socke tException: Too many open files>

An immediate step to take is to increase the rlim_fd_max to 8192 in /etc/system. But this can lead to the usage going up to 7000 and may not prove a solution.

The best thing to do is fine-tune the TCP parameters on the operating system.

The error is Runtime Exception trying to execute a procedure using Sybase Pool in WLS 8.1 SP3. This error occurrs when we use WebLogic 8.1 SP3. BEA recognized this issue and it is now fixed in the WebLogic 8.1SP4 (CR196372). For those who would like to use 8.1SP3, BEA is providing a patch by means of a JAR file.

a) Page directive with language attribute
In some JSP code in some files the value for the attribute language is specified multiple times. This worked in WebLogic 6.1 but in migrating to WebLogic 8.1, we have to be sure to specify the values only once or else it will throw an JSPException in compliance with the J2EE specification.
b) Deploying the application in Staging Mode
WebLogic 8.1 lets applications be deployed in multiple modes depending on the situation. In deploying on a single server the domain always use the no_stage mode pattern.
c) Defining context root
Ours is a standalone application, the snippet below should be added to the web.xml.



In all applications, code compliance with J2EE specification is mandatory regardless of the application server guidelines.


  • www.serverwatch.com/tutorials/article.php/10825_3418341_2
  • www.bea.com/framework.jsp?CNT=wpabst00014.htm&FP=/content/newsevents/white_papers
  • http://e-docs.bea.com/wls/docs81/upgrade/quickupgrade.html
  • http://developer.bea.com/products/wlserver81/articles/JSP_reloaded.jsp
  • http://support.bea.com/support_news/product_troubleshooting/Too_Many_Open_Files_Pattern.html
  • http://e-docs.bea.com/wls/docs81/notes/resolved_sp04.html
  • http://e-docs.bea.com/wls/docs81/deployment/overview.html
  • http://e-docs.bea.com/wls/docs81/webapp/web_xml.html#1054754
  • More Stories By GVB Subrahmanyam

    GVB Subrahmanyam an Application Developer, Lead, Project Manager, Development Manager and Delivery Manager in a wide variety of business applications as part of an IT service provider. He focuses on Development, Delivery and Sustenance of IT Applications in Supply Chain/Insurance/Banking/Finance. Albeit most of his projects are Java-based assignments, he is technology agnostic.

    In his current role, Subrahmanyam is working as a solution provider for Commercial Healthcare, Insurance, banking and Financial systems with Mahindra Satyam. He is also TOGAF certified Enterprise Architect and IBM certified Ratioanal Software Architect.

    GVB Subrahmanyam has an M.Tech. and Ph.D. from IIT Kharagpur in the area of Chemical Technology, India and MS in Software Systems from BITS Pilani. He is also a PMI certified PMP. He attended one year of the Executive Program in Business Management(EPBM) from IIM Calcutta.

    Comments (0)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

    @ThingsExpo Stories
    To Really Work for Enterprises, MultiCloud Adoption Requires Far Better and Inclusive Cloud Monitoring and Cost Management … But How? Overwhelmingly, even as enterprises have adopted cloud computing and are expanding to multi-cloud computing, IT leaders remain concerned about how to monitor, manage and control costs across hybrid and multi-cloud deployments. It’s clear that traditional IT monitoring and management approaches, designed after all for on-premises data centers, are falling short in ...
    Organizations planning enterprise data center consolidation and modernization projects are faced with a challenging, costly reality. Requirements to deploy modern, cloud-native applications simultaneously with traditional client/server applications are almost impossible to achieve with hardware-centric enterprise infrastructure. Compute and network infrastructure are fast moving down a software-defined path, but storage has been a laggard. Until now.
    DXWorldEXPO LLC announced today that the upcoming DXWorldEXPO | CloudEXPO New York event will feature 10 companies from Poland to participate at the "Poland Digital Transformation Pavilion" on November 12-13, 2018.
    Digital Transformation is much more than a buzzword. The radical shift to digital mechanisms for almost every process is evident across all industries and verticals. This is often especially true in financial services, where the legacy environment is many times unable to keep up with the rapidly shifting demands of the consumer. The constant pressure to provide complete, omnichannel delivery of customer-facing solutions to meet both regulatory and customer demands is putting enormous pressure on...
    The best way to leverage your CloudEXPO | DXWorldEXPO presence as a sponsor and exhibitor is to plan your news announcements around our events. The press covering CloudEXPO | DXWorldEXPO will have access to these releases and will amplify your news announcements. More than two dozen Cloud companies either set deals at our shows or have announced their mergers and acquisitions at CloudEXPO. Product announcements during our show provide your company with the most reach through our targeted audienc...
    In an era of historic innovation fueled by unprecedented access to data and technology, the low cost and risk of entering new markets has leveled the playing field for business. Today, any ambitious innovator can easily introduce a new application or product that can reinvent business models and transform the client experience. In their Day 2 Keynote at 19th Cloud Expo, Mercer Rowe, IBM Vice President of Strategic Alliances, and Raejeanne Skillern, Intel Vice President of Data Center Group and ...
    More and more brands have jumped on the IoT bandwagon. We have an excess of wearables – activity trackers, smartwatches, smart glasses and sneakers, and more that track seemingly endless datapoints. However, most consumers have no idea what “IoT” means. Creating more wearables that track data shouldn't be the aim of brands; delivering meaningful, tangible relevance to their users should be. We're in a period in which the IoT pendulum is still swinging. Initially, it swung toward "smart for smart...
    DXWorldEXPO LLC announced today that All in Mobile, a mobile app development company from Poland, will exhibit at the 22nd International CloudEXPO | DXWorldEXPO. All In Mobile is a mobile app development company from Poland. Since 2014, they maintain passion for developing mobile applications for enterprises and startups worldwide.
    @DevOpsSummit at Cloud Expo, taking place November 12-13 in New York City, NY, is co-located with 22nd international CloudEXPO | first international DXWorldEXPO and will feature technical sessions from a rock star conference faculty and the leading industry players in the world.
    In his keynote at 19th Cloud Expo, Sheng Liang, co-founder and CEO of Rancher Labs, discussed the technological advances and new business opportunities created by the rapid adoption of containers. With the success of Amazon Web Services (AWS) and various open source technologies used to build private clouds, cloud computing has become an essential component of IT strategy. However, users continue to face challenges in implementing clouds, as older technologies evolve and newer ones like Docker c...
    DXWorldEXPO LLC announced today that ICC-USA, a computer systems integrator and server manufacturing company focused on developing products and product appliances, will exhibit at the 22nd International CloudEXPO | DXWorldEXPO. DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City. ICC is a computer systems integrator and server manufacturing company focused on developing products and product appliances to meet a wide range of ...
    Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
    We are seeing a major migration of enterprises applications to the cloud. As cloud and business use of real time applications accelerate, legacy networks are no longer able to architecturally support cloud adoption and deliver the performance and security required by highly distributed enterprises. These outdated solutions have become more costly and complicated to implement, install, manage, and maintain.SD-WAN offers unlimited capabilities for accessing the benefits of the cloud and Internet. ...
    Headquartered in Plainsboro, NJ, Synametrics Technologies has provided IT professionals and computer systems developers since 1997. Based on the success of their initial product offerings (WinSQL and DeltaCopy), the company continues to create and hone innovative products that help its customers get more from their computer applications, databases and infrastructure. To date, over one million users around the world have chosen Synametrics solutions to help power their accelerated business or per...
    Founded in 2000, Chetu Inc. is a global provider of customized software development solutions and IT staff augmentation services for software technology providers. By providing clients with unparalleled niche technology expertise and industry experience, Chetu has become the premiere long-term, back-end software development partner for start-ups, SMBs, and Fortune 500 companies. Chetu is headquartered in Plantation, Florida, with thirteen offices throughout the U.S. and abroad.
    Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
    Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: Driving Business Strategies with Data Science," is responsible for setting the strategy and defining the Big Data service offerings and capabilities for EMC Global Services Big Data Practice. As the CTO for the Big Data Practice, he is responsible for working with organizations to help them identify where and how to start their big data journeys. He's written several white papers, is an avid blogge...
    Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: Driving Business Strategies with Data Science," is responsible for setting the strategy and defining the Big Data service offerings and capabilities for EMC Global Services Big Data Practice. As the CTO for the Big Data Practice, he is responsible for working with organizations to help them identify where and how to start their big data journeys. He's written several white papers, is an avid blogge...
    Charles Araujo is an industry analyst, internationally recognized authority on the Digital Enterprise and author of The Quantum Age of IT: Why Everything You Know About IT is About to Change. As Principal Analyst with Intellyx, he writes, speaks and advises organizations on how to navigate through this time of disruption. He is also the founder of The Institute for Digital Transformation and a sought after keynote speaker. He has been a regular contributor to both InformationWeek and CIO Insight...
    "IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...