You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Andrew McGhee <an...@health.qld.gov.au> on 2007/11/29 05:52:53 UTC

Using Spring and Hibernate with Axis2

Hi all,
 
I am writing a web service using Axis2 1.1 and have successfully
integrated Spring within the AAR. I am also using Hibernate, but at
the
moment can't get it to work inside the AAR - I have to explode the
AAR.
 
I have had a look at http://ws.apache.org/axis2/1_1_1/spring.html#263 
and have tried using 'classpath*:**/my.hbm.xml' and am getting
NoClassDefFoundError.
 
Having a look around this place, it seems that having Hibernate work
with Spring in an AAR is possible. Has anyone actually achieved this?
Are there any additional pointers/tips/tricks anyone could give to
assist?
 
Thanks in advance,
Andrew

*****************************************************************
This email, including any attachments sent with it, is
confidential and for the sole use of the intended recipient(s).
This confidentiality is not waived or lost, if you receive it and
you are not the intended recipient(s), or if it is transmitted/
received in error.

Any unauthorised use, alteration, disclosure, distribution or
review of this email is strictly prohibited.  The information
contained in this email, including any attachment sent with
it, may be subject to a statutory duty of confidentiality if it
relates to health service matters.

If you are not the intended recipient(s), or if you have
received this email in error, you are asked to immediately
notify the sender by telephone collect on Australia
+61 1800 198 175 or by return email.  You should also
delete this email, and any copies, from your computer
system network and destroy any hard copies produced.

If not an intended recipient of this email, you must not copy,
distribute or take any action(s) that relies on it; any form of
disclosure, modification, distribution and/or publication of this
email is also prohibited.

Although Queensland Health takes all reasonable steps to
ensure this email does not contain malicious software,
Queensland Health does not accept responsibility for the
consequences if any person's computer inadvertently suffers
any disruption to services, loss of information, harm or is
infected with a virus, other malicious computer programme or
code that may occur as a consequence of receiving this
email.

Unless stated otherwise, this email represents only the views
of the sender and not the views of the Queensland Government.
****************************************************************


RE: Using Spring and Hibernate with Axis2

Posted by "Tremblay, Yann" <ya...@cgi.com>.
In order to have axis2-spring and hibernate to work in our environment
we had to put all hibernate files in the axis2/WebContent/Web-Inf/lib
directory of axis2 war file. There is a problem with axis2 classloader
and Spring and it is documented at the bottom of the following link:

http://ws.apache.org/axis2/1_1/spring.html#263

look for Known issues running Spring inside the AAR

 

Yann Tremblay

System Architect

(Office:  (418) 623-5051 (2275)  

msn: yanntremblay@msn.com

 

From: Andrew McGhee [mailto:andrew_mcghee@health.qld.gov.au] 
Sent: November 28, 2007 11:53 PM
To: axis-user@ws.apache.org
Subject: Using Spring and Hibernate with Axis2

 

Hi all,
 
I am writing a web service using Axis2 1.1 and have successfully
integrated Spring within the AAR. I am also using Hibernate, but at the
moment can't get it to work inside the AAR - I have to explode the AAR.
 
I have had a look at http://ws.apache.org/axis2/1_1_1/spring.html#263 
and have tried using 'classpath*:**/my.hbm.xml' and am getting
NoClassDefFoundError.
 
Having a look around this place, it seems that having Hibernate work
with Spring in an AAR is possible. Has anyone actually achieved this?
Are there any additional pointers/tips/tricks anyone could give to
assist?
 
Thanks in advance,
Andrew 

*****************************************************************

This email, including any attachments sent with it, is

confidential and for the sole use of the intended recipient(s).

This confidentiality is not waived or lost, if you receive it and

you are not the intended recipient(s), or if it is transmitted/

received in error.

 

Any unauthorised use, alteration, disclosure, distribution or

review of this email is strictly prohibited. The information

contained in this email, including any attachment sent with

it, may be subject to a statutory duty of confidentiality if it

relates to health service matters.

 

If you are not the intended recipient(s), or if you have

received this email in error, you are asked to immediately

notify the sender by telephone collect on Australia

+61 1800 198 175 or by return email. You should also

delete this email, and any copies, from your computer

system network and destroy any hard copies produced.

 

If not an intended recipient of this email, you must not copy,

distribute or take any action(s) that relies on it; any form of

disclosure, modification, distribution and/or publication of this

email is also prohibited.

 

Although Queensland Health takes all reasonable steps to

ensure this email does not contain malicious software,

Queensland Health does not accept responsibility for the

consequences if any person's computer inadvertently suffers

any disruption to services, loss of information, harm or is

infected with a virus, other malicious computer programme or

code that may occur as a consequence of receiving this

email.

 

Unless stated otherwise, this email represents only the views

of the sender and not the views of the Queensland Government.

****************************************************************

 


Re: Using Spring and Hibernate with Axis2

Posted by Suran Jayathilaka <su...@wso2.com>.
Andrew McGhee wrote:
> Hi all,
>  
> I am writing a web service using Axis2 1.1 and have successfully
> integrated Spring within the AAR. I am also using Hibernate, but at the
> moment can't get it to work inside the AAR - I have to explode the AAR.
>  
> I have had a look at http://ws.apache.org/axis2/1_1_1/spring.html#263
> and have tried using 'classpath*:**/my.hbm.xml' and am getting
> NoClassDefFoundError.
>  
> Having a look around this place, it seems that having Hibernate work
> with Spring in an AAR is possible. Has anyone actually achieved this?
> Are there any additional pointers/tips/tricks anyone could give to
> assist?
>  
> Thanks in advance,
> Andrew
>
> *****************************************************************
>
> This email, including any attachments sent with it, is
>
> confidential and for the sole use of the intended recipient(s).
>
> This confidentiality is not waived or lost, if you receive it and
>
> you are not the intended recipient(s), or if it is transmitted/
>
> received in error.
>
>  
>
> Any unauthorised use, alteration, disclosure, distribution or
>
> review of this email is strictly prohibited. The information
>
> contained in this email, including any attachment sent with
>
> it, may be subject to a statutory duty of confidentiality if it
>
> relates to health service matters.
>
>  
>
> If you are not the intended recipient(s), or if you have
>
> received this email in error, you are asked to immediately
>
> notify the sender by telephone collect on Australia
>
> +61 1800 198 175 or by return email. You should also
>
> delete this email, and any copies, from your computer
>
> system network and destroy any hard copies produced.
>
>  
>
> If not an intended recipient of this email, you must not copy,
>
> distribute or take any action(s) that relies on it; any form of
>
> disclosure, modification, distribution and/or publication of this
>
> email is also prohibited.
>
>  
>
> Although Queensland Health takes all reasonable steps to
>
> ensure this email does not contain malicious software,
>
> Queensland Health does not accept responsibility for the
>
> consequences if any person's computer inadvertently suffers
>
> any disruption to services, loss of information, harm or is
>
> infected with a virus, other malicious computer programme or
>
> code that may occur as a consequence of receiving this
>
> email.
>
>  
>
> Unless stated otherwise, this email represents only the views
>
> of the sender and not the views of the Queensland Government.
>
> ****************************************************************
>
>  
>
Hi Andrew,

You should switch to the latest stable release of Axis2, i.e. Axis2-1.3
, since it contains many bug fixes and improvements over Axis2-1.1.

Cheers.
Suran

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Using Spring and Hibernate with Axis2

Posted by Martin Gainty <mg...@hotmail.com>.
Good Morning Andrew-

Difficult to say without looking at all the columns of all the tables and
all the relationships (child/parent) of all the databases you are requesting
hibernate and spring to create
As this effort may possibly take considerable amount of time to
create/initialise all the necessary classes
you *may* want to look into using CruiseControl as better suited for this
task
http://cruisecontrol.sourceforge.net/

(Then use Axis webservice to query the information afterwards)

HTH
M--
----- Original Message -----
From: "robert lazarski" <ro...@gmail.com>
To: <ax...@ws.apache.org>
Sent: Thursday, November 29, 2007 7:44 AM
Subject: Re: Using Spring and Hibernate with Axis2


> At least look at the updated docs for 1.3 , as they explain the
> 'hibernate inside the aar' a bit better and this general advice would
> apply to axis2 1.1 (an upgrade is recommended if possible).
>
> http://ws.apache.org/axis2/1_3/spring.html#263
>
> Look here for some tips:
>
>
http://www.springframework.org/docs/api/org/springframework/orm/hibernate/Lo
calSessionFactoryBean.html#setMappingDirectoryLocations(org.springframework.
core.io.Resource[])
>
> Then search the archives for that type of init. Also, I'm planning
> some docs that specifically cover hibernate and axis2 for the next
> release.
>
> HTH,
> Robert
>
> On Nov 28, 2007 11:52 PM, Andrew McGhee <an...@health.qld.gov.au>
wrote:
> >
> > Hi all,
> >
> > I am writing a web service using Axis2 1.1 and have successfully
> > integrated Spring within the AAR. I am also using Hibernate, but at the
> > moment can't get it to work inside the AAR - I have to explode the AAR.
> >
> > I have had a look at http://ws.apache.org/axis2/1_1_1/spring.html#263
> > and have tried using 'classpath*:**/my.hbm.xml' and am getting
> > NoClassDefFoundError.
> >
> > Having a look around this place, it seems that having Hibernate work
> > with Spring in an AAR is possible. Has anyone actually achieved this?
> > Are there any additional pointers/tips/tricks anyone could give to
> > assist?
> >
> > Thanks in advance,
> > Andrew
> >
> > *****************************************************************
> >
> > This email, including any attachments sent with it, is
> >
> > confidential and for the sole use of the intended recipient(s).
> >
> > This confidentiality is not waived or lost, if you receive it and
> >
> > you are not the intended recipient(s), or if it is transmitted/
> >
> > received in error.
> >
> >
> >
> >
> >
> > Any unauthorised use, alteration, disclosure, distribution or
> >
> > review of this email is strictly prohibited. The information
> >
> > contained in this email, including any attachment sent with
> >
> > it, may be subject to a statutory duty of confidentiality if it
> >
> > relates to health service matters.
> >
> >
> >
> >
> >
> > If you are not the intended recipient(s), or if you have
> >
> > received this email in error, you are asked to immediately
> >
> > notify the sender by telephone collect on Australia
> >
> > +61 1800 198 175 or by return email. You should also
> >
> > delete this email, and any copies, from your computer
> >
> > system network and destroy any hard copies produced.
> >
> >
> >
> >
> >
> > If not an intended recipient of this email, you must not copy,
> >
> > distribute or take any action(s) that relies on it; any form of
> >
> > disclosure, modification, distribution and/or publication of this
> >
> > email is also prohibited.
> >
> >
> >
> >
> >
> > Although Queensland Health takes all reasonable steps to
> >
> > ensure this email does not contain malicious software,
> >
> > Queensland Health does not accept responsibility for the
> >
> > consequences if any person's computer inadvertently suffers
> >
> > any disruption to services, loss of information, harm or is
> >
> > infected with a virus, other malicious computer programme or
> >
> > code that may occur as a consequence of receiving this
> >
> > email.
> >
> >
> >
> >
> >
> > Unless stated otherwise, this email represents only the views
> >
> > of the sender and not the views of the Queensland Government.
> >
> > ****************************************************************
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Using Spring and Hibernate with Axis2

Posted by robert lazarski <ro...@gmail.com>.
At least look at the updated docs for 1.3 , as they explain the
'hibernate inside the aar' a bit better and this general advice would
apply to axis2 1.1 (an upgrade is recommended if possible).

http://ws.apache.org/axis2/1_3/spring.html#263

Look here for some tips:

http://www.springframework.org/docs/api/org/springframework/orm/hibernate/LocalSessionFactoryBean.html#setMappingDirectoryLocations(org.springframework.core.io.Resource[])

Then search the archives for that type of init. Also, I'm planning
some docs that specifically cover hibernate and axis2 for the next
release.

HTH,
Robert

On Nov 28, 2007 11:52 PM, Andrew McGhee <an...@health.qld.gov.au> wrote:
>
> Hi all,
>
> I am writing a web service using Axis2 1.1 and have successfully
> integrated Spring within the AAR. I am also using Hibernate, but at the
> moment can't get it to work inside the AAR - I have to explode the AAR.
>
> I have had a look at http://ws.apache.org/axis2/1_1_1/spring.html#263
> and have tried using 'classpath*:**/my.hbm.xml' and am getting
> NoClassDefFoundError.
>
> Having a look around this place, it seems that having Hibernate work
> with Spring in an AAR is possible. Has anyone actually achieved this?
> Are there any additional pointers/tips/tricks anyone could give to
> assist?
>
> Thanks in advance,
> Andrew
>
> *****************************************************************
>
> This email, including any attachments sent with it, is
>
> confidential and for the sole use of the intended recipient(s).
>
> This confidentiality is not waived or lost, if you receive it and
>
> you are not the intended recipient(s), or if it is transmitted/
>
> received in error.
>
>
>
>
>
> Any unauthorised use, alteration, disclosure, distribution or
>
> review of this email is strictly prohibited. The information
>
> contained in this email, including any attachment sent with
>
> it, may be subject to a statutory duty of confidentiality if it
>
> relates to health service matters.
>
>
>
>
>
> If you are not the intended recipient(s), or if you have
>
> received this email in error, you are asked to immediately
>
> notify the sender by telephone collect on Australia
>
> +61 1800 198 175 or by return email. You should also
>
> delete this email, and any copies, from your computer
>
> system network and destroy any hard copies produced.
>
>
>
>
>
> If not an intended recipient of this email, you must not copy,
>
> distribute or take any action(s) that relies on it; any form of
>
> disclosure, modification, distribution and/or publication of this
>
> email is also prohibited.
>
>
>
>
>
> Although Queensland Health takes all reasonable steps to
>
> ensure this email does not contain malicious software,
>
> Queensland Health does not accept responsibility for the
>
> consequences if any person's computer inadvertently suffers
>
> any disruption to services, loss of information, harm or is
>
> infected with a virus, other malicious computer programme or
>
> code that may occur as a consequence of receiving this
>
> email.
>
>
>
>
>
> Unless stated otherwise, this email represents only the views
>
> of the sender and not the views of the Queensland Government.
>
> ****************************************************************
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org