After installing the Tridion Odata webservice opened the odata.svc and was greeted by this exception:
Exception Details:
Java.Lang.Throwable: Could not initialize class com.tridion.webservices.odata.input.handler.ODataWebserviceHandler
Some Java classes or interfaces could not be found or loaded
The most typical reasons for this problem are:
- you forgot to configure a classpath
- a jarfile, zipfile, or directory is missing from your classpath
- you have a typo in one of your classpath entries
- a jarfile required by one of your classes is missing from your classpath
- a jarfile on your classpath is out-of-date and does not contain some new classes
com.tridion.web.jsp.JSPProcessor
com.tridion.web.jsp.tag.DynamicComponentLinkHandler
com.tridion.web.jsp.tag.IncrementKeyHandler
com.tridion.webservices.odata.input.handler.ODataWebserviceHandler
com.tridion.web.jsp.ResponseWrapper
com.tridion.web.jsp.tag.ConditionsHandler
com.tridion.web.jsp.tag.ComponentLinkHandler
com.tridion.webservices.odata.ODataContextListener
com.tridion.web.jsp.tag.TargetGroupHandler
com.tridion.web.jsp.tag.BinaryLinkHandler
com.tridion.webservices.odata.ODataPublicationMappingFilter
com.tridion.web.jsp.tag.ComponentPresentationHandler
com.tridion.ambientdata.web.AmbientDataServletFilter
com.tridion.webservices.security.authentication.OAuth2AccessTokenHandler
com.tridion.web.jsp.JSPXSLTProcessor
com.tridion.web.jsp.tag.ConditionHandler
com.tridion.web.jsp.tag.PageLinkHandler
com.tridion.web.jsp.tag.TaxonomyHandler
com.tridion.web.jsp.tag.LinkBaseHandler
The Windows event log provided some additional information:
java.lang.NoClassDefFoundError: Could not initialize class com.tridion.webservices.odata.input.handler.ODataWebserviceHandler 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.JavaField.init() at Codemesh.JuggerNET.JavaField.get_FieldPtr() at Codemesh.JuggerNET.JavaField.get_staticobjectValue() at Com.Tridion.Webservices.Odata.Input.Handler.ODataWebserviceHandler.get_ODATA_SERVICE()
Thread information: Thread ID: 9 Thread account name: IIS APPPOOL\ContentDeliveryService Is impersonating: False
Stack trace: at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
Installation steps that i used:
- http://blog.building-blocks.com/technical-tips/installing-the-sdl-tridion-2011-sp1-net-content-delivery-service
- I used the Microsoft JDBC Driver 4.0 for SQL Server initially.
- I tried using the Microsoft SQL Server JDBC Driver 3.0 instead of 4.0. Still got the same exception.
- I tried not having any JDBC jar in the library folder. Still got the same exception.
- I tried Google, but didn't find anything directly related to my error.
- I tried rebooting the machine and resetting IIS. Still got the same exception.
Details on my machine:
- Operating system: Windows 2008R2
- Tridion content manager: Hotfix Rollup SDL Tridion 2011 SP1 - 2 (6.1.0.998)
- Content delivery as Windows Service (TRIDION_HOME: C:\Program Files (x86)\Tridion).
- Tridion broker: SDL Tridion 2011 SP1 (6.1.0.0)
- Java version: Java 7 JDK (JAVA HOME: C:\Program Files\Java\jdk1.7.0_65)
Update after the first reply
My machine runs a 64 bit operating system. I have installed the complete webservice from the Tridion 2011 SP1 package Tridion 2011 SP1\Content Delivery\roles\webservice\dotNet\x86_64\webservice.zip
. This package should contain the proper jar files. I installed JDK 1.6.0.34 as you suggested and changed the JAVA_HOME accordingly. Unfortunately this did not resolve the issue.
After that I completely uninstalled the JDK 7, so I only had the supported version running. This did not help either.
After that I tried applying the latest files from the Tridion 2011 SP1 HR2 to webservice folder. The jar files from Tridion 2011 SP1 HR2\Content Delivery\lib\
and the dll files from Tridion 2011 SP1 HR2\Content Delivery\dotNet\x86_64
. This also had no effect.
Second update after more input
After all the troubleshooting yesterday I switched to a cleaner copy of the machine. Is has the same operating system and Tridion installation, but only has Java 1.6 update 26 installed, a version that is supported. I installed the odata service again according to the tutorial I referenced earlier. Still having the exact same exception.
The output of the java -version command: Java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
Also checked if i currently use the right jar files. The installation package Tridion 2011 SP1\Content Delivery\roles\webservice\dotNet\x86_64\webservice.zip contains the exact jar files required according to SDL Live Content. That does not seem to be the problem.
Any help would be greatly appreciated of course, and i am happy to provide additional details if required.