• 1 reply
  • Latest Post - ‏2012-04-17T10:27:43Z by SystemAdmin
15 Posts

Pinned topic Problem getting PureQueryReader pattern to work in Modern Batch

‏2011-08-23T07:44:26Z |

I keep getting classloader problems (NoClassDefFound) while using the purequery reader/writer pattern in my applicatiojn.
I am using RAD 8.0.2 and WAS included in the RAD package ) with the feature pack for modern batch installed.

My purequery library jar (pdq.jar) is included in the classpath for the jdbc driver ( for db2 9.7 in windows ) defined in the WAS server.
So, the BDSPureQueryReader(loaded by the WAS bootstrap loader) is trying to get the pureQuery DataFactory class( loaded by the isolated
shared lib loader, that is above the application loader and below the WAS bootstrap loader in the classloader hierarchy chain ).
I have tried to move my pdq.jar to the same WAS lib directory, where the batfepapi.jar( modern batch appi classes ) is. Still the same problem.

But my own version of the pureQuery reader/writer pattern( which i wrote about 2 years ago, since CG did not have the pattern then )
works just fine.

Has this IBM pattern been tested with some pureQuery batch app.? If so, please shed some light on how should I configure to get my application working.

Please feel free to ask for any details that you may need for further investigation.
Any assistance will be greatly appreciated.
Thanks in advance.

Updated on 2012-04-17T10:27:43Z at 2012-04-17T10:27:43Z by SystemAdmin
  • SystemAdmin
    15 Posts

    Re: Problem getting PureQueryReader pattern to work in Modern Batch


    I hit on this problem again recently with RAD 8.0.4 ( which comes with the Modern Batch feature pack and
    Compute Grid plugin for WAS 7 ) also.
    So, my colleague and I started to investigate what was really causing this issue and this is what we found and fixed it :

    The Compute Grid API code resides in both, the ( in C:\Program Files (x86)\IBM\SDP\runtimes\base_v7\feature_packs\BATCH\plugins in my installation ) and in the batfepapi.jar ( in C:\Program Files (x86)\IBM\SDP\runtimes\base_v7\lib in my installation ). However, the classes from are loaded by the default OSGI classloader org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader, which happens to be the parent classloader of WAS extension classloader
    The pureQuery api and runtime jar (pdq.jar ) is loaded by ( in our case ) the WAS extension classloader (
    So, at runtime, because our application uses the PureQueryReaderPattern, this and its implementation class BDSPureQueryReader are loaded by
    the OSGi default classloader. The class BDSPureQueryReader uses class, which is in the lower child
    classloader classpath (WAS extension classloader) and hence the ClassDefNotFoundException.
    Temporary Solution :
    We just knocked off the pureQuery related pattern interfaces and classes from the
    So, now the classes are found in batfepapi.jar ( loaded by WAS Extension classloader, the same loader that also would load the pureQuery
    api/runtime classes from pdq.jar ).

    I am writing here so that others would also be benefitted.
    Having said this, I would like to say that we are quite disappointed with IBM for not responding to this important issue in this forum.
    Especially given the fact that the technology are and related products are being fervently pushed into the market and seems to be vital technology for IBM.

    I hope, in the future, IBM would respond much faster.