Friday Feb 15, 2013

Resolving conflicts with Classloaders - Example with Hibernate/Antlr

After migrating Hibernate applications to a more recent version of WebLogic Server from WLS 9.2.x, you might encounter query exceptions such as:

EXCEPTION STACK TRACE: org.hibernate.QueryException: aggregate function expected before ( in SELECT [select distinct c, (select count(*) from ...

The same query working properly under the old environment.  At first it might look like an invalid syntax in the query but the issue is really coming from a conflict between parsers clients.  The solution is to use prefer-application-packages in weblogic-application.xml (WebLogic Server-specific deployment descriptor extension for the application.xml) to define which package(s) should be loaded from the application and not from the system classloader, example:

<prefer-application-packages>

  <package-name>antlr.*</package-name>

</prefer-application-packages>

The suitable Antlr (Java-based compiler generator client) version should be made available in the application itself, inside WEB-INF/lib - this parser being used by Hibernate.  prefer-web-inf-classes must be set to true in weblogic.xml, the default value being false, for classes located in WEB-INF to be loaded in preference to the system classloader.  

WLS 10.3.x is shipped with antlr version 2.7.7 (built on Mon Jun 11 12:19:48 EDT 2007  ImplVersion: 2.7.7)

WLS 12c is shipped with antlr version 2.7.7.0 (built on Fri Nov 4 19:42:39 EDT 2011  ImplVersion: 2.7.7.0)

You can find all packages versions in %Home%/modules or simply by running java weblogic.utils.Versions

For aid in configuring filtering classloaders, see Using the Classloader Analysis Tool (CAT).

Tuesday Feb 12, 2013

5 Reasons to Upgrade to WebLogic Webcast: Your Questions Answered

Do you need to optimize your middleware performance and manageability? Are you looking to consolidate your application infrastructure to a modern shared-services or cloud infrastructure? To answer these questions and more we hosted a live webcast with Mike Lehmann, Senior Director of Product Management for Oracle WebLogic Server and Oracle iAS recently.


The live webcast was a major success thanks to all of you who attended and participated. It generated great enthusiasm and many questions most of which we answered during the live session. However, by popular demand, we have enclosed a link below to the all of the questions and answers from the webcast.

Q&A from 5 Reasons to Upgrade to Oracle WebLogic Server

It’s not too late

If you missed the live webcast, don’t worry. You can view it on demand at:

5 Reasons to Upgrade to Oracle WebLogic Server on demand

Listen to Mike discuss iAS to WebLogic upgrade paths, tools, and best practices for various data center configurations and highlight the benefits of upgrading to WebLogic and describes some of its rich capabilities including:

  • Lightweight, Modern Development Experience
  • High Density, High Performance Virtualization
  • Complete Visibility, Diagnosibility and Management of WebLogic and iAS


For more information, follow WebLogic on:
Twitter: @OracleWebLogic
LinkedIn: http://www.linkd.in/oracle_weblogic
Facebook: https://www.facebook.com/oracleweblogic
YouTube: www.youtube.com/oracleweblogic


Friday Feb 08, 2013

Deltek Highlights Smooth Upgrade to WebLogic, Plus Cool New Features

Listen to Dmitri Tyles, Senior Director of Development at Deltek -- a global provider of enterprise software and information solutions for project-oriented businesses -- discuss their reasons for upgrading to WebLogic 12c and their experience with the upgrade process. Deltek has about 14,000-plus customers and 1.8 million users Dmitri Tyles, Senior Director of Development at Deltek -- a global provider of enterprise software and information solutions for project-oriented businesses -- discuss their reasons for upgrading to WebLogic 12c and their experience with the upgrade process. Deltek has about 14,000-plus customers and 1.8 million users around the world in 80 countries. Needless to say the stakes are high. They were able to upgrade "Costpoint" with 1,500 applications to WebLogic 12c in about six weeks. They did run into a couple defects along the way which were reported to Oracle and fixes received pretty quickly. The rest of the upgrade was pretty smooth, Dmitri says. He goes on to talk about a particular feature which was really key for Deltek -- the support Oracle RAC. WebLogic always supported Oracle RAC, Dmitri claims, but the previous solution required a fair amount of manual maintenance from a WebLogic administrator. So for example, if a RAC administrator on a database side would add another node to the cluster, a WebLogic administrator would have to go in and manually update the same settings on WebLogic Server and add this node and register it. With the Active GridLink solution that Oracle has included in WebLogic, this is no longer necessary. So WebLogic is completely aware of all the changes happening to the RAC and, as such, all this ongoing maintenance is completely eliminated. 

Tuesday Feb 05, 2013

Troubleshooting Tools Part 2 - jstack

In my latest blog post I talked about VisualVM, a very effective monitoring and troubleshooting tool.  Many other easy-to-use and free tools can be used while working with Java SE.  First of all, and since there is no need to re-invent the wheel, you can access documentation of such tools for Windows at Quick Troubleshooting Tips on Windows for Java SE 6 and for Solaris and Linux at Troubleshooting Tools on Solaris OS and Linux for Java SE 6

These tools include jstack, jinfo, jconsole, jmap, jstat, jhat and a few others.

jstack can be use to dump the java threads.  While working with WebLogic Server, you can dump the java threads with various tools such as WLST.  jstack can do just that but differs from <ctrl>+<break> or kill -3 since it doesn't dump a heap summary along with the threads.  

In addition, jstack can print lock information with -l option and the list of synchronizers that may be exclusively owned by a thread.  Such information can be very useful while monitoring concurrent access by threads.

jstack comes as part of the JDK installed with WebLogic Server.  With instances of WLS running, you can open a new shell, execute the setDomain script and run jstack or any tool that's part of the JDK package. Thread dumps taken by jstack can be redirected to files, e.g. jstack <pid> > myTD.txt.

PIDs can be obtained on Solaris/Linux with the ps (report process status) command, e.g. ps -ef | grep java, and from the task managed on Windows.  In task manager you might need to go to View and Select Columns to add PID or process identifiers.

About

The official blog for Oracle WebLogic Server fans and followers!

Stay Connected

Search

Archives
« February 2013 »
SunMonTueWedThuFriSat
     
1
2
3
4
6
7
9
10
11
13
14
16
17
18
19
20
21
22
23
24
25
26
27
28
  
       
Today