You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by homer84 <er...@hotmail.com> on 2009/07/28 14:24:06 UTC
webservice with cxf, spring, hibernate: Application has thrown
exception
Hi everybody!
I'm trying to develop a webservice to extract a list of countries from a
database. as for now, the concerned service return a string with all the
countries it finds in the db.
Everything is working fine (ado, ado hibernate implementation, service and
service implementation)... I know it works because I wrote a simple App
class to test it and I get the string.
The problem is with the webservice: I've been trying it with soapUI3.0 and I
only get this error (without much details):
org.apache.cxf.phase.PhaseInterceptorChain doIntercept INFO: Application has
thrown exception, unwinding now org/hibernate/Session
I read a lot on the web and I think it is caused by some multidependent
jaxws-api. Is that correct?
if yes, below you see my pom.xml file... can you tell me how to edit it to
make everything work?
if not, what could it be?
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ch.orange.rps_ws</groupId>
<artifactId>rps_ws</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>RPS WS</name>
<dependencies>
<!-- load cglib without dependencies -->
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>2.1_3</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>2.1.4</version>
<exclusions>
<!-- exclude spring because it's 2.0 and will use 2.5.6
(later) -->
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
<!-- exclude cglib because creates conflicts with cxf -->
<exclusion>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>2.1.4</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</exclusion>
<!-- exclude cglib because creates conflicts with cxf -->
<exclusion>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- jaxws-api 2.0 because of incompatibility with web service -->
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.1</version>
</dependency>
<!-- hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.4.ga</version>
<scope>test</scope>
<exclusions>
<!-- exclude cglib because creates conflicts with cxf -->
<exclusion>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- database / mysql temp -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<projectNameTemplate>[artifactId]-[version]</projectNameTemplate>
<wtpmanifest>true</wtpmanifest>
<wtpapplicationxml>true</wtpapplicationxml>
<wtpversion>2.0</wtpversion>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.2</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
</project>
cheers
Homer84
--
View this message in context: http://www.nabble.com/webservice-with-cxf%2C-spring%2C-hibernate%3A-Application-has-thrown-exception-tp24698026p24698026.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: webservice with cxf, spring, hibernate: Application has thrown
exception
Posted by homer84 <er...@hotmail.com>.
Hi Andrew!
thanks for answering. I will digg deeper and see what can I find in the
logs.
about the multiple times posting.. sorry for that... I thought it wasn't
working and clicked 2-3 times!
cheers
homer
Andrew Clegg-2 wrote:
>
> 2009/7/28 homer84 <er...@hotmail.com>:
>
>> The problem is with the webservice: I've been trying it with soapUI3.0
>> and I
>> only get this error (without much details):
>>
>> org.apache.cxf.phase.PhaseInterceptorChain doIntercept INFO: Application
>> has
>> thrown exception, unwinding now org/hibernate/Session
>
> Is this the whole text of the exception? It looks like it's been
> truncated somewhere.
>
> Check the server logs (e.g. catalina.out or catalina.*.log if you're
> using Tomcat) to see if you can find the error in there -- it should
> have the full text plus a stacktrace. There's no way to tell what's
> wrong from pom.xml, that's just Maven project configuration stuff.
>
> BTW you posted the exact same message 3 times so far...
>
> Andrew.
>
> --
> :: http://biotext.org.uk/ ::
>
>
--
View this message in context: http://www.nabble.com/webservice-with-cxf%2C-spring%2C-hibernate%3A-Application-has-thrown-exception-tp24698026p24724529.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: webservice with cxf, spring, hibernate: Application has thrown
exception
Posted by Andrew Clegg <an...@nervechannel.com>.
2009/7/28 homer84 <er...@hotmail.com>:
> The problem is with the webservice: I've been trying it with soapUI3.0 and I
> only get this error (without much details):
>
> org.apache.cxf.phase.PhaseInterceptorChain doIntercept INFO: Application has
> thrown exception, unwinding now org/hibernate/Session
Is this the whole text of the exception? It looks like it's been
truncated somewhere.
Check the server logs (e.g. catalina.out or catalina.*.log if you're
using Tomcat) to see if you can find the error in there -- it should
have the full text plus a stacktrace. There's no way to tell what's
wrong from pom.xml, that's just Maven project configuration stuff.
BTW you posted the exact same message 3 times so far...
Andrew.
--
:: http://biotext.org.uk/ ::