Typically when you get the org.hibernate.hql.ast.HqlToken ClassNotFoundException, you are installing Tridion Content Delivery on WebLogic (or, at least, that's when I encountered it all of the time).
The actual stack trace might look something like:
java.lang.IllegalArgumentException:
org.hibernate.QueryException: ClassNotFoundException:
org.hibernate.hql.ast.HqlToken
...
at
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:601)
at
org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
...
Solution: luckily, this is a known issue and is caused by a conflict in classes and class loaders of WebLogic. So, in order to fix it, you should remove stax-api.jar from your application's class-path (or WEB_INF/lib/).
Also, you might set your WEB_INF classes as preferred.
The solution is described in detail on the SDLLiveContent documentation portal under publication SDL Tridion 2011SP1 / Installing SDL Tridion / Installing the Content Delivery server / Installing server roles in Java/JSP / Installing a server role as a JSP Web application - universal procedure (deep link here). Access to documentation portal can be gained from www.sdltridionworld.com
Comments