wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Problem creating query when using Hibernate and Axis2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Problem creating query when using Hibernate and Axis2" Watch "Problem creating query when using Hibernate and Axis2" New topic
Author

Problem creating query when using Hibernate and Axis2

Bai Shen
Ranch Hand

Joined: Sep 24, 2008
Posts: 323
I've created a web service using Axis2. I want to use Hibernate to connect to my database back end. However, it's not working correctly. I'm not sure what the exact problem is. I'm using Tomcat 6.0.18 with Axis2 1.4.1 running inside Eclipse 3.4. I'm using Hibernate 3.3.1 and talking to HSQLDB 1.8.0

I can create and insert an object into the database, but then when I run a query to retrieve it, I get an AxisFault.

Here's my Tomcat log.


This is the code that generates the error.


As you can see, as soon as I create the query, I get an AxisFault. But I don't know what the problem is.
[ October 28, 2008: Message edited by: Bai Shen ]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9937
    
159

Is this all that you see in the exception? Also are you sure in your code, the exception being caught is not eaten?


[My Blog] [JavaRanch Journal]
Bai Shen
Ranch Hand

Joined: Sep 24, 2008
Posts: 323
Originally posted by Jaikiran Pai:
Is this all that you see in the exception? Also are you sure in your code, the exception being caught is not eaten?


Yup. What I posted was my entire Tomcat log from startup to one invocation of the web service. As for the code, I'm not using any try/catch blocks, and the method doesn't have any throws clauses.

All the other errors I ran into while implementing this printed stack traces to the console, so I'm not sure why this one is different.
Bai Shen
Ranch Hand

Joined: Sep 24, 2008
Posts: 323
So after reading your message, I decided to put a try/catch block around my code. It caught an UndeclaredThrowableException caused by a CNF exception. What I don't get, however, is why it never showed up 'til I did a try/catch, and why Axis2 still sends back a 202 Accepted message.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem creating query when using Hibernate and Axis2
 
Similar Threads
log4j:WARN No appenders could be found for logger
java.lang.NoSuchMethodError:
No Class def found error
Tomcat errors while developing web services using Eclipse 3.5, Tomcat 6.0, Axis2 1.4
Conneting to database but unable to save object.