Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem creating query when using Hibernate and Axis2

 
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this all that you see in the exception? Also are you sure in your code, the exception being caught is not eaten?
 
Bai Shen
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Why fit in when you were born to stand out? - Seuss. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic