All,
I solve the problem by not using Spring 2.X version. I go back to Spring 1.x
version and everything works fine.
Thanks.
ndthuy wrote:
>
> Hi All,
>
> I am using Spring and Hibernate with Axis2. I have the problem with
> loading the applicationContext.xml. Does anyone has similar problems
; > irrespective of the service scope this method will be
>>> >> >> >
>>> >> >> > * called
>>> >> >> >
>>> >> >> > * @param ctxIgnore ctxIgnore
>>> >> >> >
>>> >> >> > * @param ignore ignore
>>> >> >> >
>>> >> >> > */
>>> >
Original Message -
From: "ndthuy" <[EMAIL PROTECTED]>
To:
Sent: Monday, December 03, 2007 9:59 AM
Subject: Re: Problem with Using Spring and Hibernate with Axis2
>
> This is the latest update:
> I am able to deploy but when I run I receive the following errors:
>
t; /**
>> >> >> >
>> >> >> > * this will be called during the deployement time of the
>> >> service.
>> >> >> > irrespective of the service scope this method
>> >> >> >
>> >> >> > * will be called
>> >> >> >
>> >> >> > * @param ignore ignore
>> >> >> >
>> >> >> > * @param
; // By Default Spring uses
> >> >> > Thread.currentThread().getContextClassLoader() to load
> >> >> >
> >> >> > // classes. When in the context of a Axis2 Service, we want
> >> to
> >> >> > use the Service ClassLoader
> >> >> >
> >> >> > // instead of the context (or in this case webapp)
> >> ClassLoader.
> >> >> > Therefore, we ne
ClassLoader equal to the Service
>> ClassLoader
>> >> > while we are loading the spring
>> >> >
>> >> > // context files. Once the spring context is loaded, we set
>> the
>> >> > context ClassLoader back to
>> >> >
>> >> > // what is was before.
>> >> >
>> >> > ClassLoader contextCl =
>>
extParam, ClassLoader cl) {
>
> StringTokenizer tokenizer = new
> StringTokenizer(springContextParam, ",");
>
> String[] urls = new String[tokenizer.countTokens()];
>
> int i = 0;
>
>
>
> if (logger.isDebugEnabled()) {
>
> logger.debug("Class
ll;
} else {
urls[i] = url.toString();
}
i++;
}
return urls;
}
}
________
From: Anthony Bull [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2007 7:21 PM
To: axis-user@ws.apache.org
Subject: Re: Problem with Using Spring
>
>
> springAdminRetrieveUserService
>
> true
> true
> mep="http://www.w3.org/ns/wsdl/in-out";>
> urn:retrie
some JSPs that call my POJO services as well. That is when I
>> decided to move all of my services into the war file. After a few bumps
>> in the road, which Robert was able to help me through, everything was up
>> and running.
>>
>>
>> -Original Messag
to:[EMAIL PROTECTED]
> Sent: Fri 11/30/2007 12:00 PM
> To: axis-user@ws.apache.org
> Subject: Re: Problem with Using Spring and Hibernate with Axis2
>
> The non-AAR approach is much simpler - you don't need to mess around
> with the TCCL for that and its the recommended approach
Message -
From: "ndthuy" <[EMAIL PROTECTED]>
To:
Sent: Friday, November 30, 2007 3:46 PM
Subject: Re: Problem with Using Spring and Hibernate with Axis2
>
> Hello,
>
> I just tried that approach and it still gave me the error of
appCtx = new
> >> > ClassPathXmlApplicationContext(springContextFiles, false);
> >> >
> >> >
> >> >
> >> > // save the spring context in a static class
> >> >
> >> > Axis2SpringContextHold
lder.setContext(appCtx);
>> >
>> >
>> >
>> > appCtx.setClassLoader(classLoader);
>> >
>> > appCtx.refresh();
>> >
>> >
>> >
>> > // set the context ClassLoader back to the webapp ClassLoader
>> >
>> > Thread.curren
/**
> >
> > * getSpringContextFileNames
> >
> > * @param springContextParam springContextParam
> >
> > * @param cl cl
> >
> > * @return String[] spring context file names
> >
> > */
> >
> > private String[] getSpringContextFileNames(String
> > springContextParam, ClassLoader
cl);
>
> logger.debug("Token count = " + tokenizer.countTokens());
>
> logger.debug("Context files = " + springContextParam);
>
> }
>
>
>
> while ((tokenizer.hasMoreTokens())) {
>
> String contextFile = ((String)
> tokenize
start with a working Spring axis2 webservice sample
http://ws.apache.org/axis2/1_3/spring.html
and iterate to your ultimate goal
M--
- Original Message -
From: "robert lazarski" <[EMAIL PROTECTED]>
To:
Sent: Thursday, November 29, 2007 1:32 PM
Subject: Re: Problem with
You will find the most persistance frameworks have real problems when
combined with Spring inside an AAR. The Spring inside the AAR approach
on the Axis2 website does not work correctly when using persistance
frameworks.
iBATIS and JPA also have similar issues where the only way around it is
t
All,
When I am not using axis2, I don't have any problem with loading
applicationContext.xml
iksrazal wrote:
>
> Remove 'parameter name="ServiceClass"' entries - they should be there
> when using spring beans in your service.xml .
>
> Beyond that, looks like you have a spring issue and not an
Meant to say 'they should NOT be there
when using spring beans in your service.xml' .
Robert
On Nov 29, 2007 1:30 PM, robert lazarski <[EMAIL PROTECTED]> wrote:
> Remove 'parameter name="ServiceClass"' entries - they should be there
> when using spring beans in your service.xml .
>
> Beyond that,
Remove 'parameter name="ServiceClass"' entries - they should be there
when using spring beans in your service.xml .
Beyond that, looks like you have a spring issue and not an axis2 issue
- you seem to have problems with this area:
> class="com.cvg.ap.service.privateservic
21 matches
Mail list logo