3

We are running a .Net website based on SDL Tridion 2011 SP1. We are getting intermittent ClassNotFoundException. Below is the stacktrace from the exception.

com.tridion.broker.querying.Queryjava.lang.ClassNotFoundException: com.tridion.broker.querying.Query 
    at com.codemesh.classloader.ExtensibleClassLoader.findClass(Unknown Source) 
    at com.codemesh.classloader.ExtensibleClassLoader.loadClass(Unknown Source) 
    at com.codemesh.classloader.ExtensibleClassLoader.loadClass(Unknown Source) 
    at java.lang.Class.forName0(Native Method) 
    at java.lang.Class.forName(Unknown Source) 
    at com.codemesh.bootstrap.JarInputStreamBootstrapper.forName(Unknown Source) 
    at Codemesh.JuggerNET.NTypeValue.Throw(Int64 inst) 
    at Codemesh.JuggerNET.JavaClass.ThrowTypedException(Int64 inst) 
    at Codemesh.JuggerNET.JavaClass.init() 
    at Codemesh.JuggerNET.JavaClass.get_JObject() 
    at Codemesh.JuggerNET.JavaMethod.init() 
    at Codemesh.JuggerNET.JavaMethod.get_MethodPtr() 
    at Codemesh.JuggerNET.JavaMethod.get_Handle() 
    at Codemesh.JuggerNET.JavaMethod.CallObject(JavaProxy jpo) 
    at Com.Tridion.Broker.Querying.Query..ctor() 
    at Tridion.ContentDelivery.DynamicContent.Query.Query..ctor()

Once the application is down, we are able to bring it up only by manually restarting the AppPool. Also in IIS application structure, the application in which we are facing this issue is a sub-application inside our main web application thus there is a lib and conf inside root bin directory and another one inside the subapplication bin directory.

  • What do you know about the circumstances when the exception occurs? What investigations have you done so far? – Dominic Cronin Oct 28 '14 at 12:21
  • We have tried setting the application pool set to not recycle but even then the issue is not resolved.Need to confirm one thing - if there is an incorrect version of jar file (64 bit, 32 bit) will the issue be intermittent or will it be constant as we are facing it at an average of once per week. – rdhaundiyal Nov 8 '14 at 15:58
  • Once the application is down, we are able to bring it up only by resetting the IIS. Also in IIS application structure, the application in which we are facing this issue is a sub-application inside our main web application thus there is a lib and conf inside root bin directory and another one inside the subapplication bin directory. – rdhaundiyal Nov 8 '14 at 16:33
  • @Siva, Dominic : Guys have you any valuable comments to share with us that can lead to the possible fix of this issue. We are still in search of the exact cause of this issue. – Gulshan Thakur Nov 17 '14 at 1:41
6

Following Nuno's advice on this question, you may want to check that your website application pool is set to not recycle.

It may also be worth checking the version of Java that you are using. Only certain versions are supported and proven to work for SDL Tridion 2011.

You may want to check out the answers here (especially Pankaj's answer): What versions of Java are supported and proven to work for Tridion 2011 SP1 HR1?

UPDATE (10/11/2014):

It appears from your comment that you have the Application Recycle Regular Time Interval set to 0. This should, in fact, be de-selected all together:

enter image description here

The steps for configuring this can be found in the Installing the API Server Role as a .NET Web application section of the online documentation (login required):

  • ...
  • Select Recycling in the Edit Application Pool area on the right.
  • In the dialog that opens, deselect Regular time intervals,
  • then click Next and Finish to commit your change.
  • Restart IIS.
  • 1)After setting AppPool not to recycle the issue has replicated, below are Apppool setting changed Recycling sections -> Regular Time Interval = 0 Process Model section -> Idle time-out = 0 2)Is there any other change need to do for disabling AppPool recycle, Do I also need to change below properties to True, by default they are False at present. Recycling sections->Disable overlapped Recycle = False Recycling sections->Disable recycling for Configuration changes = False 3)Is there any circumstance where the system will over-ride the settings and force the apppool to recycle ? – Gulshan Thakur Nov 8 '14 at 23:38
  • @Gulshan I've updated my answer with more detail and a screenshot. I've never had to change the additional settings that you mention. Hopefully the screenshot will clarify things. – Jonathan Williams Nov 10 '14 at 8:09
  • Hi Jonathan, confirmed same settings done at our end. Issue has still not been fixed with this change. Any other comments on the root cause of the issue? – Gulshan Thakur Nov 17 '14 at 1:12
  • Hi Jonathan, There is one important observation we have when this issue replicates. The application instead of picking its own web.config reads the web.config of Main Application and display the custom error page configured for Main Application. Can you pls point point out why it do this? ..FYI.. ( In IIS application structure, the application in which we are facing this issue is a sub-application inside our main web application thus there is a lib and conf inside root bin directory and another one inside the subapplication bin directory.) – Gulshan Thakur Nov 17 '14 at 12:01
  • @Gulshan Are your main website and the application that you are using in different application pools (within ISS)? If so, then you may have to set the Fixed Intervals timeout on both of them. Even if they are in separate App Pools, some application settings are inherited from the main site's web.config file, unless you specify that they are overridden (using <remove/>: stackoverflow.com/questions/4144117 – Jonathan Williams Nov 17 '14 at 15:50
3

please check followings

  1. CD license is valid
  2. If your system is 32 bit, please use 32 bit JARs and DLLs in bin otherwise 64 bit.
  3. Configure logs to verbose, etc. mode for more details to find out any missing JAR.
  4. Try to find-out, is it happening for some particular functionality and JAR for that is available in your application.
  • @rdaundial did you check any memory leak or logs in Verbose mode? is SubApplication sharing same appPool? – Raj Kumar Nov 11 '14 at 18:56
  • Hi Raj, We have different appPool for Main application and SubApplication, Could you please share some inputs how to go for memory leak check – Gulshan Thakur Nov 17 '14 at 1:18
1

At Last we found the solution: There was version mismatch between the dlls placed in the lib of subproject. We placed the same version dlls as used in the root and it solves the issue.

0

Making the parent application pool set to not to recycle resolved the issue. Earlier the sub application inside the parent application was set not to recycle but the parent application was set to recycle. Hence whenever the parent app pool recycles, it was trying to recycle the sub application as well which was causing the issue. Answer by Jonathan can be marked as answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.