aspose file tools
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply 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: 8142
    
  52

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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Problem creating query when using Hibernate and Axis2
 
Similar Threads
java.lang.NoSuchMethodError:
Conneting to database but unable to save object.
log4j:WARN No appenders could be found for logger
No Class def found error
Tomcat errors while developing web services using Eclipse 3.5, Tomcat 6.0, Axis2 1.4