ClassNotFoundException: org.hibernate.hql.ast.HqlToken


I create an AXIS2 web services. My AXIS2 is deployed within Tomcat 6 container. I use Hibernate 3.2 within my service to connect to MySQL 5 database. I get the below stack trace when I try to connect to the web service. The hibernate code just run fine if I run it in as console application. I have read about the changing the HQL parser to a classic one, it doesnt work for me and result in an error saying "Time out".


org.apache.axis2.AxisFault: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from where job_status='open']
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
at org.apache.axis2.description.OutInAxisOperationClient.send(
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
at org.apache.axis2.client.OperationClient.execute(
at Testing.main(
Who is Participating?
>>I load the hibernate object from the database and copy the value (HibernateObject.getX()) column by column to the complex type.

how do you copy, looks like it is not deep copy.

Note that the hibernate entities are subtype of the complext type you have defined, so the reference of hibernate entity always can be assigned to the supertype. Make sure you copied each and every atribute values, not just references!
Looks like the "MapringCareerStub.getVacancies" call returns the reference of hibernate entity!

1. You have to include the Hibernate libraries in the client
2. Do a conversion int the service implementation so that it returns reference of the entities defined in the WSDL!
mapringteamAuthor Commented:
Thanks for your comment,

MapringCareerStub.getVacancies dooesn't return hibernate reference. What it returns is a complex type entity defined in my WSDL. I load the hibernate object from the database and copy the value (HibernateObject.getX()) column by column to the complex type.

More comments are welcome.

Thanks in advance.
mapringteamAuthor Commented:
Thanks for your comment,

I think there is nothing related to copy by reference because it still show the same error even when I just issue the statement:

session.createQuery("from Job");

Thank u,
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.